grm-shared-library 1.0.40 → 1.0.42
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,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UserStatus } from "../enums/user-status.enum";
|
|
1
|
+
import { UserStatus } from '../enums/user-status.enum';
|
|
3
2
|
export declare class CreateUserDto {
|
|
4
3
|
name: string;
|
|
5
4
|
email: string;
|
|
6
5
|
phoneNumber?: string;
|
|
7
|
-
|
|
6
|
+
roles: number[];
|
|
8
7
|
password?: string;
|
|
9
8
|
avatar?: string;
|
|
10
9
|
designation?: string;
|
|
11
|
-
status
|
|
12
|
-
isTermsAccepted
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
otpExpiresAt?: Date;
|
|
16
|
-
partner: number;
|
|
10
|
+
status?: UserStatus;
|
|
11
|
+
isTermsAccepted: boolean;
|
|
12
|
+
otp?: string;
|
|
13
|
+
partner?: number;
|
|
17
14
|
organization: number;
|
|
18
15
|
}
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CreateUserDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const case_decorators_1 = require("../../../decorators/case-decorators");
|
|
15
|
-
const role_1 = require("../../role");
|
|
16
15
|
const user_status_enum_1 = require("../enums/user-status.enum");
|
|
17
16
|
class CreateUserDto {
|
|
18
17
|
}
|
|
@@ -21,31 +20,35 @@ __decorate([
|
|
|
21
20
|
(0, class_validator_1.IsString)(),
|
|
22
21
|
(0, class_validator_1.IsNotEmpty)(),
|
|
23
22
|
(0, class_validator_1.MinLength)(2),
|
|
23
|
+
(0, class_validator_1.MaxLength)(50),
|
|
24
24
|
(0, case_decorators_1.SentenceCase)(),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
26
|
], CreateUserDto.prototype, "name", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, class_validator_1.IsEmail)(),
|
|
29
29
|
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
(0, class_validator_1.MaxLength)(50),
|
|
30
31
|
__metadata("design:type", String)
|
|
31
32
|
], CreateUserDto.prototype, "email", void 0);
|
|
32
33
|
__decorate([
|
|
33
|
-
(0, class_validator_1.
|
|
34
|
-
(0, class_validator_1.
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.MaxLength)(20),
|
|
35
36
|
(0, class_validator_1.IsOptional)(),
|
|
36
37
|
__metadata("design:type", String)
|
|
37
38
|
], CreateUserDto.prototype, "phoneNumber", void 0);
|
|
38
39
|
__decorate([
|
|
39
|
-
(0, class_validator_1.
|
|
40
|
+
(0, class_validator_1.IsArray)(),
|
|
41
|
+
(0, class_validator_1.IsNumber)({}, { each: true }),
|
|
40
42
|
(0, class_validator_1.IsNotEmpty)(),
|
|
41
|
-
__metadata("design:type",
|
|
42
|
-
], CreateUserDto.prototype, "
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], CreateUserDto.prototype, "roles", void 0);
|
|
43
45
|
__decorate([
|
|
44
46
|
(0, class_validator_1.IsString)(),
|
|
45
47
|
(0, class_validator_1.MinLength)(8),
|
|
46
48
|
(0, class_validator_1.Matches)(/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {
|
|
47
|
-
message: 'Password must contain at least 1 uppercase letter, 1 lowercase letter, and 1 number or special character'
|
|
49
|
+
message: 'Password must contain at least 1 uppercase letter, 1 lowercase letter, and 1 number or special character',
|
|
48
50
|
}),
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
52
|
__metadata("design:type", String)
|
|
50
53
|
], CreateUserDto.prototype, "password", void 0);
|
|
51
54
|
__decorate([
|
|
@@ -56,11 +59,12 @@ __decorate([
|
|
|
56
59
|
__decorate([
|
|
57
60
|
(0, class_validator_1.IsString)(),
|
|
58
61
|
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.MaxLength)(20),
|
|
59
63
|
__metadata("design:type", String)
|
|
60
64
|
], CreateUserDto.prototype, "designation", void 0);
|
|
61
65
|
__decorate([
|
|
62
66
|
(0, class_validator_1.IsEnum)(user_status_enum_1.UserStatus),
|
|
63
|
-
(0, class_validator_1.
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
68
|
__metadata("design:type", String)
|
|
65
69
|
], CreateUserDto.prototype, "status", void 0);
|
|
66
70
|
__decorate([
|
|
@@ -69,25 +73,17 @@ __decorate([
|
|
|
69
73
|
__metadata("design:type", Boolean)
|
|
70
74
|
], CreateUserDto.prototype, "isTermsAccepted", void 0);
|
|
71
75
|
__decorate([
|
|
72
|
-
(0, class_validator_1.
|
|
73
|
-
(0, class_validator_1.IsOptional)(),
|
|
74
|
-
__metadata("design:type", Boolean)
|
|
75
|
-
], CreateUserDto.prototype, "isEmailVerified", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, class_validator_1.IsBoolean)(),
|
|
76
|
+
(0, class_validator_1.IsString)(),
|
|
78
77
|
(0, class_validator_1.IsOptional)(),
|
|
79
|
-
__metadata("design:type",
|
|
78
|
+
__metadata("design:type", String)
|
|
80
79
|
], CreateUserDto.prototype, "otp", void 0);
|
|
81
80
|
__decorate([
|
|
82
|
-
(0, class_validator_1.
|
|
81
|
+
(0, class_validator_1.IsNumber)(),
|
|
83
82
|
(0, class_validator_1.IsOptional)(),
|
|
84
|
-
__metadata("design:type", Date)
|
|
85
|
-
], CreateUserDto.prototype, "otpExpiresAt", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
88
83
|
__metadata("design:type", Number)
|
|
89
84
|
], CreateUserDto.prototype, "partner", void 0);
|
|
90
85
|
__decorate([
|
|
86
|
+
(0, class_validator_1.IsNumber)(),
|
|
91
87
|
(0, class_validator_1.IsNotEmpty)(),
|
|
92
88
|
__metadata("design:type", Number)
|
|
93
89
|
], CreateUserDto.prototype, "organization", void 0);
|
|
@@ -6,16 +6,16 @@ export interface User {
|
|
|
6
6
|
name: string;
|
|
7
7
|
email: string;
|
|
8
8
|
phoneNumber?: string;
|
|
9
|
-
|
|
9
|
+
roles: Role[];
|
|
10
10
|
password?: string;
|
|
11
11
|
avatar?: string;
|
|
12
12
|
designation?: string;
|
|
13
|
-
status
|
|
13
|
+
status?: string;
|
|
14
14
|
isTermsAccepted?: boolean;
|
|
15
15
|
isEmailVerified?: boolean;
|
|
16
|
-
otp?:
|
|
16
|
+
otp?: string;
|
|
17
17
|
otpExpiresAt?: Date;
|
|
18
|
-
partner
|
|
18
|
+
partner?: Partner;
|
|
19
19
|
organization: Organization;
|
|
20
20
|
createdAt?: Date;
|
|
21
21
|
updatedAt?: Date;
|