@yolo-croket-dev/amqp-access 0.7.377 → 0.7.378

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.
@@ -1,3 +1,4 @@
1
1
  export * from './send-template-notification.dto';
2
2
  export * from './send-template-notification-bulk.dto';
3
3
  export * from './send-template-notification-concurrency.dto';
4
+ export * from './send-seller-overseas-phone-verification-sms.dto';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./send-template-notification.dto"), exports);
18
18
  __exportStar(require("./send-template-notification-bulk.dto"), exports);
19
19
  __exportStar(require("./send-template-notification-concurrency.dto"), exports);
20
+ __exportStar(require("./send-seller-overseas-phone-verification-sms.dto"), exports);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @author sj
3
+ * @description 승인 셀러 해외 휴대폰 인증 문자 내부 발송 입력
4
+ * @process 인증 목적을 고정해 호출자가 임의 문자 본문을 전달하지 못하게 한다.
5
+ */
6
+ export declare class SendSellerOverseasPhoneVerificationSmsPayload {
7
+ phoneCountry: string;
8
+ phoneNumber: string;
9
+ verificationCode: string;
10
+ }
11
+ export interface SendSellerOverseasPhoneVerificationSmsResult {
12
+ sent: true;
13
+ }
@@ -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.SendSellerOverseasPhoneVerificationSmsPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * @author sj
16
+ * @description 승인 셀러 해외 휴대폰 인증 문자 내부 발송 입력
17
+ * @process 인증 목적을 고정해 호출자가 임의 문자 본문을 전달하지 못하게 한다.
18
+ */
19
+ class SendSellerOverseasPhoneVerificationSmsPayload {
20
+ }
21
+ exports.SendSellerOverseasPhoneVerificationSmsPayload = SendSellerOverseasPhoneVerificationSmsPayload;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.Matches)(/^\+[1-9]\d{0,2}$/),
25
+ __metadata("design:type", String)
26
+ ], SendSellerOverseasPhoneVerificationSmsPayload.prototype, "phoneCountry", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.Matches)(/^\d{4,20}$/),
30
+ __metadata("design:type", String)
31
+ ], SendSellerOverseasPhoneVerificationSmsPayload.prototype, "phoneNumber", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.Matches)(/^\d{6}$/),
35
+ __metadata("design:type", String)
36
+ ], SendSellerOverseasPhoneVerificationSmsPayload.prototype, "verificationCode", void 0);
@@ -1,10 +1,16 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { SendTemplateNotificationPayload, SendTemplateNotificationBulkPayload, SendTemplateNotificationBulkResult } from '../dto/notification';
3
+ import { SendTemplateNotificationPayload, SendTemplateNotificationBulkPayload, SendTemplateNotificationBulkResult, SendSellerOverseasPhoneVerificationSmsPayload, SendSellerOverseasPhoneVerificationSmsResult } from '../dto/notification';
4
4
  export declare class AmqpSendNotificationService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
7
7
  constructor(client: ClientProxy);
8
8
  sendTemplateNotification(payload: SendTemplateNotificationPayload, param: AbstractParam): Promise<boolean>;
9
9
  sendTemplateNotificationBulk(payload: SendTemplateNotificationBulkPayload, param: AbstractParam): Promise<SendTemplateNotificationBulkResult>;
10
+ /**
11
+ * @author sj
12
+ * @description 해외 휴대폰 인증 문자 발송
13
+ * @process 고정 목적의 인증 문자만 notification-service에 위임한다.
14
+ * */
15
+ sendSellerOverseasPhoneVerificationSms(payload: SendSellerOverseasPhoneVerificationSmsPayload, param: AbstractParam): Promise<SendSellerOverseasPhoneVerificationSmsResult>;
10
16
  }
@@ -27,6 +27,17 @@ let AmqpSendNotificationService = class AmqpSendNotificationService {
27
27
  async sendTemplateNotificationBulk(payload, param) {
28
28
  return this.amqpManager.call('알림 보내기 Bulk', 'notification.template.bulk-send', payload, param, { isErrorThrowing: true });
29
29
  }
30
+ /**
31
+ * @author sj
32
+ * @description 해외 휴대폰 인증 문자 발송
33
+ * @process 고정 목적의 인증 문자만 notification-service에 위임한다.
34
+ * */
35
+ async sendSellerOverseasPhoneVerificationSms(payload, param) {
36
+ return this.amqpManager.call('승인 셀러 해외 휴대폰 인증 문자 발송', 'notification.send.seller-overseas-phone-verification-sms', payload, param, {
37
+ isErrorThrowing: true,
38
+ isInternal: true,
39
+ });
40
+ }
30
41
  };
31
42
  exports.AmqpSendNotificationService = AmqpSendNotificationService;
32
43
  exports.AmqpSendNotificationService = AmqpSendNotificationService = __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.377",
3
+ "version": "0.7.378",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -29,4 +29,4 @@
29
29
  "class-validator": "^0.13.2",
30
30
  "dotenv": "^16.3.1"
31
31
  }
32
- }
32
+ }
@@ -6,7 +6,7 @@ import { GetUsernameByIdPayload, GetUsersForAppPushPayload, GetUsersForAppPushRe
6
6
  import { Membership } from '@yolo-croket-dev/entity';
7
7
  import { UserPhoneDecodeByPhoneNumberPayloadDto, UserPhoneDecodeByPhoneNumberResultDto } from '@yolo-croket-dev/dto/user-service';
8
8
  import { NotificationUser, UpdateUserByIdPayload } from './amqp.user-service.types';
9
- import { GetUserInfoByIdPayload, GetUserInfoByIdResult, GetUsersForAdminPayload, GetUsersForAdminResult, GetUsersPayload, GetUsersResult, GetSellerEmailPayload, GetSellerEmailResult, ReversalCreditByPInfoIdPayload, SendNotOpenAppNotificationResult, ConfirmEmailSignupVerificationPayload, ConfirmEmailSignupVerificationResult, CreateEmailSignupPayload, CreateEmailSignupResult, RequestEmailSignupVerificationPayload, RequestEmailSignupVerificationResult } from './dto/user';
9
+ import { GetUserInfoByIdPayload, GetUserInfoByIdResult, GetUsersForAdminPayload, GetUsersForAdminResult, GetUsersPayload, GetUsersResult, GetSellerEmailPayload, GetSellerEmailResult, ReversalCreditByPInfoIdPayload, SendNotOpenAppNotificationResult, ConfirmEmailSignupVerificationPayload, ConfirmEmailSignupVerificationResult, CreateEmailSignupPayload, CreateEmailSignupResult, RequestEmailSignupVerificationPayload, RequestEmailSignupVerificationResult, RequestSellerOverseasPhoneVerificationPayload, RequestSellerOverseasPhoneVerificationResult, ConfirmSellerOverseasPhoneVerificationPayload, ConfirmSellerOverseasPhoneVerificationResult } from './dto/user';
10
10
  export declare class AmqpUserService {
11
11
  private readonly client;
12
12
  private readonly amqpManager;
@@ -50,4 +50,16 @@ export declare class AmqpUserService {
50
50
  * @process 인증 token 소비와 User 생성을 user-service 단일 경계에서 처리한다.
51
51
  * */
52
52
  createEmailSignup(payload: CreateEmailSignupPayload, param: AbstractParam): Promise<CreateEmailSignupResult>;
53
+ /**
54
+ * @author sj
55
+ * @description 승인 셀러 해외 인증번호 발송
56
+ * @process user-service가 승인 상태와 OTP 상태를 검증한다.
57
+ * */
58
+ requestSellerOverseasPhoneVerification(payload: RequestSellerOverseasPhoneVerificationPayload, param: AbstractParam): Promise<RequestSellerOverseasPhoneVerificationResult>;
59
+ /**
60
+ * @author sj
61
+ * @description 승인 셀러 해외 인증번호 확인
62
+ * @process 성공 시 계정 전화번호를 저장한다.
63
+ * */
64
+ confirmSellerOverseasPhoneVerification(payload: ConfirmSellerOverseasPhoneVerificationPayload, param: AbstractParam): Promise<ConfirmSellerOverseasPhoneVerificationResult>;
53
65
  }
@@ -108,6 +108,22 @@ let AmqpUserService = class AmqpUserService {
108
108
  async createEmailSignup(payload, param) {
109
109
  return this.amqpManager.call('이메일 전용 회원가입', 'user.email-signup.create', payload, param, { isErrorThrowing: true });
110
110
  }
111
+ /**
112
+ * @author sj
113
+ * @description 승인 셀러 해외 인증번호 발송
114
+ * @process user-service가 승인 상태와 OTP 상태를 검증한다.
115
+ * */
116
+ async requestSellerOverseasPhoneVerification(payload, param) {
117
+ return this.amqpManager.call('승인 셀러 해외 휴대폰 인증번호 발송', 'user.seller.request-overseas-phone-verification', payload, param, { isErrorThrowing: true });
118
+ }
119
+ /**
120
+ * @author sj
121
+ * @description 승인 셀러 해외 인증번호 확인
122
+ * @process 성공 시 계정 전화번호를 저장한다.
123
+ * */
124
+ async confirmSellerOverseasPhoneVerification(payload, param) {
125
+ return this.amqpManager.call('승인 셀러 해외 휴대폰 인증번호 확인', 'user.seller.confirm-overseas-phone-verification', payload, param, { isErrorThrowing: true });
126
+ }
111
127
  };
112
128
  exports.AmqpUserService = AmqpUserService;
113
129
  exports.AmqpUserService = AmqpUserService = __decorate([
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @author sj
3
+ * @description 승인 셀러 해외 휴대폰 인증번호 확인 입력
4
+ * @process 확인 단계에는 발송 세션 식별자와 인증번호만 받는다.
5
+ */
6
+ export declare class ConfirmSellerOverseasPhoneVerificationPayload {
7
+ verificationId: string;
8
+ code: string;
9
+ }
10
+ /** @author sj @description 해외 휴대폰 인증번호 확인 결과 */
11
+ export declare class ConfirmSellerOverseasPhoneVerificationResult {
12
+ result: true;
13
+ }
@@ -0,0 +1,35 @@
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.ConfirmSellerOverseasPhoneVerificationResult = exports.ConfirmSellerOverseasPhoneVerificationPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * @author sj
16
+ * @description 승인 셀러 해외 휴대폰 인증번호 확인 입력
17
+ * @process 확인 단계에는 발송 세션 식별자와 인증번호만 받는다.
18
+ */
19
+ class ConfirmSellerOverseasPhoneVerificationPayload {
20
+ }
21
+ exports.ConfirmSellerOverseasPhoneVerificationPayload = ConfirmSellerOverseasPhoneVerificationPayload;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.Matches)(/^[A-Za-z0-9_-]{21}$/),
25
+ __metadata("design:type", String)
26
+ ], ConfirmSellerOverseasPhoneVerificationPayload.prototype, "verificationId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.Matches)(/^\d{6}$/),
30
+ __metadata("design:type", String)
31
+ ], ConfirmSellerOverseasPhoneVerificationPayload.prototype, "code", void 0);
32
+ /** @author sj @description 해외 휴대폰 인증번호 확인 결과 */
33
+ class ConfirmSellerOverseasPhoneVerificationResult {
34
+ }
35
+ exports.ConfirmSellerOverseasPhoneVerificationResult = ConfirmSellerOverseasPhoneVerificationResult;
@@ -14,3 +14,5 @@ export * from './send-not-open-app-notification.dto';
14
14
  export * from './request-email-signup-verification.dto';
15
15
  export * from './confirm-email-signup-verification.dto';
16
16
  export * from './create-email-signup.dto';
17
+ export * from './request-seller-overseas-phone-verification.dto';
18
+ export * from './confirm-seller-overseas-phone-verification.dto';
@@ -30,3 +30,5 @@ __exportStar(require("./send-not-open-app-notification.dto"), exports);
30
30
  __exportStar(require("./request-email-signup-verification.dto"), exports);
31
31
  __exportStar(require("./confirm-email-signup-verification.dto"), exports);
32
32
  __exportStar(require("./create-email-signup.dto"), exports);
33
+ __exportStar(require("./request-seller-overseas-phone-verification.dto"), exports);
34
+ __exportStar(require("./confirm-seller-overseas-phone-verification.dto"), exports);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @author sj
3
+ * @description 승인 셀러 해외 휴대폰 인증번호 발송 입력
4
+ * @process 국가번호와 국가 내 번호는 user-service에서 E.164로 정규화한다.
5
+ */
6
+ export declare class RequestSellerOverseasPhoneVerificationPayload {
7
+ phoneCountry: string;
8
+ phoneNumber: string;
9
+ recaptchaToken: string;
10
+ }
11
+ /** @author sj @description 해외 휴대폰 인증번호 발송 결과 @process 평문 번호와 인증번호는 응답하지 않는다. */
12
+ export declare class RequestSellerOverseasPhoneVerificationResult {
13
+ verificationId: string;
14
+ expiresAt: string;
15
+ retryAfterSeconds: number;
16
+ }
@@ -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.RequestSellerOverseasPhoneVerificationResult = exports.RequestSellerOverseasPhoneVerificationPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * @author sj
16
+ * @description 승인 셀러 해외 휴대폰 인증번호 발송 입력
17
+ * @process 국가번호와 국가 내 번호는 user-service에서 E.164로 정규화한다.
18
+ */
19
+ class RequestSellerOverseasPhoneVerificationPayload {
20
+ }
21
+ exports.RequestSellerOverseasPhoneVerificationPayload = RequestSellerOverseasPhoneVerificationPayload;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.Matches)(/^\+[1-9]\d{0,2}$/),
25
+ __metadata("design:type", String)
26
+ ], RequestSellerOverseasPhoneVerificationPayload.prototype, "phoneCountry", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.Matches)(/^[0-9().\-\s]+$/),
30
+ (0, class_validator_1.MaxLength)(32),
31
+ __metadata("design:type", String)
32
+ ], RequestSellerOverseasPhoneVerificationPayload.prototype, "phoneNumber", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsString)(),
35
+ (0, class_validator_1.MaxLength)(8192),
36
+ __metadata("design:type", String)
37
+ ], RequestSellerOverseasPhoneVerificationPayload.prototype, "recaptchaToken", void 0);
38
+ /** @author sj @description 해외 휴대폰 인증번호 발송 결과 @process 평문 번호와 인증번호는 응답하지 않는다. */
39
+ class RequestSellerOverseasPhoneVerificationResult {
40
+ }
41
+ exports.RequestSellerOverseasPhoneVerificationResult = RequestSellerOverseasPhoneVerificationResult;