grm-shared-library 1.1.86 → 1.1.89
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/cjs/modules/auth/dtos/resend-otp.dto.js +26 -4
- package/dist/cjs/modules/auth/dtos/resend-otp.dto.js.map +1 -1
- package/dist/cjs/modules/auth/dtos/send-otp.dto.js +4 -4
- package/dist/cjs/modules/auth/dtos/send-otp.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/resend-otp.dto.js +28 -6
- package/dist/esm/modules/auth/dtos/resend-otp.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/send-otp.dto.js +5 -5
- package/dist/esm/modules/auth/dtos/send-otp.dto.js.map +1 -1
- package/dist/types/modules/auth/dtos/resend-otp.dto.d.ts +3 -1
- package/package.json +1 -1
|
@@ -20,19 +20,41 @@ __decorate([
|
|
|
20
20
|
(0, swagger_1.ApiProperty)({
|
|
21
21
|
description: 'Action for which OTP is being requested',
|
|
22
22
|
enum: otp_action_1.OtpAction,
|
|
23
|
-
example: otp_action_1.OtpAction.LOGIN
|
|
23
|
+
example: otp_action_1.OtpAction.LOGIN,
|
|
24
|
+
format: 'string'
|
|
24
25
|
}),
|
|
25
26
|
(0, class_validator_1.IsEnum)(otp_action_1.OtpAction),
|
|
26
27
|
(0, class_validator_1.IsNotEmpty)(),
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], ResendOTPDto.prototype, "action", void 0);
|
|
29
30
|
__decorate([
|
|
30
|
-
(0, swagger_1.
|
|
31
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
31
32
|
description: 'Verification token from previous request',
|
|
32
|
-
example: 'abc123def456'
|
|
33
|
+
example: 'abc123def456',
|
|
34
|
+
format: 'string'
|
|
33
35
|
}),
|
|
34
36
|
(0, class_validator_1.IsString)(),
|
|
35
|
-
(0, class_validator_1.
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
38
|
__metadata("design:type", String)
|
|
37
39
|
], ResendOTPDto.prototype, "verificationToken", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
42
|
+
description: 'Email of the user requesting OTP',
|
|
43
|
+
example: 'user@example.com',
|
|
44
|
+
format: 'email'
|
|
45
|
+
}),
|
|
46
|
+
(0, class_validator_1.IsEmail)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], ResendOTPDto.prototype, "email", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
52
|
+
description: 'Phone number of the user requesting OTP',
|
|
53
|
+
example: '+1234567890',
|
|
54
|
+
format: 'phone'
|
|
55
|
+
}),
|
|
56
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], ResendOTPDto.prototype, "phoneNumber", void 0);
|
|
38
60
|
//# sourceMappingURL=resend-otp.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resend-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/resend-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"resend-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/resend-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmG;AACnG,6CAAmE;AACnE,oDAAgD;AAEhD,MAAa,YAAY;CAqCxB;AArCD,oCAqCC;AA5BG;IARC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,sBAAS;QACf,OAAO,EAAE,sBAAS,CAAC,KAAK;QACxB,MAAM,EAAE,QAAQ;KACnB,CAAC;IACD,IAAA,wBAAM,EAAC,sBAAS,CAAC;IACjB,IAAA,4BAAU,GAAE;;4CACM;AASnB;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,QAAQ;KACnB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACc;AAS3B;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;2CACE;AASf;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,IAAA,+BAAa,GAAE;IACf,IAAA,4BAAU,GAAE;;iDACQ"}
|
|
@@ -17,8 +17,8 @@ class SendOTPDto {
|
|
|
17
17
|
}
|
|
18
18
|
exports.SendOTPDto = SendOTPDto;
|
|
19
19
|
__decorate([
|
|
20
|
-
(0, swagger_1.
|
|
21
|
-
description: 'The phone number to send the OTP to',
|
|
20
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
21
|
+
description: 'The phone number to send the OTP to (If email is not provided)',
|
|
22
22
|
example: '+1234567890',
|
|
23
23
|
format: 'phone'
|
|
24
24
|
}),
|
|
@@ -27,8 +27,8 @@ __decorate([
|
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], SendOTPDto.prototype, "phoneNumber", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, swagger_1.
|
|
31
|
-
description: 'The email address to send the OTP to',
|
|
30
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
31
|
+
description: 'The email address to send the OTP to (If phone number is not provided)',
|
|
32
32
|
example: 'user@example.com',
|
|
33
33
|
format: 'email'
|
|
34
34
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/send-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"send-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/send-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAAmG;AACnG,oDAAgD;AAEhD,MAAa,UAAU;CA2BtB;AA3BD,gCA2BC;AAnBG;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,gEAAgE;QAC7E,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,IAAA,+BAAa,GAAE;IACf,IAAA,4BAAU,GAAE;;+CACQ;AASrB;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,wEAAwE;QACrF,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;yCACE;AASf;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,sBAAS;QACf,OAAO,EAAE,sBAAS,CAAC,YAAY;KAClC,CAAC;IACD,IAAA,wBAAM,EAAC,sBAAS,CAAC;IACjB,IAAA,4BAAU,GAAE;;0CACM"}
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { IsEnum, IsNotEmpty, IsString } from "class-validator";
|
|
11
|
-
import { ApiProperty } from "@nestjs/swagger";
|
|
10
|
+
import { IsEmail, IsEnum, IsNotEmpty, IsOptional, IsPhoneNumber, IsString } from "class-validator";
|
|
11
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
12
12
|
import { OtpAction } from "../enums/otp-action";
|
|
13
13
|
export class ResendOTPDto {
|
|
14
14
|
}
|
|
@@ -16,19 +16,41 @@ __decorate([
|
|
|
16
16
|
ApiProperty({
|
|
17
17
|
description: 'Action for which OTP is being requested',
|
|
18
18
|
enum: OtpAction,
|
|
19
|
-
example: OtpAction.LOGIN
|
|
19
|
+
example: OtpAction.LOGIN,
|
|
20
|
+
format: 'string'
|
|
20
21
|
}),
|
|
21
22
|
IsEnum(OtpAction),
|
|
22
23
|
IsNotEmpty(),
|
|
23
24
|
__metadata("design:type", String)
|
|
24
25
|
], ResendOTPDto.prototype, "action", void 0);
|
|
25
26
|
__decorate([
|
|
26
|
-
|
|
27
|
+
ApiPropertyOptional({
|
|
27
28
|
description: 'Verification token from previous request',
|
|
28
|
-
example: 'abc123def456'
|
|
29
|
+
example: 'abc123def456',
|
|
30
|
+
format: 'string'
|
|
29
31
|
}),
|
|
30
32
|
IsString(),
|
|
31
|
-
|
|
33
|
+
IsOptional(),
|
|
32
34
|
__metadata("design:type", String)
|
|
33
35
|
], ResendOTPDto.prototype, "verificationToken", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
ApiPropertyOptional({
|
|
38
|
+
description: 'Email of the user requesting OTP',
|
|
39
|
+
example: 'user@example.com',
|
|
40
|
+
format: 'email'
|
|
41
|
+
}),
|
|
42
|
+
IsEmail(),
|
|
43
|
+
IsOptional(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ResendOTPDto.prototype, "email", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
ApiPropertyOptional({
|
|
48
|
+
description: 'Phone number of the user requesting OTP',
|
|
49
|
+
example: '+1234567890',
|
|
50
|
+
format: 'phone'
|
|
51
|
+
}),
|
|
52
|
+
IsPhoneNumber(),
|
|
53
|
+
IsOptional(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], ResendOTPDto.prototype, "phoneNumber", void 0);
|
|
34
56
|
//# sourceMappingURL=resend-otp.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resend-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/resend-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"resend-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/resend-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,OAAO,YAAY;CAqCxB;AA5BG;IARC,WAAW,CAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS,CAAC,KAAK;QACxB,MAAM,EAAE,QAAQ;KACnB,CAAC;IACD,MAAM,CAAC,SAAS,CAAC;IACjB,UAAU,EAAE;;4CACM;AASnB;IAPC,mBAAmB,CAAC;QACjB,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,QAAQ;KACnB,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;uDACc;AAS3B;IAPC,mBAAmB,CAAC;QACjB,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,OAAO,EAAE;IACT,UAAU,EAAE;;2CACE;AASf;IAPC,mBAAmB,CAAC;QACjB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,aAAa,EAAE;IACf,UAAU,EAAE;;iDACQ"}
|
|
@@ -7,14 +7,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { ApiProperty } from "@nestjs/swagger";
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
11
11
|
import { IsEmail, IsEnum, IsNotEmpty, IsOptional, IsPhoneNumber } from "class-validator";
|
|
12
12
|
import { OtpAction } from "../enums/otp-action";
|
|
13
13
|
export class SendOTPDto {
|
|
14
14
|
}
|
|
15
15
|
__decorate([
|
|
16
|
-
|
|
17
|
-
description: 'The phone number to send the OTP to',
|
|
16
|
+
ApiPropertyOptional({
|
|
17
|
+
description: 'The phone number to send the OTP to (If email is not provided)',
|
|
18
18
|
example: '+1234567890',
|
|
19
19
|
format: 'phone'
|
|
20
20
|
}),
|
|
@@ -23,8 +23,8 @@ __decorate([
|
|
|
23
23
|
__metadata("design:type", String)
|
|
24
24
|
], SendOTPDto.prototype, "phoneNumber", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
|
|
27
|
-
description: 'The email address to send the OTP to',
|
|
26
|
+
ApiPropertyOptional({
|
|
27
|
+
description: 'The email address to send the OTP to (If phone number is not provided)',
|
|
28
28
|
example: 'user@example.com',
|
|
29
29
|
format: 'email'
|
|
30
30
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/send-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"send-otp.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/send-otp.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAY,MAAM,iBAAiB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,OAAO,UAAU;CA2BtB;AAnBG;IAPC,mBAAmB,CAAC;QACjB,WAAW,EAAE,gEAAgE;QAC7E,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,aAAa,EAAE;IACf,UAAU,EAAE;;+CACQ;AASrB;IAPC,mBAAmB,CAAC;QACjB,WAAW,EAAE,wEAAwE;QACrF,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,OAAO,EAAE;IACT,UAAU,EAAE;;yCACE;AASf;IAPC,WAAW,CAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS,CAAC,YAAY;KAClC,CAAC;IACD,MAAM,CAAC,SAAS,CAAC;IACjB,UAAU,EAAE;;0CACM"}
|