law-common 10.22.1-beta.5 → 10.23.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.
- package/dist/src/api/index.d.ts +3 -5
- package/dist/src/api/index.js +3 -6
- package/dist/src/api/interface/billing.entity.response.d.ts +2 -3
- package/dist/src/api/interface/client.entity.response.d.ts +3 -4
- package/dist/src/api/interface/expense_type.entity.api.d.ts +3 -0
- package/dist/src/api/interface/expense_type.entity.response.d.ts +3 -3
- package/dist/src/api/interface/login.response.interface.d.ts +2 -2
- package/dist/src/api/interface/office.location.entity.api.d.ts +3 -0
- package/dist/src/api/interface/office.location.entity.response.d.ts +3 -3
- package/dist/src/api/interface/project.entity.response.d.ts +5 -5
- package/dist/src/api/interface/rate.entity.response.d.ts +4 -0
- package/dist/src/api/interface/reimbursement.entity.response.d.ts +2 -3
- package/dist/src/api/interface/timesheet.entity.response.interface.d.ts +2 -3
- package/dist/src/api/interface/user.create.dto.interace.d.ts +2 -2
- package/dist/src/api/interface/user.update.dto.interface.d.ts +2 -2
- package/dist/src/entities/interface/country.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/designation.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/designation.entity.interface.js +1 -1
- package/dist/src/entities/interface/expense_type.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/industry.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/office.location.entity.d.ts +2 -2
- package/dist/src/entities/interface/rate.entity.interface.d.ts +2 -3
- package/dist/src/entities/interface/user.entity.interface.d.ts +2 -2
- package/dist/src/entities/model/designation.entity.model.d.ts +5 -5
- package/dist/src/entities/model/designation.entity.model.js +6 -6
- package/dist/src/entities/model/entity.model.interface.d.ts +1 -1
- package/dist/src/entities/model/entity.model.interface.js +2 -2
- package/dist/src/entities/model/user.entity.model.d.ts +5 -5
- package/dist/src/entities/model/user.entity.model.js +6 -6
- package/dist/src/misc/interface/optional.interface.js +2 -2
- package/dist/src/utils/helper.fn.util.d.ts +0 -1
- package/dist/src/utils/helper.fn.util.js +0 -6
- package/package.json +1 -1
- package/dist/src/api/interface/country.entity.response.d.ts +0 -4
- package/dist/src/api/interface/designation.entity.response.d.ts +0 -4
- package/dist/src/api/interface/industry.entity.response.d.ts +0 -3
- package/dist/src/api/interface/user.entity.api.d.ts +0 -3
- package/dist/src/api/interface/user.entity.api.js +0 -2
- package/dist/src/api/interface/user.entity.response.d.ts +0 -4
- package/dist/src/api/interface/user.entity.response.js +0 -2
- /package/dist/src/api/interface/{country.entity.response.js → expense_type.entity.api.js} +0 -0
- /package/dist/src/api/interface/{designation.entity.response.js → office.location.entity.api.js} +0 -0
- /package/dist/src/api/interface/{industry.entity.response.js → rate.entity.response.js} +0 -0
package/dist/src/api/index.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
export * from "./interface/base.response.interface";
|
|
2
2
|
export * from "./interface/task.create.dto.interface";
|
|
3
3
|
export * from "./interface/task.update.dto.interface";
|
|
4
|
-
export * from "./interface/user.entity.api";
|
|
5
|
-
export * from "./interface/user.entity.response";
|
|
6
4
|
export * from "./interface/user.create.dto.interace";
|
|
7
5
|
export * from "./interface/login.response.interface";
|
|
8
6
|
export * from "./interface/jwt.payload.interface";
|
|
9
7
|
export * from "./interface/user.update.dto.interface";
|
|
10
|
-
export * from "./interface/designation.entity.response";
|
|
11
8
|
export * from "./interface/login.dto.interface";
|
|
12
|
-
export * from "./interface/industry.entity.response";
|
|
13
9
|
export * from "./interface/configuration.entity.response";
|
|
10
|
+
export * from "./interface/rate.entity.response";
|
|
14
11
|
export * from "./interface/client.entity.response";
|
|
15
12
|
export * from "./interface/project.entity.response";
|
|
16
13
|
export * from "./interface/timesheet.entity.response.interface";
|
|
@@ -18,11 +15,13 @@ export * from "./interface/project.response.interface";
|
|
|
18
15
|
export * from "./interface/reimbursement.entity.response";
|
|
19
16
|
export * from "./interface/expense_type.create.dto.interface";
|
|
20
17
|
export * from "./interface/task.create.dto.interface";
|
|
18
|
+
export * from "./interface/expense_type.entity.api";
|
|
21
19
|
export * from "./interface/expense_type.update.dto";
|
|
22
20
|
export * from "./interface/expense_type.entity.response";
|
|
23
21
|
export * from "./interface/billing.create.dto.interface";
|
|
24
22
|
export * from "./interface/billing.entity.response";
|
|
25
23
|
export * from "./interface/office.location.create.dto.interface";
|
|
24
|
+
export * from "./interface/office.location.entity.api";
|
|
26
25
|
export * from "./interface/office.Location.update.dto.interface";
|
|
27
26
|
export * from "./interface/office.location.entity.response";
|
|
28
27
|
export * from "./interface/billing.timesheet.entity.api";
|
|
@@ -67,7 +66,6 @@ export * from "./interface/work.from.home.api";
|
|
|
67
66
|
export * from "./interface/work.from.home.create.dto.interface";
|
|
68
67
|
export * from "./interface/work.from.home.update.interface";
|
|
69
68
|
export * from "./interface/work_from_home_history.api";
|
|
70
|
-
export * from "./interface/country.entity.response";
|
|
71
69
|
export * from "./interface/organization.entity.api";
|
|
72
70
|
export * from "./interface/intermediary.bank.entity.response";
|
|
73
71
|
export * from "./interface/holiday.entity.response";
|
package/dist/src/api/index.js
CHANGED
|
@@ -17,17 +17,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./interface/base.response.interface"), exports);
|
|
18
18
|
__exportStar(require("./interface/task.create.dto.interface"), exports);
|
|
19
19
|
__exportStar(require("./interface/task.update.dto.interface"), exports);
|
|
20
|
-
// export * from "./interface/task.entity.api";
|
|
21
|
-
__exportStar(require("./interface/user.entity.api"), exports);
|
|
22
|
-
__exportStar(require("./interface/user.entity.response"), exports);
|
|
23
20
|
__exportStar(require("./interface/user.create.dto.interace"), exports);
|
|
24
21
|
__exportStar(require("./interface/login.response.interface"), exports);
|
|
25
22
|
__exportStar(require("./interface/jwt.payload.interface"), exports);
|
|
26
23
|
__exportStar(require("./interface/user.update.dto.interface"), exports);
|
|
27
|
-
__exportStar(require("./interface/designation.entity.response"), exports);
|
|
28
24
|
__exportStar(require("./interface/login.dto.interface"), exports);
|
|
29
|
-
__exportStar(require("./interface/industry.entity.response"), exports);
|
|
30
25
|
__exportStar(require("./interface/configuration.entity.response"), exports);
|
|
26
|
+
__exportStar(require("./interface/rate.entity.response"), exports);
|
|
31
27
|
__exportStar(require("./interface/client.entity.response"), exports);
|
|
32
28
|
__exportStar(require("./interface/project.entity.response"), exports);
|
|
33
29
|
__exportStar(require("./interface/timesheet.entity.response.interface"), exports);
|
|
@@ -35,11 +31,13 @@ __exportStar(require("./interface/project.response.interface"), exports);
|
|
|
35
31
|
__exportStar(require("./interface/reimbursement.entity.response"), exports);
|
|
36
32
|
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
37
33
|
__exportStar(require("./interface/task.create.dto.interface"), exports);
|
|
34
|
+
__exportStar(require("./interface/expense_type.entity.api"), exports);
|
|
38
35
|
__exportStar(require("./interface/expense_type.update.dto"), exports);
|
|
39
36
|
__exportStar(require("./interface/expense_type.entity.response"), exports);
|
|
40
37
|
__exportStar(require("./interface/billing.create.dto.interface"), exports);
|
|
41
38
|
__exportStar(require("./interface/billing.entity.response"), exports);
|
|
42
39
|
__exportStar(require("./interface/office.location.create.dto.interface"), exports);
|
|
40
|
+
__exportStar(require("./interface/office.location.entity.api"), exports);
|
|
43
41
|
__exportStar(require("./interface/office.Location.update.dto.interface"), exports);
|
|
44
42
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
45
43
|
__exportStar(require("./interface/billing.timesheet.entity.api"), exports);
|
|
@@ -84,7 +82,6 @@ __exportStar(require("./interface/work.from.home.api"), exports);
|
|
|
84
82
|
__exportStar(require("./interface/work.from.home.create.dto.interface"), exports);
|
|
85
83
|
__exportStar(require("./interface/work.from.home.update.interface"), exports);
|
|
86
84
|
__exportStar(require("./interface/work_from_home_history.api"), exports);
|
|
87
|
-
__exportStar(require("./interface/country.entity.response"), exports);
|
|
88
85
|
__exportStar(require("./interface/organization.entity.api"), exports);
|
|
89
86
|
__exportStar(require("./interface/intermediary.bank.entity.response"), exports);
|
|
90
87
|
__exportStar(require("./interface/holiday.entity.response"), exports);
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { BillingActionsEnum, BillingStatusEnum, IBillingEntity } from "../../entities";
|
|
1
|
+
import { BillingActionsEnum, BillingStatusEnum, IBillingEntity, IUserEntity } from "../../entities";
|
|
2
2
|
import { IBillingReimbursementExpenseApiEntity } from "./billing-reimbursement-expense.api";
|
|
3
3
|
import { IBillingApiEntity } from "./billing.entity.api";
|
|
4
4
|
import { IBillingTimesheetApiEntity } from "./billing.timesheet.entity.api";
|
|
5
5
|
import { IUpdateBillingDto } from "./billing.update.dto.interface";
|
|
6
6
|
import { IProjectApiEntity } from "./project.entity.response";
|
|
7
|
-
import { IUserApiEntity } from "./user.entity.api";
|
|
8
7
|
export type IBillingEntityResponse = {
|
|
9
8
|
billing: IBillingApiEntity;
|
|
10
9
|
billingTimesheets?: IBillingTimesheetApiEntity[];
|
|
11
10
|
billingReimbursementExpenses?: IBillingReimbursementExpenseApiEntity[];
|
|
12
11
|
};
|
|
13
12
|
export interface IUserEntityRelation {
|
|
14
|
-
users?:
|
|
13
|
+
users?: IUserEntity[];
|
|
15
14
|
}
|
|
16
15
|
export interface IProjectEntityRelation {
|
|
17
16
|
projects?: IProjectApiEntity[];
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { IClientEntity, IClientEntityChildren, IClientEntityDependent } from "../../entities";
|
|
2
|
-
import { IUserApiEntity } from "./user.entity.api";
|
|
1
|
+
import { IClientEntity, IClientEntityChildren, IClientEntityDependent, IUserEntity } from "../../entities";
|
|
3
2
|
export type IClientApiEntityDependent = IClientEntity & IClientEntityDependent & IClientEntityChildren;
|
|
4
3
|
export type IClientEntityGet = {
|
|
5
4
|
clients: IClientApiEntityDependent[];
|
|
6
5
|
users: {
|
|
7
|
-
[key: string]:
|
|
6
|
+
[key: string]: IUserEntity;
|
|
8
7
|
};
|
|
9
8
|
introducingPartnerIds: {
|
|
10
|
-
[key: string]:
|
|
9
|
+
[key: string]: IUserEntity;
|
|
11
10
|
};
|
|
12
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IExpenseTypeEntity } from "../../entities";
|
|
2
1
|
import { IBaseResponse } from "./base.response.interface";
|
|
3
|
-
|
|
4
|
-
export type
|
|
2
|
+
import { IExpenseTypeApiEntity } from "./expense_type.entity.api";
|
|
3
|
+
export type IExpenseTypeApiEntityResponse = IBaseResponse<IExpenseTypeApiEntity>;
|
|
4
|
+
export type IExpenseTypeApiEntityResponseArray = IBaseResponse<IExpenseTypeApiEntity[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IOfficeLocationEntity } from "../../entities";
|
|
2
1
|
import { IBaseResponse } from "./base.response.interface";
|
|
3
|
-
|
|
4
|
-
export type
|
|
2
|
+
import { IOfficeLocationApiEntity } from "./office.location.entity.api";
|
|
3
|
+
export type IOfficeLocationApiEntityResponse = IBaseResponse<IOfficeLocationApiEntity>;
|
|
4
|
+
export type IOfficeLocationApiEntityResponseArray = IBaseResponse<IOfficeLocationApiEntity[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IApiEntity, IClientEntity,
|
|
2
|
-
import {
|
|
1
|
+
import { IApiEntity, IClientEntity, IDesignationEntity, IProjectCreateDtoExtra, IProjectEntity, IProjectUserDto, IUserEntity } from "../../entities";
|
|
2
|
+
import { IRateApiEntity } from "./rate.entity.response";
|
|
3
3
|
export type IProjectApiEntity = IApiEntity<IProjectEntity>;
|
|
4
4
|
export type IProjectApiEntityArray = IProjectApiEntity[];
|
|
5
5
|
export interface IProjectUserDtoResponse extends IProjectUserDto {
|
|
@@ -12,15 +12,15 @@ export type IProjectApiEntityDependent = IProjectApiEntity & IProjectEntityDepen
|
|
|
12
12
|
export type IProjectEntityGet = {
|
|
13
13
|
projects: IProjectApiEntityDependent[];
|
|
14
14
|
users: {
|
|
15
|
-
[key: string]:
|
|
15
|
+
[key: string]: IUserEntity;
|
|
16
16
|
};
|
|
17
17
|
clients: {
|
|
18
18
|
[key: string]: IClientEntity;
|
|
19
19
|
};
|
|
20
20
|
designations?: {
|
|
21
|
-
[key: string]:
|
|
21
|
+
[key: string]: IDesignationEntity;
|
|
22
22
|
};
|
|
23
23
|
rates?: {
|
|
24
|
-
[key: string]:
|
|
24
|
+
[key: string]: IRateApiEntity;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { IApiEntity, IReimbursementEntity, IReimbursementExpenseEntity, ReimbursementActionEnum, ReimbursementExpenseActionEnum, ReimbursementExpenseState, ReimbursementStatusEnum } from "../../entities";
|
|
1
|
+
import { IApiEntity, IReimbursementEntity, IReimbursementExpenseEntity, IUserEntity, ReimbursementActionEnum, ReimbursementExpenseActionEnum, ReimbursementExpenseState, ReimbursementStatusEnum } from "../../entities";
|
|
2
2
|
import { IProjectEntityGet } from "./project.entity.response";
|
|
3
3
|
import { IReimbursementExpenseApiEntityArray } from "./reimbursement_expense.api";
|
|
4
|
-
import { IUserApiEntity } from "./user.entity.api";
|
|
5
4
|
export type IReimbursementApiEntity = IApiEntity<IReimbursementEntity>;
|
|
6
5
|
export type IReimbursementApiEntityArray = IReimbursementApiEntity[];
|
|
7
6
|
export type IReimbursementEntityGet = {
|
|
8
7
|
reimbursements: IReimbursementResponse[];
|
|
9
8
|
users: {
|
|
10
|
-
[key: string]:
|
|
9
|
+
[key: string]: IUserEntity;
|
|
11
10
|
};
|
|
12
11
|
projects: IProjectEntityGet;
|
|
13
12
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { IApiEntity, IProjectUserMappingEntity, ITimesheetEntity, ITimesheetEntityUpdateDto, TimesheetActionEnum, TimesheetStatusEnum } from "../../entities";
|
|
1
|
+
import { IApiEntity, IProjectUserMappingEntity, ITimesheetEntity, ITimesheetEntityUpdateDto, IUserEntity, TimesheetActionEnum, TimesheetStatusEnum } from "../../entities";
|
|
2
2
|
import { IBaseResponse } from "./base.response.interface";
|
|
3
3
|
import { IClientApiEntityDependent } from "./client.entity.response";
|
|
4
4
|
import { IProjectApiEntityDependent } from "./project.entity.response";
|
|
5
|
-
import { IUserApiEntity } from "./user.entity.api";
|
|
6
5
|
export type ITimesheetApiEntity = IApiEntity<ITimesheetEntity>;
|
|
7
6
|
export type ITimesheetApiEntityArray = ITimesheetApiEntity[];
|
|
8
7
|
export type ITimesheetApiEntityResponse = IBaseResponse<ITimesheetApiEntity>;
|
|
@@ -16,7 +15,7 @@ export type ITimesheetEntityGet = {
|
|
|
16
15
|
[key: string]: IProjectApiEntityDependent;
|
|
17
16
|
};
|
|
18
17
|
users: {
|
|
19
|
-
[key: string]:
|
|
18
|
+
[key: string]: IUserEntity;
|
|
20
19
|
};
|
|
21
20
|
tasks: string[];
|
|
22
21
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface IUserCreateDto extends Omit<
|
|
1
|
+
import { IUserEntity } from "../../entities";
|
|
2
|
+
export interface IUserCreateDto extends Omit<IUserEntity, "id" | "updatedOn" | "updatedBy" | "createdBy" | "createdOn" | "password" | "status" | "organizationId"> {
|
|
3
3
|
panDocument?: File;
|
|
4
4
|
aadharDocument?: File;
|
|
5
5
|
passportDocument?: File;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface IUserUpdateDto extends Omit<
|
|
1
|
+
import { IUserEntity } from "../../entities";
|
|
2
|
+
export interface IUserUpdateDto extends Omit<IUserEntity, "createdOn" | "updatedOn" | "createdBy" | "updatedBy" | "id" | "organizationId"> {
|
|
3
3
|
panDocument?: File;
|
|
4
4
|
aadharDocument?: File;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
2
2
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
3
|
-
export interface ICountryEntity extends
|
|
3
|
+
export interface ICountryEntity extends IEntityAuditColumn {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
2
2
|
import { IApiEntity, IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
3
|
-
export interface IDesignationEntity extends
|
|
3
|
+
export interface IDesignationEntity extends IEntityAuditColumn {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
description?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExpenseTypeEnum } from "../enums/expense_type.entity.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
3
3
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
4
|
-
export interface IExpenseTypeEntity extends
|
|
4
|
+
export interface IExpenseTypeEntity extends IAuditColumnEntity {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
description?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
2
2
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
3
|
-
export interface IIndustryEntity extends
|
|
3
|
+
export interface IIndustryEntity extends IEntityAuditColumn {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
description?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAuditColumnEntity } from "../interface/audit-column.entity.interface";
|
|
2
2
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
3
|
-
export interface IOfficeLocationEntity extends
|
|
3
|
+
export interface IOfficeLocationEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
address: string;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CurrencyEnum, TimeUnitEnum } from "../../enums";
|
|
2
2
|
import { PartialBy } from "../../misc";
|
|
3
3
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
4
|
-
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
5
4
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
6
|
-
export interface IRateEntity extends
|
|
5
|
+
export interface IRateEntity extends IAuditColumnEntity {
|
|
7
6
|
id: number;
|
|
8
7
|
designation: string;
|
|
9
8
|
rate: number;
|
|
@@ -14,6 +13,6 @@ export interface IRateEntityCreateDto extends IEntityCreateDto<IRateEntity> {
|
|
|
14
13
|
}
|
|
15
14
|
export interface IRateEntityUpdateDto extends IEntityUpdateDto<IRateEntity> {
|
|
16
15
|
}
|
|
17
|
-
export interface IRateEntityUpdateByDesignationCurrencyDto extends PartialBy<Omit<IRateEntity,
|
|
16
|
+
export interface IRateEntityUpdateByDesignationCurrencyDto extends PartialBy<Omit<IRateEntity, 'id' | keyof IAuditColumnEntity>, 'unit'> {
|
|
18
17
|
}
|
|
19
18
|
export type IRateEntityFilterData = IEntityFilterData<IRateEntity>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UserRoleEnum, UserStatusEnum } from "../enums/user.entity.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
3
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
4
|
-
export interface IUserEntity extends
|
|
4
|
+
export interface IUserEntity extends IEntityAuditColumn {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
email: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDesignationEntity } from "../interface/designation.entity.interface";
|
|
2
2
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
3
|
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
-
export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.DESIGNATION> implements
|
|
4
|
+
export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.DESIGNATION> implements IDesignationEntity {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
createdBy: number;
|
|
9
|
-
createdOn:
|
|
9
|
+
createdOn: number;
|
|
10
10
|
updatedBy: number;
|
|
11
|
-
updatedOn:
|
|
12
|
-
static
|
|
11
|
+
updatedOn: number;
|
|
12
|
+
static fromEntity(entity: IDesignationEntity): DesignationEntityModel;
|
|
13
13
|
getRelationConfigs(): any[];
|
|
14
14
|
}
|
|
@@ -9,9 +9,9 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
9
9
|
this.id = 0;
|
|
10
10
|
this.name = "";
|
|
11
11
|
this.createdBy = 0;
|
|
12
|
-
this.createdOn =
|
|
12
|
+
this.createdOn = 0;
|
|
13
13
|
this.updatedBy = 0;
|
|
14
|
-
this.updatedOn =
|
|
14
|
+
this.updatedOn = 0;
|
|
15
15
|
}
|
|
16
16
|
// constructor(data: IDesignationApiEntity) {
|
|
17
17
|
// this.id = data.id;
|
|
@@ -22,10 +22,10 @@ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
22
22
|
// this.updatedBy = data.updatedBy;
|
|
23
23
|
// this.updatedOn = data.updatedOn;
|
|
24
24
|
// }
|
|
25
|
-
static
|
|
26
|
-
const
|
|
27
|
-
Object.assign(
|
|
28
|
-
return
|
|
25
|
+
static fromEntity(entity) {
|
|
26
|
+
const result = new DesignationEntityModel(entity_utils_interface_1.EntityEnum.DESIGNATION);
|
|
27
|
+
Object.assign(result, entity);
|
|
28
|
+
return result;
|
|
29
29
|
}
|
|
30
30
|
getRelationConfigs() {
|
|
31
31
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
@@ -5,4 +5,4 @@ export declare function getEntityIndexMap<T extends EntityEnum>(data: IBaseEntit
|
|
|
5
5
|
enumEntities: EntityEnum[];
|
|
6
6
|
}): EntityIndexMap;
|
|
7
7
|
export declare function populateRelationsFor(entityIndexMap: EntityIndexMap, enumEntities: EntityEnum[]): void;
|
|
8
|
-
export declare function parseEntities<T extends EnumEntityType<EntityEnum>>(json: IBaseEntityApiResponse<T>, baseEntity: EntityEnum, entityMap: EntityMap
|
|
8
|
+
export declare function parseEntities<T extends EnumEntityType<EntityEnum>>(json: IBaseEntityApiResponse<T>, baseEntity: EntityEnum, entityMap: EntityMap): EntityMap;
|
|
@@ -47,13 +47,13 @@ function populateRelationsFor(entityIndexMap, enumEntities) {
|
|
|
47
47
|
base_entity_model_1.BaseEntityModel.populateRelationsForEntities(entityIndexMap, entity);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function parseEntities(json, baseEntity, entityMap
|
|
50
|
+
function parseEntities(json, baseEntity, entityMap) {
|
|
51
51
|
var _a;
|
|
52
52
|
const entityFromJsonMappings = {
|
|
53
53
|
[entity_utils_interface_1.EntityEnum.PROJECT]: project_entity_model_1.ProjectEntityModel.fromApiEntity,
|
|
54
54
|
[entity_utils_interface_1.EntityEnum.CLIENT]: client_entity_model_1.ClientEntityModel.fromEntity,
|
|
55
55
|
[entity_utils_interface_1.EntityEnum.BILLING]: billing_entity_model_1.BillingEntityModel.fromApiEntity,
|
|
56
|
-
[entity_utils_interface_1.EntityEnum.USER]: user_entity_model_1.UserEntityModel.
|
|
56
|
+
[entity_utils_interface_1.EntityEnum.USER]: user_entity_model_1.UserEntityModel.fromEntity,
|
|
57
57
|
[entity_utils_interface_1.EntityEnum.PROJECT_USER_MAPPING]: project_user_mapping_entity_model_1.ProjectUserMappingEntityModel.fromApiEntity,
|
|
58
58
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT]: reimbursement_entity_model_1.ReimbursementEntityModel.fromApiEntity,
|
|
59
59
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT_EXPENSE]: reimbursement_expense_entity_model_1.ReimbursementExpenseEntityModel.fromApiEntity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IUserApiEntity } from "../../api";
|
|
2
1
|
import { UserRoleEnum, UserStatusEnum } from "../enums/user.entity.enum";
|
|
3
2
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
|
+
import { IUserEntity } from "../interface/user.entity.interface";
|
|
4
4
|
import { BaseEntityModel } from "./base.entity.model";
|
|
5
|
-
export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> implements
|
|
5
|
+
export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> implements IUserEntity {
|
|
6
6
|
id: number;
|
|
7
7
|
name: string;
|
|
8
8
|
email: string;
|
|
@@ -39,8 +39,8 @@ export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> im
|
|
|
39
39
|
permissions?: string[];
|
|
40
40
|
createdBy: number;
|
|
41
41
|
updatedBy: number;
|
|
42
|
-
createdOn:
|
|
43
|
-
updatedOn:
|
|
42
|
+
createdOn: number;
|
|
43
|
+
updatedOn: number;
|
|
44
44
|
getRelationConfigs(): any[];
|
|
45
|
-
static
|
|
45
|
+
static fromEntity(entity: IUserEntity): UserEntityModel;
|
|
46
46
|
}
|
|
@@ -21,16 +21,16 @@ class UserEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
21
21
|
this.emergencyContactRelation = "";
|
|
22
22
|
this.createdBy = 0;
|
|
23
23
|
this.updatedBy = 0;
|
|
24
|
-
this.createdOn =
|
|
25
|
-
this.updatedOn =
|
|
24
|
+
this.createdOn = 0;
|
|
25
|
+
this.updatedOn = 0;
|
|
26
26
|
}
|
|
27
27
|
getRelationConfigs() {
|
|
28
28
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
29
29
|
}
|
|
30
|
-
static
|
|
31
|
-
const
|
|
32
|
-
Object.assign(
|
|
33
|
-
return
|
|
30
|
+
static fromEntity(entity) {
|
|
31
|
+
const result = new UserEntityModel(entity_utils_interface_1.EntityEnum.USER);
|
|
32
|
+
Object.assign(result, entity);
|
|
33
|
+
return result;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
exports.UserEntityModel = UserEntityModel;
|
|
@@ -269,4 +269,3 @@ export declare function hasProperty<T extends object>(obj: T | null | undefined,
|
|
|
269
269
|
* convertToNumberType("abc"); // throws Error("Invalid number: abc")
|
|
270
270
|
*/
|
|
271
271
|
export declare function convertToNumberType<T extends string | number>(value: T): number;
|
|
272
|
-
export declare function epochToDateTime(epoch: number): string;
|
|
@@ -39,8 +39,6 @@ exports.findDuplicateIds = findDuplicateIds;
|
|
|
39
39
|
exports.getDecimalNumberFromString = getDecimalNumberFromString;
|
|
40
40
|
exports.hasProperty = hasProperty;
|
|
41
41
|
exports.convertToNumberType = convertToNumberType;
|
|
42
|
-
exports.epochToDateTime = epochToDateTime;
|
|
43
|
-
const date_fns_1 = require("date-fns");
|
|
44
42
|
const util_constants_1 = require("../constants/util.constants");
|
|
45
43
|
const error_key_enum_1 = require("../enums/error.key.enum");
|
|
46
44
|
const exceptions_1 = require("../exceptions");
|
|
@@ -566,7 +564,3 @@ function convertToNumberType(value) {
|
|
|
566
564
|
}
|
|
567
565
|
return num;
|
|
568
566
|
}
|
|
569
|
-
function epochToDateTime(epoch) {
|
|
570
|
-
const date = new Date(epoch * 1000); // JS Date expects milliseconds
|
|
571
|
-
return (0, date_fns_1.format)(date, "yyyy-MM-dd HH:mm:ss");
|
|
572
|
-
}
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IDesignationApiEntity } from "../../entities";
|
|
2
|
-
import { IBaseResponse } from "./base.response.interface";
|
|
3
|
-
export type IDesignationApiEntityResponse = IBaseResponse<IDesignationApiEntity>;
|
|
4
|
-
export type IDesignationApiEntityResponseArray = IBaseResponse<IDesignationApiEntity[]>;
|
|
File without changes
|
/package/dist/src/api/interface/{designation.entity.response.js → office.location.entity.api.js}
RENAMED
|
File without changes
|
|
File without changes
|