resurgence-data 1.0.42 → 1.0.44
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.
@@ -228,7 +228,10 @@ export declare class UpdateBillerItemDto extends BaseDTO {
|
|
228
228
|
export declare class CreateInvoiceDto extends BaseDTO {
|
229
229
|
billerId: string;
|
230
230
|
customerId: string;
|
231
|
+
items: string[];
|
231
232
|
discountValue: number;
|
233
|
+
total?: number;
|
234
|
+
totalService?: number;
|
232
235
|
discountType: string;
|
233
236
|
dueDate: string;
|
234
237
|
status: string;
|
@@ -236,6 +239,7 @@ export declare class CreateInvoiceDto extends BaseDTO {
|
|
236
239
|
export declare class UpdateInvoiceDto extends BaseDTO {
|
237
240
|
id: string;
|
238
241
|
billerId?: string;
|
242
|
+
items?: string[];
|
239
243
|
customerId?: string;
|
240
244
|
discountValue?: number;
|
241
245
|
discountType?: string;
|
@@ -1519,15 +1519,40 @@ __decorate([
|
|
1519
1519
|
(0, class_validator_1.IsString)({ message: "Customer ID must be a valid string" }),
|
1520
1520
|
__metadata("design:type", String)
|
1521
1521
|
], CreateInvoiceDto.prototype, "customerId", void 0);
|
1522
|
+
__decorate([
|
1523
|
+
(0, swagger_1.ApiProperty)({
|
1524
|
+
description: "List of items",
|
1525
|
+
example: "['550e8400-e29b-41d4-a716-446655440001','550e8400-e29b-41d4-a716-446655440001' ]",
|
1526
|
+
}),
|
1527
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Please provide items for this invoice" }),
|
1528
|
+
(0, class_validator_1.IsArray)({ message: "Please provide a list of items for this invoice" }),
|
1529
|
+
__metadata("design:type", Array)
|
1530
|
+
], CreateInvoiceDto.prototype, "items", void 0);
|
1522
1531
|
__decorate([
|
1523
1532
|
(0, swagger_1.ApiProperty)({
|
1524
1533
|
description: "The discount value applied to the invoice",
|
1525
1534
|
example: 10.5,
|
1526
1535
|
}),
|
1527
1536
|
(0, class_validator_1.IsNotEmpty)({ message: "Discount value must not be empty" }),
|
1528
|
-
(0, class_validator_1.
|
1537
|
+
(0, class_validator_1.IsNumber)(undefined, { message: "Discount value must be a valid number" }),
|
1529
1538
|
__metadata("design:type", Number)
|
1530
1539
|
], CreateInvoiceDto.prototype, "discountValue", void 0);
|
1540
|
+
__decorate([
|
1541
|
+
(0, swagger_1.ApiProperty)({
|
1542
|
+
description: "Total for invoice",
|
1543
|
+
example: 20030,
|
1544
|
+
}),
|
1545
|
+
(0, class_validator_1.IsInt)({ message: "Discount value must be a valid number" }),
|
1546
|
+
__metadata("design:type", Number)
|
1547
|
+
], CreateInvoiceDto.prototype, "total", void 0);
|
1548
|
+
__decorate([
|
1549
|
+
(0, swagger_1.ApiProperty)({
|
1550
|
+
description: "Total for invoice service charges",
|
1551
|
+
example: 1000,
|
1552
|
+
}),
|
1553
|
+
(0, class_validator_1.IsNumber)(undefined, { message: "Discount value must be a valid number" }),
|
1554
|
+
__metadata("design:type", Number)
|
1555
|
+
], CreateInvoiceDto.prototype, "totalService", void 0);
|
1531
1556
|
__decorate([
|
1532
1557
|
(0, swagger_1.ApiProperty)({
|
1533
1558
|
description: "The type of discount applied to the invoice",
|
@@ -1577,6 +1602,16 @@ __decorate([
|
|
1577
1602
|
(0, class_validator_1.IsOptional)(),
|
1578
1603
|
__metadata("design:type", String)
|
1579
1604
|
], UpdateInvoiceDto.prototype, "billerId", void 0);
|
1605
|
+
__decorate([
|
1606
|
+
(0, swagger_1.ApiProperty)({
|
1607
|
+
description: "List of items",
|
1608
|
+
example: "['550e8400-e29b-41d4-a716-446655440001','550e8400-e29b-41d4-a716-446655440001' ]",
|
1609
|
+
required: false,
|
1610
|
+
}),
|
1611
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Please provide items for this invoice" }),
|
1612
|
+
(0, class_validator_1.IsArray)({ message: "Please provide a list of items for this invoice" }),
|
1613
|
+
__metadata("design:type", Array)
|
1614
|
+
], UpdateInvoiceDto.prototype, "items", void 0);
|
1580
1615
|
__decorate([
|
1581
1616
|
(0, swagger_1.ApiProperty)({
|
1582
1617
|
description: "The ID of the customer",
|
package/dist/exception/index.js
CHANGED
@@ -21,3 +21,4 @@ __exportStar(require("./authorization.exception"), exports);
|
|
21
21
|
__exportStar(require("./database.exception"), exports);
|
22
22
|
__exportStar(require("./integration.exception"), exports);
|
23
23
|
__exportStar(require("./process.exception"), exports);
|
24
|
+
__exportStar(require("./data.exception"), exports);
|
package/package.json
CHANGED
package/src/biller/biller.dto.ts
CHANGED
@@ -1345,13 +1345,33 @@ export class CreateInvoiceDto extends BaseDTO {
|
|
1345
1345
|
@IsString({ message: "Customer ID must be a valid string" })
|
1346
1346
|
customerId: string;
|
1347
1347
|
|
1348
|
+
@ApiProperty({
|
1349
|
+
description: "List of items",
|
1350
|
+
example: "['550e8400-e29b-41d4-a716-446655440001','550e8400-e29b-41d4-a716-446655440001' ]",
|
1351
|
+
})
|
1352
|
+
@IsNotEmpty({ message: "Please provide items for this invoice" })
|
1353
|
+
@IsArray({ message: "Please provide a list of items for this invoice" })
|
1354
|
+
items: string[];
|
1355
|
+
|
1348
1356
|
@ApiProperty({
|
1349
1357
|
description: "The discount value applied to the invoice",
|
1350
1358
|
example: 10.5,
|
1351
1359
|
})
|
1352
1360
|
@IsNotEmpty({ message: "Discount value must not be empty" })
|
1353
|
-
@
|
1361
|
+
@IsNumber(undefined, { message: "Discount value must be a valid number" })
|
1354
1362
|
discountValue: number;
|
1363
|
+
@ApiProperty({
|
1364
|
+
description: "Total for invoice",
|
1365
|
+
example: 20030,
|
1366
|
+
})
|
1367
|
+
@IsInt({ message: "Discount value must be a valid number" })
|
1368
|
+
total?: number;
|
1369
|
+
@ApiProperty({
|
1370
|
+
description: "Total for invoice service charges",
|
1371
|
+
example: 1000,
|
1372
|
+
})
|
1373
|
+
@IsNumber(undefined, { message: "Discount value must be a valid number" })
|
1374
|
+
totalService?: number;
|
1355
1375
|
|
1356
1376
|
@ApiProperty({
|
1357
1377
|
description: "The type of discount applied to the invoice",
|
@@ -1396,6 +1416,15 @@ export class UpdateInvoiceDto extends BaseDTO {
|
|
1396
1416
|
@IsOptional()
|
1397
1417
|
billerId?: string;
|
1398
1418
|
|
1419
|
+
@ApiProperty({
|
1420
|
+
description: "List of items",
|
1421
|
+
example: "['550e8400-e29b-41d4-a716-446655440001','550e8400-e29b-41d4-a716-446655440001' ]",
|
1422
|
+
required: false,
|
1423
|
+
})
|
1424
|
+
@IsNotEmpty({ message: "Please provide items for this invoice" })
|
1425
|
+
@IsArray({ message: "Please provide a list of items for this invoice" })
|
1426
|
+
items?: string[];
|
1427
|
+
|
1399
1428
|
@ApiProperty({
|
1400
1429
|
description: "The ID of the customer",
|
1401
1430
|
example: "550e8400-e29b-41d4-a716-446655440001",
|
package/src/exception/index.ts
CHANGED