@enonic-types/lib-node 8.0.0-B4 → 8.0.0-B5

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.
Files changed (2) hide show
  1. package/node.d.ts +14 -12
  2. package/package.json +2 -2
package/node.d.ts CHANGED
@@ -99,16 +99,14 @@ export interface PushNodesResult {
99
99
  id: string;
100
100
  reason: string;
101
101
  }[];
102
- deleted: string[];
103
102
  }
104
103
  export interface PatchNodeParams {
105
104
  key: string;
106
105
  editor: (node: Node) => PatchedNode;
107
- branches: string[];
106
+ branches?: string[];
108
107
  }
109
108
  export interface PatchNodeResult {
110
- nodeId: string;
111
- branchResult: {
109
+ branchResults: {
112
110
  branch: string;
113
111
  node: PatchedNode;
114
112
  }[];
@@ -138,7 +136,9 @@ export interface SortNodeParams {
138
136
  }
139
137
  export interface SortNodeResult<NodeData> {
140
138
  node: Node<NodeData>;
141
- reorderedNodes?: Node<NodeData>[];
139
+ reorderedNodes: {
140
+ node: Node<NodeData>;
141
+ }[];
142
142
  }
143
143
  export interface QueryNodeParams<AggregationInput extends Aggregations = never> {
144
144
  start?: number;
@@ -203,10 +203,12 @@ export interface ApplyPermissionsParams {
203
203
  branches?: string[];
204
204
  scope?: string;
205
205
  }
206
- export type ApplyPermissionsResult = Record<string, BranchResult[]>;
206
+ export type ApplyPermissionsResult = Record<string, {
207
+ branchResults: BranchResult[];
208
+ }>;
207
209
  export interface BranchResult {
208
210
  branch: string;
209
- node: Node;
211
+ permissions: AccessControlEntry[];
210
212
  }
211
213
  export type RefreshMode = 'SEARCH' | 'STORAGE' | 'ALL';
212
214
  export interface GetCommitParams {
@@ -310,7 +312,7 @@ export interface RepoConnection {
310
312
  push(params: PushNodeParams): PushNodesResult;
311
313
  diff(params: DiffBranchesParams): DiffBranchesResult;
312
314
  getBinary(params: GetBinaryParams): ByteSource;
313
- move(params: MoveNodeParams): boolean;
315
+ move<NodeData = Record<string, unknown>>(params: MoveNodeParams): Node<NodeData>;
314
316
  sort<NodeData = Record<string, unknown>>(params: SortNodeParams): SortNodeResult<NodeData>;
315
317
  query<AggregationInput extends Aggregations = never>(params: QueryNodeParams<AggregationInput>): NodeQueryResult<AggregationsToAggregationResults<AggregationInput>>;
316
318
  exists(key: string): boolean;
@@ -341,8 +343,8 @@ export interface ConnectParams {
341
343
  * @example-ref examples/node/connect.js
342
344
  *
343
345
  * @param {object} params JSON with the parameters.
344
- * @param {object} params.repoId repository id
345
- * @param {object} params.branch branch id
346
+ * @param {string} params.repoId repository id
347
+ * @param {string} params.branch branch id
346
348
  * @param {object} [params.user] User to execute the callback with. Default is the current user.
347
349
  * @param {string} params.user.login Login of the user.
348
350
  * @param {string} [params.user.idProvider] Id provider containing the user. By default, the system id provider is used.
@@ -360,8 +362,8 @@ export interface MultiRepoConnectParams {
360
362
  *
361
363
  * @param {object} params JSON with the parameters.
362
364
  * @param {object[]} params.sources array of sources to connect to
363
- * @param {object} params.sources.repoId repository id
364
- * @param {object} params.sources.branch branch id
365
+ * @param {string} params.sources.repoId repository id
366
+ * @param {string} params.sources.branch branch id
365
367
  * @param {string[]} [params.sources.principals] Principals to execute the callback with. Uses principals in context if not specified or empty.
366
368
  *
367
369
  * @returns {MultiRepoConnection} Returns a new multirepo-connection.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-node",
3
- "version": "8.0.0-B4",
3
+ "version": "8.0.0-B5",
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": "8.0.0-B4"
30
+ "@enonic-types/core": "8.0.0-B5"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"