vr-models 1.0.48 → 1.0.50
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.
|
@@ -15,7 +15,7 @@ export interface PhoneContactAttributes {
|
|
|
15
15
|
otpAttempts?: number;
|
|
16
16
|
lastFailedAttemptAt?: Date;
|
|
17
17
|
isLocked?: boolean;
|
|
18
|
-
lockedUntil
|
|
18
|
+
lockedUntil: Date | null;
|
|
19
19
|
carrier?: string;
|
|
20
20
|
countryCode?: string;
|
|
21
21
|
deactivatedAt?: Date | null;
|
|
@@ -44,7 +44,7 @@ export declare class PhoneContact extends Model<InferAttributes<PhoneContact>, I
|
|
|
44
44
|
otpAttempts?: number;
|
|
45
45
|
lastFailedAttemptAt?: Date;
|
|
46
46
|
isLocked?: boolean;
|
|
47
|
-
lockedUntil
|
|
47
|
+
lockedUntil: Date | null;
|
|
48
48
|
carrier?: string;
|
|
49
49
|
countryCode?: string;
|
|
50
50
|
deactivatedAt?: Date | null;
|
|
@@ -63,6 +63,8 @@ class PhoneContact extends vr_migrations_1.Model {
|
|
|
63
63
|
defaultValue: {
|
|
64
64
|
otpAttempts: 0,
|
|
65
65
|
isLocked: false,
|
|
66
|
+
lockedUntil: null,
|
|
67
|
+
lastFailedAttemptAt: null,
|
|
66
68
|
},
|
|
67
69
|
},
|
|
68
70
|
createdAt: {
|
|
@@ -136,7 +138,7 @@ class PhoneContact extends vr_migrations_1.Model {
|
|
|
136
138
|
new Date() > new Date(this.metadata.lockedUntil)) {
|
|
137
139
|
// Auto-unlock
|
|
138
140
|
this.metadata.isLocked = false;
|
|
139
|
-
this.metadata.lockedUntil =
|
|
141
|
+
this.metadata.lockedUntil = null;
|
|
140
142
|
this.save();
|
|
141
143
|
return false;
|
|
142
144
|
}
|