law-common 10.23.0 → 10.23.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.
- package/dist/src/api/index.d.ts +0 -5
- package/dist/src/api/index.js +0 -5
- 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.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.response.d.ts +3 -3
- package/dist/src/api/interface/project.entity.response.d.ts +3 -5
- 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/expense_type.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 +3 -2
- package/dist/src/entities/interface/user.entity.interface.d.ts +2 -2
- 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 +1 -0
- package/dist/src/utils/helper.fn.util.js +6 -0
- package/package.json +35 -35
- package/dist/src/api/interface/expense_type.entity.api.d.ts +0 -3
- package/dist/src/api/interface/expense_type.entity.api.js +0 -2
- package/dist/src/api/interface/office.location.entity.api.d.ts +0 -3
- package/dist/src/api/interface/office.location.entity.api.js +0 -2
- package/dist/src/api/interface/rate.entity.response.d.ts +0 -4
- package/dist/src/api/interface/rate.entity.response.js +0 -2
- 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/index.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
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
8
|
export * from "./interface/login.dto.interface";
|
|
11
9
|
export * from "./interface/configuration.entity.response";
|
|
12
|
-
export * from "./interface/rate.entity.response";
|
|
13
10
|
export * from "./interface/client.entity.response";
|
|
14
11
|
export * from "./interface/project.entity.response";
|
|
15
12
|
export * from "./interface/timesheet.entity.response.interface";
|
|
@@ -17,13 +14,11 @@ export * from "./interface/project.response.interface";
|
|
|
17
14
|
export * from "./interface/reimbursement.entity.response";
|
|
18
15
|
export * from "./interface/expense_type.create.dto.interface";
|
|
19
16
|
export * from "./interface/task.create.dto.interface";
|
|
20
|
-
export * from "./interface/expense_type.entity.api";
|
|
21
17
|
export * from "./interface/expense_type.update.dto";
|
|
22
18
|
export * from "./interface/expense_type.entity.response";
|
|
23
19
|
export * from "./interface/billing.create.dto.interface";
|
|
24
20
|
export * from "./interface/billing.entity.response";
|
|
25
21
|
export * from "./interface/office.location.create.dto.interface";
|
|
26
|
-
export * from "./interface/office.location.entity.api";
|
|
27
22
|
export * from "./interface/office.Location.update.dto.interface";
|
|
28
23
|
export * from "./interface/office.location.entity.response";
|
|
29
24
|
export * from "./interface/billing.timesheet.entity.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -17,15 +17,12 @@ 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
|
-
__exportStar(require("./interface/user.entity.api"), exports);
|
|
21
|
-
__exportStar(require("./interface/user.entity.response"), exports);
|
|
22
20
|
__exportStar(require("./interface/user.create.dto.interace"), exports);
|
|
23
21
|
__exportStar(require("./interface/login.response.interface"), exports);
|
|
24
22
|
__exportStar(require("./interface/jwt.payload.interface"), exports);
|
|
25
23
|
__exportStar(require("./interface/user.update.dto.interface"), exports);
|
|
26
24
|
__exportStar(require("./interface/login.dto.interface"), exports);
|
|
27
25
|
__exportStar(require("./interface/configuration.entity.response"), exports);
|
|
28
|
-
__exportStar(require("./interface/rate.entity.response"), exports);
|
|
29
26
|
__exportStar(require("./interface/client.entity.response"), exports);
|
|
30
27
|
__exportStar(require("./interface/project.entity.response"), exports);
|
|
31
28
|
__exportStar(require("./interface/timesheet.entity.response.interface"), exports);
|
|
@@ -33,13 +30,11 @@ __exportStar(require("./interface/project.response.interface"), exports);
|
|
|
33
30
|
__exportStar(require("./interface/reimbursement.entity.response"), exports);
|
|
34
31
|
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
35
32
|
__exportStar(require("./interface/task.create.dto.interface"), exports);
|
|
36
|
-
__exportStar(require("./interface/expense_type.entity.api"), exports);
|
|
37
33
|
__exportStar(require("./interface/expense_type.update.dto"), exports);
|
|
38
34
|
__exportStar(require("./interface/expense_type.entity.response"), exports);
|
|
39
35
|
__exportStar(require("./interface/billing.create.dto.interface"), exports);
|
|
40
36
|
__exportStar(require("./interface/billing.entity.response"), exports);
|
|
41
37
|
__exportStar(require("./interface/office.location.create.dto.interface"), exports);
|
|
42
|
-
__exportStar(require("./interface/office.location.entity.api"), exports);
|
|
43
38
|
__exportStar(require("./interface/office.Location.update.dto.interface"), exports);
|
|
44
39
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
45
40
|
__exportStar(require("./interface/billing.timesheet.entity.api"), 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";
|
|
1
2
|
import { IBaseResponse } from "./base.response.interface";
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type IExpenseTypeApiEntityResponseArray = IBaseResponse<IExpenseTypeApiEntity[]>;
|
|
3
|
+
export type IExpenseTypeApiEntityResponse = IBaseResponse<IExpenseTypeEntity>;
|
|
4
|
+
export type IExpenseTypeApiEntityResponseArray = IBaseResponse<IExpenseTypeEntity[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { IOfficeLocationEntity } from "../../entities";
|
|
1
2
|
import { IBaseResponse } from "./base.response.interface";
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type IOfficeLocationApiEntityResponseArray = IBaseResponse<IOfficeLocationApiEntity[]>;
|
|
3
|
+
export type IOfficeLocationApiEntityResponse = IBaseResponse<IOfficeLocationEntity>;
|
|
4
|
+
export type IOfficeLocationApiEntityResponseArray = IBaseResponse<IOfficeLocationEntity[]>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { IApiEntity, IClientEntity, IDesignationEntity, IProjectCreateDtoExtra, IProjectEntity, IProjectUserDto } from "../../entities";
|
|
2
|
-
import { IRateApiEntity } from "./rate.entity.response";
|
|
3
|
-
import { IUserApiEntity } from "./user.entity.api";
|
|
1
|
+
import { IApiEntity, IClientEntity, IDesignationEntity, IProjectCreateDtoExtra, IProjectEntity, IProjectUserDto, IRateEntity, IUserEntity } from "../../entities";
|
|
4
2
|
export type IProjectApiEntity = IApiEntity<IProjectEntity>;
|
|
5
3
|
export type IProjectApiEntityArray = IProjectApiEntity[];
|
|
6
4
|
export interface IProjectUserDtoResponse extends IProjectUserDto {
|
|
@@ -13,7 +11,7 @@ export type IProjectApiEntityDependent = IProjectApiEntity & IProjectEntityDepen
|
|
|
13
11
|
export type IProjectEntityGet = {
|
|
14
12
|
projects: IProjectApiEntityDependent[];
|
|
15
13
|
users: {
|
|
16
|
-
[key: string]:
|
|
14
|
+
[key: string]: IUserEntity;
|
|
17
15
|
};
|
|
18
16
|
clients: {
|
|
19
17
|
[key: string]: IClientEntity;
|
|
@@ -22,6 +20,6 @@ export type IProjectEntityGet = {
|
|
|
22
20
|
[key: string]: IDesignationEntity;
|
|
23
21
|
};
|
|
24
22
|
rates?: {
|
|
25
|
-
[key: string]:
|
|
23
|
+
[key: string]: IRateEntity;
|
|
26
24
|
};
|
|
27
25
|
};
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { ExpenseTypeEnum } from "../enums/expense_type.entity.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
3
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
4
|
-
export interface IExpenseTypeEntity extends
|
|
4
|
+
export interface IExpenseTypeEntity extends IEntityAuditColumn {
|
|
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 { IEntityFilterData } from "./entity.utils.interface";
|
|
3
|
-
export interface IOfficeLocationEntity extends
|
|
3
|
+
export interface IOfficeLocationEntity extends IEntityAuditColumn {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
address: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
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";
|
|
4
5
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
5
|
-
export interface IRateEntity extends
|
|
6
|
+
export interface IRateEntity extends IEntityAuditColumn {
|
|
6
7
|
id: number;
|
|
7
8
|
designation: string;
|
|
8
9
|
rate: number;
|
|
@@ -13,6 +14,6 @@ export interface IRateEntityCreateDto extends IEntityCreateDto<IRateEntity> {
|
|
|
13
14
|
}
|
|
14
15
|
export interface IRateEntityUpdateDto extends IEntityUpdateDto<IRateEntity> {
|
|
15
16
|
}
|
|
16
|
-
export interface IRateEntityUpdateByDesignationCurrencyDto extends PartialBy<Omit<IRateEntity,
|
|
17
|
+
export interface IRateEntityUpdateByDesignationCurrencyDto extends PartialBy<Omit<IRateEntity, "id" | keyof IAuditColumnEntity>, "unit"> {
|
|
17
18
|
}
|
|
18
19
|
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;
|
|
@@ -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,3 +269,4 @@ 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,6 +39,8 @@ 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");
|
|
42
44
|
const util_constants_1 = require("../constants/util.constants");
|
|
43
45
|
const error_key_enum_1 = require("../enums/error.key.enum");
|
|
44
46
|
const exceptions_1 = require("../exceptions");
|
|
@@ -564,3 +566,7 @@ function convertToNumberType(value) {
|
|
|
564
566
|
}
|
|
565
567
|
return num;
|
|
566
568
|
}
|
|
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,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "law-common",
|
|
3
|
-
"version": "10.23.
|
|
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
|
-
"publish:major": "npm version major && git push && npm run build && npm publish",
|
|
16
|
-
"link": "npm run build && npm link",
|
|
17
|
-
"test": "jest"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [],
|
|
20
|
-
"author": "",
|
|
21
|
-
"license": "ISC",
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@types/jest": "^29.5.13",
|
|
24
|
-
"@types/node": "^22.6.1",
|
|
25
|
-
"jest": "^29.7.0",
|
|
26
|
-
"ts-jest": "^29.2.5",
|
|
27
|
-
"ts-node": "^10.9.2",
|
|
28
|
-
"typescript": "^5.6.2"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@types/express": "^5.0.0",
|
|
32
|
-
"@types/multer": "^1.4.12",
|
|
33
|
-
"date-fns": "^4.1.0"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "law-common",
|
|
3
|
+
"version": "10.23.1-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
|
+
"publish:major": "npm version major && git push && npm run build && npm publish",
|
|
16
|
+
"link": "npm run build && npm link",
|
|
17
|
+
"test": "jest"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [],
|
|
20
|
+
"author": "",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/jest": "^29.5.13",
|
|
24
|
+
"@types/node": "^22.6.1",
|
|
25
|
+
"jest": "^29.7.0",
|
|
26
|
+
"ts-jest": "^29.2.5",
|
|
27
|
+
"ts-node": "^10.9.2",
|
|
28
|
+
"typescript": "^5.6.2"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@types/express": "^5.0.0",
|
|
32
|
+
"@types/multer": "^1.4.12",
|
|
33
|
+
"date-fns": "^4.1.0"
|
|
34
|
+
}
|
|
35
|
+
}
|