law-common 10.26.1-beta.1 → 10.26.1-beta.3
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 +1 -1
- package/dist/src/api/index.js +3 -1
- package/dist/src/api/interface/billing.entity.api.d.ts +3 -0
- package/dist/src/api/interface/billing.entity.response.d.ts +4 -4
- package/dist/src/api/interface/billing.transaction.entity.response.d.ts +3 -2
- package/dist/src/entities/interface/billing-reimbursement-expense.entity.interface.d.ts +2 -2
- package/dist/src/entities/interface/billing.entity.interface.d.ts +2 -2
- package/dist/src/entities/model/billing-reimbursement-expense.entity.model.d.ts +5 -5
- package/dist/src/entities/model/billing-reimbursement-expense.entity.model.js +6 -6
- package/dist/src/entities/model/billing.entity.model.d.ts +5 -6
- package/dist/src/entities/model/billing.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 +0 -31
- package/dist/src/utils/helper.fn.util.js +0 -34
- package/package.json +1 -1
- package/dist/src/api/interface/billing-reimbursement-expense.api.d.ts +0 -3
- /package/dist/src/api/interface/{billing-reimbursement-expense.api.js → billing.entity.api.js} +0 -0
package/dist/src/api/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./interface/billing.entity.response";
|
|
|
20
20
|
export * from "./interface/office.location.create.dto.interface";
|
|
21
21
|
export * from "./interface/office.Location.update.dto.interface";
|
|
22
22
|
export * from "./interface/office.location.entity.response";
|
|
23
|
+
export * from "./interface/billing.entity.api";
|
|
23
24
|
export * from "./interface/billing.update.dto.interface";
|
|
24
25
|
export * from "./interface/bank.create.dto.interface";
|
|
25
26
|
export * from "./interface/bank.update.dto.interface";
|
|
@@ -57,5 +58,4 @@ export * from "./interface/work.from.home.update.interface";
|
|
|
57
58
|
export * from "./interface/work_from_home_history.api";
|
|
58
59
|
export * from "./interface/cron-job-manual-trigger.dto.interface";
|
|
59
60
|
export * from "./interface/cron-job.entity.response";
|
|
60
|
-
export * from "./interface/billing-reimbursement-expense.api";
|
|
61
61
|
export * from "./interface/billing-reimbursement-expense-history.api";
|
package/dist/src/api/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __exportStar(require("./interface/billing.entity.response"), exports);
|
|
|
36
36
|
__exportStar(require("./interface/office.location.create.dto.interface"), exports);
|
|
37
37
|
__exportStar(require("./interface/office.Location.update.dto.interface"), exports);
|
|
38
38
|
__exportStar(require("./interface/office.location.entity.response"), exports);
|
|
39
|
+
__exportStar(require("./interface/billing.entity.api"), exports);
|
|
39
40
|
__exportStar(require("./interface/billing.update.dto.interface"), exports);
|
|
40
41
|
__exportStar(require("./interface/bank.create.dto.interface"), exports);
|
|
41
42
|
__exportStar(require("./interface/bank.update.dto.interface"), exports);
|
|
@@ -73,6 +74,7 @@ __exportStar(require("./interface/work.from.home.update.interface"), exports);
|
|
|
73
74
|
__exportStar(require("./interface/work_from_home_history.api"), exports);
|
|
74
75
|
__exportStar(require("./interface/cron-job-manual-trigger.dto.interface"), exports);
|
|
75
76
|
__exportStar(require("./interface/cron-job.entity.response"), exports);
|
|
76
|
-
|
|
77
|
+
// export * from "./interface/to-do.entity.api";
|
|
78
|
+
// export * from "./interface/billing-reimbursement-expense.api";
|
|
77
79
|
__exportStar(require("./interface/billing-reimbursement-expense-history.api"), exports);
|
|
78
80
|
// export * from "./interface/project-user-mapping.entity.api";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BillingActionsEnum, BillingStatusEnum, IBillingEntity, IBillingTimesheetEntity, IProjectEntity, IUserEntity } from "../../entities";
|
|
2
|
-
import {
|
|
1
|
+
import { BillingActionsEnum, BillingStatusEnum, IBillingEntity, IBillingReimbursementExpenseEntity, IBillingTimesheetEntity, IProjectEntity, IUserEntity } from "../../entities";
|
|
2
|
+
import { IBillingApiEntity } from "./billing.entity.api";
|
|
3
3
|
import { IUpdateBillingDto } from "./billing.update.dto.interface";
|
|
4
4
|
export type IBillingEntityResponse = {
|
|
5
|
-
billing:
|
|
5
|
+
billing: IBillingApiEntity;
|
|
6
|
+
billingReimbursementExpenses?: IBillingReimbursementExpenseEntity[];
|
|
6
7
|
billingTimesheets?: IBillingTimesheetEntity[];
|
|
7
|
-
billingReimbursementExpenses?: IBillingReimbursementExpenseApiEntity[];
|
|
8
8
|
};
|
|
9
9
|
export interface IUserEntityRelation {
|
|
10
10
|
users?: IUserEntity[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IApiEntity,
|
|
1
|
+
import { IApiEntity, IBillingTransactionEntity } from "../../entities";
|
|
2
|
+
import { IBillingApiEntity } from "./billing.entity.api";
|
|
2
3
|
export type IBillingTransactionApiEntity = IApiEntity<IBillingTransactionEntity>;
|
|
3
4
|
export type IBillingTransactionApiEntityArray = IBillingTransactionApiEntity[];
|
|
4
5
|
export type IBillingTransactionEntityGet = {
|
|
5
6
|
billingTransaction: IBillingTransactionApiEntity;
|
|
6
|
-
billing:
|
|
7
|
+
billing: IBillingApiEntity;
|
|
7
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BillingReimbursementExpenseImpactEnum } from "../enums/billing-reimburement-expense-impact.enum";
|
|
2
2
|
import { BillingReimbursementExpenseChangedStatusEnum } from "../enums/billing-reimbursement-expense-change-status.enum";
|
|
3
|
-
import {
|
|
3
|
+
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
4
|
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
|
|
5
|
-
export interface IBillingReimbursementExpenseEntity extends
|
|
5
|
+
export interface IBillingReimbursementExpenseEntity extends IEntityAuditColumn {
|
|
6
6
|
id: number;
|
|
7
7
|
billingId: number;
|
|
8
8
|
userId: number;
|
|
@@ -3,9 +3,9 @@ import { BillingTypeEnum } from "../enums/billing-type.enum";
|
|
|
3
3
|
import { BillingStatusEnum } from "../enums/billing.status.enum";
|
|
4
4
|
import { BillingInvoiceTypeEnum } from "../enums/billing_invoice_type.enum";
|
|
5
5
|
import { PaymentStatusEnum } from "../enums/payment_status.enum";
|
|
6
|
-
import {
|
|
6
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
7
7
|
import { EntityEnum, IEntityFilterData } from "./entity.utils.interface";
|
|
8
|
-
export interface IBillingEntity extends
|
|
8
|
+
export interface IBillingEntity extends IAuditColumnEntity {
|
|
9
9
|
id: number;
|
|
10
10
|
startDate: string;
|
|
11
11
|
endDate: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IBillingReimbursementExpenseApiEntity } from "../../api";
|
|
2
1
|
import { BillingReimbursementExpenseImpactEnum } from "../enums/billing-reimburement-expense-impact.enum";
|
|
3
2
|
import { BillingReimbursementExpenseChangedStatusEnum } from "../enums/billing-reimbursement-expense-change-status.enum";
|
|
3
|
+
import { IBillingReimbursementExpenseEntity } from "../interface/billing-reimbursement-expense.entity.interface";
|
|
4
4
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
5
5
|
import { BaseEntityModel } from "./base.entity.model";
|
|
6
|
-
export declare class BillingReimbursementExpneseEntityModel extends BaseEntityModel<EntityEnum.BILLING_REIMBURSEMENT_EXPENSE> implements
|
|
6
|
+
export declare class BillingReimbursementExpneseEntityModel extends BaseEntityModel<EntityEnum.BILLING_REIMBURSEMENT_EXPENSE> implements IBillingReimbursementExpenseEntity {
|
|
7
7
|
id: number;
|
|
8
8
|
billingId: number;
|
|
9
9
|
userId: number;
|
|
@@ -17,9 +17,9 @@ export declare class BillingReimbursementExpneseEntityModel extends BaseEntityMo
|
|
|
17
17
|
impact?: BillingReimbursementExpenseImpactEnum;
|
|
18
18
|
updatedBy: number;
|
|
19
19
|
createdBy: number;
|
|
20
|
-
createdOn:
|
|
21
|
-
updatedOn:
|
|
20
|
+
createdOn: number;
|
|
21
|
+
updatedOn: number;
|
|
22
22
|
static relationConfigs: never[];
|
|
23
23
|
getRelationConfigs(): any[];
|
|
24
|
-
static fromApiEntity(
|
|
24
|
+
static fromApiEntity(entity: IBillingReimbursementExpenseEntity): BillingReimbursementExpneseEntityModel;
|
|
25
25
|
}
|
|
@@ -19,16 +19,16 @@ class BillingReimbursementExpneseEntityModel extends base_entity_model_1.BaseEnt
|
|
|
19
19
|
this.amendmentPurpose = "";
|
|
20
20
|
this.updatedBy = 0;
|
|
21
21
|
this.createdBy = 0;
|
|
22
|
-
this.createdOn =
|
|
23
|
-
this.updatedOn =
|
|
22
|
+
this.createdOn = 0;
|
|
23
|
+
this.updatedOn = 0;
|
|
24
24
|
}
|
|
25
25
|
getRelationConfigs() {
|
|
26
26
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
27
27
|
}
|
|
28
|
-
static fromApiEntity(
|
|
29
|
-
const
|
|
30
|
-
Object.assign(
|
|
31
|
-
return
|
|
28
|
+
static fromApiEntity(entity) {
|
|
29
|
+
const result = new BillingReimbursementExpneseEntityModel(entity_utils_interface_1.EntityEnum.BILLING_REIMBURSEMENT_EXPENSE);
|
|
30
|
+
Object.assign(result, entity);
|
|
31
|
+
return result;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
exports.BillingReimbursementExpneseEntityModel = BillingReimbursementExpneseEntityModel;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IBillingFlowConfig } from "../../api";
|
|
1
|
+
import { IBillingApiEntity, IBillingFlowConfig } from "../../api";
|
|
2
2
|
import { CurrencyEnum } from "../../enums";
|
|
3
3
|
import { BillingTypeEnum } from "../enums/billing-type.enum";
|
|
4
4
|
import { BillingActionsEnum } from "../enums/billing.action.enum";
|
|
5
5
|
import { BillingStatusEnum } from "../enums/billing.status.enum";
|
|
6
6
|
import { BillingInvoiceTypeEnum } from "../enums/billing_invoice_type.enum";
|
|
7
7
|
import { PaymentStatusEnum } from "../enums/payment_status.enum";
|
|
8
|
-
import { IBillingEntity } from "../interface/billing.entity.interface";
|
|
9
8
|
import { EntityEnum, EnumEntityType } from "../interface/entity.utils.interface";
|
|
10
9
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
11
10
|
import { BankEntityModel } from "./bank.entity.model";
|
|
@@ -25,7 +24,7 @@ export declare enum BillingStatusCategoryEnumForUI {
|
|
|
25
24
|
CLIENT_REVIEW_STATUS = "CLIENT_REVIEW_STATUS",
|
|
26
25
|
PAYMENT_STATUS = "PAYMENT_STATUS"
|
|
27
26
|
}
|
|
28
|
-
export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLING> implements
|
|
27
|
+
export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLING> implements IBillingApiEntity {
|
|
29
28
|
id: number;
|
|
30
29
|
startDate: string;
|
|
31
30
|
endDate: string;
|
|
@@ -49,8 +48,8 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
|
|
|
49
48
|
currency: CurrencyEnum;
|
|
50
49
|
createdBy: number;
|
|
51
50
|
updatedBy: number;
|
|
52
|
-
createdOn:
|
|
53
|
-
updatedOn:
|
|
51
|
+
createdOn: string;
|
|
52
|
+
updatedOn: string;
|
|
54
53
|
type: BillingTypeEnum;
|
|
55
54
|
project?: ProjectEntityModel;
|
|
56
55
|
client?: ClientEntityModel;
|
|
@@ -69,7 +68,7 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
|
|
|
69
68
|
EntityEnum.BILLING_TIMESHEET,
|
|
70
69
|
EntityEnum.BANK
|
|
71
70
|
], EnumEntityType<EntityEnum.BILLING>>;
|
|
72
|
-
static
|
|
71
|
+
static fromApiEntity(apiEntity: IBillingApiEntity): BillingEntityModel;
|
|
73
72
|
getStatusCategory(): BillingStatusCategoryEnumForUI;
|
|
74
73
|
getStatusLabel(): string;
|
|
75
74
|
getTotalAmountInINR(): number;
|
|
@@ -39,14 +39,14 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
39
39
|
this.currency = enums_1.CurrencyEnum.INR;
|
|
40
40
|
this.createdBy = 0;
|
|
41
41
|
this.updatedBy = 0;
|
|
42
|
-
this.createdOn =
|
|
43
|
-
this.updatedOn =
|
|
42
|
+
this.createdOn = "";
|
|
43
|
+
this.updatedOn = "";
|
|
44
44
|
this.type = billing_type_enum_1.BillingTypeEnum.INVOICE;
|
|
45
45
|
}
|
|
46
|
-
static
|
|
47
|
-
const
|
|
48
|
-
Object.assign(
|
|
49
|
-
return
|
|
46
|
+
static fromApiEntity(apiEntity) {
|
|
47
|
+
const entity = new BillingEntityModel(entity_utils_interface_1.EntityEnum.BILLING);
|
|
48
|
+
Object.assign(entity, apiEntity);
|
|
49
|
+
return entity;
|
|
50
50
|
}
|
|
51
51
|
getStatusCategory() {
|
|
52
52
|
return this.mapStatusCategory(this.status);
|
|
@@ -52,7 +52,7 @@ function parseEntities(json, baseEntity, entityMap) {
|
|
|
52
52
|
const entityFromJsonMappings = {
|
|
53
53
|
[entity_utils_interface_1.EntityEnum.PROJECT]: project_entity_model_1.ProjectEntityModel.fromEntity,
|
|
54
54
|
[entity_utils_interface_1.EntityEnum.CLIENT]: client_entity_model_1.ClientEntityModel.fromEntity,
|
|
55
|
-
[entity_utils_interface_1.EntityEnum.BILLING]: billing_entity_model_1.BillingEntityModel.
|
|
55
|
+
[entity_utils_interface_1.EntityEnum.BILLING]: billing_entity_model_1.BillingEntityModel.fromApiEntity,
|
|
56
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.fromEntity,
|
|
58
58
|
[entity_utils_interface_1.EntityEnum.REIMBURSEMENT]: reimbursement_entity_model_1.ReimbursementEntityModel.fromApiEntity,
|
|
@@ -269,36 +269,5 @@ 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
|
-
/**
|
|
273
|
-
* Converts an epoch timestamp (in seconds) into a formatted date-time string.
|
|
274
|
-
*
|
|
275
|
-
* @param {number} epoch - The epoch timestamp in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
276
|
-
*
|
|
277
|
-
* @returns {string} The formatted date-time string in "yyyy-MM-dd HH:mm:ss" format.
|
|
278
|
-
*
|
|
279
|
-
* @example
|
|
280
|
-
* epochToDateTime(1759211965);
|
|
281
|
-
* // Returns: "2025-09-30 11:19:25"
|
|
282
|
-
*
|
|
283
|
-
* @example
|
|
284
|
-
* epochToDateTime(0);
|
|
285
|
-
* // Returns: "1970-01-01 05:30:00" // if your system timezone is IST (UTC+5:30)
|
|
286
|
-
*/
|
|
287
272
|
export declare function epochToDateTime(epoch: number): string;
|
|
288
|
-
/**
|
|
289
|
-
* Converts a JavaScript Date object into epoch seconds (UNIX timestamp).
|
|
290
|
-
*
|
|
291
|
-
* @param {Date} date - A JavaScript Date instance.
|
|
292
|
-
*
|
|
293
|
-
* @returns {number} The corresponding epoch time in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
294
|
-
*
|
|
295
|
-
* @example
|
|
296
|
-
* toEpochSeconds(new Date("2025-09-30 11:19:25"));
|
|
297
|
-
* // Returns: 1759211965
|
|
298
|
-
*
|
|
299
|
-
* @example
|
|
300
|
-
* toEpochSeconds(new Date());
|
|
301
|
-
* // Returns: current epoch time in seconds
|
|
302
|
-
*/
|
|
303
|
-
export declare function toEpochSeconds(date: Date): number;
|
|
304
273
|
export declare function dateTimeToEpoch(dateInput: string | Date): number;
|
|
@@ -40,7 +40,6 @@ exports.getDecimalNumberFromString = getDecimalNumberFromString;
|
|
|
40
40
|
exports.hasProperty = hasProperty;
|
|
41
41
|
exports.convertToNumberType = convertToNumberType;
|
|
42
42
|
exports.epochToDateTime = epochToDateTime;
|
|
43
|
-
exports.toEpochSeconds = toEpochSeconds;
|
|
44
43
|
exports.dateTimeToEpoch = dateTimeToEpoch;
|
|
45
44
|
const date_fns_1 = require("date-fns");
|
|
46
45
|
const util_constants_1 = require("../constants/util.constants");
|
|
@@ -568,43 +567,10 @@ function convertToNumberType(value) {
|
|
|
568
567
|
}
|
|
569
568
|
return num;
|
|
570
569
|
}
|
|
571
|
-
/**
|
|
572
|
-
* Converts an epoch timestamp (in seconds) into a formatted date-time string.
|
|
573
|
-
*
|
|
574
|
-
* @param {number} epoch - The epoch timestamp in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
575
|
-
*
|
|
576
|
-
* @returns {string} The formatted date-time string in "yyyy-MM-dd HH:mm:ss" format.
|
|
577
|
-
*
|
|
578
|
-
* @example
|
|
579
|
-
* epochToDateTime(1759211965);
|
|
580
|
-
* // Returns: "2025-09-30 11:19:25"
|
|
581
|
-
*
|
|
582
|
-
* @example
|
|
583
|
-
* epochToDateTime(0);
|
|
584
|
-
* // Returns: "1970-01-01 05:30:00" // if your system timezone is IST (UTC+5:30)
|
|
585
|
-
*/
|
|
586
570
|
function epochToDateTime(epoch) {
|
|
587
571
|
const date = new Date(epoch * 1000); // JS Date expects milliseconds
|
|
588
572
|
return (0, date_fns_1.format)(date, "yyyy-MM-dd HH:mm:ss");
|
|
589
573
|
}
|
|
590
|
-
/**
|
|
591
|
-
* Converts a JavaScript Date object into epoch seconds (UNIX timestamp).
|
|
592
|
-
*
|
|
593
|
-
* @param {Date} date - A JavaScript Date instance.
|
|
594
|
-
*
|
|
595
|
-
* @returns {number} The corresponding epoch time in seconds (number of seconds since 1970-01-01 00:00:00 UTC).
|
|
596
|
-
*
|
|
597
|
-
* @example
|
|
598
|
-
* toEpochSeconds(new Date("2025-09-30 11:19:25"));
|
|
599
|
-
* // Returns: 1759211965
|
|
600
|
-
*
|
|
601
|
-
* @example
|
|
602
|
-
* toEpochSeconds(new Date());
|
|
603
|
-
* // Returns: current epoch time in seconds
|
|
604
|
-
*/
|
|
605
|
-
function toEpochSeconds(date) {
|
|
606
|
-
return Math.floor(date.getTime() / 1000);
|
|
607
|
-
}
|
|
608
574
|
function dateTimeToEpoch(dateInput) {
|
|
609
575
|
const date = typeof dateInput === "string" ? new Date(dateInput) : dateInput;
|
|
610
576
|
return Math.floor(date.getTime() / 1000);
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IApiEntity, IBillingReimbursementExpenseEntity } from "../../entities";
|
|
2
|
-
export type IBillingReimbursementExpenseApiEntity = IApiEntity<IBillingReimbursementExpenseEntity>;
|
|
3
|
-
export type IBillingReimbursementExpenseApiEntityArray = IBillingReimbursementExpenseApiEntity[];
|
/package/dist/src/api/interface/{billing-reimbursement-expense.api.js → billing.entity.api.js}
RENAMED
|
File without changes
|