@yolo-croket-dev/amqp-access 0.7.367 → 0.7.368
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 +3 -3
- package/user-service/dto/user/command/sign-in-guest-user.dto.d.ts +13 -2
- package/user-service/dto/user/command/sign-in-guest-user.dto.js +25 -2
- package/user-service/services/amqp.user-entity.service.d.ts +3 -1
- package/user-service/services/amqp.user-entity.service.js +11 -1
- package/user-service/services/amqp.signup-certification.service.d.ts +0 -14
- package/user-service/services/amqp.signup-certification.service.js +0 -38
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.368",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Yolo Co., Ltd.",
|
|
6
6
|
"description": "크로켓 amqp-access npm",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@nestjs/common": "^10.3.10",
|
|
21
21
|
"@nestjs/mapped-types": "2.0.2",
|
|
22
|
-
"@yolo-croket-dev/core": "
|
|
22
|
+
"@yolo-croket-dev/core": "1.10.0",
|
|
23
23
|
"@yolo-croket-dev/domain": "0.2.50",
|
|
24
24
|
"@yolo-croket-dev/dto-v2": "0.2.31",
|
|
25
25
|
"@yolo-croket-dev/entity": "0.2.109",
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
"class-validator": "^0.13.2",
|
|
29
29
|
"dotenv": "^16.3.1"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
/** @author jun @description 비회원 OTP 검증 입력 @process 서버에 저장한 요청과 코드를 검증한다. */
|
|
1
2
|
export declare class SignInGuestUserPayload {
|
|
2
|
-
|
|
3
|
+
verificationId: string;
|
|
4
|
+
verificationCode: string;
|
|
3
5
|
}
|
|
4
6
|
export interface SignInGuestUserResult {
|
|
5
7
|
access_token: string;
|
|
6
|
-
refresh_token: string;
|
|
7
8
|
userId: string;
|
|
8
9
|
}
|
|
10
|
+
/** @author jun @description 비회원 OTP 발송 입력 @process 번호와 웹 CAPTCHA를 서버에서 검증한다. */
|
|
11
|
+
export declare class RequestGuestPhoneVerificationPayload {
|
|
12
|
+
phoneNumber: string;
|
|
13
|
+
recaptchaToken: string;
|
|
14
|
+
}
|
|
15
|
+
export interface RequestGuestPhoneVerificationResult {
|
|
16
|
+
verificationId: string;
|
|
17
|
+
expiresAt: string;
|
|
18
|
+
retryAfterSeconds: number;
|
|
19
|
+
}
|
|
@@ -9,12 +9,35 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SignInGuestUserPayload = void 0;
|
|
12
|
+
exports.RequestGuestPhoneVerificationPayload = exports.SignInGuestUserPayload = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
/** @author jun @description 비회원 OTP 검증 입력 @process 서버에 저장한 요청과 코드를 검증한다. */
|
|
14
15
|
class SignInGuestUserPayload {
|
|
15
16
|
}
|
|
16
17
|
exports.SignInGuestUserPayload = SignInGuestUserPayload;
|
|
17
18
|
__decorate([
|
|
18
19
|
(0, class_validator_1.IsString)(),
|
|
20
|
+
(0, class_validator_1.Matches)(/^[a-f0-9]{64}\.[a-f0-9]{32}$/),
|
|
19
21
|
__metadata("design:type", String)
|
|
20
|
-
], SignInGuestUserPayload.prototype, "
|
|
22
|
+
], SignInGuestUserPayload.prototype, "verificationId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.Matches)(/^\d{6}$/),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], SignInGuestUserPayload.prototype, "verificationCode", void 0);
|
|
28
|
+
/** @author jun @description 비회원 OTP 발송 입력 @process 번호와 웹 CAPTCHA를 서버에서 검증한다. */
|
|
29
|
+
class RequestGuestPhoneVerificationPayload {
|
|
30
|
+
}
|
|
31
|
+
exports.RequestGuestPhoneVerificationPayload = RequestGuestPhoneVerificationPayload;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.Matches)(/^0?1[016789][0-9-]{7,10}$/),
|
|
35
|
+
(0, class_validator_1.MaxLength)(13),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], RequestGuestPhoneVerificationPayload.prototype, "phoneNumber", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.MinLength)(1),
|
|
41
|
+
(0, class_validator_1.MaxLength)(8192),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], RequestGuestPhoneVerificationPayload.prototype, "recaptchaToken", void 0);
|
|
@@ -4,7 +4,7 @@ import { AbstractParam } from '@yolo-croket-dev/core';
|
|
|
4
4
|
import { DecodePhoneNumbersPayload, PhoneDecodedData } from '@yolo-croket-dev/dto-v2/user-service';
|
|
5
5
|
import { UserEntity } from '@yolo-croket-dev/entity-v2';
|
|
6
6
|
import { SaveShippingAddressPayload } from '../dto/user/command/save-shipping-address.dto';
|
|
7
|
-
import { GetDuplicateUsersByPhoneNumberPayload, GetDuplicateUsersByPhoneNumberResult, GetUserIdsByUsernamePayload, GetUserIdsByUsernameResult, GetUserInfosForPartialRefundPayload, GetUserInfosForPartialRefundResult, IssueSignupRewardPayload, IssueSignupRewardResult, PatchGenderAndBirthdayPayload, SaveSystemAppPushAcceptPayload, IssueInflowSignupRewardResult, VerificationPhoneForSnsUserPayload, SignInGuestUserPayload, SignInGuestUserResult, UpdateGuestUsernamePayload, AppSwitchingRewardPayload, AppSwitchingRewardResult, GetUserIdsForTimeDealPushPayload, GetUserIdsForTimeDealPushResult, GetMarketingReceiveByPhoneNumbersResult, GetMarketingReceiveByPhoneNumbersPayload, IsUnlimitedBenefitUserIdPayload, GetUserInfosByIdsPayload } from '../dto';
|
|
7
|
+
import { GetDuplicateUsersByPhoneNumberPayload, GetDuplicateUsersByPhoneNumberResult, GetUserIdsByUsernamePayload, GetUserIdsByUsernameResult, GetUserInfosForPartialRefundPayload, GetUserInfosForPartialRefundResult, IssueSignupRewardPayload, IssueSignupRewardResult, PatchGenderAndBirthdayPayload, SaveSystemAppPushAcceptPayload, IssueInflowSignupRewardResult, VerificationPhoneForSnsUserPayload, SignInGuestUserPayload, SignInGuestUserResult, RequestGuestPhoneVerificationPayload, RequestGuestPhoneVerificationResult, UpdateGuestUsernamePayload, AppSwitchingRewardPayload, AppSwitchingRewardResult, GetUserIdsForTimeDealPushPayload, GetUserIdsForTimeDealPushResult, GetMarketingReceiveByPhoneNumbersResult, GetMarketingReceiveByPhoneNumbersPayload, IsUnlimitedBenefitUserIdPayload, GetUserInfosByIdsPayload } from '../dto';
|
|
8
8
|
/** 기존 userService 와 이름이 겹쳐 userEntityService로 임시 사용 */
|
|
9
9
|
export declare class AmqpUserEntityService {
|
|
10
10
|
private readonly client;
|
|
@@ -20,6 +20,8 @@ export declare class AmqpUserEntityService {
|
|
|
20
20
|
issueInflowSignupReward(param: AbstractParam): Promise<IssueInflowSignupRewardResult>;
|
|
21
21
|
getDuplicateUsersByPhoneNumber(payload: GetDuplicateUsersByPhoneNumberPayload, param: AbstractParam): Promise<GetDuplicateUsersByPhoneNumberResult>;
|
|
22
22
|
verificationPhoneForSnsUser(payload: VerificationPhoneForSnsUserPayload, param: AbstractParam): Promise<void>;
|
|
23
|
+
/** @author jun @description 비회원 인증번호 발송 @process 제한된 시간 안에 인증 소유 서비스에 위임한다. */
|
|
24
|
+
requestGuestPhoneVerification(payload: RequestGuestPhoneVerificationPayload, param: AbstractParam): Promise<RequestGuestPhoneVerificationResult>;
|
|
23
25
|
signInGuestUser(payload: SignInGuestUserPayload, param: AbstractParam): Promise<SignInGuestUserResult>;
|
|
24
26
|
updateGuestUserName(payload: UpdateGuestUsernamePayload, param: AbstractParam): Promise<void>;
|
|
25
27
|
appSwitchingReward(payload: AppSwitchingRewardPayload, param: AbstractParam): Promise<AppSwitchingRewardResult>;
|
|
@@ -52,8 +52,18 @@ let AmqpUserEntityService = class AmqpUserEntityService {
|
|
|
52
52
|
async verificationPhoneForSnsUser(payload, param) {
|
|
53
53
|
return this.amqpManager.call('유저 - SNS 유저 휴대폰 번호 인증', 'user.put.verification-phone-for-sns-user', payload, param, { isErrorThrowing: true });
|
|
54
54
|
}
|
|
55
|
+
/** @author jun @description 비회원 인증번호 발송 @process 제한된 시간 안에 인증 소유 서비스에 위임한다. */
|
|
56
|
+
async requestGuestPhoneVerification(payload, param) {
|
|
57
|
+
return this.amqpManager.call('비회원 인증번호 발송', 'user.request.guest-phone-verification', payload, {
|
|
58
|
+
...param,
|
|
59
|
+
timeout: 20000,
|
|
60
|
+
}, { isErrorThrowing: true });
|
|
61
|
+
}
|
|
55
62
|
async signInGuestUser(payload, param) {
|
|
56
|
-
return this.amqpManager.call('유저 - 게스트 유저 로그인', 'user.sign-in.guest-user', payload,
|
|
63
|
+
return this.amqpManager.call('유저 - 게스트 유저 로그인', 'user.sign-in.guest-user', payload, {
|
|
64
|
+
...param,
|
|
65
|
+
timeout: 20000,
|
|
66
|
+
}, { isErrorThrowing: true });
|
|
57
67
|
}
|
|
58
68
|
async updateGuestUserName(payload, param) {
|
|
59
69
|
return this.amqpManager.call('유저 - 게스트 유저 이름 수정', 'user.update.guest-user-name', payload, param, { isErrorThrowing: true });
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ClientProxy } from '@nestjs/microservices';
|
|
2
|
-
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
-
import { ClaimSignupCertificationPayload, ClaimSignupCertificationResult } from '../dto/signup-certification';
|
|
4
|
-
/**
|
|
5
|
-
* @author 홍준
|
|
6
|
-
* @description 가입 전 본인인증 귀속 AMQP client
|
|
7
|
-
* @process 가입 완료 후 로그인된 사용자에게 일회성 인증 결과를 연결한다.
|
|
8
|
-
*/
|
|
9
|
-
export declare class AmqpSignupCertificationService {
|
|
10
|
-
private readonly client;
|
|
11
|
-
private readonly amqpManager;
|
|
12
|
-
constructor(client: ClientProxy);
|
|
13
|
-
claim(payload: ClaimSignupCertificationPayload, param: AbstractParam): Promise<ClaimSignupCertificationResult>;
|
|
14
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AmqpSignupCertificationService = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const microservices_1 = require("@nestjs/microservices");
|
|
18
|
-
const functions_1 = require("@yolo-croket-dev/core/functions");
|
|
19
|
-
/**
|
|
20
|
-
* @author 홍준
|
|
21
|
-
* @description 가입 전 본인인증 귀속 AMQP client
|
|
22
|
-
* @process 가입 완료 후 로그인된 사용자에게 일회성 인증 결과를 연결한다.
|
|
23
|
-
*/
|
|
24
|
-
let AmqpSignupCertificationService = class AmqpSignupCertificationService {
|
|
25
|
-
constructor(client) {
|
|
26
|
-
this.client = client;
|
|
27
|
-
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
28
|
-
}
|
|
29
|
-
async claim(payload, param) {
|
|
30
|
-
return this.amqpManager.call('가입 전 본인인증 사용자 귀속', 'signup-certification.claim', payload, param, { isErrorThrowing: true });
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.AmqpSignupCertificationService = AmqpSignupCertificationService;
|
|
34
|
-
exports.AmqpSignupCertificationService = AmqpSignupCertificationService = __decorate([
|
|
35
|
-
(0, common_1.Injectable)(),
|
|
36
|
-
__param(0, (0, common_1.Inject)('USER_SERVICE_PROVIDER')),
|
|
37
|
-
__metadata("design:paramtypes", [microservices_1.ClientProxy])
|
|
38
|
-
], AmqpSignupCertificationService);
|