grm-shared-library 1.0.133 → 1.0.135
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.
- package/dist/kafka/dtos/otp-payload.dto.d.ts +11 -0
- package/dist/kafka/dtos/otp-payload.dto.js +61 -0
- package/dist/kafka/dtos/password-reset-payload.dto.d.ts +7 -0
- package/dist/kafka/dtos/password-reset-payload.dto.js +41 -0
- package/dist/kafka/dtos/user-created-payload.dto.d.ts +13 -0
- package/dist/kafka/dtos/user-created-payload.dto.js +72 -0
- package/dist/kafka/dtos/user-registered-payload.dto.d.ts +9 -0
- package/dist/kafka/dtos/user-registered-payload.dto.js +51 -0
- package/dist/kafka/index.d.ts +4 -4
- package/dist/kafka/index.js +4 -4
- package/dist/kafka/topics.d.ts +1 -0
- package/dist/kafka/topics.js +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class OTPPayloadDto {
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName?: string;
|
|
4
|
+
email: string;
|
|
5
|
+
phoneNumber?: string;
|
|
6
|
+
verificationToken: string;
|
|
7
|
+
verificationTokenExpiresAt?: Date;
|
|
8
|
+
otp: string;
|
|
9
|
+
otpExpiresAt?: Date;
|
|
10
|
+
attributes?: Record<string, any>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 class_validator_1 = require("class-validator");
|
|
14
|
+
class OTPPayloadDto {
|
|
15
|
+
}
|
|
16
|
+
exports.OTPPayloadDto = OTPPayloadDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], OTPPayloadDto.prototype, "firstName", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], OTPPayloadDto.prototype, "lastName", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsEmail)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], OTPPayloadDto.prototype, "email", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], OTPPayloadDto.prototype, "phoneNumber", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], OTPPayloadDto.prototype, "verificationToken", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsDate)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", Date)
|
|
46
|
+
], OTPPayloadDto.prototype, "verificationTokenExpiresAt", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], OTPPayloadDto.prototype, "otp", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsDate)(),
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
__metadata("design:type", Date)
|
|
56
|
+
], OTPPayloadDto.prototype, "otpExpiresAt", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsObject)(),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], OTPPayloadDto.prototype, "attributes", void 0);
|
|
@@ -0,0 +1,41 @@
|
|
|
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, "firstName", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], PasswordResetPayloadDto.prototype, "lastName", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsEmail)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], PasswordResetPayloadDto.prototype, "email", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsIP)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], PasswordResetPayloadDto.prototype, "ipAddress", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], 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,51 @@
|
|
|
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, "firstName", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], UserRegisteredPayloadDto.prototype, "lastName", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsEmail)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UserRegisteredPayloadDto.prototype, "email", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UserRegisteredPayloadDto.prototype, "phoneNumber", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsDate)(),
|
|
44
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
45
|
+
__metadata("design:type", Date)
|
|
46
|
+
], UserRegisteredPayloadDto.prototype, "createdAt", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsObject)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], UserRegisteredPayloadDto.prototype, "attributes", void 0);
|
package/dist/kafka/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './topics';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
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';
|
package/dist/kafka/index.js
CHANGED
|
@@ -15,7 +15,7 @@ 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("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
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);
|
package/dist/kafka/topics.d.ts
CHANGED
package/dist/kafka/topics.js
CHANGED
|
@@ -17,6 +17,8 @@ exports.KAFKA_TOPICS = {
|
|
|
17
17
|
// OTP
|
|
18
18
|
OTP_VARIFIED: 'otp.validated',
|
|
19
19
|
OTP_REQUESTED: 'otp.requested',
|
|
20
|
-
//Password
|
|
21
|
-
PASSWORD_RESET: 'password.reset'
|
|
20
|
+
// Password
|
|
21
|
+
PASSWORD_RESET: 'password.reset',
|
|
22
|
+
// Incident
|
|
23
|
+
INCIDENT_CREATED: 'incident.created',
|
|
22
24
|
};
|