law-common 1.2.3 → 1.2.5
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.
|
@@ -4,5 +4,7 @@ export type IClientApiEntity = IApiEntity<IClientEntity>;
|
|
|
4
4
|
export type IClientApiEntityArray = IClientApiEntity[];
|
|
5
5
|
export type IGetClientsByFilter = {
|
|
6
6
|
clients: IClientApiEntityArray;
|
|
7
|
-
users:
|
|
7
|
+
users: {
|
|
8
|
+
[key: string]: IUserApiEntity;
|
|
9
|
+
};
|
|
8
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CountryEnum } from "../enums/country.entity.enum";
|
|
2
2
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
3
|
-
import { IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
|
|
3
|
+
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
4
4
|
export interface IClientEntity extends IAuditColumnEntity {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
@@ -15,9 +15,12 @@ export interface IClientEntity extends IAuditColumnEntity {
|
|
|
15
15
|
description?: string;
|
|
16
16
|
organizationId: number;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type IClientExclude = 'organizationId';
|
|
19
|
+
export interface IClientEntityCreateDto extends Omit<IEntityCreateDto<IClientEntity>, IClientExclude> {
|
|
19
20
|
partnerIds: number[];
|
|
20
|
-
|
|
21
|
+
}
|
|
22
|
+
export interface IClientEntityUpdateDto extends Omit<IEntityUpdateDto<IClientEntity>, IClientExclude> {
|
|
23
|
+
partnerIds?: number[];
|
|
21
24
|
}
|
|
22
25
|
export interface IClientEntityFilterDto extends IEntityFilterData<IClientEntity> {
|
|
23
26
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export declare function groupByFunction<T, K>(list: T[], keyGetter: (input: T) => K): Map<K, T[]>;
|
|
2
2
|
export declare function groupByOneToOneFunction<T, K>(list: T[], keyGetter: (input: T) => K): Map<K, T>;
|
|
3
|
+
export declare function convertMapToObject<K, T>(map: Map<K, T>): {
|
|
4
|
+
[key: string]: T;
|
|
5
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.groupByFunction = groupByFunction;
|
|
4
4
|
exports.groupByOneToOneFunction = groupByOneToOneFunction;
|
|
5
|
+
exports.convertMapToObject = convertMapToObject;
|
|
5
6
|
function groupByFunction(list, keyGetter) {
|
|
6
7
|
const map = new Map();
|
|
7
8
|
list.forEach((item) => {
|
|
@@ -24,3 +25,6 @@ function groupByOneToOneFunction(list, keyGetter) {
|
|
|
24
25
|
});
|
|
25
26
|
return map;
|
|
26
27
|
}
|
|
28
|
+
function convertMapToObject(map) {
|
|
29
|
+
return Object.fromEntries(map);
|
|
30
|
+
}
|