law-common 1.2.58-beta.1 → 1.2.58-beta.10

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 (77) hide show
  1. package/dist/src/api/index.d.ts +23 -1
  2. package/dist/src/api/index.js +23 -1
  3. package/dist/src/api/interface/bank.create.dto.interface.d.ts +3 -0
  4. package/dist/src/api/interface/bank.entity.api.d.ts +3 -0
  5. package/dist/src/api/interface/bank.entity.api.js +2 -0
  6. package/dist/src/api/interface/bank.entity.response.d.ts +4 -0
  7. package/dist/src/api/interface/bank.entity.response.js +2 -0
  8. package/dist/src/api/interface/bank.update.dto.interface.d.ts +3 -0
  9. package/dist/src/api/interface/bank.update.dto.interface.js +2 -0
  10. package/dist/src/api/interface/billing.entity.response.d.ts +37 -3
  11. package/dist/src/api/interface/billing.payment.create.dto.interface.d.ts +3 -0
  12. package/dist/src/api/interface/billing.payment.create.dto.interface.js +2 -0
  13. package/dist/src/api/interface/billing.payment.entity.api.d.ts +3 -0
  14. package/dist/src/api/interface/billing.payment.entity.api.js +2 -0
  15. package/dist/src/api/interface/billing.payment.update.dto.interface.d.ts +3 -0
  16. package/dist/src/api/interface/billing.payment.update.dto.interface.js +2 -0
  17. package/dist/src/api/interface/billing.timesheet.entity.api.d.ts +3 -0
  18. package/dist/src/api/interface/billing.timesheet.entity.api.js +2 -0
  19. package/dist/src/api/interface/billing.update.dto.interface.d.ts +29 -0
  20. package/dist/src/api/interface/billing.update.dto.interface.js +2 -0
  21. package/dist/src/api/interface/client.affiliate.create.dto.interface.d.ts +3 -0
  22. package/dist/src/api/interface/client.affiliate.create.dto.interface.js +2 -0
  23. package/dist/src/api/interface/client.affiliate.entity.api.d.ts +3 -0
  24. package/dist/src/api/interface/client.affiliate.entity.api.js +2 -0
  25. package/dist/src/api/interface/client.affiliate.update.dto.interface.d.ts +3 -0
  26. package/dist/src/api/interface/client.affiliate.update.dto.interface.js +2 -0
  27. package/dist/src/api/interface/permission.create.dto.interface.d.ts +3 -0
  28. package/dist/src/api/interface/permission.create.dto.interface.js +2 -0
  29. package/dist/src/api/interface/permission.entity.api.d.ts +3 -0
  30. package/dist/src/api/interface/permission.entity.api.js +2 -0
  31. package/dist/src/api/interface/permission.update.dto.interface.d.ts +3 -0
  32. package/dist/src/api/interface/permission.update.dto.interface.js +2 -0
  33. package/dist/src/api/interface/project.response.interface.js +2 -0
  34. package/dist/src/api/interface/role.create.dto.interface.d.ts +3 -0
  35. package/dist/src/api/interface/role.create.dto.interface.js +2 -0
  36. package/dist/src/api/interface/role.entity.response.d.ts +3 -0
  37. package/dist/src/api/interface/role.entity.response.js +2 -0
  38. package/dist/src/api/interface/role.permission.mapping.create.dto.interface.d.ts +5 -0
  39. package/dist/src/api/interface/role.permission.mapping.create.dto.interface.js +2 -0
  40. package/dist/src/api/interface/role.permission.mapping.entity.api.d.ts +4 -0
  41. package/dist/src/api/interface/role.permission.mapping.entity.api.js +2 -0
  42. package/dist/src/api/interface/role.permission.mapping.update.dto.interface.d.ts +4 -0
  43. package/dist/src/api/interface/role.permission.mapping.update.dto.interface.js +2 -0
  44. package/dist/src/api/interface/role.update.dto.interface.d.ts +3 -0
  45. package/dist/src/api/interface/role.update.dto.interface.js +2 -0
  46. package/dist/src/api/interface/user.create.dto.interace.d.ts +3 -1
  47. package/dist/src/entities/enums/billing.payment.type.enum.d.ts +4 -0
  48. package/dist/src/entities/enums/billing.payment.type.enum.js +8 -0
  49. package/dist/src/entities/enums/billing.status.enum.d.ts +9 -0
  50. package/dist/src/entities/enums/billing.status.enum.js +13 -0
  51. package/dist/src/entities/enums/user.entity.enum.d.ts +4 -1
  52. package/dist/src/entities/enums/user.entity.enum.js +5 -2
  53. package/dist/src/entities/index.d.ts +8 -0
  54. package/dist/src/entities/index.js +8 -0
  55. package/dist/src/entities/interface/bank.entity.interface.d.ts +14 -0
  56. package/dist/src/entities/interface/bank.entity.interface.js +2 -0
  57. package/dist/src/entities/interface/billing.entity.interface.d.ts +9 -2
  58. package/dist/src/entities/interface/billing_payment.entity.interface.d.ts +15 -0
  59. package/dist/src/entities/interface/billing_payment.entity.interface.js +2 -0
  60. package/dist/src/entities/interface/client_affiliate_entity.interface.d.ts +11 -0
  61. package/dist/src/entities/interface/client_affiliate_entity.interface.js +2 -0
  62. package/dist/src/entities/interface/office.location.entity.d.ts +1 -0
  63. package/dist/src/entities/interface/permission.entity.interface.d.ts +9 -0
  64. package/dist/src/entities/interface/permission.entity.interface.js +2 -0
  65. package/dist/src/entities/interface/role.entity.interface.d.ts +9 -0
  66. package/dist/src/entities/interface/role.entity.interface.js +2 -0
  67. package/dist/src/entities/interface/role.permission.mapping.entity.interface.d.ts +6 -0
  68. package/dist/src/entities/interface/role.permission.mapping.entity.interface.js +4 -0
  69. package/dist/src/entities/interface/user.entity.interface.d.ts +13 -0
  70. package/dist/src/misc/interface/optional.interface.js +23 -10
  71. package/dist/src/model/entities/interface/timesheet.model.interface.d.ts +3 -0
  72. package/dist/src/model/entities/interface/timesheet.model.interface.js +2 -0
  73. package/dist/src/model/entities/timesheet.model.d.ts +25 -0
  74. package/dist/src/model/entities/timesheet.model.js +35 -0
  75. package/package.json +34 -34
  76. /package/dist/src/api/interface/{billing.response.interface.js → bank.create.dto.interface.js} +0 -0
  77. /package/dist/src/api/interface/{billing.response.interface.d.ts → project.response.interface.d.ts} +0 -0
@@ -17,7 +17,7 @@ export * from "./interface/rate.entity.response";
17
17
  export * from "./interface/client.entity.response";
18
18
  export * from "./interface/project.entity.response";
19
19
  export * from "./interface/timesheet.entity.response.interface";
20
- export * from "./interface/billing.response.interface";
20
+ export * from "./interface/project.response.interface";
21
21
  export * from "./interface/reimbursement.entity.response";
22
22
  export * from "./interface/expense_type.create.dto.interface";
23
23
  export * from "./interface/task.create.dto.interface";
@@ -30,3 +30,25 @@ export * from "./interface/office.location.create.dto.interface";
30
30
  export * from "./interface/office.location.entity.api";
31
31
  export * from "./interface/office.Location.update.dto.interface";
32
32
  export * from "./interface/office.location.entity.response";
33
+ export * from "./interface/billing.timesheet.entity.api";
34
+ export * from "./interface/billing.entity.api";
35
+ export * from "./interface/billing.update.dto.interface";
36
+ export * from "./interface/bank.create.dto.interface";
37
+ export * from "./interface/bank.update.dto.interface";
38
+ export * from "./interface/bank.entity.api";
39
+ export * from "./interface/bank.entity.response";
40
+ export * from "./interface/billing.payment.create.dto.interface";
41
+ export * from "./interface/billing.payment.entity.api";
42
+ export * from "./interface/billing.payment.update.dto.interface";
43
+ export * from "./interface/client.affiliate.create.dto.interface";
44
+ export * from "./interface/client.affiliate.update.dto.interface";
45
+ export * from "./interface/client.affiliate.entity.api";
46
+ export * from "./interface/role.create.dto.interface";
47
+ export * from "./interface/role.update.dto.interface";
48
+ export * from "./interface/role.entity.response";
49
+ export * from "./interface/permission.create.dto.interface";
50
+ export * from "./interface/permission.update.dto.interface";
51
+ export * from "./interface/permission.entity.api";
52
+ export * from "./interface/role.permission.mapping.create.dto.interface";
53
+ export * from "./interface/role.permission.mapping.entity.api";
54
+ export * from "./interface/role.permission.mapping.update.dto.interface";
@@ -33,7 +33,7 @@ __exportStar(require("./interface/rate.entity.response"), exports);
33
33
  __exportStar(require("./interface/client.entity.response"), exports);
34
34
  __exportStar(require("./interface/project.entity.response"), exports);
35
35
  __exportStar(require("./interface/timesheet.entity.response.interface"), exports);
36
- __exportStar(require("./interface/billing.response.interface"), exports);
36
+ __exportStar(require("./interface/project.response.interface"), exports);
37
37
  __exportStar(require("./interface/reimbursement.entity.response"), exports);
38
38
  __exportStar(require("./interface/expense_type.create.dto.interface"), exports);
39
39
  __exportStar(require("./interface/task.create.dto.interface"), exports);
@@ -46,3 +46,25 @@ __exportStar(require("./interface/office.location.create.dto.interface"), export
46
46
  __exportStar(require("./interface/office.location.entity.api"), exports);
47
47
  __exportStar(require("./interface/office.Location.update.dto.interface"), exports);
48
48
  __exportStar(require("./interface/office.location.entity.response"), exports);
49
+ __exportStar(require("./interface/billing.timesheet.entity.api"), exports);
50
+ __exportStar(require("./interface/billing.entity.api"), exports);
51
+ __exportStar(require("./interface/billing.update.dto.interface"), exports);
52
+ __exportStar(require("./interface/bank.create.dto.interface"), exports);
53
+ __exportStar(require("./interface/bank.update.dto.interface"), exports);
54
+ __exportStar(require("./interface/bank.entity.api"), exports);
55
+ __exportStar(require("./interface/bank.entity.response"), exports);
56
+ __exportStar(require("./interface/billing.payment.create.dto.interface"), exports);
57
+ __exportStar(require("./interface/billing.payment.entity.api"), exports);
58
+ __exportStar(require("./interface/billing.payment.update.dto.interface"), exports);
59
+ __exportStar(require("./interface/client.affiliate.create.dto.interface"), exports);
60
+ __exportStar(require("./interface/client.affiliate.update.dto.interface"), exports);
61
+ __exportStar(require("./interface/client.affiliate.entity.api"), exports);
62
+ __exportStar(require("./interface/role.create.dto.interface"), exports);
63
+ __exportStar(require("./interface/role.update.dto.interface"), exports);
64
+ __exportStar(require("./interface/role.entity.response"), exports);
65
+ __exportStar(require("./interface/permission.create.dto.interface"), exports);
66
+ __exportStar(require("./interface/permission.update.dto.interface"), exports);
67
+ __exportStar(require("./interface/permission.entity.api"), exports);
68
+ __exportStar(require("./interface/role.permission.mapping.create.dto.interface"), exports);
69
+ __exportStar(require("./interface/role.permission.mapping.entity.api"), exports);
70
+ __exportStar(require("./interface/role.permission.mapping.update.dto.interface"), exports);
@@ -0,0 +1,3 @@
1
+ import { IBankEntity, IEntityCreateDto } from "../../entities";
2
+ export interface IBankCreateDto extends IEntityCreateDto<IBankEntity> {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IBankEntity } from "../../entities";
2
+ export type IBankApiEntity = IApiEntity<IBankEntity>;
3
+ export type IBankApiEntityArray = IBankApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { IBankApiEntity } from "./bank.entity.api";
2
+ import { IBaseResponse } from "./base.response.interface";
3
+ export type IBankApiEntityResponse = IBaseResponse<IBankApiEntity>;
4
+ export type IBankApiEntityResponseArray = IBaseResponse<IBankApiEntity[]>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IBankEntity, IEntityUpdateDto } from "../../entities";
2
+ export interface IBankUpdateDto extends IEntityUpdateDto<IBankEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,38 @@
1
- import { IBaseResponse } from "./base.response.interface";
1
+ import { IAuditColumnEntity, IBillingTimesheetDetail, PaymentStatusEnum, StatusEnum } from "../../entities";
2
2
  import { IBillingApiEntity } from "./billing.entity.api";
3
- export type IBillingApiEntityResponse = IBaseResponse<IBillingApiEntity>;
4
- export type IBillingApiEntityResponseArray = IBaseResponse<IBillingApiEntity[]>;
3
+ import { IBillingTimesheetApiEntity } from "./billing.timesheet.entity.api";
4
+ export interface IBillingEntityResponse extends IAuditColumnEntity {
5
+ id: number;
6
+ startDate: string;
7
+ endDate: string;
8
+ projectId: number;
9
+ totalMinutes: number;
10
+ totalAmount: number;
11
+ invoiceNumber?: number;
12
+ paymentStatus: PaymentStatusEnum;
13
+ billingTimesheets: IBillingTimesheetDetail[];
14
+ status?: StatusEnum;
15
+ writeoffAmount?: number;
16
+ }
17
+ export type IBillingEntityGet = {
18
+ billing: IBillingApiEntity;
19
+ billingTimesheets: IBillingTimesheetApiEntity[];
20
+ };
21
+ export type IBillingEntityUpdateGet = {
22
+ id: number;
23
+ startDate: string;
24
+ endDate: string;
25
+ projectId: number;
26
+ totalAmount: number;
27
+ totalMinutes: number;
28
+ paymentStatus: PaymentStatusEnum;
29
+ status: StatusEnum;
30
+ invoiceNumber: number;
31
+ writeoffAmount: number;
32
+ createdOn: string;
33
+ updatedOn: string;
34
+ createdBy: number;
35
+ updatedBy: number;
36
+ timesheets: IBillingTimesheetApiEntity[];
37
+ };
38
+ export type IBillingEntityGetArray = IBillingEntityGet[];
@@ -0,0 +1,3 @@
1
+ import { IBillingPaymentEntity, IEntityCreateDto } from "../../entities";
2
+ export interface IBillingPaymentCreateDto extends IEntityCreateDto<IBillingPaymentEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IBillingPaymentEntity } from "../../entities";
2
+ export type IBillingPaymentApiEntity = IApiEntity<IBillingPaymentEntity>;
3
+ export type IBillingPaymentApiEntityArray = IBillingPaymentApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IBillingPaymentEntity, IEntityUpdateDto } from "../../entities";
2
+ export interface IBillingPaymentUpdateDto extends IEntityUpdateDto<IBillingPaymentEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IBillingTimesheetEntity } from "../../entities";
2
+ export type IBillingTimesheetApiEntity = IApiEntity<IBillingTimesheetEntity>;
3
+ export type IBillingTimesheetApiEntityArray = IBillingTimesheetApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ import { BillingImpactEnum, BillingTimesheetStatusEnum, IBillingEntity, IBillingTimesheetEntity, IEntityUpdateDto, PaymentStatusEnum, StatusEnum } from "../../entities";
2
+ export interface IBillingUpdateDto extends IEntityUpdateDto<IBillingEntity> {
3
+ }
4
+ export interface IBillingTimesheetUpdateDto extends IEntityUpdateDto<IBillingTimesheetEntity> {
5
+ id?: number;
6
+ task?: string;
7
+ description?: string;
8
+ dateCode?: string;
9
+ totalDuration?: number;
10
+ totalAmount?: number;
11
+ impact?: BillingImpactEnum;
12
+ amendmentPurpose?: string;
13
+ }
14
+ export interface IBillingTimesheetDeleteDto extends Partial<IBillingTimesheetEntity> {
15
+ id: number;
16
+ changedStatus: BillingTimesheetStatusEnum;
17
+ }
18
+ export interface IUpdateBillingDto {
19
+ startDate?: string;
20
+ endDate?: string;
21
+ projectId?: number;
22
+ totalAmount?: number;
23
+ totalMinutes?: number;
24
+ paymentStatus?: PaymentStatusEnum;
25
+ status?: StatusEnum;
26
+ invoiceNumber?: number;
27
+ writeoffAmount?: number;
28
+ timesheets?: IBillingTimesheetUpdateDto[];
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IClientAffiliateEntity, IEntityCreateDto } from "../../entities";
2
+ export interface IClientAffiliateCreateDto extends IEntityCreateDto<IClientAffiliateEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IClientAffiliateEntity } from "../../entities";
2
+ export type IClientAffiliateApiEntity = IApiEntity<IClientAffiliateEntity>;
3
+ export type IClientAffiliateApiEntityArray = IClientAffiliateApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IClientAffiliateEntity, IEntityUpdateDto } from "../../entities";
2
+ export interface IClientAffiliateUpdateDto extends IEntityUpdateDto<IClientAffiliateEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IEntityCreateDto, IPermissionEntity } from "../../entities";
2
+ export interface IPermissionCreateDto extends IEntityCreateDto<IPermissionEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IPermissionEntity } from "../../entities";
2
+ export type IPermissionApiEntity = IApiEntity<IPermissionEntity>;
3
+ export type IPermissionApiEntityArray = IPermissionApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IEntityUpdateDto, IPermissionEntity } from "../../entities";
2
+ export interface IPermissionUpdateDto extends IEntityUpdateDto<IPermissionEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IEntityCreateDto, IRoleEntity } from "../../entities";
2
+ export interface IRoleCreateDto extends IEntityCreateDto<IRoleEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IRoleEntity } from "../../entities";
2
+ export type IRoleApiEntity = IApiEntity<IRoleEntity>;
3
+ export type IRoleApiEntityArray = IRoleApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface IRolePermissionsMappingCreateDto {
2
+ permissions: {
3
+ [permissionName: string]: string[];
4
+ };
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { IApiEntity } from "../../entities";
2
+ import { IRolePermissionMappingEntity } from "../../entities/interface/role.permission.mapping.entity.interface";
3
+ export type IRolePermissionMappingApiEntity = IApiEntity<IRolePermissionMappingEntity>;
4
+ export type IRolePermissionMappingApiEntityArray = IRolePermissionMappingApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { IEntityUpdateDto } from "../../entities";
2
+ import { IRolePermissionMappingEntity } from "../../entities/interface/role.permission.mapping.entity.interface";
3
+ export interface IRolePermissionMappingUpdateDto extends IEntityUpdateDto<IRolePermissionMappingEntity> {
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IEntityUpdateDto, IRoleEntity } from "../../entities";
2
+ export interface IRoleUpdateDto extends IEntityUpdateDto<IRoleEntity> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
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"> {
3
3
  panDocument?: File;
4
4
  aadharDocument?: File;
5
+ passportDocument?: File;
6
+ academicQualificationDocument?: File;
5
7
  }
@@ -0,0 +1,4 @@
1
+ export declare enum BillingPaymentType {
2
+ NEFT = "NEFT",
3
+ UTR = "UTR"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BillingPaymentType = void 0;
4
+ var BillingPaymentType;
5
+ (function (BillingPaymentType) {
6
+ BillingPaymentType["NEFT"] = "NEFT";
7
+ BillingPaymentType["UTR"] = "UTR";
8
+ })(BillingPaymentType || (exports.BillingPaymentType = BillingPaymentType = {}));
@@ -0,0 +1,9 @@
1
+ export declare enum StatusEnum {
2
+ PENDING = "PENDING",
3
+ CLIENT_REVIEW = "CLIENT_REVIEW",
4
+ APPROVED = "APPROVED",
5
+ PAYMENT_PENDING = "PAYMENT_PENDING",
6
+ PAYMENT_DONE = "PAYMENT_DONE",
7
+ CLIENT_REVISION = "CLIENT_REVISION",
8
+ CANCELLED = "CANCELLED"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StatusEnum = void 0;
4
+ var StatusEnum;
5
+ (function (StatusEnum) {
6
+ StatusEnum["PENDING"] = "PENDING";
7
+ StatusEnum["CLIENT_REVIEW"] = "CLIENT_REVIEW";
8
+ StatusEnum["APPROVED"] = "APPROVED";
9
+ StatusEnum["PAYMENT_PENDING"] = "PAYMENT_PENDING";
10
+ StatusEnum["PAYMENT_DONE"] = "PAYMENT_DONE";
11
+ StatusEnum["CLIENT_REVISION"] = "CLIENT_REVISION";
12
+ StatusEnum["CANCELLED"] = "CANCELLED";
13
+ })(StatusEnum || (exports.StatusEnum = StatusEnum = {}));
@@ -7,7 +7,10 @@ export declare enum UserRoleEnum {
7
7
  admin = "admin",
8
8
  employee = "employee",
9
9
  partner = "partner",
10
- accountant = "accountant"
10
+ accountant = "accountant",
11
+ owner = "owner",
12
+ secretary = "secretary",
13
+ hr = "hr"
11
14
  }
12
15
  export declare namespace UserRoleEnum {
13
16
  function getNames(): string[];
@@ -13,16 +13,19 @@ var UserRoleEnum;
13
13
  UserRoleEnum["employee"] = "employee";
14
14
  UserRoleEnum["partner"] = "partner";
15
15
  UserRoleEnum["accountant"] = "accountant";
16
+ UserRoleEnum["owner"] = "owner";
17
+ UserRoleEnum["secretary"] = "secretary";
18
+ UserRoleEnum["hr"] = "hr";
16
19
  })(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
17
20
  (function (UserRoleEnum) {
18
21
  function getNames() {
19
- return Object.values(UserRoleEnum).filter(value => typeof value === 'string');
22
+ return Object.values(UserRoleEnum).filter((value) => typeof value === "string");
20
23
  }
21
24
  UserRoleEnum.getNames = getNames;
22
25
  })(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
23
26
  (function (UserStatusEnum) {
24
27
  function getNames() {
25
- return Object.values(UserStatusEnum).filter(value => typeof value === 'string');
28
+ return Object.values(UserStatusEnum).filter((value) => typeof value === "string");
26
29
  }
27
30
  UserStatusEnum.getNames = getNames;
28
31
  })(UserStatusEnum || (exports.UserStatusEnum = UserStatusEnum = {}));
@@ -23,4 +23,12 @@ export * from "./enums/billing.impact.enum";
23
23
  export * from "./interface/billing.entity.interface";
24
24
  export * from "./enums/payment_status.enum";
25
25
  export * from "./enums/billing.timesheet.change.status.enum";
26
+ export * from "./enums/billing.status.enum";
26
27
  export * from "./interface/office.location.entity";
28
+ export * from "./interface/bank.entity.interface";
29
+ export * from "./enums/billing.payment.type.enum";
30
+ export * from "./interface/billing_payment.entity.interface";
31
+ export * from "./interface/client_affiliate_entity.interface";
32
+ export * from "./interface/role.entity.interface";
33
+ export * from "./interface/permission.entity.interface";
34
+ export * from "./interface/role.permission.mapping.entity.interface";
@@ -39,4 +39,12 @@ __exportStar(require("./enums/billing.impact.enum"), exports);
39
39
  __exportStar(require("./interface/billing.entity.interface"), exports);
40
40
  __exportStar(require("./enums/payment_status.enum"), exports);
41
41
  __exportStar(require("./enums/billing.timesheet.change.status.enum"), exports);
42
+ __exportStar(require("./enums/billing.status.enum"), exports);
42
43
  __exportStar(require("./interface/office.location.entity"), exports);
44
+ __exportStar(require("./interface/bank.entity.interface"), exports);
45
+ __exportStar(require("./enums/billing.payment.type.enum"), exports);
46
+ __exportStar(require("./interface/billing_payment.entity.interface"), exports);
47
+ __exportStar(require("./interface/client_affiliate_entity.interface"), exports);
48
+ __exportStar(require("./interface/role.entity.interface"), exports);
49
+ __exportStar(require("./interface/permission.entity.interface"), exports);
50
+ __exportStar(require("./interface/role.permission.mapping.entity.interface"), exports);
@@ -0,0 +1,14 @@
1
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
2
+ import { IEntityFilterData } from "./entity.utils.interface";
3
+ export interface IBankEntity extends IAuditColumnEntity {
4
+ id: number;
5
+ accountName: string;
6
+ organizationId: number;
7
+ name: string;
8
+ accountNo: string;
9
+ branchAddress: string;
10
+ micrCode: string;
11
+ ifscCode: string;
12
+ emailForPaymentInfo: string;
13
+ }
14
+ export type IBankEntityFilterData = IEntityFilterData<IBankEntity>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  import { BillingImpactEnum } from "../enums/billing.impact.enum";
2
+ import { StatusEnum } from "../enums/billing.status.enum";
2
3
  import { BillingTimesheetStatusEnum } from "../enums/billing.timesheet.change.status.enum";
3
4
  import { PaymentStatusEnum } from "../enums/payment_status.enum";
4
5
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
@@ -12,6 +13,8 @@ export interface IBillingEntity extends IAuditColumnEntity {
12
13
  totalMinutes: number;
13
14
  invoiceNumber?: number;
14
15
  paymentStatus: PaymentStatusEnum;
16
+ status: StatusEnum;
17
+ writeoffAmount: number;
15
18
  }
16
19
  export interface IBillingTimesheetEntity extends IAuditColumnEntity {
17
20
  id: number;
@@ -30,7 +33,8 @@ export interface IBillingTimesheetEntity extends IAuditColumnEntity {
30
33
  }
31
34
  export interface IBillingTimesheetEntityCreateDto extends IEntityCreateDto<IBillingTimesheetEntity> {
32
35
  }
33
- export interface IBillingTimesheetDetail {
36
+ export interface IBillingTimesheetDetail extends IAuditColumnEntity {
37
+ id: number;
34
38
  timesheetId: number;
35
39
  totalAmount: number;
36
40
  changedStatus: BillingTimesheetStatusEnum;
@@ -45,4 +49,7 @@ export interface IBillingTimesheetDetail {
45
49
  }
46
50
  export interface IBillingTimesheetDetailsArray extends Array<IBillingTimesheetDetail> {
47
51
  }
48
- export type IBillingEntityFilterData = IEntityFilterData<IBillingEntity>;
52
+ export interface IBillingEntityFilterDto extends IEntityFilterData<IBillingEntity> {
53
+ }
54
+ export interface IBillingTimesheetEntityFilterDto extends IEntityFilterData<IBillingTimesheetEntity> {
55
+ }
@@ -0,0 +1,15 @@
1
+ import { BillingPaymentType } from "../enums/billing.payment.type.enum";
2
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
+ import { IEntityFilterData } from "./entity.utils.interface";
4
+ export interface IBillingPaymentEntity extends IAuditColumnEntity {
5
+ id: number;
6
+ billingId: number;
7
+ bankId: number;
8
+ type: BillingPaymentType;
9
+ transactionId: string;
10
+ amount: number;
11
+ date: string;
12
+ tds: number;
13
+ discount: number;
14
+ }
15
+ export type IBillingPaymentEntityFilterData = IEntityFilterData<IBillingPaymentEntity>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
2
+ import { IEntityFilterData } from "./entity.utils.interface";
3
+ export interface IClientAffiliateEntity extends IAuditColumnEntity {
4
+ id: number;
5
+ name: string;
6
+ address: string;
7
+ details?: string;
8
+ clientId: number;
9
+ organizationId: number;
10
+ }
11
+ export type IClientAffiliateEntityFilterDto = IEntityFilterData<IClientAffiliateEntity>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,5 +7,6 @@ export interface IOfficeLocationEntity extends IAuditColumnEntity {
7
7
  address: string;
8
8
  zipCode: number;
9
9
  country: CountryEnum;
10
+ organizationId: number;
10
11
  }
11
12
  export type IOfficeLocationEntityFilterData = IEntityFilterData<IOfficeLocationEntity>;
@@ -0,0 +1,9 @@
1
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
2
+ import { IEntityFilterData } from "./entity.utils.interface";
3
+ export interface IPermissionEntity extends IAuditColumnEntity {
4
+ id: number;
5
+ name: string;
6
+ description?: string;
7
+ organizationId: number;
8
+ }
9
+ export type IPermissionEntityFilterData = IEntityFilterData<IPermissionEntity>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
2
+ import { IEntityFilterData } from "./entity.utils.interface";
3
+ export interface IRoleEntity extends IAuditColumnEntity {
4
+ id: number;
5
+ name: string;
6
+ description?: string;
7
+ organizationId: number;
8
+ }
9
+ export type IRoleEntityFilterData = IEntityFilterData<IRoleEntity>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
2
+ export interface IRolePermissionMappingEntity extends IAuditColumnEntity {
3
+ id: number;
4
+ roleId: number;
5
+ permissionId: number;
6
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export type IRolePermissionMappingEntityFilterData =
4
+ // IEntityFilterData<IRolePermissionMappingEntity>;
@@ -23,5 +23,18 @@ export interface IUserEntity extends IAuditColumnEntity {
23
23
  role: UserRoleEnum;
24
24
  status: UserStatusEnum;
25
25
  organizationId?: number;
26
+ passportDocumentUrl?: string;
27
+ academicQualificationDocumentUrl?: string;
28
+ officeAllocation: number;
29
+ tempAddress?: string;
30
+ tempZipCode?: number;
31
+ tempCountry?: CountryEnum;
32
+ tempAddressSameAsPrimary: boolean;
33
+ emergencyContactName: string;
34
+ emergencyContactNo: string;
35
+ emergencyContactRelation: string;
36
+ secondEmergencyContactName?: string;
37
+ secondaryEmergencyContactNo?: string;
38
+ secondaryEmergencyContactRelation?: string;
26
39
  }
27
40
  export type IUserEntityFilterData = IEntityFilterData<IUserEntity>;
@@ -2,26 +2,39 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const entities_1 = require("../../entities");
4
4
  const userDTO = {
5
- contactNo: '',
6
- secondaryContactNo: '',
7
- password: '',
8
- userCode: '',
5
+ contactNo: "",
6
+ secondaryContactNo: "",
7
+ password: "",
8
+ userCode: "",
9
9
  joiningDate: new Date(),
10
10
  endDate: new Date(),
11
- address: '',
11
+ address: "",
12
12
  zipCode: 0,
13
13
  country: entities_1.CountryEnum.India,
14
- designation: '',
14
+ designation: "",
15
15
  role: entities_1.UserRoleEnum.employee,
16
16
  createdOn: new Date(),
17
17
  updatedOn: new Date(),
18
18
  createdBy: 1,
19
19
  updatedBy: 1,
20
- panDocumentUrl: '',
21
- aadharDocumentUrl: '',
22
- panNo: '',
23
- aadharNo: '',
20
+ panDocumentUrl: "",
21
+ aadharDocumentUrl: "",
22
+ panNo: "",
23
+ aadharNo: "",
24
24
  status: entities_1.UserStatusEnum.active,
25
25
  organizationId: 1,
26
+ passportDocumentUrl: "",
27
+ academicQualificationDocumentUrl: "",
28
+ officeAllocation: 0,
29
+ tempAddress: "",
30
+ tempZipCode: 0,
31
+ tempCountry: entities_1.CountryEnum.India,
32
+ tempAddressSameAsPrimary: true,
33
+ emergencyContactName: "",
34
+ emergencyContactNo: "",
35
+ emergencyContactRelation: "",
36
+ secondEmergencyContactName: "",
37
+ secondaryEmergencyContactNo: "",
38
+ secondaryEmergencyContactRelation: "",
26
39
  };
27
40
  console.log(userDTO);
@@ -0,0 +1,3 @@
1
+ import { ITimesheetEntity } from "../../../entities";
2
+ export interface ITimesheetEntityModel extends ITimesheetEntity {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import { ITimesheetEntity } from "../../entities";
2
+ import { ITimesheetEntityModel } from "./interface/timesheet.model.interface";
3
+ export declare class TimesheetEntityModel implements ITimesheetEntityModel {
4
+ id: number;
5
+ userId: number;
6
+ projectId: number;
7
+ task: string;
8
+ description?: string;
9
+ dateCode: string;
10
+ totalDuration: number;
11
+ createdBy: number;
12
+ createdOn: Date;
13
+ updatedBy: number;
14
+ updatedOn: Date;
15
+ /**
16
+ * @param timesheets - Array of TimesheetModel instances
17
+ * @return - Array of Timesheet Model
18
+ */
19
+ static convertToModel(timesheetsEntity: ITimesheetEntity): ITimesheetEntityModel;
20
+ /**
21
+ * @param timesheets
22
+ * @returns
23
+ */
24
+ static getTotalDuration(timesheets: ITimesheetEntityModel[]): number;
25
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimesheetEntityModel = void 0;
4
+ class TimesheetEntityModel {
5
+ constructor() {
6
+ this.id = 0;
7
+ this.userId = 0;
8
+ this.projectId = 0;
9
+ this.task = "";
10
+ this.description = "";
11
+ this.dateCode = "";
12
+ this.totalDuration = 0;
13
+ this.createdBy = 0;
14
+ this.createdOn = new Date();
15
+ this.updatedBy = 1;
16
+ this.updatedOn = new Date();
17
+ }
18
+ /**
19
+ * @param timesheets - Array of TimesheetModel instances
20
+ * @return - Array of Timesheet Model
21
+ */
22
+ static convertToModel(timesheetsEntity) {
23
+ const timesheetModel = Object.assign({}, timesheetsEntity);
24
+ return timesheetModel;
25
+ }
26
+ /**
27
+ * @param timesheets
28
+ * @returns
29
+ */
30
+ static getTotalDuration(timesheets) {
31
+ const totalDurationOfEachTimesheet = timesheets.map((timesheet) => timesheet.totalDuration);
32
+ return totalDurationOfEachTimesheet.reduce((sum, duration) => sum + duration, 0);
33
+ }
34
+ }
35
+ exports.TimesheetEntityModel = TimesheetEntityModel;
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "law-common",
3
- "version": "1.2.58-beta.1",
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
- "link": "npm run build && npm link",
16
- "test": "jest"
17
- },
18
- "keywords": [],
19
- "author": "",
20
- "license": "ISC",
21
- "devDependencies": {
22
- "@types/jest": "^29.5.13",
23
- "@types/node": "^22.6.1",
24
- "jest": "^29.7.0",
25
- "ts-jest": "^29.2.5",
26
- "ts-node": "^10.9.2",
27
- "typescript": "^5.6.2"
28
- },
29
- "dependencies": {
30
- "@types/express": "^5.0.0",
31
- "@types/multer": "^1.4.12",
32
- "date-fns": "^4.1.0"
33
- }
34
- }
1
+ {
2
+ "name": "law-common",
3
+ "version": "1.2.58-beta.10",
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
+ "link": "npm run build && npm link",
16
+ "test": "jest"
17
+ },
18
+ "keywords": [],
19
+ "author": "",
20
+ "license": "ISC",
21
+ "devDependencies": {
22
+ "@types/jest": "^29.5.13",
23
+ "@types/node": "^22.6.1",
24
+ "jest": "^29.7.0",
25
+ "ts-jest": "^29.2.5",
26
+ "ts-node": "^10.9.2",
27
+ "typescript": "^5.6.2"
28
+ },
29
+ "dependencies": {
30
+ "@types/express": "^5.0.0",
31
+ "@types/multer": "^1.4.12",
32
+ "date-fns": "^4.1.0"
33
+ }
34
+ }