grm-shared-library 1.0.106 → 1.0.108

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,11 +1,11 @@
1
1
  export interface OTPPayload {
2
2
  firstName: string;
3
3
  lastName: string;
4
+ email: string;
5
+ phoneNumber: string;
4
6
  verificationToken: string;
5
7
  verificationTokenExpiresAt: Date;
6
8
  otp: string;
7
9
  otpExpiresAt: Date;
8
- email: string;
9
- phoneNumber: string;
10
10
  attributes: Record<string, any>;
11
11
  }
@@ -0,0 +1,7 @@
1
+ export interface PasswordResetPayload {
2
+ firstName: string;
3
+ lastName: string;
4
+ email: string;
5
+ ipAddress: string;
6
+ address: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,4 +10,5 @@ export declare const KAFKA_TOPICS: {
10
10
  ORG_DELETED: string;
11
11
  OTP_VARIFIED: string;
12
12
  OTP_REQUESTED: string;
13
+ PASSWORD_RESET: string;
13
14
  };
@@ -16,5 +16,7 @@ exports.KAFKA_TOPICS = {
16
16
  ORG_DELETED: 'org.deleted',
17
17
  // OTP
18
18
  OTP_VARIFIED: 'otp.validated',
19
- OTP_REQUESTED: 'otp.requested'
19
+ OTP_REQUESTED: 'otp.requested',
20
+ //Password
21
+ PASSWORD_RESET: 'password.reset',
20
22
  };
@@ -1,6 +1,6 @@
1
1
  export declare class ResetPasswordDto {
2
- password: string;
3
- confirmPassword: string;
4
2
  verificationToken: string;
5
3
  otp: string;
4
+ password: string;
5
+ confirmPassword: string;
6
6
  }
@@ -19,25 +19,25 @@ exports.ResetPasswordDto = ResetPasswordDto;
19
19
  __decorate([
20
20
  (0, class_validator_1.IsString)(),
21
21
  (0, class_validator_1.IsNotEmpty)(),
22
- (0, class_validator_1.MinLength)(8),
23
- (0, class_validator_1.Matches)(password_regex_const_1.PASSWORD_REGEX, { message: password_regex_const_1.PASSWORD_ERROR_MESSAGE }),
24
22
  __metadata("design:type", String)
25
- ], ResetPasswordDto.prototype, "password", void 0);
23
+ ], ResetPasswordDto.prototype, "verificationToken", void 0);
26
24
  __decorate([
27
25
  (0, class_validator_1.IsString)(),
28
26
  (0, class_validator_1.IsNotEmpty)(),
29
- (0, class_validator_1.MinLength)(8),
30
- (0, class_validator_1.Matches)(password_regex_const_1.PASSWORD_REGEX, { message: password_regex_const_1.PASSWORD_ERROR_MESSAGE }),
31
- (0, match_decorator_1.Match)('password', { message: 'Passwords do not match' }),
32
27
  __metadata("design:type", String)
33
- ], ResetPasswordDto.prototype, "confirmPassword", void 0);
28
+ ], ResetPasswordDto.prototype, "otp", void 0);
34
29
  __decorate([
35
30
  (0, class_validator_1.IsString)(),
36
31
  (0, class_validator_1.IsNotEmpty)(),
32
+ (0, class_validator_1.MinLength)(8),
33
+ (0, class_validator_1.Matches)(password_regex_const_1.PASSWORD_REGEX, { message: password_regex_const_1.PASSWORD_ERROR_MESSAGE }),
37
34
  __metadata("design:type", String)
38
- ], ResetPasswordDto.prototype, "verificationToken", void 0);
35
+ ], ResetPasswordDto.prototype, "password", void 0);
39
36
  __decorate([
40
37
  (0, class_validator_1.IsString)(),
41
38
  (0, class_validator_1.IsNotEmpty)(),
39
+ (0, class_validator_1.MinLength)(8),
40
+ (0, class_validator_1.Matches)(password_regex_const_1.PASSWORD_REGEX, { message: password_regex_const_1.PASSWORD_ERROR_MESSAGE }),
41
+ (0, match_decorator_1.Match)('password', { message: 'Passwords do not match' }),
42
42
  __metadata("design:type", String)
43
- ], ResetPasswordDto.prototype, "otp", void 0);
43
+ ], ResetPasswordDto.prototype, "confirmPassword", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [