revdev 0.118.0 → 0.120.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.
@@ -12,3 +12,11 @@ export interface LinkChildrenRequest {
12
12
  children: LinkChildOption[];
13
13
  }
14
14
  export declare type LinkRequest = LinkParentRequest | LinkChildrenRequest;
15
+ export interface ParsedLinkRequest extends LinkChildrenRequest {
16
+ linkIds: string[];
17
+ unlinkIds: string[];
18
+ }
19
+ export interface LinkObjectRequest {
20
+ id: string;
21
+ link: boolean;
22
+ }
@@ -1,4 +1,4 @@
1
- import { LinkChildrenRequest, LinkRequest } from "../common";
1
+ import { LinkRequest, ParsedLinkRequest } from "../common";
2
2
  export declare class LinkUtil {
3
- static parse(request: LinkRequest): LinkChildrenRequest;
3
+ static parse(request: LinkRequest): ParsedLinkRequest;
4
4
  }
package/lib/utils/link.js CHANGED
@@ -17,7 +17,7 @@ var LinkUtil = /** @class */ (function () {
17
17
  else if (request.children) {
18
18
  children = request.children;
19
19
  }
20
- return { parentId: parentId, children: children };
20
+ return { parentId: parentId, children: children, linkIds: children.filter(function (x) { return x.link; }).map(function (x) { return x.id; }), unlinkIds: children.filter(function (x) { return !x.link; }).map(function (x) { return x.id; }) };
21
21
  };
22
22
  return LinkUtil;
23
23
  }());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.118.0",
3
+ "version": "0.120.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",