law-common 1.2.58-beta.16 → 1.2.58-beta.18
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/interface/billing.entity.response.d.ts +6 -3
- package/dist/src/api/interface/billing.flow.update.dto.d.ts +2 -2
- package/dist/src/api/interface/billing.transaction.entity.response.d.ts +5 -0
- package/dist/src/api/interface/billing.update.dto.interface.d.ts +2 -2
- package/dist/src/entities/enums/billing.status.enum.d.ts +2 -2
- package/dist/src/entities/enums/billing.status.enum.js +31 -31
- package/dist/src/entities/enums/user.entity.enum.d.ts +1 -0
- package/dist/src/entities/enums/user.entity.enum.js +7 -0
- package/dist/src/entities/interface/billing.entity.interface.d.ts +5 -2
- package/package.json +32 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAuditColumnEntity, IBillingTimesheetDetail, PaymentStatusEnum,
|
|
1
|
+
import { IAuditColumnEntity, IBillingTimesheetDetail, PaymentStatusEnum, BillingStatusEnum } from "../../entities";
|
|
2
2
|
import { IBillingApiEntity } from "./billing.entity.api";
|
|
3
3
|
import { IBillingTimesheetApiEntity } from "./billing.timesheet.entity.api";
|
|
4
4
|
export interface IBillingEntityResponse extends IAuditColumnEntity {
|
|
@@ -11,7 +11,7 @@ export interface IBillingEntityResponse extends IAuditColumnEntity {
|
|
|
11
11
|
invoiceNumber?: number;
|
|
12
12
|
paymentStatus: PaymentStatusEnum;
|
|
13
13
|
billingTimesheets: IBillingTimesheetDetail[];
|
|
14
|
-
status?:
|
|
14
|
+
status?: BillingStatusEnum;
|
|
15
15
|
writeoffAmount?: number;
|
|
16
16
|
}
|
|
17
17
|
export type IBillingEntityGet = {
|
|
@@ -26,9 +26,12 @@ export type IBillingEntityUpdateGet = {
|
|
|
26
26
|
totalAmount: number;
|
|
27
27
|
totalMinutes: number;
|
|
28
28
|
paymentStatus: PaymentStatusEnum;
|
|
29
|
-
status:
|
|
29
|
+
status: BillingStatusEnum;
|
|
30
30
|
invoiceNumber?: number;
|
|
31
31
|
writeoffAmount: number;
|
|
32
|
+
totalAmountPaid: number;
|
|
33
|
+
tdsAmount: number;
|
|
34
|
+
creditNoteAmount: number;
|
|
32
35
|
createdOn: string;
|
|
33
36
|
updatedOn: string;
|
|
34
37
|
createdBy: number;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
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[];
|
|
5
|
+
export type IBillingTransactionEntityGet = {
|
|
6
|
+
billingTransaction: IBillingTransactionApiEntity;
|
|
7
|
+
billing: IBillingApiEntity;
|
|
8
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillingImpactEnum,
|
|
1
|
+
import { BillingImpactEnum, BillingActionsEnum, BillingTimesheetStatusEnum, IBillingEntity, IBillingTimesheetEntity, IEntityUpdateDto } from "../../entities";
|
|
2
2
|
export interface IBillingUpdateDto extends IEntityUpdateDto<IBillingEntity> {
|
|
3
3
|
}
|
|
4
4
|
export interface IBillingTimesheetUpdateDto extends IEntityUpdateDto<IBillingTimesheetEntity> {
|
|
@@ -16,6 +16,6 @@ export interface IBillingTimesheetDeleteDto extends Partial<IBillingTimesheetEnt
|
|
|
16
16
|
changedStatus: BillingTimesheetStatusEnum;
|
|
17
17
|
}
|
|
18
18
|
export interface IUpdateBillingDto extends IBillingUpdateDto {
|
|
19
|
-
action
|
|
19
|
+
action?: BillingActionsEnum;
|
|
20
20
|
timesheets?: IBillingTimesheetUpdateDto[];
|
|
21
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum BillingStatusEnum {
|
|
2
2
|
PENDING_APPROVAL = "PENDING_APPROVAL",
|
|
3
3
|
REQUEST_CHANGES = "REQUEST_CHANGES",
|
|
4
4
|
CHANGES_SAVED = "CHANGES_SAVED",
|
|
@@ -11,7 +11,7 @@ export declare enum StatusEnum {
|
|
|
11
11
|
PENDING_PAYMENT = "PENDING_PAYMENT",
|
|
12
12
|
PAYMENT_DONE = "PAYMENT_DONE"
|
|
13
13
|
}
|
|
14
|
-
export declare enum
|
|
14
|
+
export declare enum BillingActionsEnum {
|
|
15
15
|
APPROVE = "approve",
|
|
16
16
|
REJECT = "reject",
|
|
17
17
|
EDIT = "edit",
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
(function (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})(
|
|
18
|
-
var
|
|
19
|
-
(function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})(
|
|
3
|
+
exports.BillingActionsEnum = exports.BillingStatusEnum = void 0;
|
|
4
|
+
var BillingStatusEnum;
|
|
5
|
+
(function (BillingStatusEnum) {
|
|
6
|
+
BillingStatusEnum["PENDING_APPROVAL"] = "PENDING_APPROVAL";
|
|
7
|
+
BillingStatusEnum["REQUEST_CHANGES"] = "REQUEST_CHANGES";
|
|
8
|
+
BillingStatusEnum["CHANGES_SAVED"] = "CHANGES_SAVED";
|
|
9
|
+
BillingStatusEnum["INTERNAL_APPROVED"] = "INTERNAL_APPROVED";
|
|
10
|
+
BillingStatusEnum["PENDING_CLIENT_REVIEW"] = "PENDING_CLIENT_REVIEW";
|
|
11
|
+
BillingStatusEnum["CLIENT_REVISION_APPROVAL"] = "CLIENT_REVISION_APPROVAL";
|
|
12
|
+
BillingStatusEnum["CANCELLED"] = "CANCELLED";
|
|
13
|
+
BillingStatusEnum["REJECT_CLIENT_REVISION"] = "REJECT_CLIENT_REVISION";
|
|
14
|
+
BillingStatusEnum["INVOICE_SENT"] = "INVOICE_SENT";
|
|
15
|
+
BillingStatusEnum["PENDING_PAYMENT"] = "PENDING_PAYMENT";
|
|
16
|
+
BillingStatusEnum["PAYMENT_DONE"] = "PAYMENT_DONE";
|
|
17
|
+
})(BillingStatusEnum || (exports.BillingStatusEnum = BillingStatusEnum = {}));
|
|
18
|
+
var BillingActionsEnum;
|
|
19
|
+
(function (BillingActionsEnum) {
|
|
20
|
+
BillingActionsEnum["APPROVE"] = "approve";
|
|
21
|
+
BillingActionsEnum["REJECT"] = "reject";
|
|
22
|
+
BillingActionsEnum["EDIT"] = "edit";
|
|
23
|
+
BillingActionsEnum["REQUEST_FOR_CHANGES"] = "requestForChanges";
|
|
24
|
+
BillingActionsEnum["SENT_FOR_APPROVAL"] = "sentForApproval";
|
|
25
|
+
BillingActionsEnum["SEND_FOR_CLIENT_REVIEW"] = "sendForClientReview";
|
|
26
|
+
BillingActionsEnum["CLIENT_REVISION"] = "clientRevision";
|
|
27
|
+
BillingActionsEnum["SEND_INVOICE"] = "sendInvoice";
|
|
28
|
+
BillingActionsEnum["APPROVAL"] = "approval";
|
|
29
|
+
BillingActionsEnum["UPDATE_PAYMENT"] = "updatePayment";
|
|
30
|
+
BillingActionsEnum["CREDIT_NOTE"] = "creditNote";
|
|
31
|
+
BillingActionsEnum["WRITE_OFF"] = "writeOff";
|
|
32
|
+
BillingActionsEnum["TDS"] = "tds";
|
|
33
|
+
})(BillingActionsEnum || (exports.BillingActionsEnum = BillingActionsEnum = {}));
|
|
@@ -22,6 +22,13 @@ var UserRoleEnum;
|
|
|
22
22
|
return Object.values(UserRoleEnum).filter((value) => typeof value === "string");
|
|
23
23
|
}
|
|
24
24
|
UserRoleEnum.getNames = getNames;
|
|
25
|
+
function parse(value) {
|
|
26
|
+
if (Object.values(UserRoleEnum).includes(value)) {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
throw new Error("Invalid user role");
|
|
30
|
+
}
|
|
31
|
+
UserRoleEnum.parse = parse;
|
|
25
32
|
})(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
|
|
26
33
|
(function (UserStatusEnum) {
|
|
27
34
|
function getNames() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BillingImpactEnum } from "../enums/billing.impact.enum";
|
|
2
|
-
import {
|
|
2
|
+
import { BillingStatusEnum } from "../enums/billing.status.enum";
|
|
3
3
|
import { BillingTimesheetStatusEnum } from "../enums/billing.timesheet.change.status.enum";
|
|
4
4
|
import { PaymentStatusEnum } from "../enums/payment_status.enum";
|
|
5
5
|
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
@@ -13,8 +13,11 @@ export interface IBillingEntity extends IAuditColumnEntity {
|
|
|
13
13
|
totalMinutes: number;
|
|
14
14
|
invoiceNumber?: number;
|
|
15
15
|
paymentStatus: PaymentStatusEnum;
|
|
16
|
-
status:
|
|
16
|
+
status: BillingStatusEnum;
|
|
17
17
|
writeoffAmount: number;
|
|
18
|
+
totalAmountPaid: number;
|
|
19
|
+
tdsAmount: number;
|
|
20
|
+
creditNoteAmount: number;
|
|
18
21
|
}
|
|
19
22
|
export interface IBillingTimesheetEntity extends IAuditColumnEntity {
|
|
20
23
|
id: number;
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
"name": "law-common",
|
|
3
|
+
"version": "1.2.58-beta.18",
|
|
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
|
+
"link": "npm run build && npm link",
|
|
16
|
+
"test": "jest"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/jest": "^29.5.13",
|
|
23
|
+
"@types/node": "^22.6.1",
|
|
24
|
+
"jest": "^29.7.0",
|
|
25
|
+
"ts-jest": "^29.2.5",
|
|
26
|
+
"ts-node": "^10.9.2",
|
|
27
|
+
"typescript": "^5.6.2"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@types/express": "^5.0.0",
|
|
31
|
+
"@types/multer": "^1.4.12",
|
|
32
|
+
"date-fns": "^4.1.0"
|
|
33
|
+
}
|
|
34
34
|
}
|