@yolo-croket-dev/amqp-access 0.7.369 → 0.7.370-sj
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/package.json +2 -2
- package/user-service/amqp.user-service.service.d.ts +7 -0
- package/user-service/amqp.user-service.service.js +12 -0
- package/user-service/dto/user/command/email-signup.dto.d.ts +41 -0
- package/user-service/dto/user/command/email-signup.dto.js +106 -0
- package/user-service/dto/user/command/index.d.ts +1 -0
- package/user-service/dto/user/command/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/amqp-access",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.370-sj",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Yolo Co., Ltd.",
|
|
6
6
|
"description": "크로켓 amqp-access npm",
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
"class-validator": "^0.13.2",
|
|
29
29
|
"dotenv": "^16.3.1"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|
|
@@ -8,10 +8,17 @@ import { UserPhoneDecodeByPhoneNumberPayloadDto, UserPhoneDecodeByPhoneNumberRes
|
|
|
8
8
|
import { NotificationUser, UpdateUserByIdPayload } from './amqp.user-service.types';
|
|
9
9
|
import { GetUserInfoByIdPayload, GetUserInfoByIdResult, GetUsersForAdminPayload, GetUsersForAdminResult, GetUsersPayload, GetUsersResult, GetSellerEmailPayload, GetSellerEmailResult, ReversalCreditByPInfoIdPayload } from './dto/user';
|
|
10
10
|
import { SendNotOpenAppNotificationResult } from './dto/user/command';
|
|
11
|
+
import { ConfirmEmailSignupVerificationPayload, ConfirmEmailSignupVerificationResult, CreateEmailSignupPayload, CreateEmailSignupResult, RequestEmailSignupVerificationPayload, RequestEmailSignupVerificationResult } from './dto/user/command';
|
|
11
12
|
export declare class AmqpUserService {
|
|
12
13
|
private readonly client;
|
|
13
14
|
private readonly amqpManager;
|
|
14
15
|
constructor(client: ClientProxy);
|
|
16
|
+
/** @author sj @description 이메일 전용 가입 인증 메일 발송 @process 가입 전 인증 상태는 user-service가 소유하고 gateway는 이 RPC 결과만 전달한다. */
|
|
17
|
+
requestEmailSignupVerification(payload: RequestEmailSignupVerificationPayload, param: AbstractParam): Promise<RequestEmailSignupVerificationResult>;
|
|
18
|
+
/** @author sj @description 이메일 전용 가입 인증번호 확인 @process 성공 시 User 생성 전에만 사용하는 일회성 token을 반환한다. */
|
|
19
|
+
confirmEmailSignupVerification(payload: ConfirmEmailSignupVerificationPayload, param: AbstractParam): Promise<ConfirmEmailSignupVerificationResult>;
|
|
20
|
+
/** @author sj @description 이메일 전용 회원가입 @process 인증 token 소비와 User 생성을 user-service 단일 경계에서 처리한다. */
|
|
21
|
+
createEmailSignup(payload: CreateEmailSignupPayload, param: AbstractParam): Promise<CreateEmailSignupResult>;
|
|
15
22
|
getUsersForAdmin(payload: GetUsersForAdminPayload, param: AbstractParam): Promise<GetUsersForAdminResult>;
|
|
16
23
|
getStoreItemsForAdminAmqp(payload: GetStoreItemsForAdminPayload, param: AbstractParam): Promise<GetStoreItemsForAdminResult>;
|
|
17
24
|
updateStoreItemSelectionConnectInfosBulkAmqp(payload: UpdateStoreItemSelectionConnectInfosBulkPayload, param: AbstractParam): Promise<void>;
|
|
@@ -21,6 +21,18 @@ let AmqpUserService = class AmqpUserService {
|
|
|
21
21
|
this.client = client;
|
|
22
22
|
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
23
23
|
}
|
|
24
|
+
/** @author sj @description 이메일 전용 가입 인증 메일 발송 @process 가입 전 인증 상태는 user-service가 소유하고 gateway는 이 RPC 결과만 전달한다. */
|
|
25
|
+
async requestEmailSignupVerification(payload, param) {
|
|
26
|
+
return this.amqpManager.call('이메일 전용 가입 인증 메일 발송', 'user.email-signup.request-verification', payload, param, { isErrorThrowing: true });
|
|
27
|
+
}
|
|
28
|
+
/** @author sj @description 이메일 전용 가입 인증번호 확인 @process 성공 시 User 생성 전에만 사용하는 일회성 token을 반환한다. */
|
|
29
|
+
async confirmEmailSignupVerification(payload, param) {
|
|
30
|
+
return this.amqpManager.call('이메일 전용 가입 인증번호 확인', 'user.email-signup.confirm-verification', payload, param, { isErrorThrowing: true });
|
|
31
|
+
}
|
|
32
|
+
/** @author sj @description 이메일 전용 회원가입 @process 인증 token 소비와 User 생성을 user-service 단일 경계에서 처리한다. */
|
|
33
|
+
async createEmailSignup(payload, param) {
|
|
34
|
+
return this.amqpManager.call('이메일 전용 회원가입', 'user.email-signup.create', payload, param, { isErrorThrowing: true });
|
|
35
|
+
}
|
|
24
36
|
async getUsersForAdmin(payload, param) {
|
|
25
37
|
return this.amqpManager.call('관리자를 위한 유저 정보 리스트 조회', 'user.get.for-admin', payload, param, { isErrorThrowing: true });
|
|
26
38
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** @author sj @description 이메일 전용 가입 인증 메일 발송 입력 @process user-service가 가입 전 Redis 인증 세션을 만들고 인증 메일 발송을 요청한다. */
|
|
2
|
+
export declare class RequestEmailSignupVerificationPayload {
|
|
3
|
+
email: string;
|
|
4
|
+
locale?: string;
|
|
5
|
+
}
|
|
6
|
+
/** @author sj @description 이메일 전용 가입 인증 메일 발송 결과 @process 클라이언트는 verificationId만 인증번호 확인 요청에 사용한다. */
|
|
7
|
+
export declare class RequestEmailSignupVerificationResult {
|
|
8
|
+
verificationId: string;
|
|
9
|
+
expiresAt: string;
|
|
10
|
+
retryAfterSeconds: number;
|
|
11
|
+
}
|
|
12
|
+
/** @author sj @description 이메일 가입 인증번호 검증 입력 @process 인증 세션 식별자와 6자리 코드만 전달하며 이메일 원문은 다시 받지 않는다. */
|
|
13
|
+
export declare class ConfirmEmailSignupVerificationPayload {
|
|
14
|
+
verificationId: string;
|
|
15
|
+
code: string;
|
|
16
|
+
}
|
|
17
|
+
/** @author sj @description 이메일 가입 인증번호 검증 결과 @process 가입 API에서 한 번만 사용할 불투명 verificationToken을 반환한다. */
|
|
18
|
+
export declare class ConfirmEmailSignupVerificationResult {
|
|
19
|
+
verificationToken: string;
|
|
20
|
+
expiresAt: string;
|
|
21
|
+
}
|
|
22
|
+
/** @author sj @description 전화번호 없는 이메일 전용 회원가입 입력 @process 인증 완료 token과 기존 가입 동의 필드로 User를 생성한다. */
|
|
23
|
+
export declare class CreateEmailSignupPayload {
|
|
24
|
+
email: string;
|
|
25
|
+
password: string;
|
|
26
|
+
username: string;
|
|
27
|
+
verificationToken: string;
|
|
28
|
+
event_email?: boolean;
|
|
29
|
+
event_sms?: boolean;
|
|
30
|
+
event_appPush?: boolean;
|
|
31
|
+
from?: string;
|
|
32
|
+
afterAgreementAD?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** @author sj @description 이메일 전용 회원가입 결과 @process 생성 User와 즉시 로그인에 필요한 JWT만 반환한다. */
|
|
35
|
+
export declare class CreateEmailSignupResult {
|
|
36
|
+
result: true;
|
|
37
|
+
userId: string;
|
|
38
|
+
userid: string;
|
|
39
|
+
access_token: string;
|
|
40
|
+
refresh_token: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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.CreateEmailSignupResult = exports.CreateEmailSignupPayload = exports.ConfirmEmailSignupVerificationResult = exports.ConfirmEmailSignupVerificationPayload = exports.RequestEmailSignupVerificationResult = exports.RequestEmailSignupVerificationPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/** @author sj @description 이메일 전용 가입 인증 메일 발송 입력 @process user-service가 가입 전 Redis 인증 세션을 만들고 인증 메일 발송을 요청한다. */
|
|
15
|
+
class RequestEmailSignupVerificationPayload {
|
|
16
|
+
}
|
|
17
|
+
exports.RequestEmailSignupVerificationPayload = RequestEmailSignupVerificationPayload;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsEmail)(),
|
|
20
|
+
(0, class_validator_1.MaxLength)(320),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], RequestEmailSignupVerificationPayload.prototype, "email", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.MaxLength)(20),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], RequestEmailSignupVerificationPayload.prototype, "locale", void 0);
|
|
29
|
+
/** @author sj @description 이메일 전용 가입 인증 메일 발송 결과 @process 클라이언트는 verificationId만 인증번호 확인 요청에 사용한다. */
|
|
30
|
+
class RequestEmailSignupVerificationResult {
|
|
31
|
+
}
|
|
32
|
+
exports.RequestEmailSignupVerificationResult = RequestEmailSignupVerificationResult;
|
|
33
|
+
/** @author sj @description 이메일 가입 인증번호 검증 입력 @process 인증 세션 식별자와 6자리 코드만 전달하며 이메일 원문은 다시 받지 않는다. */
|
|
34
|
+
class ConfirmEmailSignupVerificationPayload {
|
|
35
|
+
}
|
|
36
|
+
exports.ConfirmEmailSignupVerificationPayload = ConfirmEmailSignupVerificationPayload;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.Matches)(/^[A-Za-z0-9_-]{21}$/),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ConfirmEmailSignupVerificationPayload.prototype, "verificationId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.Matches)(/^\d{6}$/),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ConfirmEmailSignupVerificationPayload.prototype, "code", void 0);
|
|
47
|
+
/** @author sj @description 이메일 가입 인증번호 검증 결과 @process 가입 API에서 한 번만 사용할 불투명 verificationToken을 반환한다. */
|
|
48
|
+
class ConfirmEmailSignupVerificationResult {
|
|
49
|
+
}
|
|
50
|
+
exports.ConfirmEmailSignupVerificationResult = ConfirmEmailSignupVerificationResult;
|
|
51
|
+
/** @author sj @description 전화번호 없는 이메일 전용 회원가입 입력 @process 인증 완료 token과 기존 가입 동의 필드로 User를 생성한다. */
|
|
52
|
+
class CreateEmailSignupPayload {
|
|
53
|
+
}
|
|
54
|
+
exports.CreateEmailSignupPayload = CreateEmailSignupPayload;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsEmail)(),
|
|
57
|
+
(0, class_validator_1.MaxLength)(320),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], CreateEmailSignupPayload.prototype, "email", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsString)(),
|
|
62
|
+
(0, class_validator_1.MinLength)(8),
|
|
63
|
+
(0, class_validator_1.MaxLength)(20),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], CreateEmailSignupPayload.prototype, "password", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.MinLength)(1),
|
|
69
|
+
(0, class_validator_1.MaxLength)(100),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], CreateEmailSignupPayload.prototype, "username", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.Matches)(/^[A-Za-z0-9_-]{43}$/),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], CreateEmailSignupPayload.prototype, "verificationToken", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
(0, class_validator_1.IsBoolean)(),
|
|
80
|
+
__metadata("design:type", Boolean)
|
|
81
|
+
], CreateEmailSignupPayload.prototype, "event_email", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsBoolean)(),
|
|
85
|
+
__metadata("design:type", Boolean)
|
|
86
|
+
], CreateEmailSignupPayload.prototype, "event_sms", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
(0, class_validator_1.IsBoolean)(),
|
|
90
|
+
__metadata("design:type", Boolean)
|
|
91
|
+
], CreateEmailSignupPayload.prototype, "event_appPush", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
(0, class_validator_1.IsString)(),
|
|
95
|
+
(0, class_validator_1.MaxLength)(100),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], CreateEmailSignupPayload.prototype, "from", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.IsOptional)(),
|
|
100
|
+
(0, class_validator_1.IsBoolean)(),
|
|
101
|
+
__metadata("design:type", Boolean)
|
|
102
|
+
], CreateEmailSignupPayload.prototype, "afterAgreementAD", void 0);
|
|
103
|
+
/** @author sj @description 이메일 전용 회원가입 결과 @process 생성 User와 즉시 로그인에 필요한 JWT만 반환한다. */
|
|
104
|
+
class CreateEmailSignupResult {
|
|
105
|
+
}
|
|
106
|
+
exports.CreateEmailSignupResult = CreateEmailSignupResult;
|
|
@@ -26,3 +26,4 @@ __exportStar(require("./update-guest-username.dto"), exports);
|
|
|
26
26
|
__exportStar(require("./reversal-credit-by-p-info-id.dto"), exports);
|
|
27
27
|
__exportStar(require("./app-switching-reward.dto"), exports);
|
|
28
28
|
__exportStar(require("./send-not-open-app-notification.dto"), exports);
|
|
29
|
+
__exportStar(require("./email-signup.dto"), exports);
|