law-common 10.23.1-beta.0 → 10.23.1-beta.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.
- package/dist/src/api/index.d.ts +0 -5
- package/dist/src/api/index.js +0 -5
- package/dist/src/api/interface/bank.entity.response.d.ts +3 -8
- package/dist/src/api/interface/expense_type.entity.response.d.ts +3 -3
- package/dist/src/api/interface/office.location.entity.response.d.ts +3 -3
- package/dist/src/api/interface/project.entity.response.d.ts +2 -3
- package/dist/src/entities/interface/bank.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/expense_type.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/intermediary_bank.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/model/bank.entity.model.d.ts +5 -5
- package/dist/src/entities/model/bank.entity.model.js +6 -6
- package/dist/src/entities/model/entity.model.interface.js +1 -1
- package/dist/src/utils/helper.fn.util.d.ts +1 -0
- package/dist/src/utils/helper.fn.util.js +6 -0
- package/package.json +1 -1
- package/dist/src/api/interface/bank.entity.api.d.ts +0 -3
- package/dist/src/api/interface/bank.entity.api.js +0 -2
- 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/intermediary.bank.entity.response.d.ts +0 -3
- package/dist/src/api/interface/intermediary.bank.entity.response.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/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * from "./interface/jwt.payload.interface";
|
|
|
7
7
|
export * from "./interface/user.update.dto.interface";
|
|
8
8
|
export * from "./interface/login.dto.interface";
|
|
9
9
|
export * from "./interface/configuration.entity.response";
|
|
10
|
-
export * from "./interface/rate.entity.response";
|
|
11
10
|
export * from "./interface/client.entity.response";
|
|
12
11
|
export * from "./interface/project.entity.response";
|
|
13
12
|
export * from "./interface/timesheet.entity.response.interface";
|
|
@@ -15,13 +14,11 @@ export * from "./interface/project.response.interface";
|
|
|
15
14
|
export * from "./interface/reimbursement.entity.response";
|
|
16
15
|
export * from "./interface/expense_type.create.dto.interface";
|
|
17
16
|
export * from "./interface/task.create.dto.interface";
|
|
18
|
-
export * from "./interface/expense_type.entity.api";
|
|
19
17
|
export * from "./interface/expense_type.update.dto";
|
|
20
18
|
export * from "./interface/expense_type.entity.response";
|
|
21
19
|
export * from "./interface/billing.create.dto.interface";
|
|
22
20
|
export * from "./interface/billing.entity.response";
|
|
23
21
|
export * from "./interface/office.location.create.dto.interface";
|
|
24
|
-
export * from "./interface/office.location.entity.api";
|
|
25
22
|
export * from "./interface/office.Location.update.dto.interface";
|
|
26
23
|
export * from "./interface/office.location.entity.response";
|
|
27
24
|
export * from "./interface/billing.timesheet.entity.api";
|
|
@@ -29,7 +26,6 @@ export * from "./interface/billing.entity.api";
|
|
|
29
26
|
export * from "./interface/billing.update.dto.interface";
|
|
30
27
|
export * from "./interface/bank.create.dto.interface";
|
|
31
28
|
export * from "./interface/bank.update.dto.interface";
|
|
32
|
-
export * from "./interface/bank.entity.api";
|
|
33
29
|
export * from "./interface/bank.entity.response";
|
|
34
30
|
export * from "./interface/billing.payment.create.dto.interface";
|
|
35
31
|
export * from "./interface/billing.payment.entity.api";
|
|
@@ -67,7 +63,6 @@ export * from "./interface/work.from.home.create.dto.interface";
|
|
|
67
63
|
export * from "./interface/work.from.home.update.interface";
|
|
68
64
|
export * from "./interface/work_from_home_history.api";
|
|
69
65
|
export * from "./interface/organization.entity.api";
|
|
70
|
-
export * from "./interface/intermediary.bank.entity.response";
|
|
71
66
|
export * from "./interface/holiday.entity.response";
|
|
72
67
|
export * from "./interface/holiday-list.entity.response";
|
|
73
68
|
export * from "./interface/cron-job-manual-trigger.dto.interface";
|
package/dist/src/api/index.js
CHANGED
|
@@ -23,7 +23,6 @@ __exportStar(require("./interface/jwt.payload.interface"), exports);
|
|
|
23
23
|
__exportStar(require("./interface/user.update.dto.interface"), exports);
|
|
24
24
|
__exportStar(require("./interface/login.dto.interface"), exports);
|
|
25
25
|
__exportStar(require("./interface/configuration.entity.response"), exports);
|
|
26
|
-
__exportStar(require("./interface/rate.entity.response"), exports);
|
|
27
26
|
__exportStar(require("./interface/client.entity.response"), exports);
|
|
28
27
|
__exportStar(require("./interface/project.entity.response"), exports);
|
|
29
28
|
__exportStar(require("./interface/timesheet.entity.response.interface"), exports);
|
|
@@ -31,13 +30,11 @@ __exportStar(require("./interface/project.response.interface"), exports);
|
|
|
31
30
|
__exportStar(require("./interface/reimbursement.entity.response"), exports);
|
|
32
31
|
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
33
32
|
__exportStar(require("./interface/task.create.dto.interface"), exports);
|
|
34
|
-
__exportStar(require("./interface/expense_type.entity.api"), exports);
|
|
35
33
|
__exportStar(require("./interface/expense_type.update.dto"), exports);
|
|
36
34
|
__exportStar(require("./interface/expense_type.entity.response"), exports);
|
|
37
35
|
__exportStar(require("./interface/billing.create.dto.interface"), exports);
|
|
38
36
|
__exportStar(require("./interface/billing.entity.response"), exports);
|
|
39
37
|
__exportStar(require("./interface/office.location.create.dto.interface"), exports);
|
|
40
|
-
__exportStar(require("./interface/office.location.entity.api"), exports);
|
|
41
38
|
__exportStar(require("./interface/office.Location.update.dto.interface"), exports);
|
|
42
39
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
43
40
|
__exportStar(require("./interface/billing.timesheet.entity.api"), exports);
|
|
@@ -45,7 +42,6 @@ __exportStar(require("./interface/billing.entity.api"), exports);
|
|
|
45
42
|
__exportStar(require("./interface/billing.update.dto.interface"), exports);
|
|
46
43
|
__exportStar(require("./interface/bank.create.dto.interface"), exports);
|
|
47
44
|
__exportStar(require("./interface/bank.update.dto.interface"), exports);
|
|
48
|
-
__exportStar(require("./interface/bank.entity.api"), exports);
|
|
49
45
|
__exportStar(require("./interface/bank.entity.response"), exports);
|
|
50
46
|
__exportStar(require("./interface/billing.payment.create.dto.interface"), exports);
|
|
51
47
|
__exportStar(require("./interface/billing.payment.entity.api"), exports);
|
|
@@ -83,7 +79,6 @@ __exportStar(require("./interface/work.from.home.create.dto.interface"), exports
|
|
|
83
79
|
__exportStar(require("./interface/work.from.home.update.interface"), exports);
|
|
84
80
|
__exportStar(require("./interface/work_from_home_history.api"), exports);
|
|
85
81
|
__exportStar(require("./interface/organization.entity.api"), exports);
|
|
86
|
-
__exportStar(require("./interface/intermediary.bank.entity.response"), exports);
|
|
87
82
|
__exportStar(require("./interface/holiday.entity.response"), exports);
|
|
88
83
|
__exportStar(require("./interface/holiday-list.entity.response"), exports);
|
|
89
84
|
__exportStar(require("./interface/cron-job-manual-trigger.dto.interface"), exports);
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { BankActionEnum, BankStatusEnum } from "../../entities";
|
|
2
|
-
import { IBankApiEntity } from "./bank.entity.api";
|
|
3
|
-
import { IBaseResponse } from "./base.response.interface";
|
|
4
|
-
import { IIntermediaryBankApiEntityArray } from "./intermediary.bank.entity.response";
|
|
5
|
-
export type IBankApiEntityResponse = IBaseResponse<IBankApiEntity>;
|
|
6
|
-
export type IBankApiEntityResponseArray = IBaseResponse<IBankApiEntity[]>;
|
|
1
|
+
import { BankActionEnum, BankStatusEnum, IBankEntity, IIntermediaryBankEntity } from "../../entities";
|
|
7
2
|
export type IBankFlowConfig = {
|
|
8
3
|
[key in BankStatusEnum]?: {
|
|
9
4
|
actions: {
|
|
@@ -14,7 +9,7 @@ export type IBankFlowConfig = {
|
|
|
14
9
|
};
|
|
15
10
|
};
|
|
16
11
|
};
|
|
17
|
-
export interface IBankEntityGet extends
|
|
18
|
-
intermediaryBankDetails?:
|
|
12
|
+
export interface IBankEntityGet extends IBankEntity {
|
|
13
|
+
intermediaryBankDetails?: IIntermediaryBankEntity[];
|
|
19
14
|
}
|
|
20
15
|
export type IBankEntityGetArray = IBankEntityGet[];
|
|
@@ -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,5 +1,4 @@
|
|
|
1
|
-
import { IApiEntity, IClientEntity, IDesignationEntity, IProjectCreateDtoExtra, IProjectEntity, IProjectUserDto, IUserEntity } from "../../entities";
|
|
2
|
-
import { IRateApiEntity } from "./rate.entity.response";
|
|
1
|
+
import { IApiEntity, IClientEntity, IDesignationEntity, IProjectCreateDtoExtra, IProjectEntity, IProjectUserDto, IRateEntity, IUserEntity } from "../../entities";
|
|
3
2
|
export type IProjectApiEntity = IApiEntity<IProjectEntity>;
|
|
4
3
|
export type IProjectApiEntityArray = IProjectApiEntity[];
|
|
5
4
|
export interface IProjectUserDtoResponse extends IProjectUserDto {
|
|
@@ -21,6 +20,6 @@ export type IProjectEntityGet = {
|
|
|
21
20
|
[key: string]: IDesignationEntity;
|
|
22
21
|
};
|
|
23
22
|
rates?: {
|
|
24
|
-
[key: string]:
|
|
23
|
+
[key: string]: IRateEntity;
|
|
25
24
|
};
|
|
26
25
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BankActionEnum } from "../enums/bank_action.enum";
|
|
2
2
|
import { BankStatusEnum } from "../enums/bank_status.enum";
|
|
3
|
-
import {
|
|
3
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
4
|
import { IEntityFilterData } from "./entity.utils.interface";
|
|
5
|
-
export interface IBankEntity extends
|
|
5
|
+
export interface IBankEntity extends IEntityAuditColumn {
|
|
6
6
|
id: number;
|
|
7
7
|
accountName: string;
|
|
8
8
|
organizationId: number;
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { CurrencyEnum } from "../../enums";
|
|
2
|
-
import {
|
|
2
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
3
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
4
|
-
export interface IIntermediaryBankEntity extends
|
|
4
|
+
export interface IIntermediaryBankEntity extends IEntityAuditColumn {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
bankId: number;
|
|
@@ -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,8 +1,8 @@
|
|
|
1
|
-
import { IBankApiEntity } from "../../api";
|
|
2
1
|
import { BankStatusEnum } from "../enums/bank_status.enum";
|
|
2
|
+
import { IBankEntity } from "../interface/bank.entity.interface";
|
|
3
3
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
4
4
|
import { BaseEntityModel } from "./base.entity.model";
|
|
5
|
-
export declare class BankEntityModel extends BaseEntityModel<EntityEnum.BANK> implements
|
|
5
|
+
export declare class BankEntityModel extends BaseEntityModel<EntityEnum.BANK> implements IBankEntity {
|
|
6
6
|
id: number;
|
|
7
7
|
accountName: string;
|
|
8
8
|
organizationId: number;
|
|
@@ -16,8 +16,8 @@ export declare class BankEntityModel extends BaseEntityModel<EntityEnum.BANK> im
|
|
|
16
16
|
swiftAddress?: string;
|
|
17
17
|
createdBy: number;
|
|
18
18
|
updatedBy: number;
|
|
19
|
-
createdOn:
|
|
20
|
-
updatedOn:
|
|
21
|
-
static
|
|
19
|
+
createdOn: number;
|
|
20
|
+
updatedOn: number;
|
|
21
|
+
static fromEntity(entity: IBankEntity): BankEntityModel;
|
|
22
22
|
getRelationConfigs(): any[];
|
|
23
23
|
}
|
|
@@ -18,13 +18,13 @@ class BankEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
18
18
|
this.status = bank_status_enum_1.BankStatusEnum.CREATE_APPROVAL;
|
|
19
19
|
this.createdBy = 0;
|
|
20
20
|
this.updatedBy = 0;
|
|
21
|
-
this.createdOn =
|
|
22
|
-
this.updatedOn =
|
|
21
|
+
this.createdOn = 0;
|
|
22
|
+
this.updatedOn = 0;
|
|
23
23
|
}
|
|
24
|
-
static
|
|
25
|
-
const
|
|
26
|
-
Object.assign(
|
|
27
|
-
return
|
|
24
|
+
static fromEntity(entity) {
|
|
25
|
+
const result = new BankEntityModel(entity_utils_interface_1.EntityEnum.BANK);
|
|
26
|
+
Object.assign(result, entity);
|
|
27
|
+
return result;
|
|
28
28
|
}
|
|
29
29
|
getRelationConfigs() {
|
|
30
30
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
@@ -59,7 +59,7 @@ function parseEntities(json, baseEntity, entityMap) {
|
|
|
59
59
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT_EXPENSE]: reimbursement_expense_entity_model_1.ReimbursementExpenseEntityModel.fromApiEntity,
|
|
60
60
|
[entity_utils_interface_1.EntityEnum.BILLING_REIMBURSEMENT_EXPENSE]: billing_reimbursement_expense_entity_model_1.BillingReimbursementExpneseEntityModel.fromApiEntity,
|
|
61
61
|
[entity_utils_interface_1.EntityEnum.CLIENT_AFFILIATE]: client_affiliate_entity_model_1.ClientAffiliateEntityModel.fromApiEntity,
|
|
62
|
-
[entity_utils_interface_1.EntityEnum.BANK]: bank_entity_model_1.BankEntityModel.
|
|
62
|
+
[entity_utils_interface_1.EntityEnum.BANK]: bank_entity_model_1.BankEntityModel.fromEntity,
|
|
63
63
|
[entity_utils_interface_1.EntityEnum.CONFIGURATION]: configuration_model_1.ConfigurationEntityModel.fromApiEntity,
|
|
64
64
|
[entity_utils_interface_1.EntityEnum.TASK]: task_entity_model_1.TaskEntityModel.fromEntity,
|
|
65
65
|
[entity_utils_interface_1.EntityEnum.BILLING_TIMESHEET]: billing_timesheet_entity_model_1.BillingTimesheetEntityModel.fromApiEntity,
|
|
@@ -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