law-common 2.9.2 → 3.0.1-beta.1

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.
Files changed (34) hide show
  1. package/dist/src/api/index.d.ts +1 -1
  2. package/dist/src/api/index.js +1 -1
  3. package/dist/src/api/interface/bank.entity.response.d.ts +11 -0
  4. package/dist/src/api/interface/bank.update.dto.interface.d.ts +2 -1
  5. package/dist/src/api/interface/bank_history.api.d.ts +3 -0
  6. package/dist/src/api/interface/client.entity.response.d.ts +3 -0
  7. package/dist/src/api/interface/user.create.dto.interace.d.ts +1 -1
  8. package/dist/src/api/interface/user.update.dto.interface.d.ts +1 -1
  9. package/dist/src/entities/enums/bank_action.enum.d.ts +12 -0
  10. package/dist/src/entities/enums/bank_action.enum.js +43 -0
  11. package/dist/src/entities/enums/bank_entity_keys.enum.d.ts +17 -0
  12. package/dist/src/entities/enums/bank_entity_keys.enum.js +51 -0
  13. package/dist/src/entities/enums/bank_status.enum.d.ts +13 -0
  14. package/dist/src/entities/enums/bank_status.enum.js +31 -0
  15. package/dist/src/entities/enums/billing.transaction.enum.js +6 -1
  16. package/dist/src/entities/enums/history_operation.enum.js +6 -1
  17. package/dist/src/entities/enums/timesheet.status.enum.js +6 -1
  18. package/dist/src/entities/enums/user.entity.enum.d.ts +7 -1
  19. package/dist/src/entities/enums/user.entity.enum.js +14 -2
  20. package/dist/src/entities/index.d.ts +4 -0
  21. package/dist/src/entities/index.js +4 -0
  22. package/dist/src/entities/interface/bank.entity.interface.d.ts +9 -1
  23. package/dist/src/entities/interface/bank_history.entity.interface.d.ts +14 -0
  24. package/dist/src/entities/interface/bank_history.entity.interface.js +5 -0
  25. package/dist/src/entities/interface/client.entity.interface.d.ts +7 -1
  26. package/dist/src/entities/interface/entity.utils.interface.d.ts +38 -2
  27. package/dist/src/entities/interface/timesheet_history.entity.interface.d.ts +0 -23
  28. package/dist/src/entities/interface/user.entity.interface.d.ts +4 -2
  29. package/dist/src/entities/interface/user.entity.interface.js +3 -0
  30. package/dist/src/enums/error.key.enum.d.ts +8 -1
  31. package/dist/src/enums/error.key.enum.js +7 -0
  32. package/package.json +1 -1
  33. package/dist/src/api/interface/timesheet_history_entity.response.d.ts +0 -12
  34. /package/dist/src/api/interface/{timesheet_history_entity.response.js → bank_history.api.js} +0 -0
@@ -63,4 +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";
66
+ export * from "./interface/bank_history.api";
@@ -79,4 +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);
82
+ __exportStar(require("./interface/bank_history.api"), exports);
@@ -1,4 +1,15 @@
1
+ import { BankActionEnum, BankStatusEnum } from "../../entities";
1
2
  import { IBankApiEntity } from "./bank.entity.api";
2
3
  import { IBaseResponse } from "./base.response.interface";
3
4
  export type IBankApiEntityResponse = IBaseResponse<IBankApiEntity>;
4
5
  export type IBankApiEntityResponseArray = IBaseResponse<IBankApiEntity[]>;
6
+ export type IBankFlowConfig = {
7
+ [key in BankStatusEnum]?: {
8
+ actions: {
9
+ [key in BankActionEnum]?: {
10
+ permissions: string[];
11
+ next: () => BankStatusEnum;
12
+ };
13
+ };
14
+ };
15
+ };
@@ -1,3 +1,4 @@
1
- import { IBankEntity, IEntityUpdateDto } from "../../entities";
1
+ import { IBankActionDataDto, IBankEntity, IEntityUpdateDto } from "../../entities";
2
2
  export interface IBankUpdateDto extends IEntityUpdateDto<IBankEntity> {
3
+ actionData?: IBankActionDataDto;
3
4
  }
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IBankHistoryEntity } from "../../entities";
2
+ export type IBankHistoryApiEntity = IApiEntity<IBankHistoryEntity>;
3
+ export type IBankHistoryApiEntityArray = IBankHistoryApiEntity[];
@@ -8,4 +8,7 @@ export type IClientEntityGet = {
8
8
  users: {
9
9
  [key: string]: IUserApiEntity;
10
10
  };
11
+ introducingPartnerIds: {
12
+ [key: string]: IUserApiEntity;
13
+ };
11
14
  };
@@ -1,5 +1,5 @@
1
1
  import { IUserApiEntity } from "./user.entity.api";
2
- export interface IUserCreateDto extends Omit<IUserApiEntity, "id" | "updatedOn" | "updatedBy" | "createdBy" | "createdOn"> {
2
+ export interface IUserCreateDto extends Omit<IUserApiEntity, "id" | "updatedOn" | "updatedBy" | "createdBy" | "createdOn" | "password" | "status"> {
3
3
  panDocument?: File;
4
4
  aadharDocument?: File;
5
5
  passportDocument?: File;
@@ -1,5 +1,5 @@
1
1
  import { IUserApiEntity } from "./user.entity.api";
2
- export interface IUserUpdateDto extends Omit<IUserApiEntity, 'createdOn' | 'updatedOn' | 'createdBy' | 'updatedBy' | 'id'> {
2
+ export interface IUserUpdateDto extends Omit<IUserApiEntity, "createdOn" | "updatedOn" | "createdBy" | "updatedBy" | "id"> {
3
3
  panDocument?: File;
4
4
  aadharDocument?: File;
5
5
  }
@@ -0,0 +1,12 @@
1
+ export declare enum BankActionEnum {
2
+ VIEW = "view",
3
+ EDIT = "edit",
4
+ DELETE = "delete",
5
+ CREATE = "create",
6
+ APPROVE = "approve",
7
+ REJECT = "reject",
8
+ RECALL = "recall"
9
+ }
10
+ export declare namespace BankActionEnum {
11
+ function getLabel(action: BankActionEnum): string;
12
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankActionEnum = void 0;
4
+ const error_key_enum_1 = require("../../enums/error.key.enum");
5
+ const exceptions_1 = require("../../exceptions");
6
+ var BankActionEnum;
7
+ (function (BankActionEnum) {
8
+ BankActionEnum["VIEW"] = "view";
9
+ BankActionEnum["EDIT"] = "edit";
10
+ BankActionEnum["DELETE"] = "delete";
11
+ BankActionEnum["CREATE"] = "create";
12
+ BankActionEnum["APPROVE"] = "approve";
13
+ BankActionEnum["REJECT"] = "reject";
14
+ BankActionEnum["RECALL"] = "recall";
15
+ })(BankActionEnum || (exports.BankActionEnum = BankActionEnum = {}));
16
+ (function (BankActionEnum) {
17
+ const actionLabelMap = {
18
+ [BankActionEnum.APPROVE]: "Approve",
19
+ [BankActionEnum.VIEW]: "View",
20
+ [BankActionEnum.EDIT]: "Edit",
21
+ [BankActionEnum.DELETE]: "Delete",
22
+ [BankActionEnum.CREATE]: "Create",
23
+ [BankActionEnum.REJECT]: "Reject",
24
+ [BankActionEnum.RECALL]: "Recall",
25
+ };
26
+ function getLabel(action) {
27
+ if (!Object.values(BankActionEnum).includes(action)) {
28
+ throw new exceptions_1.AppBadRequestException({
29
+ key: error_key_enum_1.ErrorKeyEnum.BANK_FLOW_ACTION,
30
+ message: ["Invalid action value"],
31
+ });
32
+ }
33
+ const label = actionLabelMap[action];
34
+ if (!label) {
35
+ throw new exceptions_1.AppBadRequestException({
36
+ key: error_key_enum_1.ErrorKeyEnum.BANK_FLOW_ACTION,
37
+ message: ["Invalid action value"],
38
+ });
39
+ }
40
+ return label;
41
+ }
42
+ BankActionEnum.getLabel = getLabel;
43
+ })(BankActionEnum || (exports.BankActionEnum = BankActionEnum = {}));
@@ -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 = {}));
@@ -0,0 +1,13 @@
1
+ export declare enum BankStatusEnum {
2
+ CREATE_APPROVAL = "create_approval",
3
+ EDIT_APPROVAL = "edit_approval",
4
+ DELETE_APPROVAL = "delete_approval",
5
+ REJECTED = "rejected",
6
+ APPROVED = "approved",
7
+ DELETED = "deleted",
8
+ RESOLVED_REJECTED = "resolved_rejected"
9
+ }
10
+ export declare namespace BankStatusEnum {
11
+ function getNames(): string[];
12
+ function parse(value: string): BankStatusEnum;
13
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankStatusEnum = void 0;
4
+ const error_key_enum_1 = require("../../enums/error.key.enum");
5
+ const exceptions_1 = require("../../exceptions");
6
+ var BankStatusEnum;
7
+ (function (BankStatusEnum) {
8
+ BankStatusEnum["CREATE_APPROVAL"] = "create_approval";
9
+ BankStatusEnum["EDIT_APPROVAL"] = "edit_approval";
10
+ BankStatusEnum["DELETE_APPROVAL"] = "delete_approval";
11
+ BankStatusEnum["REJECTED"] = "rejected";
12
+ BankStatusEnum["APPROVED"] = "approved";
13
+ BankStatusEnum["DELETED"] = "deleted";
14
+ BankStatusEnum["RESOLVED_REJECTED"] = "resolved_rejected";
15
+ })(BankStatusEnum || (exports.BankStatusEnum = BankStatusEnum = {}));
16
+ (function (BankStatusEnum) {
17
+ function getNames() {
18
+ return Object.values(BankStatusEnum).filter((value) => typeof value === "string");
19
+ }
20
+ BankStatusEnum.getNames = getNames;
21
+ function parse(value) {
22
+ if (Object.values(BankStatusEnum).includes(value)) {
23
+ return value;
24
+ }
25
+ throw new exceptions_1.AppBadRequestException({
26
+ key: error_key_enum_1.ErrorKeyEnum.BANK_STATUS,
27
+ message: ["Invalid bank status"],
28
+ });
29
+ }
30
+ BankStatusEnum.parse = parse;
31
+ })(BankStatusEnum || (exports.BankStatusEnum = BankStatusEnum = {}));
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BillingTransactionType = void 0;
4
+ const error_key_enum_1 = require("../../enums/error.key.enum");
5
+ const exceptions_1 = require("../../exceptions");
4
6
  var BillingTransactionType;
5
7
  (function (BillingTransactionType) {
6
8
  BillingTransactionType["TDS"] = "TDS";
@@ -17,7 +19,10 @@ var BillingTransactionType;
17
19
  if (Object.values(BillingTransactionType).includes(value)) {
18
20
  return value;
19
21
  }
20
- throw new Error("Invalid Billing Transaction Type");
22
+ throw new exceptions_1.AppBadRequestException({
23
+ key: error_key_enum_1.ErrorKeyEnum.BILLING_TRANSACTION_TYPE,
24
+ message: ["Invalid Billing Transaction Type"],
25
+ });
21
26
  }
22
27
  BillingTransactionType.parse = parse;
23
28
  })(BillingTransactionType || (exports.BillingTransactionType = BillingTransactionType = {}));
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HistoryOperationEnum = void 0;
4
+ const error_key_enum_1 = require("../../enums/error.key.enum");
5
+ const exceptions_1 = require("../../exceptions");
4
6
  var HistoryOperationEnum;
5
7
  (function (HistoryOperationEnum) {
6
8
  HistoryOperationEnum["CREATE"] = "create";
@@ -16,7 +18,10 @@ var HistoryOperationEnum;
16
18
  if (Object.values(HistoryOperationEnum).includes(value)) {
17
19
  return value;
18
20
  }
19
- throw new Error("Invalid History operation");
21
+ throw new exceptions_1.AppBadRequestException({
22
+ key: error_key_enum_1.ErrorKeyEnum.HISTORY_OPERATION,
23
+ message: ["Invalid History operation"],
24
+ });
20
25
  }
21
26
  HistoryOperationEnum.parse = parse;
22
27
  })(HistoryOperationEnum || (exports.HistoryOperationEnum = HistoryOperationEnum = {}));
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimesheetStatusEnum = void 0;
4
+ const error_key_enum_1 = require("../../enums/error.key.enum");
5
+ const exceptions_1 = require("../../exceptions");
4
6
  var TimesheetStatusEnum;
5
7
  (function (TimesheetStatusEnum) {
6
8
  TimesheetStatusEnum["ONTIME"] = "ontime";
@@ -21,7 +23,10 @@ var TimesheetStatusEnum;
21
23
  if (Object.values(TimesheetStatusEnum).includes(value)) {
22
24
  return value;
23
25
  }
24
- throw new Error("Invalid timesheet status");
26
+ throw new exceptions_1.AppBadRequestException({
27
+ key: error_key_enum_1.ErrorKeyEnum.TIMESHEET_STATUS,
28
+ message: ["Invalid timesheet status"],
29
+ });
25
30
  }
26
31
  TimesheetStatusEnum.parse = parse;
27
32
  })(TimesheetStatusEnum || (exports.TimesheetStatusEnum = TimesheetStatusEnum = {}));
@@ -1,7 +1,8 @@
1
1
  export declare enum UserStatusEnum {
2
2
  active = "active",
3
3
  deactive = "deactive",
4
- suspended = "suspended"
4
+ suspended = "suspended",
5
+ pending = "pending"
5
6
  }
6
7
  export declare enum UserRoleEnum {
7
8
  admin = "admin",
@@ -12,6 +13,11 @@ export declare enum UserRoleEnum {
12
13
  secretary = "secretary",
13
14
  hr = "hr"
14
15
  }
16
+ export declare enum UserGenderEnum {
17
+ male = "male",
18
+ female = "female",
19
+ prefer_not_to_say = "prefer_not_to_say"
20
+ }
15
21
  export declare namespace UserRoleEnum {
16
22
  function getNames(): string[];
17
23
  function parse(value: string): UserRoleEnum;
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserRoleEnum = exports.UserStatusEnum = void 0;
3
+ exports.UserGenderEnum = exports.UserRoleEnum = exports.UserStatusEnum = void 0;
4
+ const error_key_enum_1 = require("../../enums/error.key.enum");
5
+ const exceptions_1 = require("../../exceptions");
4
6
  var UserStatusEnum;
5
7
  (function (UserStatusEnum) {
6
8
  UserStatusEnum["active"] = "active";
7
9
  UserStatusEnum["deactive"] = "deactive";
8
10
  UserStatusEnum["suspended"] = "suspended";
11
+ UserStatusEnum["pending"] = "pending";
9
12
  })(UserStatusEnum || (exports.UserStatusEnum = UserStatusEnum = {}));
10
13
  var UserRoleEnum;
11
14
  (function (UserRoleEnum) {
@@ -17,6 +20,12 @@ var UserRoleEnum;
17
20
  UserRoleEnum["secretary"] = "secretary";
18
21
  UserRoleEnum["hr"] = "hr";
19
22
  })(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
23
+ var UserGenderEnum;
24
+ (function (UserGenderEnum) {
25
+ UserGenderEnum["male"] = "male";
26
+ UserGenderEnum["female"] = "female";
27
+ UserGenderEnum["prefer_not_to_say"] = "prefer_not_to_say";
28
+ })(UserGenderEnum || (exports.UserGenderEnum = UserGenderEnum = {}));
20
29
  (function (UserRoleEnum) {
21
30
  function getNames() {
22
31
  return Object.values(UserRoleEnum).filter((value) => typeof value === "string");
@@ -26,7 +35,10 @@ var UserRoleEnum;
26
35
  if (Object.values(UserRoleEnum).includes(value)) {
27
36
  return value;
28
37
  }
29
- throw new Error("Invalid user role");
38
+ throw new exceptions_1.AppBadRequestException({
39
+ key: error_key_enum_1.ErrorKeyEnum.USER_ROLE,
40
+ message: ["Invalid user role"],
41
+ });
30
42
  }
31
43
  UserRoleEnum.parse = parse;
32
44
  })(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
@@ -48,3 +48,7 @@ export * from "./interface/reimbursement_history.entity.interface";
48
48
  export * from "./interface/reimbursement_expense.entity.interface";
49
49
  export * from "./enums/entity_search_constraint_type.enum";
50
50
  export * from "./enums/timesheet_entity_keys.enum";
51
+ export * from "./enums/bank_action.enum";
52
+ export * from "./enums/bank_status.enum";
53
+ export * from "./interface/bank_history.entity.interface";
54
+ export * from "./enums/bank_entity_keys.enum";
@@ -64,3 +64,7 @@ __exportStar(require("./interface/reimbursement_history.entity.interface"), expo
64
64
  __exportStar(require("./interface/reimbursement_expense.entity.interface"), exports);
65
65
  __exportStar(require("./enums/entity_search_constraint_type.enum"), exports);
66
66
  __exportStar(require("./enums/timesheet_entity_keys.enum"), exports);
67
+ __exportStar(require("./enums/bank_action.enum"), exports);
68
+ __exportStar(require("./enums/bank_status.enum"), exports);
69
+ __exportStar(require("./interface/bank_history.entity.interface"), exports);
70
+ __exportStar(require("./enums/bank_entity_keys.enum"), exports);
@@ -1,3 +1,5 @@
1
+ import { BankActionEnum } from "../enums/bank_action.enum";
2
+ import { BankStatusEnum } from "../enums/bank_status.enum";
1
3
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
2
4
  import { IEntityFilterData } from "./entity.utils.interface";
3
5
  export interface IBankEntity extends IAuditColumnEntity {
@@ -9,6 +11,12 @@ export interface IBankEntity extends IAuditColumnEntity {
9
11
  branchAddress: string;
10
12
  micrCode: string;
11
13
  ifscCode: string;
12
- emailForPaymentInfo: string;
14
+ emailForPaymentInfoCsv: string;
15
+ status?: BankStatusEnum;
16
+ remark?: string;
17
+ }
18
+ export interface IBankActionDataDto {
19
+ action: BankActionEnum;
20
+ remark?: string;
13
21
  }
14
22
  export type IBankEntityFilterData = IEntityFilterData<IBankEntity>;
@@ -0,0 +1,14 @@
1
+ import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
+ import { IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
4
+ export interface IBankHistoryEntity extends IAuditColumnEntity {
5
+ id: number;
6
+ entityId: number;
7
+ operation: HistoryOperationEnum;
8
+ data: string;
9
+ }
10
+ export interface IBankHistoryCreateDto extends IEntityCreateDto<IBankHistoryEntity> {
11
+ }
12
+ export interface IBankHistorySearchDto extends IEntityFilterData<IBankHistoryEntity> {
13
+ }
14
+ export declare const bankHistoryExcludeKeys: string[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bankHistoryExcludeKeys = void 0;
4
+ const constants_1 = require("../../constants");
5
+ exports.bankHistoryExcludeKeys = [...constants_1.historyKeysToExclude];
@@ -19,7 +19,8 @@ export interface IClientEntity extends IAuditColumnEntity {
19
19
  reference?: string;
20
20
  }
21
21
  export interface IClientEntityDependent {
22
- partnerIds: number[];
22
+ userIds: number[];
23
+ introducingPartnerIds: number[];
23
24
  }
24
25
  export interface IClientEntityChildren {
25
26
  projectIds?: number[];
@@ -36,3 +37,8 @@ export interface IClientUserMappingEntity extends IAuditColumnEntity {
36
37
  clientId: number;
37
38
  userId: number;
38
39
  }
40
+ export interface IClientIntroducingMappingEntity extends IAuditColumnEntity {
41
+ id: number;
42
+ clientId: number;
43
+ userId: number;
44
+ }
@@ -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, 'id' | keyof IAuditColumnEntity>;
12
- export type IEntityUpdateDto<T> = Omit<Partial<T>, 'id' | keyof IAuditColumnEntity>;
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
- };
@@ -8,7 +8,7 @@ export interface IUserEntity extends IAuditColumnEntity {
8
8
  email: string;
9
9
  contactNo: string;
10
10
  secondaryContactNo?: string;
11
- password: string;
11
+ password?: string;
12
12
  userCode?: string;
13
13
  joiningDate?: Date;
14
14
  endDate?: Date;
@@ -21,7 +21,7 @@ export interface IUserEntity extends IAuditColumnEntity {
21
21
  aadharNo?: string;
22
22
  aadharDocumentUrl?: string;
23
23
  role: UserRoleEnum;
24
- status: UserStatusEnum;
24
+ status?: UserStatusEnum;
25
25
  organizationId?: number;
26
26
  passportDocumentUrl?: string;
27
27
  academicQualificationDocumentUrl?: string;
@@ -39,3 +39,5 @@ export interface IUserEntity extends IAuditColumnEntity {
39
39
  permissions?: string[];
40
40
  }
41
41
  export type IUserEntityFilterData = IEntityFilterData<IUserEntity>;
42
+ export declare const charForPassword = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
43
+ export declare const passwordLength = 12;
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.passwordLength = exports.charForPassword = void 0;
4
+ exports.charForPassword = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
5
+ exports.passwordLength = 12;
@@ -2,8 +2,15 @@ export declare enum ErrorKeyEnum {
2
2
  TIME_UNIT = "TIME_UNIT",
3
3
  CURRENCY = "CURRENCY",
4
4
  TIMESHEET_FLOW_ACTION = "TIMESHEET_FLOW_ACTION",
5
+ TIMESHEET_STATUS = "TIMESHEET_STATUS",
5
6
  BILLING_FLOW_ACTION = "BILLING_FLOW_ACTION",
6
7
  REIMBURSEMENT_FLOW_ACTION = "REIMBURSEMENT_FLOW_ACTION",
7
8
  REIMBURSEMENT_EXPENSE_FLOW_ACTION = "REIMBURSEMENT_EXPENSE_FLOW_ACTION",
8
- TIMESHEET_KEY = "TIMESHEET_KEY"
9
+ TIMESHEET_KEY = "TIMESHEET_KEY",
10
+ BANK_FLOW_ACTION = "BANK_FLOW_ACTION",
11
+ BANK_KEY = "BANK_KEY",
12
+ BANK_STATUS = "BANK_STATUS",
13
+ BILLING_TRANSACTION_TYPE = "BILLING_TRANSACTION_TYPE",
14
+ HISTORY_OPERATION = "HISTORY_OPERATION",
15
+ USER_ROLE = "USER_ROLE"
9
16
  }
@@ -6,8 +6,15 @@ var ErrorKeyEnum;
6
6
  ErrorKeyEnum["TIME_UNIT"] = "TIME_UNIT";
7
7
  ErrorKeyEnum["CURRENCY"] = "CURRENCY";
8
8
  ErrorKeyEnum["TIMESHEET_FLOW_ACTION"] = "TIMESHEET_FLOW_ACTION";
9
+ ErrorKeyEnum["TIMESHEET_STATUS"] = "TIMESHEET_STATUS";
9
10
  ErrorKeyEnum["BILLING_FLOW_ACTION"] = "BILLING_FLOW_ACTION";
10
11
  ErrorKeyEnum["REIMBURSEMENT_FLOW_ACTION"] = "REIMBURSEMENT_FLOW_ACTION";
11
12
  ErrorKeyEnum["REIMBURSEMENT_EXPENSE_FLOW_ACTION"] = "REIMBURSEMENT_EXPENSE_FLOW_ACTION";
12
13
  ErrorKeyEnum["TIMESHEET_KEY"] = "TIMESHEET_KEY";
14
+ ErrorKeyEnum["BANK_FLOW_ACTION"] = "BANK_FLOW_ACTION";
15
+ ErrorKeyEnum["BANK_KEY"] = "BANK_KEY";
16
+ ErrorKeyEnum["BANK_STATUS"] = "BANK_STATUS";
17
+ ErrorKeyEnum["BILLING_TRANSACTION_TYPE"] = "BILLING_TRANSACTION_TYPE";
18
+ ErrorKeyEnum["HISTORY_OPERATION"] = "HISTORY_OPERATION";
19
+ ErrorKeyEnum["USER_ROLE"] = "USER_ROLE";
13
20
  })(ErrorKeyEnum || (exports.ErrorKeyEnum = ErrorKeyEnum = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "2.9.2",
3
+ "version": "3.0.1-beta.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -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
- };