law-common 2.3.0 → 2.4.1-beta.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.
@@ -0,0 +1,9 @@
1
+ export declare enum HistoryOperationEnum {
2
+ CREATE = "create",
3
+ UPDATE = "update",
4
+ DELETE = "delete"
5
+ }
6
+ export declare namespace HistoryOperationEnum {
7
+ function getNames(): string[];
8
+ function parse(value: string): HistoryOperationEnum;
9
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HistoryOperationEnum = void 0;
4
+ var HistoryOperationEnum;
5
+ (function (HistoryOperationEnum) {
6
+ HistoryOperationEnum["CREATE"] = "create";
7
+ HistoryOperationEnum["UPDATE"] = "update";
8
+ HistoryOperationEnum["DELETE"] = "delete";
9
+ })(HistoryOperationEnum || (exports.HistoryOperationEnum = HistoryOperationEnum = {}));
10
+ (function (HistoryOperationEnum) {
11
+ function getNames() {
12
+ return Object.values(HistoryOperationEnum).filter((value) => typeof value === "string");
13
+ }
14
+ HistoryOperationEnum.getNames = getNames;
15
+ function parse(value) {
16
+ if (Object.values(HistoryOperationEnum).includes(value)) {
17
+ return value;
18
+ }
19
+ throw new Error("Invalid History operation");
20
+ }
21
+ HistoryOperationEnum.parse = parse;
22
+ })(HistoryOperationEnum || (exports.HistoryOperationEnum = HistoryOperationEnum = {}));
@@ -35,8 +35,7 @@ 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
37
  export * from "./interface/timesheet_history.entity.interface";
38
- export * from "./enums/timesheet.operation.enum";
39
- export * from "./enums/billing_history_operation.enum";
40
- export * from "./enums/billing_timesheet_history_operation.enum";
38
+ export * from "./enums/history_operation.enum";
41
39
  export * from "./interface/billing_history.entity.interface";
42
40
  export * from "./interface/billing_timesheet_history.entity.interface";
41
+ export * from "./enums/history_operation.enum";
@@ -51,8 +51,7 @@ __exportStar(require("./interface/role.permission.mapping.entity.interface"), ex
51
51
  __exportStar(require("./interface/billing_transaction.entity.interface"), exports);
52
52
  __exportStar(require("./enums/billing.transaction.enum"), exports);
53
53
  __exportStar(require("./interface/timesheet_history.entity.interface"), exports);
54
- __exportStar(require("./enums/timesheet.operation.enum"), exports);
55
- __exportStar(require("./enums/billing_history_operation.enum"), exports);
56
- __exportStar(require("./enums/billing_timesheet_history_operation.enum"), exports);
54
+ __exportStar(require("./enums/history_operation.enum"), exports);
57
55
  __exportStar(require("./interface/billing_history.entity.interface"), exports);
58
56
  __exportStar(require("./interface/billing_timesheet_history.entity.interface"), exports);
57
+ __exportStar(require("./enums/history_operation.enum"), exports);
@@ -1,10 +1,10 @@
1
- import { BillingOperationEnum } from "../enums/billing_history_operation.enum";
1
+ import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
2
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
3
  import { IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
4
4
  export interface IBillingHistoryEntity extends IAuditColumnEntity {
5
5
  id: number;
6
- billingId: number;
7
- operation: BillingOperationEnum;
6
+ entityId: number;
7
+ operation: HistoryOperationEnum;
8
8
  data: string;
9
9
  }
10
10
  export interface IBillingHistoryCreateDto extends IEntityCreateDto<IBillingHistoryEntity> {
@@ -1,10 +1,10 @@
1
- import { BillingTimesheetOperationEnum } from "../enums/billing_timesheet_history_operation.enum";
1
+ import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
2
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
3
  import { IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
4
4
  export interface IBillingTimesheetHistoryEntity extends IAuditColumnEntity {
5
5
  id: number;
6
- timesheetId: number;
7
- operation: BillingTimesheetOperationEnum;
6
+ entityId: number;
7
+ operation: HistoryOperationEnum;
8
8
  data: string;
9
9
  }
10
10
  export interface IBillingTimesheetHistoryCreateDto extends IEntityCreateDto<IBillingTimesheetHistoryEntity> {
@@ -1,10 +1,10 @@
1
- import { TimesheetOperationEnum } from "../enums/timesheet.operation.enum";
1
+ import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
2
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
3
  import { IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
4
4
  export interface ITimesheetHistoryEntity extends IAuditColumnEntity {
5
5
  id: number;
6
- timesheetId: number;
7
- operation: TimesheetOperationEnum;
6
+ entityId: number;
7
+ operation: HistoryOperationEnum;
8
8
  data: string;
9
9
  }
10
10
  export interface ITimesheetHistoryCreateDto extends IEntityCreateDto<ITimesheetHistoryEntity> {
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "law-common",
3
- "version": "2.3.0",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "files": [
7
- "dist/**/*"
8
- ],
9
- "scripts": {
10
- "clean": "rm -rf dist",
11
- "build": "npm run clean && tsc",
12
- "publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
13
- "publish:patch": "npm version patch && git push && npm run build && npm publish",
14
- "publish:minor": "npm version minor && git push && npm run build && npm publish",
15
- "publish:major": "npm version major && git push && npm run build && npm publish",
16
- "link": "npm run build && npm link",
17
- "test": "jest"
18
- },
19
- "keywords": [],
20
- "author": "",
21
- "license": "ISC",
22
- "devDependencies": {
23
- "@types/jest": "^29.5.13",
24
- "@types/node": "^22.6.1",
25
- "jest": "^29.7.0",
26
- "ts-jest": "^29.2.5",
27
- "ts-node": "^10.9.2",
28
- "typescript": "^5.6.2"
29
- },
30
- "dependencies": {
31
- "@types/express": "^5.0.0",
32
- "@types/multer": "^1.4.12",
33
- "date-fns": "^4.1.0"
34
- }
35
- }
1
+ {
2
+ "name": "law-common",
3
+ "version": "2.4.1-beta.0",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "files": [
7
+ "dist/**/*"
8
+ ],
9
+ "scripts": {
10
+ "clean": "rm -rf dist",
11
+ "build": "npm run clean && tsc",
12
+ "publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
13
+ "publish:patch": "npm version patch && git push && npm run build && npm publish",
14
+ "publish:minor": "npm version minor && git push && npm run build && npm publish",
15
+ "publish:major": "npm version major && git push && npm run build && npm publish",
16
+ "link": "npm run build && npm link",
17
+ "test": "jest"
18
+ },
19
+ "keywords": [],
20
+ "author": "",
21
+ "license": "ISC",
22
+ "devDependencies": {
23
+ "@types/jest": "^29.5.13",
24
+ "@types/node": "^22.6.1",
25
+ "jest": "^29.7.0",
26
+ "ts-jest": "^29.2.5",
27
+ "ts-node": "^10.9.2",
28
+ "typescript": "^5.6.2"
29
+ },
30
+ "dependencies": {
31
+ "@types/express": "^5.0.0",
32
+ "@types/multer": "^1.4.12",
33
+ "date-fns": "^4.1.0"
34
+ }
35
+ }
@@ -1,9 +0,0 @@
1
- export declare enum BillingOperationEnum {
2
- CREATE = "create",
3
- UPDATE = "update",
4
- DELETE = "delete"
5
- }
6
- export declare namespace BillingOperationEnum {
7
- function getNames(): string[];
8
- function parse(value: string): BillingOperationEnum;
9
- }
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingOperationEnum = void 0;
4
- var BillingOperationEnum;
5
- (function (BillingOperationEnum) {
6
- BillingOperationEnum["CREATE"] = "create";
7
- BillingOperationEnum["UPDATE"] = "update";
8
- BillingOperationEnum["DELETE"] = "delete";
9
- })(BillingOperationEnum || (exports.BillingOperationEnum = BillingOperationEnum = {}));
10
- (function (BillingOperationEnum) {
11
- function getNames() {
12
- return Object.values(BillingOperationEnum).filter((value) => typeof value === "string");
13
- }
14
- BillingOperationEnum.getNames = getNames;
15
- function parse(value) {
16
- if (Object.values(BillingOperationEnum).includes(value)) {
17
- return value;
18
- }
19
- throw new Error("Invalid Billing History operation");
20
- }
21
- BillingOperationEnum.parse = parse;
22
- })(BillingOperationEnum || (exports.BillingOperationEnum = BillingOperationEnum = {}));
@@ -1,9 +0,0 @@
1
- export declare enum BillingTimesheetOperationEnum {
2
- CREATE = "create",
3
- UPDATE = "update",
4
- DELETE = "delete"
5
- }
6
- export declare namespace BillingTimesheetOperationEnum {
7
- function getNames(): string[];
8
- function parse(value: string): BillingTimesheetOperationEnum;
9
- }
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingTimesheetOperationEnum = void 0;
4
- var BillingTimesheetOperationEnum;
5
- (function (BillingTimesheetOperationEnum) {
6
- BillingTimesheetOperationEnum["CREATE"] = "create";
7
- BillingTimesheetOperationEnum["UPDATE"] = "update";
8
- BillingTimesheetOperationEnum["DELETE"] = "delete";
9
- })(BillingTimesheetOperationEnum || (exports.BillingTimesheetOperationEnum = BillingTimesheetOperationEnum = {}));
10
- (function (BillingTimesheetOperationEnum) {
11
- function getNames() {
12
- return Object.values(BillingTimesheetOperationEnum).filter((value) => typeof value === "string");
13
- }
14
- BillingTimesheetOperationEnum.getNames = getNames;
15
- function parse(value) {
16
- if (Object.values(BillingTimesheetOperationEnum).includes(value)) {
17
- return value;
18
- }
19
- throw new Error("Invalid Billing Timesheet History operation");
20
- }
21
- BillingTimesheetOperationEnum.parse = parse;
22
- })(BillingTimesheetOperationEnum || (exports.BillingTimesheetOperationEnum = BillingTimesheetOperationEnum = {}));
@@ -1,9 +0,0 @@
1
- export declare enum TimesheetOperationEnum {
2
- CREATE = "create",
3
- UPDATE = "update",
4
- DELETE = "delete"
5
- }
6
- export declare namespace TimesheetOperationEnum {
7
- function getNames(): string[];
8
- function parse(value: string): TimesheetOperationEnum;
9
- }
@@ -1,22 +0,0 @@
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 = {}));