law-common 1.2.6 → 1.2.8
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IApiEntity, IClientEntity } from "../../entities";
|
|
1
|
+
import { IApiEntity, IClientEntity, IClientEntityDependent } from "../../entities";
|
|
2
2
|
import { IUserApiEntity } from "./user.entity.api";
|
|
3
3
|
export type IClientApiEntity = IApiEntity<IClientEntity>;
|
|
4
4
|
export type IClientApiEntityArray = IClientApiEntity[];
|
|
5
|
-
export type
|
|
6
|
-
clients:
|
|
5
|
+
export type IClientEntityGet = {
|
|
6
|
+
clients: (IClientApiEntity & IClientEntityDependent)[];
|
|
7
7
|
users: {
|
|
8
8
|
[key: string]: IUserApiEntity;
|
|
9
9
|
};
|
|
@@ -15,11 +15,13 @@ export interface IClientEntity extends IAuditColumnEntity {
|
|
|
15
15
|
description?: string;
|
|
16
16
|
organizationId: number;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
export interface IClientEntityCreateDto extends Omit<IEntityCreateDto<IClientEntity>, IClientExclude> {
|
|
18
|
+
export interface IClientEntityDependent {
|
|
20
19
|
partnerIds: number[];
|
|
21
20
|
}
|
|
22
|
-
export
|
|
21
|
+
export type IClientExclude = 'organizationId';
|
|
22
|
+
export interface IClientEntityCreateDto extends Omit<IEntityCreateDto<IClientEntity>, IClientExclude>, IClientEntityDependent {
|
|
23
|
+
}
|
|
24
|
+
export interface IClientEntityUpdateDto extends Omit<IEntityUpdateDto<IClientEntity>, IClientExclude>, Partial<IClientEntityDependent> {
|
|
23
25
|
partnerIds?: number[];
|
|
24
26
|
}
|
|
25
27
|
export interface IClientEntityFilterDto extends IEntityFilterData<IClientEntity> {
|
|
@@ -4,6 +4,7 @@ exports.groupByFunction = groupByFunction;
|
|
|
4
4
|
exports.groupByOneToOneFunction = groupByOneToOneFunction;
|
|
5
5
|
exports.convertMapToObject = convertMapToObject;
|
|
6
6
|
exports.removeSamePropertyValues = removeSamePropertyValues;
|
|
7
|
+
exports.removeElementsFromArray = removeElementsFromArray;
|
|
7
8
|
function groupByFunction(list, keyGetter) {
|
|
8
9
|
const map = new Map();
|
|
9
10
|
list.forEach((item) => {
|
|
@@ -36,3 +37,6 @@ function removeSamePropertyValues(source, target) {
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
function removeElementsFromArray(source, target) {
|
|
41
|
+
return target.filter((element) => !source.includes(element));
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "law-common",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"clean": "rm -rf dist",
|
|
12
12
|
"build": "npm run clean && tsc",
|
|
13
13
|
"publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
|
|
14
|
-
"publish
|
|
14
|
+
"publish": "npm version patch && git push && npm run build && npm publish",
|
|
15
15
|
"publish:minor": "npm version minor && git push && npm run build && npm publish",
|
|
16
16
|
"link": "npm run build && npm link"
|
|
17
17
|
},
|