resurgence-data 1.1.38 → 1.1.41
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.
@@ -1,6 +1,4 @@
|
|
1
1
|
export declare class InviteRequestDTO {
|
2
|
-
firstName: string;
|
3
|
-
lastName: string;
|
4
2
|
emailAddress: string;
|
5
3
|
role: string;
|
6
4
|
billerId: string;
|
@@ -10,7 +8,13 @@ export declare class InviteRequestDTO {
|
|
10
8
|
export declare class AcceptInviteInviteDTO {
|
11
9
|
token: string;
|
12
10
|
password?: string;
|
11
|
+
firstName?: string;
|
12
|
+
lastName?: string;
|
13
13
|
}
|
14
14
|
export declare class RevokeInviteDTO {
|
15
15
|
id: string;
|
16
16
|
}
|
17
|
+
export declare class RevokeUserAccessDTO {
|
18
|
+
billerId: string;
|
19
|
+
userId: string;
|
20
|
+
}
|
@@ -9,23 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.RevokeInviteDTO = exports.AcceptInviteInviteDTO = exports.InviteRequestDTO = void 0;
|
12
|
+
exports.RevokeUserAccessDTO = exports.RevokeInviteDTO = exports.AcceptInviteInviteDTO = exports.InviteRequestDTO = void 0;
|
13
13
|
const class_validator_1 = require("class-validator");
|
14
14
|
const account_type_1 = require("../types/account.type");
|
15
15
|
const swagger_1 = require("@nestjs/swagger");
|
16
16
|
class InviteRequestDTO {
|
17
17
|
}
|
18
18
|
exports.InviteRequestDTO = InviteRequestDTO;
|
19
|
-
__decorate([
|
20
|
-
(0, class_validator_1.IsString)({ message: "Could you provide your invitee's first name?" }),
|
21
|
-
(0, swagger_1.ApiProperty)({ description: "First name of the invitee" }),
|
22
|
-
__metadata("design:type", String)
|
23
|
-
], InviteRequestDTO.prototype, "firstName", void 0);
|
24
|
-
__decorate([
|
25
|
-
(0, class_validator_1.IsString)({ message: "Could you provide your invitee's last name?" }),
|
26
|
-
(0, swagger_1.ApiProperty)({ description: "Last name of the invitee" }),
|
27
|
-
__metadata("design:type", String)
|
28
|
-
], InviteRequestDTO.prototype, "lastName", void 0);
|
29
19
|
__decorate([
|
30
20
|
(0, class_validator_1.IsEmail)(undefined, { message: "Hmm, that doesn't look like a valid email. Could you double-check it?" }),
|
31
21
|
(0, class_validator_1.IsString)({ message: "We need your invitee's email address. Please provide it." }),
|
@@ -62,10 +52,26 @@ __decorate([
|
|
62
52
|
], AcceptInviteInviteDTO.prototype, "token", void 0);
|
63
53
|
__decorate([
|
64
54
|
(0, class_validator_1.IsString)({ message: "Looks like your password isn't valid. Please provide one." }),
|
65
|
-
(0, swagger_1.ApiProperty)({ description: "Users password" }),
|
55
|
+
(0, swagger_1.ApiProperty)({ description: "Users password", required: false }),
|
66
56
|
(0, class_validator_1.IsOptional)(),
|
67
57
|
__metadata("design:type", String)
|
68
58
|
], AcceptInviteInviteDTO.prototype, "password", void 0);
|
59
|
+
__decorate([
|
60
|
+
(0, class_validator_1.ValidateIf)((o) => o.password),
|
61
|
+
(0, class_validator_1.IsString)({ message: "Looks like your first name isn't valid. Please provide one." }),
|
62
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Looks like your first name isn't provided. Please enter it." }),
|
63
|
+
(0, swagger_1.ApiProperty)({ description: "Users First name", required: false }),
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
65
|
+
__metadata("design:type", String)
|
66
|
+
], AcceptInviteInviteDTO.prototype, "firstName", void 0);
|
67
|
+
__decorate([
|
68
|
+
(0, class_validator_1.ValidateIf)((o) => o.password),
|
69
|
+
(0, class_validator_1.IsString)({ message: "Looks like your last name isn't valid. Please provide one." }),
|
70
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Looks like your last name isn't provided. Please enter it." }),
|
71
|
+
(0, swagger_1.ApiProperty)({ description: "Users Last name", required: false }),
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
73
|
+
__metadata("design:type", String)
|
74
|
+
], AcceptInviteInviteDTO.prototype, "lastName", void 0);
|
69
75
|
class RevokeInviteDTO {
|
70
76
|
}
|
71
77
|
exports.RevokeInviteDTO = RevokeInviteDTO;
|
@@ -74,3 +80,16 @@ __decorate([
|
|
74
80
|
(0, swagger_1.ApiProperty)({ description: "ID of the invite" }),
|
75
81
|
__metadata("design:type", String)
|
76
82
|
], RevokeInviteDTO.prototype, "id", void 0);
|
83
|
+
class RevokeUserAccessDTO {
|
84
|
+
}
|
85
|
+
exports.RevokeUserAccessDTO = RevokeUserAccessDTO;
|
86
|
+
__decorate([
|
87
|
+
(0, class_validator_1.IsUUID)(4, { message: "Please select a biller id." }),
|
88
|
+
(0, swagger_1.ApiProperty)({ description: "Biller id " }),
|
89
|
+
__metadata("design:type", String)
|
90
|
+
], RevokeUserAccessDTO.prototype, "billerId", void 0);
|
91
|
+
__decorate([
|
92
|
+
(0, class_validator_1.IsUUID)(4, { message: "Please select user id to revoke." }),
|
93
|
+
(0, swagger_1.ApiProperty)({ description: "user ID ro revoke" }),
|
94
|
+
__metadata("design:type", String)
|
95
|
+
], RevokeUserAccessDTO.prototype, "userId", void 0);
|
@@ -57,6 +57,8 @@ export declare class CreateBillerDto extends BaseDTO {
|
|
57
57
|
live: boolean;
|
58
58
|
active: boolean;
|
59
59
|
slug?: string;
|
60
|
+
description?: string;
|
61
|
+
registrationNumber?: string;
|
60
62
|
billerCode?: string;
|
61
63
|
chargeConfigurations?: CreateBillerChargeConfigurationDto[];
|
62
64
|
createdAt?: string;
|
@@ -67,6 +69,8 @@ export declare class UpdateBillerDto extends BaseDTO {
|
|
67
69
|
id: string;
|
68
70
|
categoryId?: string;
|
69
71
|
billerProfileId?: string;
|
72
|
+
description?: string;
|
73
|
+
registrationNumber?: string;
|
70
74
|
name?: string;
|
71
75
|
live?: boolean;
|
72
76
|
active: boolean;
|
@@ -229,6 +229,18 @@ __decorate([
|
|
229
229
|
(0, class_validator_1.IsString)({ message: "Slug must be a string." }),
|
230
230
|
__metadata("design:type", String)
|
231
231
|
], CreateBillerDto.prototype, "slug", void 0);
|
232
|
+
__decorate([
|
233
|
+
(0, swagger_1.ApiProperty)({ description: "The description of the business.", example: "Electricity provider", required: false }),
|
234
|
+
(0, class_validator_1.IsOptional)(),
|
235
|
+
(0, class_validator_1.IsString)({ message: "Description must be a string" }),
|
236
|
+
__metadata("design:type", String)
|
237
|
+
], CreateBillerDto.prototype, "description", void 0);
|
238
|
+
__decorate([
|
239
|
+
(0, swagger_1.ApiProperty)({ description: "registration number for the business.", example: "RC673467", required: false }),
|
240
|
+
(0, class_validator_1.IsOptional)(),
|
241
|
+
(0, class_validator_1.IsString)({ message: "Registration number must be a string" }),
|
242
|
+
__metadata("design:type", String)
|
243
|
+
], CreateBillerDto.prototype, "registrationNumber", void 0);
|
232
244
|
__decorate([
|
233
245
|
(0, swagger_1.ApiProperty)({ description: "The biller code.", example: "ELEC123", required: false }),
|
234
246
|
(0, class_validator_1.IsOptional)(),
|
@@ -274,6 +286,18 @@ __decorate([
|
|
274
286
|
(0, class_validator_1.IsString)({ message: "Profile ID must be a string." }),
|
275
287
|
__metadata("design:type", String)
|
276
288
|
], UpdateBillerDto.prototype, "billerProfileId", void 0);
|
289
|
+
__decorate([
|
290
|
+
(0, swagger_1.ApiProperty)({ description: "The description of the business.", example: "Electricity provider", required: false }),
|
291
|
+
(0, class_validator_1.IsOptional)(),
|
292
|
+
(0, class_validator_1.IsString)({ message: "Description must be a string" }),
|
293
|
+
__metadata("design:type", String)
|
294
|
+
], UpdateBillerDto.prototype, "description", void 0);
|
295
|
+
__decorate([
|
296
|
+
(0, swagger_1.ApiProperty)({ description: "registration numberfor the business.", example: "RC673467", required: false }),
|
297
|
+
(0, class_validator_1.IsOptional)(),
|
298
|
+
(0, class_validator_1.IsString)({ message: "Registration number must be a string" }),
|
299
|
+
__metadata("design:type", String)
|
300
|
+
], UpdateBillerDto.prototype, "registrationNumber", void 0);
|
277
301
|
__decorate([
|
278
302
|
(0, swagger_1.ApiProperty)({ description: "The name of the biller.", example: "Electricity Provider", required: false }),
|
279
303
|
(0, class_validator_1.IsString)({ message: "Name must be a string." }),
|
package/package.json
CHANGED
@@ -1,16 +1,8 @@
|
|
1
|
-
import { IsEmail, IsIn, IsOptional, IsString, IsUUID } from "class-validator";
|
1
|
+
import { IsEmail, IsIn, IsNotEmpty, IsOptional, IsString, IsUUID, ValidateIf } from "class-validator";
|
2
2
|
import { accountTypes } from "../types/account.type";
|
3
3
|
import { ApiProperty } from "@nestjs/swagger";
|
4
4
|
|
5
5
|
export class InviteRequestDTO {
|
6
|
-
@IsString({ message: "Could you provide your invitee's first name?" })
|
7
|
-
@ApiProperty({ description: "First name of the invitee" })
|
8
|
-
firstName: string;
|
9
|
-
|
10
|
-
@IsString({ message: "Could you provide your invitee's last name?" })
|
11
|
-
@ApiProperty({ description: "Last name of the invitee" })
|
12
|
-
lastName: string;
|
13
|
-
|
14
6
|
@IsEmail(undefined, { message: "Hmm, that doesn't look like a valid email. Could you double-check it?" })
|
15
7
|
@IsString({ message: "We need your invitee's email address. Please provide it." })
|
16
8
|
@ApiProperty({ description: "Email address of the invitee" })
|
@@ -39,9 +31,23 @@ export class AcceptInviteInviteDTO {
|
|
39
31
|
token: string;
|
40
32
|
|
41
33
|
@IsString({ message: "Looks like your password isn't valid. Please provide one." })
|
42
|
-
@ApiProperty({ description: "Users password" })
|
34
|
+
@ApiProperty({ description: "Users password", required: false })
|
43
35
|
@IsOptional()
|
44
36
|
password?: string;
|
37
|
+
|
38
|
+
@ValidateIf((o) => o.password)
|
39
|
+
@IsString({ message: "Looks like your first name isn't valid. Please provide one." })
|
40
|
+
@IsNotEmpty({ message: "Looks like your first name isn't provided. Please enter it." })
|
41
|
+
@ApiProperty({ description: "Users First name", required: false })
|
42
|
+
@IsOptional()
|
43
|
+
firstName?: string;
|
44
|
+
|
45
|
+
@ValidateIf((o) => o.password)
|
46
|
+
@IsString({ message: "Looks like your last name isn't valid. Please provide one." })
|
47
|
+
@IsNotEmpty({ message: "Looks like your last name isn't provided. Please enter it." })
|
48
|
+
@ApiProperty({ description: "Users Last name", required: false })
|
49
|
+
@IsOptional()
|
50
|
+
lastName?: string;
|
45
51
|
}
|
46
52
|
|
47
53
|
export class RevokeInviteDTO {
|
@@ -49,3 +55,11 @@ export class RevokeInviteDTO {
|
|
49
55
|
@ApiProperty({ description: "ID of the invite" })
|
50
56
|
id: string;
|
51
57
|
}
|
58
|
+
export class RevokeUserAccessDTO {
|
59
|
+
@IsUUID(4, { message: "Please select a biller id." })
|
60
|
+
@ApiProperty({ description: "Biller id " })
|
61
|
+
billerId: string;
|
62
|
+
@IsUUID(4, { message: "Please select user id to revoke." })
|
63
|
+
@ApiProperty({ description: "user ID ro revoke" })
|
64
|
+
userId: string;
|
65
|
+
}
|
package/src/biller/biller.dto.ts
CHANGED
@@ -200,6 +200,16 @@ export class CreateBillerDto extends BaseDTO {
|
|
200
200
|
@IsString({ message: "Slug must be a string." })
|
201
201
|
slug?: string;
|
202
202
|
|
203
|
+
@ApiProperty({ description: "The description of the business.", example: "Electricity provider", required: false })
|
204
|
+
@IsOptional()
|
205
|
+
@IsString({ message: "Description must be a string" })
|
206
|
+
description?: string;
|
207
|
+
|
208
|
+
@ApiProperty({ description: "registration number for the business.", example: "RC673467", required: false })
|
209
|
+
@IsOptional()
|
210
|
+
@IsString({ message: "Registration number must be a string" })
|
211
|
+
registrationNumber?: string;
|
212
|
+
|
203
213
|
@ApiProperty({ description: "The biller code.", example: "ELEC123", required: false })
|
204
214
|
@IsOptional()
|
205
215
|
@IsString({ message: "Biller code must be a string." })
|
@@ -239,6 +249,16 @@ export class UpdateBillerDto extends BaseDTO {
|
|
239
249
|
@IsString({ message: "Profile ID must be a string." })
|
240
250
|
billerProfileId?: string;
|
241
251
|
|
252
|
+
@ApiProperty({ description: "The description of the business.", example: "Electricity provider", required: false })
|
253
|
+
@IsOptional()
|
254
|
+
@IsString({ message: "Description must be a string" })
|
255
|
+
description?: string;
|
256
|
+
|
257
|
+
@ApiProperty({ description: "registration numberfor the business.", example: "RC673467", required: false })
|
258
|
+
@IsOptional()
|
259
|
+
@IsString({ message: "Registration number must be a string" })
|
260
|
+
registrationNumber?: string;
|
261
|
+
|
242
262
|
@ApiProperty({ description: "The name of the biller.", example: "Electricity Provider", required: false })
|
243
263
|
@IsString({ message: "Name must be a string." })
|
244
264
|
@Length(1, 50, { message: "Name must be between 1 and 50 characters long." })
|