resurgence-data 1.0.35 → 1.0.36

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,5 +1,6 @@
1
1
  export interface AuthenticationBillerRole {
2
2
  authenticationId: string;
3
+ billerName?: string;
3
4
  billerId: string;
4
5
  role: string;
5
6
  }
@@ -62,6 +62,7 @@ export interface UserAuthenticationBillerRole {
62
62
  id: string;
63
63
  billerId: string;
64
64
  authenticationId: string;
65
+ billerName?: string;
65
66
  role: string;
66
67
  createdAt?: Date;
67
68
  updatedAt?: Date;
@@ -4,6 +4,7 @@ export declare class InviteRequestDTO {
4
4
  emailAddress: string;
5
5
  role: string;
6
6
  billerId: string;
7
+ billerName: string;
7
8
  userId: string;
8
9
  }
9
10
  export declare class AcceptInviteInviteDTO {
@@ -42,6 +42,11 @@ __decorate([
42
42
  (0, swagger_1.ApiProperty)({ description: "Biller id for the merchant sending the invite" }),
43
43
  __metadata("design:type", String)
44
44
  ], InviteRequestDTO.prototype, "billerId", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.IsString)({ message: "We need the biller's name. Please provide it." }),
47
+ (0, swagger_1.ApiProperty)({ description: "Biller name" }),
48
+ __metadata("design:type", String)
49
+ ], InviteRequestDTO.prototype, "billerName", void 0);
45
50
  __decorate([
46
51
  (0, class_validator_1.IsUUID)(4, { message: "The user identifier doesn't seem right. Could you check it?" }),
47
52
  (0, swagger_1.ApiProperty)({ description: "User id of the inviter" }),
@@ -4,3 +4,12 @@ exports.InviteStatuses = exports.inviteAccountTypes = exports.accountTypes = voi
4
4
  exports.accountTypes = ["ADMINISTRATOR", "USER", "SUPPORT", "BILLER", "BILLER_ADMINISTRATOR", "BILLER_USER"];
5
5
  exports.inviteAccountTypes = ["BILLER_ADMINISTRATOR", "BILLER_USER"];
6
6
  exports.InviteStatuses = ["ACCEPTED", "PENDING", "REVOKED"];
7
+ var ROLE;
8
+ (function (ROLE) {
9
+ ROLE[ROLE["ADMINISTRATOR"] = 0] = "ADMINISTRATOR";
10
+ ROLE[ROLE["USER"] = 1] = "USER";
11
+ ROLE[ROLE["SUPPORT"] = 2] = "SUPPORT";
12
+ ROLE[ROLE["BILLER"] = 3] = "BILLER";
13
+ ROLE[ROLE["BILLER_ADMINISTRATOR"] = 4] = "BILLER_ADMINISTRATOR";
14
+ ROLE[ROLE["BILLER_USER"] = 5] = "BILLER_USER";
15
+ })(ROLE || (ROLE = {}));
package/dist/user/user.js CHANGED
@@ -13,6 +13,15 @@ exports.UpdateUserDTO = exports.CreateUserDTO = 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
+ var ROLE;
17
+ (function (ROLE) {
18
+ ROLE[ROLE["ADMINISTRATOR"] = 0] = "ADMINISTRATOR";
19
+ ROLE[ROLE["USER"] = 1] = "USER";
20
+ ROLE[ROLE["SUPPORT"] = 2] = "SUPPORT";
21
+ ROLE[ROLE["BILLER"] = 3] = "BILLER";
22
+ ROLE[ROLE["BILLER_ADMINISTRATOR"] = 4] = "BILLER_ADMINISTRATOR";
23
+ ROLE[ROLE["BILLER_USER"] = 5] = "BILLER_USER";
24
+ })(ROLE || (ROLE = {}));
16
25
  class CreateUserDTO {
17
26
  }
18
27
  exports.CreateUserDTO = CreateUserDTO;
@@ -53,7 +62,7 @@ __decorate([
53
62
  __decorate([
54
63
  (0, class_validator_1.IsString)({ message: "Account type is required. Please specify it." }),
55
64
  (0, class_validator_1.IsIn)(account_type_1.accountTypes, { message: "Please select a valid account type" }),
56
- (0, swagger_1.ApiProperty)({ description: "users role" }),
65
+ (0, swagger_1.ApiProperty)({ description: "users role", enumName: "ROLE", enum: ROLE }),
57
66
  __metadata("design:type", String)
58
67
  ], CreateUserDTO.prototype, "role", void 0);
59
68
  class UpdateUserDTO extends CreateUserDTO {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resurgence-data",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "DTOs and shareable resources",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -1,5 +1,6 @@
1
1
  export interface AuthenticationBillerRole {
2
2
  authenticationId: string;
3
+ billerName?: string;
3
4
  billerId: string;
4
5
  role: string;
5
6
  }
@@ -103,6 +103,7 @@ export interface UserAuthenticationBillerRole {
103
103
  id: string;
104
104
  billerId: string;
105
105
  authenticationId: string;
106
+ billerName?: string;
106
107
  role: string;
107
108
  createdAt?: Date;
108
109
  updatedAt?: Date;
@@ -24,6 +24,10 @@ export class InviteRequestDTO {
24
24
  @ApiProperty({ description: "Biller id for the merchant sending the invite" })
25
25
  billerId: string;
26
26
 
27
+ @IsString({ message: "We need the biller's name. Please provide it." })
28
+ @ApiProperty({ description: "Biller name" })
29
+ billerName: string;
30
+
27
31
  @IsUUID(4, { message: "The user identifier doesn't seem right. Could you check it?" })
28
32
  @ApiProperty({ description: "User id of the inviter" })
29
33
  userId: string;