law-common 2.9.2-beta.4 → 2.9.2-beta.6
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/api/index.d.ts +0 -1
- package/dist/src/api/index.js +0 -1
- package/dist/src/entities/enums/bank_entity_keys.enum.d.ts +17 -0
- package/dist/src/entities/enums/bank_entity_keys.enum.js +51 -0
- package/dist/src/entities/enums/bank_status.enum.js +1 -1
- package/dist/src/entities/enums/user.entity.enum.d.ts +2 -1
- package/dist/src/entities/enums/user.entity.enum.js +1 -0
- package/dist/src/entities/index.d.ts +1 -0
- package/dist/src/entities/index.js +1 -0
- package/dist/src/entities/interface/entity.utils.interface.d.ts +38 -2
- package/dist/src/entities/interface/timesheet_history.entity.interface.d.ts +0 -23
- package/dist/src/enums/error.key.enum.d.ts +2 -1
- package/dist/src/enums/error.key.enum.js +1 -0
- package/package.json +1 -1
- package/dist/src/api/interface/timesheet_history_entity.response.d.ts +0 -12
- package/dist/src/api/interface/timesheet_history_entity.response.js +0 -2
package/dist/src/api/index.d.ts
CHANGED
|
@@ -63,5 +63,4 @@ export * from "./interface/billing.history.api";
|
|
|
63
63
|
export * from "./interface/billing_timesheet_history.api";
|
|
64
64
|
export * from "./interface/reimbursement_history.api";
|
|
65
65
|
export * from "./interface/reimbursement_expense.api";
|
|
66
|
-
export * from "./interface/timesheet_history_entity.response";
|
|
67
66
|
export * from "./interface/bank_history.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -79,5 +79,4 @@ __exportStar(require("./interface/billing.history.api"), exports);
|
|
|
79
79
|
__exportStar(require("./interface/billing_timesheet_history.api"), exports);
|
|
80
80
|
__exportStar(require("./interface/reimbursement_history.api"), exports);
|
|
81
81
|
__exportStar(require("./interface/reimbursement_expense.api"), exports);
|
|
82
|
-
__exportStar(require("./interface/timesheet_history_entity.response"), exports);
|
|
83
82
|
__exportStar(require("./interface/bank_history.api"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum BankEntityKeysEnum {
|
|
2
|
+
id = "id",
|
|
3
|
+
accountName = "accountName",
|
|
4
|
+
organizationId = "organizationId",
|
|
5
|
+
name = "name",
|
|
6
|
+
accountNo = "accountNo",
|
|
7
|
+
branchAddress = "branchAddress",
|
|
8
|
+
micrCode = "micrCode",
|
|
9
|
+
ifscCode = "ifscCode",
|
|
10
|
+
emailForPaymentInfoCsv = "emailForPaymentInfoCsv",
|
|
11
|
+
status = "status",
|
|
12
|
+
remark = "remark"
|
|
13
|
+
}
|
|
14
|
+
export declare namespace BankEntityKeysEnum {
|
|
15
|
+
const keyLabelMap: Record<BankEntityKeysEnum, string>;
|
|
16
|
+
function getLabel(key: BankEntityKeysEnum): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BankEntityKeysEnum = void 0;
|
|
4
|
+
const error_key_enum_1 = require("../../enums/error.key.enum");
|
|
5
|
+
const exceptions_1 = require("../../exceptions");
|
|
6
|
+
var BankEntityKeysEnum;
|
|
7
|
+
(function (BankEntityKeysEnum) {
|
|
8
|
+
BankEntityKeysEnum["id"] = "id";
|
|
9
|
+
BankEntityKeysEnum["accountName"] = "accountName";
|
|
10
|
+
BankEntityKeysEnum["organizationId"] = "organizationId";
|
|
11
|
+
BankEntityKeysEnum["name"] = "name";
|
|
12
|
+
BankEntityKeysEnum["accountNo"] = "accountNo";
|
|
13
|
+
BankEntityKeysEnum["branchAddress"] = "branchAddress";
|
|
14
|
+
BankEntityKeysEnum["micrCode"] = "micrCode";
|
|
15
|
+
BankEntityKeysEnum["ifscCode"] = "ifscCode";
|
|
16
|
+
BankEntityKeysEnum["emailForPaymentInfoCsv"] = "emailForPaymentInfoCsv";
|
|
17
|
+
BankEntityKeysEnum["status"] = "status";
|
|
18
|
+
BankEntityKeysEnum["remark"] = "remark";
|
|
19
|
+
})(BankEntityKeysEnum || (exports.BankEntityKeysEnum = BankEntityKeysEnum = {}));
|
|
20
|
+
(function (BankEntityKeysEnum) {
|
|
21
|
+
BankEntityKeysEnum.keyLabelMap = {
|
|
22
|
+
[BankEntityKeysEnum.id]: "Bank ID",
|
|
23
|
+
[BankEntityKeysEnum.accountName]: "Account Name",
|
|
24
|
+
[BankEntityKeysEnum.organizationId]: "Organization ID",
|
|
25
|
+
[BankEntityKeysEnum.name]: "Bank Name",
|
|
26
|
+
[BankEntityKeysEnum.accountNo]: "Account Number",
|
|
27
|
+
[BankEntityKeysEnum.branchAddress]: "Branch Address",
|
|
28
|
+
[BankEntityKeysEnum.micrCode]: "MICR Code",
|
|
29
|
+
[BankEntityKeysEnum.ifscCode]: "IFSC Code",
|
|
30
|
+
[BankEntityKeysEnum.emailForPaymentInfoCsv]: "Email for Payment Info CSV",
|
|
31
|
+
[BankEntityKeysEnum.status]: "Status",
|
|
32
|
+
[BankEntityKeysEnum.remark]: "Remark",
|
|
33
|
+
};
|
|
34
|
+
function getLabel(key) {
|
|
35
|
+
if (!Object.values(BankEntityKeysEnum).includes(key)) {
|
|
36
|
+
throw new exceptions_1.AppBadRequestException({
|
|
37
|
+
key: error_key_enum_1.ErrorKeyEnum.BANK_KEY,
|
|
38
|
+
message: ["Invalid key name"],
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const label = BankEntityKeysEnum.keyLabelMap[key];
|
|
42
|
+
if (!label) {
|
|
43
|
+
throw new exceptions_1.AppBadRequestException({
|
|
44
|
+
key: error_key_enum_1.ErrorKeyEnum.BANK_KEY,
|
|
45
|
+
message: ["Invalid key name"],
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return label;
|
|
49
|
+
}
|
|
50
|
+
BankEntityKeysEnum.getLabel = getLabel;
|
|
51
|
+
})(BankEntityKeysEnum || (exports.BankEntityKeysEnum = BankEntityKeysEnum = {}));
|
|
@@ -20,7 +20,7 @@ var BankStatusEnum;
|
|
|
20
20
|
if (Object.values(BankStatusEnum).includes(value)) {
|
|
21
21
|
return value;
|
|
22
22
|
}
|
|
23
|
-
throw new Error("Invalid bank
|
|
23
|
+
throw new Error("Invalid bank status");
|
|
24
24
|
}
|
|
25
25
|
BankStatusEnum.parse = parse;
|
|
26
26
|
})(BankStatusEnum || (exports.BankStatusEnum = BankStatusEnum = {}));
|
|
@@ -6,6 +6,7 @@ var UserStatusEnum;
|
|
|
6
6
|
UserStatusEnum["active"] = "active";
|
|
7
7
|
UserStatusEnum["deactive"] = "deactive";
|
|
8
8
|
UserStatusEnum["suspended"] = "suspended";
|
|
9
|
+
UserStatusEnum["pending"] = "pending";
|
|
9
10
|
})(UserStatusEnum || (exports.UserStatusEnum = UserStatusEnum = {}));
|
|
10
11
|
var UserRoleEnum;
|
|
11
12
|
(function (UserRoleEnum) {
|
|
@@ -67,3 +67,4 @@ __exportStar(require("./enums/timesheet_entity_keys.enum"), exports);
|
|
|
67
67
|
__exportStar(require("./enums/bank_action.enum"), exports);
|
|
68
68
|
__exportStar(require("./enums/bank_status.enum"), exports);
|
|
69
69
|
__exportStar(require("./interface/bank_history.entity.interface"), exports);
|
|
70
|
+
__exportStar(require("./enums/bank_entity_keys.enum"), exports);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ConvertToArray } from "../../misc";
|
|
2
2
|
import { Modify } from "../../misc/interface/modify.interface";
|
|
3
|
+
import { EntitySearchConstraintTypeEnum } from "../enums/entity_search_constraint_type.enum";
|
|
4
|
+
import { HistoryOperationEnum } from "../enums/history_operation.enum";
|
|
3
5
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
4
6
|
export type IApiEntity<T extends {
|
|
5
7
|
createdOn: Date;
|
|
@@ -8,8 +10,8 @@ export type IApiEntity<T extends {
|
|
|
8
10
|
createdOn: string;
|
|
9
11
|
updatedOn: string;
|
|
10
12
|
}>;
|
|
11
|
-
export type IEntityCreateDto<T> = Omit<T,
|
|
12
|
-
export type IEntityUpdateDto<T> = Omit<Partial<T>,
|
|
13
|
+
export type IEntityCreateDto<T> = Omit<T, "id" | keyof IAuditColumnEntity>;
|
|
14
|
+
export type IEntityUpdateDto<T> = Omit<Partial<T>, "id" | keyof IAuditColumnEntity>;
|
|
13
15
|
export type IEntityApiResponse<T extends {
|
|
14
16
|
createdOn: Date;
|
|
15
17
|
updatedOn: Date;
|
|
@@ -29,3 +31,37 @@ export type IEntityFilterData<T> = ConvertToArray<IEntityUpdateDto<T>> & {
|
|
|
29
31
|
[key in keyof T]?: T[key];
|
|
30
32
|
};
|
|
31
33
|
};
|
|
34
|
+
export type IEntitySearchConstraint = {
|
|
35
|
+
entityId: number[];
|
|
36
|
+
constraint: {
|
|
37
|
+
since: IEntitySearchSinceConstraint;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type IEntitySearchSinceConstraint = {
|
|
41
|
+
type: EntitySearchConstraintTypeEnum;
|
|
42
|
+
columnKey: string;
|
|
43
|
+
value: number;
|
|
44
|
+
};
|
|
45
|
+
export type IEntityHistoryParsed = {
|
|
46
|
+
parsedData: any;
|
|
47
|
+
id: number;
|
|
48
|
+
entityId: number;
|
|
49
|
+
operation: HistoryOperationEnum;
|
|
50
|
+
data: string;
|
|
51
|
+
createdOn: Date;
|
|
52
|
+
updatedOn: Date;
|
|
53
|
+
createdBy: number;
|
|
54
|
+
updatedBy: number;
|
|
55
|
+
};
|
|
56
|
+
export type IHistoryEntitySearchByConstraintResponse = {
|
|
57
|
+
id: number;
|
|
58
|
+
createdBy: number;
|
|
59
|
+
changedLogs: IHistoryEntityChangedLogs[];
|
|
60
|
+
};
|
|
61
|
+
export type IHistoryEntityChangedLogs = {
|
|
62
|
+
key: string;
|
|
63
|
+
label: string;
|
|
64
|
+
newValue: string | number;
|
|
65
|
+
oldValue: string | number;
|
|
66
|
+
timeStamp: string;
|
|
67
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EntitySearchConstraintTypeEnum } from "../enums/entity_search_constraint_type.enum";
|
|
2
1
|
import { HistoryOperationEnum } from "../enums/history_operation.enum";
|
|
3
2
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
4
3
|
import { IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
|
|
@@ -15,25 +14,3 @@ export interface ITimesheetHistoryUpdateDto extends IEntityCreateDto<ITimesheetH
|
|
|
15
14
|
export interface ITimesheetHistorySearchDto extends IEntityFilterData<ITimesheetHistoryEntity> {
|
|
16
15
|
}
|
|
17
16
|
export declare const timesheetHistoryExcludeKeys: string[];
|
|
18
|
-
export type IEntitySearchConstraint = {
|
|
19
|
-
entityId: number[];
|
|
20
|
-
constraint: {
|
|
21
|
-
since: IEntitySearchSinceConstraint;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export type IEntitySearchSinceConstraint = {
|
|
25
|
-
type: EntitySearchConstraintTypeEnum;
|
|
26
|
-
columnKey: string;
|
|
27
|
-
value: number;
|
|
28
|
-
};
|
|
29
|
-
export type ITimesheetHistoryParsed = {
|
|
30
|
-
parsedData: any;
|
|
31
|
-
id: number;
|
|
32
|
-
entityId: number;
|
|
33
|
-
operation: HistoryOperationEnum;
|
|
34
|
-
data: string;
|
|
35
|
-
createdOn: Date;
|
|
36
|
-
updatedOn: Date;
|
|
37
|
-
createdBy: number;
|
|
38
|
-
updatedBy: number;
|
|
39
|
-
};
|
|
@@ -6,5 +6,6 @@ export declare enum ErrorKeyEnum {
|
|
|
6
6
|
REIMBURSEMENT_FLOW_ACTION = "REIMBURSEMENT_FLOW_ACTION",
|
|
7
7
|
REIMBURSEMENT_EXPENSE_FLOW_ACTION = "REIMBURSEMENT_EXPENSE_FLOW_ACTION",
|
|
8
8
|
TIMESHEET_KEY = "TIMESHEET_KEY",
|
|
9
|
-
BANK_FLOW_ACTION = "BANK_FLOW_ACTION"
|
|
9
|
+
BANK_FLOW_ACTION = "BANK_FLOW_ACTION",
|
|
10
|
+
BANK_KEY = "BANK_KEY"
|
|
10
11
|
}
|
|
@@ -11,4 +11,5 @@ var ErrorKeyEnum;
|
|
|
11
11
|
ErrorKeyEnum["REIMBURSEMENT_EXPENSE_FLOW_ACTION"] = "REIMBURSEMENT_EXPENSE_FLOW_ACTION";
|
|
12
12
|
ErrorKeyEnum["TIMESHEET_KEY"] = "TIMESHEET_KEY";
|
|
13
13
|
ErrorKeyEnum["BANK_FLOW_ACTION"] = "BANK_FLOW_ACTION";
|
|
14
|
+
ErrorKeyEnum["BANK_KEY"] = "BANK_KEY";
|
|
14
15
|
})(ErrorKeyEnum || (exports.ErrorKeyEnum = ErrorKeyEnum = {}));
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type ITimesheetHistoryEntitySearchByConstraintResponse = {
|
|
2
|
-
id: number;
|
|
3
|
-
createdBy: number;
|
|
4
|
-
changedLogs: ITimesheetHistoryEntityChangedLogs[];
|
|
5
|
-
};
|
|
6
|
-
export type ITimesheetHistoryEntityChangedLogs = {
|
|
7
|
-
key: string;
|
|
8
|
-
label: string;
|
|
9
|
-
newValue: string | number;
|
|
10
|
-
oldValue: string | number;
|
|
11
|
-
timeStamp: string;
|
|
12
|
-
};
|