law-common 2.0.0 → 2.2.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.
- package/dist/src/@constants.d.ts +1 -0
- package/dist/src/@constants.js +17 -0
- package/dist/src/api/index.d.ts +1 -0
- package/dist/src/api/index.js +1 -0
- package/dist/src/api/interface/timesheet.history.api.d.ts +3 -0
- package/dist/src/api/interface/timesheet.history.api.js +2 -0
- package/dist/src/constants/constants.d.ts +1 -0
- package/dist/src/constants/constants.js +9 -0
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/index.js +17 -0
- package/dist/src/entities/enums/timesheet.operation.enum.d.ts +9 -0
- package/dist/src/entities/enums/timesheet.operation.enum.js +22 -0
- package/dist/src/entities/index.d.ts +2 -0
- package/dist/src/entities/index.js +2 -0
- package/dist/src/entities/interface/project.entity.interface.d.ts +2 -0
- package/dist/src/entities/interface/timesheet_history.entity.interface.d.ts +16 -0
- package/dist/src/entities/interface/timesheet_history.entity.interface.js +5 -0
- package/dist/src/index.d.ts +5 -4
- package/dist/src/index.js +2 -1
- package/dist/src/utils/helper.fn.util.d.ts +1 -0
- package/dist/src/utils/helper.fn.util.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./constants";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants"), exports);
|
package/dist/src/api/index.d.ts
CHANGED
|
@@ -58,3 +58,4 @@ export * from "./interface/billing.transaction.create.dto.interface";
|
|
|
58
58
|
export * from "./interface/billing.transaction.update.dto.interface";
|
|
59
59
|
export * from "./interface/billing.transaction.entity.response";
|
|
60
60
|
export * from "./interface/billing.flow.update.dto";
|
|
61
|
+
export * from "./interface/timesheet.history.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -74,3 +74,4 @@ __exportStar(require("./interface/billing.transaction.create.dto.interface"), ex
|
|
|
74
74
|
__exportStar(require("./interface/billing.transaction.update.dto.interface"), exports);
|
|
75
75
|
__exportStar(require("./interface/billing.transaction.entity.response"), exports);
|
|
76
76
|
__exportStar(require("./interface/billing.flow.update.dto"), exports);
|
|
77
|
+
__exportStar(require("./interface/timesheet.history.api"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const historyKeysToExclude: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./constants";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimesheetOperationEnum = void 0;
|
|
4
|
+
var TimesheetOperationEnum;
|
|
5
|
+
(function (TimesheetOperationEnum) {
|
|
6
|
+
TimesheetOperationEnum["CREATE"] = "create";
|
|
7
|
+
TimesheetOperationEnum["UPDATE"] = "update";
|
|
8
|
+
TimesheetOperationEnum["DELETE"] = "delete";
|
|
9
|
+
})(TimesheetOperationEnum || (exports.TimesheetOperationEnum = TimesheetOperationEnum = {}));
|
|
10
|
+
(function (TimesheetOperationEnum) {
|
|
11
|
+
function getNames() {
|
|
12
|
+
return Object.values(TimesheetOperationEnum).filter((value) => typeof value === "string");
|
|
13
|
+
}
|
|
14
|
+
TimesheetOperationEnum.getNames = getNames;
|
|
15
|
+
function parse(value) {
|
|
16
|
+
if (Object.values(TimesheetOperationEnum).includes(value)) {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
throw new Error("Invalid timesheet history operation");
|
|
20
|
+
}
|
|
21
|
+
TimesheetOperationEnum.parse = parse;
|
|
22
|
+
})(TimesheetOperationEnum || (exports.TimesheetOperationEnum = TimesheetOperationEnum = {}));
|
|
@@ -34,3 +34,5 @@ export * from "./interface/permission.entity.interface";
|
|
|
34
34
|
export * from "./interface/role.permission.mapping.entity.interface";
|
|
35
35
|
export * from "./interface/billing_transaction.entity.interface";
|
|
36
36
|
export * from "./enums/billing.transaction.enum";
|
|
37
|
+
export * from "./interface/timesheet_history.entity.interface";
|
|
38
|
+
export * from "./enums/timesheet.operation.enum";
|
|
@@ -50,3 +50,5 @@ __exportStar(require("./interface/permission.entity.interface"), exports);
|
|
|
50
50
|
__exportStar(require("./interface/role.permission.mapping.entity.interface"), exports);
|
|
51
51
|
__exportStar(require("./interface/billing_transaction.entity.interface"), exports);
|
|
52
52
|
__exportStar(require("./enums/billing.transaction.enum"), exports);
|
|
53
|
+
__exportStar(require("./interface/timesheet_history.entity.interface"), exports);
|
|
54
|
+
__exportStar(require("./enums/timesheet.operation.enum"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TimesheetOperationEnum } from "../enums/timesheet.operation.enum";
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
3
|
+
import { IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
|
|
4
|
+
export interface ITimesheetHistoryEntity extends IAuditColumnEntity {
|
|
5
|
+
id: number;
|
|
6
|
+
timesheetId: number;
|
|
7
|
+
operation: TimesheetOperationEnum;
|
|
8
|
+
data: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ITimesheetHistoryCreateDto extends IEntityCreateDto<ITimesheetHistoryEntity> {
|
|
11
|
+
}
|
|
12
|
+
export interface ITimesheetHistoryUpdateDto extends IEntityCreateDto<ITimesheetHistoryEntity> {
|
|
13
|
+
}
|
|
14
|
+
export interface ITimesheetHistorySearchDto extends IEntityFilterData<ITimesheetHistoryEntity> {
|
|
15
|
+
}
|
|
16
|
+
export declare const timesheetHistoryExcludeKeys: string[];
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * as api from
|
|
2
|
-
export * as exceptions from
|
|
3
|
-
export * as misc from
|
|
4
|
-
export * as utils from
|
|
1
|
+
export * as api from "./@api";
|
|
2
|
+
export * as exceptions from "./@exceptions";
|
|
3
|
+
export * as misc from "./@misc";
|
|
4
|
+
export * as utils from "./@entities";
|
|
5
5
|
export * as enums from "./enums";
|
|
6
6
|
export * from "./utils";
|
|
7
|
+
export * as constant from "./@constants";
|
package/dist/src/index.js
CHANGED
|
@@ -26,10 +26,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.enums = exports.utils = exports.misc = exports.exceptions = exports.api = void 0;
|
|
29
|
+
exports.constant = exports.enums = exports.utils = exports.misc = exports.exceptions = exports.api = void 0;
|
|
30
30
|
exports.api = __importStar(require("./@api"));
|
|
31
31
|
exports.exceptions = __importStar(require("./@exceptions"));
|
|
32
32
|
exports.misc = __importStar(require("./@misc"));
|
|
33
33
|
exports.utils = __importStar(require("./@entities"));
|
|
34
34
|
exports.enums = __importStar(require("./enums"));
|
|
35
35
|
__exportStar(require("./utils"), exports);
|
|
36
|
+
exports.constant = __importStar(require("./@constants"));
|
|
@@ -5,6 +5,7 @@ export declare function convertMapToObject<K, T>(map: Map<K, T>): {
|
|
|
5
5
|
[key: string]: T;
|
|
6
6
|
};
|
|
7
7
|
export declare function removeSamePropertyValues(source: any, target: any): void;
|
|
8
|
+
export declare function getChangedProperties<T>(source: T, target: T): Partial<T>;
|
|
8
9
|
/**
|
|
9
10
|
* Removes elements from the target array that are present in the source array.
|
|
10
11
|
*
|
|
@@ -13,6 +13,7 @@ exports.groupByFunction = groupByFunction;
|
|
|
13
13
|
exports.groupByOneToOneFunction = groupByOneToOneFunction;
|
|
14
14
|
exports.convertMapToObject = convertMapToObject;
|
|
15
15
|
exports.removeSamePropertyValues = removeSamePropertyValues;
|
|
16
|
+
exports.getChangedProperties = getChangedProperties;
|
|
16
17
|
exports.removeElementsFromArray = removeElementsFromArray;
|
|
17
18
|
exports.arrayDifference = arrayDifference;
|
|
18
19
|
exports.arrayIntersection = arrayIntersection;
|
|
@@ -60,6 +61,15 @@ function removeSamePropertyValues(source, target) {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
}
|
|
64
|
+
function getChangedProperties(source, target) {
|
|
65
|
+
const result = {};
|
|
66
|
+
for (let key in target) {
|
|
67
|
+
if (source[key] !== target[key]) {
|
|
68
|
+
result[key] = target[key];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
63
73
|
/**
|
|
64
74
|
* Removes elements from the target array that are present in the source array.
|
|
65
75
|
*
|