resurgence-data 1.1.18 → 1.1.20
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.
@@ -103,7 +103,7 @@ __decorate([
|
|
103
103
|
__decorate([
|
104
104
|
(0, swagger_1.ApiProperty)({
|
105
105
|
description: "List of items",
|
106
|
-
example: "['550e8400-e29b-41d4-a716-446655440001','550e8400-e29b-41d4-a716-446655440001' ]",
|
106
|
+
example: "[{id:'550e8400-e29b-41d4-a716-446655440001', quantity:2},{id:'550e8400-e29b-41d4-a716-446655440001', quantity:3}]",
|
107
107
|
}),
|
108
108
|
(0, class_validator_1.IsNotEmpty)({ message: "Please provide items for this invoice" }),
|
109
109
|
(0, class_validator_1.IsArray)({ message: "Please provide a list of items for this invoice" }),
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { UUID } from "crypto";
|
2
|
+
import { InvoiceItemDto } from "./invoice.dto";
|
2
3
|
export declare class PaymentPageDto {
|
3
4
|
billerId: UUID;
|
4
5
|
description?: string;
|
@@ -8,6 +9,7 @@ export declare class PaymentPageDto {
|
|
8
9
|
active?: boolean;
|
9
10
|
url?: string;
|
10
11
|
acceptsUserAmount?: boolean;
|
12
|
+
items?: InvoiceItemDto[];
|
11
13
|
}
|
12
14
|
export declare class UpdatePaymentPageDto {
|
13
15
|
id: string;
|
@@ -19,6 +21,7 @@ export declare class UpdatePaymentPageDto {
|
|
19
21
|
active?: boolean;
|
20
22
|
url?: string;
|
21
23
|
acceptsUserAmount?: boolean;
|
24
|
+
items?: InvoiceItemDto[];
|
22
25
|
}
|
23
26
|
export declare class PaymentPageResponseDto {
|
24
27
|
billerId: string;
|
@@ -31,4 +34,5 @@ export declare class PaymentPageResponseDto {
|
|
31
34
|
acceptsUserAmount?: boolean;
|
32
35
|
createdAt: Date;
|
33
36
|
updatedAt: Date;
|
37
|
+
items?: InvoiceItemDto[];
|
34
38
|
}
|
@@ -67,6 +67,15 @@ __decorate([
|
|
67
67
|
(0, class_validator_1.IsOptional)(),
|
68
68
|
__metadata("design:type", Boolean)
|
69
69
|
], PaymentPageDto.prototype, "acceptsUserAmount", void 0);
|
70
|
+
__decorate([
|
71
|
+
(0, swagger_1.ApiProperty)({
|
72
|
+
description: "List of items",
|
73
|
+
example: "[{id:'550e8400-e29b-41d4-a716-446655440001', quantity:2},{id:'550e8400-e29b-41d4-a716-446655440001', quantity:3}]",
|
74
|
+
}),
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
76
|
+
(0, class_validator_1.IsArray)({ message: "Please provide a list of items for this invoice" }),
|
77
|
+
__metadata("design:type", Array)
|
78
|
+
], PaymentPageDto.prototype, "items", void 0);
|
70
79
|
class UpdatePaymentPageDto {
|
71
80
|
constructor() {
|
72
81
|
this.currencyCode = "NGN";
|
@@ -129,6 +138,15 @@ __decorate([
|
|
129
138
|
(0, class_validator_1.IsOptional)(),
|
130
139
|
__metadata("design:type", Boolean)
|
131
140
|
], UpdatePaymentPageDto.prototype, "acceptsUserAmount", void 0);
|
141
|
+
__decorate([
|
142
|
+
(0, swagger_1.ApiProperty)({
|
143
|
+
description: "List of items",
|
144
|
+
example: "[{id:'550e8400-e29b-41d4-a716-446655440001', quantity:2},{id:'550e8400-e29b-41d4-a716-446655440001', quantity:3}]",
|
145
|
+
}),
|
146
|
+
(0, class_validator_1.IsOptional)(),
|
147
|
+
(0, class_validator_1.IsArray)({ message: "Please provide a list of items for this invoice" }),
|
148
|
+
__metadata("design:type", Array)
|
149
|
+
], UpdatePaymentPageDto.prototype, "items", void 0);
|
132
150
|
class PaymentPageResponseDto {
|
133
151
|
}
|
134
152
|
exports.PaymentPageResponseDto = PaymentPageResponseDto;
|
@@ -172,3 +190,7 @@ __decorate([
|
|
172
190
|
(0, swagger_1.ApiProperty)({ description: "Date when the page was last updated" }),
|
173
191
|
__metadata("design:type", Date)
|
174
192
|
], PaymentPageResponseDto.prototype, "updatedAt", void 0);
|
193
|
+
__decorate([
|
194
|
+
(0, swagger_1.ApiProperty)({ description: "List of Items" }),
|
195
|
+
__metadata("design:type", Array)
|
196
|
+
], PaymentPageResponseDto.prototype, "items", void 0);
|
package/package.json
CHANGED
@@ -89,7 +89,8 @@ export class CreateInvoiceDto extends BaseDTO {
|
|
89
89
|
|
90
90
|
@ApiProperty({
|
91
91
|
description: "List of items",
|
92
|
-
example:
|
92
|
+
example:
|
93
|
+
"[{id:'550e8400-e29b-41d4-a716-446655440001', quantity:2},{id:'550e8400-e29b-41d4-a716-446655440001', quantity:3}]",
|
93
94
|
})
|
94
95
|
@IsNotEmpty({ message: "Please provide items for this invoice" })
|
95
96
|
@IsArray({ message: "Please provide a list of items for this invoice" })
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiProperty } from "@nestjs/swagger";
|
2
|
-
import { IsString, IsInt, IsOptional, IsBoolean, IsNotEmpty, IsUUID } from "class-validator";
|
2
|
+
import { IsString, IsInt, IsOptional, IsBoolean, IsNotEmpty, IsUUID, IsArray } from "class-validator";
|
3
3
|
import { UUID } from "crypto";
|
4
|
+
import { InvoiceItemDto } from "./invoice.dto";
|
4
5
|
|
5
6
|
export class PaymentPageDto {
|
6
7
|
@ApiProperty({ description: "Payment page biller code uuid" })
|
@@ -43,6 +44,14 @@ export class PaymentPageDto {
|
|
43
44
|
@IsBoolean({ message: "acceptsUserAmount must be a boolean" })
|
44
45
|
@IsOptional()
|
45
46
|
acceptsUserAmount?: boolean;
|
47
|
+
@ApiProperty({
|
48
|
+
description: "List of items",
|
49
|
+
example:
|
50
|
+
"[{id:'550e8400-e29b-41d4-a716-446655440001', quantity:2},{id:'550e8400-e29b-41d4-a716-446655440001', quantity:3}]",
|
51
|
+
})
|
52
|
+
@IsOptional()
|
53
|
+
@IsArray({ message: "Please provide a list of items for this invoice" })
|
54
|
+
items?: InvoiceItemDto[];
|
46
55
|
}
|
47
56
|
|
48
57
|
export class UpdatePaymentPageDto {
|
@@ -92,6 +101,15 @@ export class UpdatePaymentPageDto {
|
|
92
101
|
@IsBoolean({ message: "acceptsUserAmount must be a boolean" })
|
93
102
|
@IsOptional()
|
94
103
|
acceptsUserAmount?: boolean;
|
104
|
+
|
105
|
+
@ApiProperty({
|
106
|
+
description: "List of items",
|
107
|
+
example:
|
108
|
+
"[{id:'550e8400-e29b-41d4-a716-446655440001', quantity:2},{id:'550e8400-e29b-41d4-a716-446655440001', quantity:3}]",
|
109
|
+
})
|
110
|
+
@IsOptional()
|
111
|
+
@IsArray({ message: "Please provide a list of items for this invoice" })
|
112
|
+
items?: InvoiceItemDto[];
|
95
113
|
}
|
96
114
|
|
97
115
|
export class PaymentPageResponseDto {
|
@@ -124,4 +142,7 @@ export class PaymentPageResponseDto {
|
|
124
142
|
|
125
143
|
@ApiProperty({ description: "Date when the page was last updated" })
|
126
144
|
updatedAt: Date;
|
145
|
+
|
146
|
+
@ApiProperty({ description: "List of Items" })
|
147
|
+
items?: InvoiceItemDto[];
|
127
148
|
}
|