law-common 9.0.0 → 9.0.2

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.
@@ -32,7 +32,9 @@ export declare enum EntityEnum {
32
32
  REIMBURSEMENT_EXPENSE = "reimbursement_expense",
33
33
  WORK_FROM_HOME = "work_from_home",
34
34
  LEAVE = "leave",
35
- ORGANIZATION = "organization"
35
+ ORGANIZATION = "organization",
36
+ BANK = "bank",
37
+ CLIENT_AFFILIATE = "client_affiliate"
36
38
  }
37
39
  export type ISearchIncludeEntity = {
38
40
  name: EntityEnum;
@@ -64,9 +66,11 @@ export type IBaseEntityApiResponse<T extends {
64
66
  export type EntityRelationConfig<T> = {
65
67
  [K in EntityEnum]?: {
66
68
  mappingProperties: (keyof T)[];
67
- searchProperty: K extends EntityEnum.USER ? keyof IUserEntity : K extends EntityEnum.PROJECT ? keyof IProjectEntity : K extends EntityEnum.BILLING_TIMESHEET ? keyof IBillingTimesheetEntity : never;
69
+ searchProperty: EntityKeyType<K>;
70
+ projectProperties?: EntityKeyType<K>[];
68
71
  };
69
72
  };
73
+ export type EntityKeyType<K extends EntityEnum> = K extends EntityEnum.USER ? keyof IUserEntity : K extends EntityEnum.PROJECT ? keyof IProjectEntity : K extends EntityEnum.BILLING_TIMESHEET ? keyof IBillingTimesheetEntity : never;
70
74
  export type IEntityApiResponse<T extends {
71
75
  createdOn: Date;
72
76
  updatedOn: Date;
@@ -17,4 +17,6 @@ var EntityEnum;
17
17
  EntityEnum["WORK_FROM_HOME"] = "work_from_home";
18
18
  EntityEnum["LEAVE"] = "leave";
19
19
  EntityEnum["ORGANIZATION"] = "organization";
20
+ EntityEnum["BANK"] = "bank";
21
+ EntityEnum["CLIENT_AFFILIATE"] = "client_affiliate";
20
22
  })(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [