grm-shared-library 1.0.211 → 1.0.213

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.
@@ -0,0 +1,14 @@
1
+ import { OtpAction } from "../../../modules/auth/enums/otp-action";
2
+ export declare class CreateOTPPayloadDto {
3
+ name: string;
4
+ email: string;
5
+ phoneNumber?: string;
6
+ role?: string;
7
+ verificationToken: string;
8
+ verificationTokenExpiresAt?: Date;
9
+ otp: string;
10
+ otpExpiresAt?: Date;
11
+ otpExpirationDescription?: string;
12
+ action: OtpAction;
13
+ attributes?: Record<string, any>;
14
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateOTPPayloadDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const otp_action_1 = require("../../../modules/auth/enums/otp-action");
15
+ class CreateOTPPayloadDto {
16
+ }
17
+ exports.CreateOTPPayloadDto = CreateOTPPayloadDto;
18
+ __decorate([
19
+ (0, class_validator_1.IsString)(),
20
+ (0, class_validator_1.IsNotEmpty)(),
21
+ __metadata("design:type", String)
22
+ ], CreateOTPPayloadDto.prototype, "name", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsEmail)(),
25
+ (0, class_validator_1.IsNotEmpty)(),
26
+ __metadata("design:type", String)
27
+ ], CreateOTPPayloadDto.prototype, "email", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsPhoneNumber)(),
30
+ (0, class_validator_1.IsOptional)(),
31
+ __metadata("design:type", String)
32
+ ], CreateOTPPayloadDto.prototype, "phoneNumber", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsString)(),
35
+ (0, class_validator_1.IsOptional)(),
36
+ __metadata("design:type", String)
37
+ ], CreateOTPPayloadDto.prototype, "role", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsString)(),
40
+ (0, class_validator_1.IsNotEmpty)(),
41
+ __metadata("design:type", String)
42
+ ], CreateOTPPayloadDto.prototype, "verificationToken", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsDate)(),
45
+ (0, class_validator_1.IsOptional)(),
46
+ __metadata("design:type", Date)
47
+ ], CreateOTPPayloadDto.prototype, "verificationTokenExpiresAt", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsString)(),
50
+ (0, class_validator_1.IsNotEmpty)(),
51
+ __metadata("design:type", String)
52
+ ], CreateOTPPayloadDto.prototype, "otp", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsDate)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ __metadata("design:type", Date)
57
+ ], CreateOTPPayloadDto.prototype, "otpExpiresAt", void 0);
58
+ __decorate([
59
+ (0, class_validator_1.IsString)(),
60
+ (0, class_validator_1.IsOptional)(),
61
+ __metadata("design:type", String)
62
+ ], CreateOTPPayloadDto.prototype, "otpExpirationDescription", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsString)(),
65
+ (0, class_validator_1.IsNotEmpty)(),
66
+ __metadata("design:type", String)
67
+ ], CreateOTPPayloadDto.prototype, "action", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsObject)(),
70
+ (0, class_validator_1.IsOptional)(),
71
+ __metadata("design:type", Object)
72
+ ], CreateOTPPayloadDto.prototype, "attributes", void 0);
@@ -0,0 +1,8 @@
1
+ import { CreateOTPPayloadDto } from "./create-otp-payload.dto";
2
+ declare const OTPPayloadDto_base: import("@nestjs/mapped-types").MappedType<Omit<CreateOTPPayloadDto, "action" | "verificationTokenExpiresAt" | "otpExpiresAt">>;
3
+ export declare class OTPPayloadDto extends OTPPayloadDto_base {
4
+ verificationTokenExpiresAt?: string;
5
+ otpExpiresAt: string;
6
+ action: string;
7
+ }
8
+ export {};
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OTPPayloadDto = void 0;
13
+ const mapped_types_1 = require("@nestjs/mapped-types");
14
+ const create_otp_payload_dto_1 = require("./create-otp-payload.dto");
15
+ const class_validator_1 = require("class-validator");
16
+ class OTPPayloadDto extends (0, mapped_types_1.OmitType)(create_otp_payload_dto_1.CreateOTPPayloadDto, ['verificationTokenExpiresAt', 'otpExpiresAt', 'action']) {
17
+ }
18
+ exports.OTPPayloadDto = OTPPayloadDto;
19
+ __decorate([
20
+ (0, class_validator_1.IsString)(),
21
+ (0, class_validator_1.IsOptional)(),
22
+ __metadata("design:type", String)
23
+ ], OTPPayloadDto.prototype, "verificationTokenExpiresAt", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsString)(),
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ __metadata("design:type", String)
28
+ ], OTPPayloadDto.prototype, "otpExpiresAt", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsString)(),
31
+ (0, class_validator_1.IsNotEmpty)(),
32
+ __metadata("design:type", String)
33
+ ], OTPPayloadDto.prototype, "action", void 0);
@@ -3,7 +3,7 @@ export declare class OTPPayloadDto {
3
3
  name: string;
4
4
  email: string;
5
5
  phoneNumber?: string;
6
- role?: string[];
6
+ role?: string;
7
7
  verificationToken: string;
8
8
  verificationTokenExpiresAt?: Date;
9
9
  otp: string;
@@ -31,10 +31,9 @@ __decorate([
31
31
  __metadata("design:type", String)
32
32
  ], OTPPayloadDto.prototype, "phoneNumber", void 0);
33
33
  __decorate([
34
- (0, class_validator_1.IsArray)(),
35
- (0, class_validator_1.IsString)({ each: true }),
34
+ (0, class_validator_1.IsString)(),
36
35
  (0, class_validator_1.IsOptional)(),
37
- __metadata("design:type", Array)
36
+ __metadata("design:type", String)
38
37
  ], OTPPayloadDto.prototype, "role", void 0);
39
38
  __decorate([
40
39
  (0, class_validator_1.IsString)(),
@@ -0,0 +1,6 @@
1
+ export declare class PasswordResetPayloadDto {
2
+ name: string;
3
+ email: string;
4
+ ipAddress?: string;
5
+ address?: string;
6
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PasswordResetPayloadDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class PasswordResetPayloadDto {
15
+ }
16
+ exports.PasswordResetPayloadDto = PasswordResetPayloadDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], PasswordResetPayloadDto.prototype, "name", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsEmail)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], PasswordResetPayloadDto.prototype, "email", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsIP)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], PasswordResetPayloadDto.prototype, "ipAddress", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", String)
36
+ ], PasswordResetPayloadDto.prototype, "address", void 0);
@@ -0,0 +1,13 @@
1
+ export declare class UserCreatedPayloadDto {
2
+ id: number;
3
+ firstName: string;
4
+ lastName?: string;
5
+ email: string;
6
+ phoneNumber?: string;
7
+ roles: string[];
8
+ otp?: string;
9
+ otpExpiresAt?: Date;
10
+ verificationToken?: string;
11
+ createdAt: Date;
12
+ attributes?: Record<string, any>;
13
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UserCreatedPayloadDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class UserCreatedPayloadDto {
15
+ }
16
+ exports.UserCreatedPayloadDto = UserCreatedPayloadDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsNumber)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", Number)
21
+ ], UserCreatedPayloadDto.prototype, "id", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], UserCreatedPayloadDto.prototype, "firstName", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], UserCreatedPayloadDto.prototype, "lastName", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsEmail)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ __metadata("design:type", String)
36
+ ], UserCreatedPayloadDto.prototype, "email", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsPhoneNumber)(),
39
+ (0, class_validator_1.IsOptional)(),
40
+ __metadata("design:type", String)
41
+ ], UserCreatedPayloadDto.prototype, "phoneNumber", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsArray)(),
44
+ (0, class_validator_1.ArrayNotEmpty)(),
45
+ (0, class_validator_1.IsString)({ each: true }),
46
+ __metadata("design:type", Array)
47
+ ], UserCreatedPayloadDto.prototype, "roles", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsString)(),
50
+ (0, class_validator_1.IsOptional)(),
51
+ __metadata("design:type", String)
52
+ ], UserCreatedPayloadDto.prototype, "otp", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsDate)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ __metadata("design:type", Date)
57
+ ], UserCreatedPayloadDto.prototype, "otpExpiresAt", void 0);
58
+ __decorate([
59
+ (0, class_validator_1.IsString)(),
60
+ (0, class_validator_1.IsOptional)(),
61
+ __metadata("design:type", String)
62
+ ], UserCreatedPayloadDto.prototype, "verificationToken", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsDate)(),
65
+ (0, class_validator_1.IsNotEmpty)(),
66
+ __metadata("design:type", Date)
67
+ ], UserCreatedPayloadDto.prototype, "createdAt", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsObject)(),
70
+ (0, class_validator_1.IsOptional)(),
71
+ __metadata("design:type", Object)
72
+ ], UserCreatedPayloadDto.prototype, "attributes", void 0);
@@ -0,0 +1,8 @@
1
+ export declare class UserRegisteredPayloadDto {
2
+ id: number;
3
+ name: string;
4
+ email: string;
5
+ phoneNumber?: string;
6
+ createdAt: Date;
7
+ attributes?: Record<string, any>;
8
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UserRegisteredPayloadDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class UserRegisteredPayloadDto {
15
+ }
16
+ exports.UserRegisteredPayloadDto = UserRegisteredPayloadDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsNumber)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", Number)
21
+ ], UserRegisteredPayloadDto.prototype, "id", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], UserRegisteredPayloadDto.prototype, "name", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsEmail)(),
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", String)
31
+ ], UserRegisteredPayloadDto.prototype, "email", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsPhoneNumber)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", String)
36
+ ], UserRegisteredPayloadDto.prototype, "phoneNumber", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsDate)(),
39
+ (0, class_validator_1.IsNotEmpty)(),
40
+ __metadata("design:type", Date)
41
+ ], UserRegisteredPayloadDto.prototype, "createdAt", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsObject)(),
44
+ (0, class_validator_1.IsOptional)(),
45
+ __metadata("design:type", Object)
46
+ ], UserRegisteredPayloadDto.prototype, "attributes", void 0);
@@ -1,5 +1,6 @@
1
1
  export * from './topics';
2
- export * from './dtos/user-created-payload.dto';
3
- export * from './dtos/user-registered-payload.dto';
4
- export * from './dtos/otp-payload.dto';
5
- export * from './dtos/password-reset-payload.dto';
2
+ export * from './dtos/user/user-created-payload.dto';
3
+ export * from './dtos/user/user-registered-payload.dto';
4
+ export * from './dtos/otp/create-otp-payload.dto';
5
+ export * from './dtos/otp/otp-payload.dto';
6
+ export * from './dtos/password/password-reset-payload.dto';
@@ -15,7 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./topics"), exports);
18
- __exportStar(require("./dtos/user-created-payload.dto"), exports);
19
- __exportStar(require("./dtos/user-registered-payload.dto"), exports);
20
- __exportStar(require("./dtos/otp-payload.dto"), exports);
21
- __exportStar(require("./dtos/password-reset-payload.dto"), exports);
18
+ __exportStar(require("./dtos/user/user-created-payload.dto"), exports);
19
+ __exportStar(require("./dtos/user/user-registered-payload.dto"), exports);
20
+ __exportStar(require("./dtos/otp/create-otp-payload.dto"), exports);
21
+ __exportStar(require("./dtos/otp/otp-payload.dto"), exports);
22
+ __exportStar(require("./dtos/password/password-reset-payload.dto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.211",
3
+ "version": "1.0.213",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [