@yolo-croket-dev/amqp-access 0.7.321 → 0.7.323

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 CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.321",
3
+ "version": "0.7.323",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
- "description": "\ud06c\ub85c\ucf13 amqp-access npm",
6
+ "description": "크로켓 amqp-access npm",
7
7
  "keywords": [
8
8
  "croket"
9
9
  ],
@@ -1,6 +1,6 @@
1
1
  import { AdCenterSettle } from '@yolo-croket-dev/entity/src/ad-center-settle/ad-center-settle.schema';
2
2
  import { BusinessInfo } from '@yolo-croket-dev/entity/src/store';
3
- declare const AdCenterSettleForGoogleSheet_base: import("@nestjs/common").Type<Pick<AdCenterSettle, "_id" | "sellerId" | "publicId" | "couponInfo" | "pastStoreInfo" | "PInfoId" | "expectedSettleDateString" | "adType" | "adCenterStartDateString" | "adCenterEndDateString" | "transactionInfo" | "bizMemo" | "subtractionSettleAmountInfo" | "settlementManagerInfo" | "googleSheetInfo" | "actualSettleDateString" | "financeMemo">>;
3
+ declare const AdCenterSettleForGoogleSheet_base: import("@nestjs/common").Type<Pick<AdCenterSettle, "_id" | "sellerId" | "publicId" | "couponInfo" | "pastStoreInfo" | "expectedSettleDateString" | "adType" | "adCenterStartDateString" | "adCenterEndDateString" | "actualSettleDateString" | "PInfoId" | "transactionInfo" | "subtractionSettleAmountInfo" | "bizMemo" | "financeMemo" | "settlementManagerInfo" | "googleSheetInfo">>;
4
4
  /** 구글 시트용 광고센터정산 데이터 */
5
5
  export declare class AdCenterSettleForGoogleSheet extends AdCenterSettleForGoogleSheet_base {
6
6
  storeInfo: {
@@ -1,11 +1,10 @@
1
- import { PortoneCertificationMode } from './start-portone-certification.dto';
2
1
  /**
3
2
  * @author 홍준
4
3
  * @description 포트원 V1 본인확인 완료 검증 요청값
5
4
  * @process 클라이언트가 전달한 식별자는 포트원 REST API 응답과 서버 세션 양쪽으로 검증한다.
6
5
  */
7
6
  export declare class CompletePortoneCertificationPayload {
8
- impUid?: string;
7
+ impUid: string;
9
8
  merchantUid: string;
10
9
  }
11
10
  /**
@@ -14,7 +13,15 @@ export declare class CompletePortoneCertificationPayload {
14
13
  * @process CI 원문과 HMAC은 외부 응답으로 반환하지 않는다.
15
14
  */
16
15
  export declare class CompletePortoneCertificationResult {
17
- mode: PortoneCertificationMode;
18
16
  ciReceived: boolean;
19
17
  verifiedAt: Date;
20
18
  }
19
+ /**
20
+ * @author 홍준
21
+ * @description 가입 전 포트원 본인인증 완료 결과
22
+ * @process 검증 완료 후 발급한 일회성 식별자를 필수로 반환해 가입 요청과 연결한다.
23
+ */
24
+ export declare class CompleteSignupPortoneCertificationResult extends CompletePortoneCertificationResult {
25
+ /** @description 가입 API의 optional signupCertificationId에 전달할 검증 완료 식별자. */
26
+ signupCertificationId: string;
27
+ }
@@ -9,7 +9,7 @@ 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.CompletePortoneCertificationResult = exports.CompletePortoneCertificationPayload = void 0;
12
+ exports.CompleteSignupPortoneCertificationResult = exports.CompletePortoneCertificationResult = exports.CompletePortoneCertificationPayload = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  /**
15
15
  * @author 홍준
@@ -20,14 +20,15 @@ class CompletePortoneCertificationPayload {
20
20
  }
21
21
  exports.CompletePortoneCertificationPayload = CompletePortoneCertificationPayload;
22
22
  __decorate([
23
- (0, class_validator_1.IsOptional)(),
24
23
  (0, class_validator_1.IsString)(),
25
24
  (0, class_validator_1.IsNotEmpty)(),
25
+ (0, class_validator_1.Matches)(/\S/),
26
26
  __metadata("design:type", String)
27
27
  ], CompletePortoneCertificationPayload.prototype, "impUid", void 0);
28
28
  __decorate([
29
29
  (0, class_validator_1.IsString)(),
30
30
  (0, class_validator_1.IsNotEmpty)(),
31
+ (0, class_validator_1.Matches)(/\S/),
31
32
  __metadata("design:type", String)
32
33
  ], CompletePortoneCertificationPayload.prototype, "merchantUid", void 0);
33
34
  /**
@@ -38,3 +39,11 @@ __decorate([
38
39
  class CompletePortoneCertificationResult {
39
40
  }
40
41
  exports.CompletePortoneCertificationResult = CompletePortoneCertificationResult;
42
+ /**
43
+ * @author 홍준
44
+ * @description 가입 전 포트원 본인인증 완료 결과
45
+ * @process 검증 완료 후 발급한 일회성 식별자를 필수로 반환해 가입 요청과 연결한다.
46
+ */
47
+ class CompleteSignupPortoneCertificationResult extends CompletePortoneCertificationResult {
48
+ }
49
+ exports.CompleteSignupPortoneCertificationResult = CompleteSignupPortoneCertificationResult;
@@ -1,9 +1,3 @@
1
- /** @author 홍준 @description CI 인증 실행 모드 @process 서버가 환경 설정으로 결정하며 요청 본문에서는 받지 않는다. */
2
- export declare enum PortoneCertificationMode {
3
- MOCK = "mock",
4
- TEST = "test",
5
- LIVE = "live"
6
- }
7
1
  /**
8
2
  * @author 홍준
9
3
  * @description 포트원 본인확인 요청에 사용할 단발성 상점 주문번호
@@ -11,8 +5,8 @@ export declare enum PortoneCertificationMode {
11
5
  */
12
6
  export declare class StartPortoneCertificationResult {
13
7
  merchantUid: string;
14
- mode: PortoneCertificationMode;
15
- channelKey?: string;
8
+ /** @description 인증 시작 성공 시 반드시 반환하는 서버 환경별 포트원 채널키. */
9
+ channelKey: string;
16
10
  }
17
11
  /** @author 홍준 @description 가입 전 본인인증 시작 결과 @process 가입 시 인증 결과를 결속할 단발성 식별자를 함께 반환한다. */
18
12
  export declare class StartSignupPortoneCertificationResult extends StartPortoneCertificationResult {
@@ -1,13 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StartSignupPortoneCertificationResult = exports.StartPortoneCertificationResult = exports.PortoneCertificationMode = void 0;
4
- /** @author 홍준 @description CI 인증 실행 모드 @process 서버가 환경 설정으로 결정하며 요청 본문에서는 받지 않는다. */
5
- var PortoneCertificationMode;
6
- (function (PortoneCertificationMode) {
7
- PortoneCertificationMode["MOCK"] = "mock";
8
- PortoneCertificationMode["TEST"] = "test";
9
- PortoneCertificationMode["LIVE"] = "live";
10
- })(PortoneCertificationMode || (exports.PortoneCertificationMode = PortoneCertificationMode = {}));
3
+ exports.StartSignupPortoneCertificationResult = exports.StartPortoneCertificationResult = void 0;
11
4
  /**
12
5
  * @author 홍준
13
6
  * @description 포트원 본인확인 요청에 사용할 단발성 상점 주문번호
@@ -14,3 +14,7 @@ export declare class ClaimSignupCertificationPayload {
14
14
  export declare class ClaimSignupCertificationResult {
15
15
  ciCertified: boolean;
16
16
  }
17
+ /** @author 홍준 @description 가입 인증 선점 결과 @process 가입 저장 전에 인증 결과를 서버가 정한 사용자 ID에 결속한다. */
18
+ export declare class ReserveSignupCertificationResult {
19
+ reserved: boolean;
20
+ }
@@ -9,7 +9,7 @@ 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.ClaimSignupCertificationResult = exports.ClaimSignupCertificationPayload = void 0;
12
+ exports.ReserveSignupCertificationResult = exports.ClaimSignupCertificationResult = exports.ClaimSignupCertificationPayload = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  /**
15
15
  * @author 홍준
@@ -22,6 +22,7 @@ exports.ClaimSignupCertificationPayload = ClaimSignupCertificationPayload;
22
22
  __decorate([
23
23
  (0, class_validator_1.IsString)(),
24
24
  (0, class_validator_1.IsNotEmpty)(),
25
+ (0, class_validator_1.Matches)(/\S/),
25
26
  __metadata("design:type", String)
26
27
  ], ClaimSignupCertificationPayload.prototype, "signupCertificationId", void 0);
27
28
  /**
@@ -32,3 +33,7 @@ __decorate([
32
33
  class ClaimSignupCertificationResult {
33
34
  }
34
35
  exports.ClaimSignupCertificationResult = ClaimSignupCertificationResult;
36
+ /** @author 홍준 @description 가입 인증 선점 결과 @process 가입 저장 전에 인증 결과를 서버가 정한 사용자 ID에 결속한다. */
37
+ class ReserveSignupCertificationResult {
38
+ }
39
+ exports.ReserveSignupCertificationResult = ReserveSignupCertificationResult;
@@ -1,6 +1,6 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { CompletePortoneCertificationPayload, CompletePortoneCertificationResult, StartPortoneCertificationResult } from '../dto/portone-certification';
3
+ import { CompletePortoneCertificationPayload, CompletePortoneCertificationResult, CompleteSignupPortoneCertificationResult, StartPortoneCertificationResult, StartSignupPortoneCertificationResult } from '../dto/portone-certification';
4
4
  /**
5
5
  * @author 홍준
6
6
  * @description 포트원 본인확인 user-service AMQP client
@@ -10,8 +10,12 @@ export declare class AmqpPortoneCertificationService {
10
10
  private readonly client;
11
11
  private readonly amqpManager;
12
12
  constructor(client: ClientProxy);
13
+ /** @author 홍준 @description 가입 전 인증 시작 @process 회원 ID 없이 임시 인증 세션을 생성한다. */
14
+ startSignup(param: AbstractParam): Promise<StartSignupPortoneCertificationResult>;
15
+ /** @author 홍준 @description 가입 전 인증 완료 @process 검증된 인증정보와 연결된 가입 매칭 식별자를 반환한다. */
16
+ completeSignup(payload: CompletePortoneCertificationPayload, param: AbstractParam): Promise<CompleteSignupPortoneCertificationResult>;
13
17
  /** @author 홍준 @description 인증 요청용 merchant UID 생성 @process 단발성 세션을 만든다. */
14
18
  start(param: AbstractParam): Promise<StartPortoneCertificationResult>;
15
- /** @author 홍준 @description 포트원 인증 결과 검증 @process 포트원 서버 조회 후 CI HMAC만 보관한다. */
19
+ /** @author 홍준 @description 포트원 인증 결과 검증 @process 포트원 서버 조회 후 CI와 제공된 개인정보를 암호화 저장한다. */
16
20
  complete(payload: CompletePortoneCertificationPayload, param: AbstractParam): Promise<CompletePortoneCertificationResult>;
17
21
  }
@@ -26,11 +26,19 @@ let AmqpPortoneCertificationService = class AmqpPortoneCertificationService {
26
26
  this.client = client;
27
27
  this.amqpManager = new functions_1.AmqpManagement(this.client);
28
28
  }
29
+ /** @author 홍준 @description 가입 전 인증 시작 @process 회원 ID 없이 임시 인증 세션을 생성한다. */
30
+ async startSignup(param) {
31
+ return this.amqpManager.call('가입 전 포트원 인증 시작', 'portone-certification.signup.start', undefined, param, { isErrorThrowing: true });
32
+ }
33
+ /** @author 홍준 @description 가입 전 인증 완료 @process 검증된 인증정보와 연결된 가입 매칭 식별자를 반환한다. */
34
+ async completeSignup(payload, param) {
35
+ return this.amqpManager.call('가입 전 포트원 인증 완료', 'portone-certification.signup.complete', payload, param, { isErrorThrowing: true });
36
+ }
29
37
  /** @author 홍준 @description 인증 요청용 merchant UID 생성 @process 단발성 세션을 만든다. */
30
38
  async start(param) {
31
39
  return this.amqpManager.call('포트원 본인확인 시작', 'portone-certification.start', undefined, param, { isErrorThrowing: true });
32
40
  }
33
- /** @author 홍준 @description 포트원 인증 결과 검증 @process 포트원 서버 조회 후 CI HMAC만 보관한다. */
41
+ /** @author 홍준 @description 포트원 인증 결과 검증 @process 포트원 서버 조회 후 CI와 제공된 개인정보를 암호화 저장한다. */
34
42
  async complete(payload, param) {
35
43
  return this.amqpManager.call('포트원 본인확인 완료', 'portone-certification.complete', payload, param, { isErrorThrowing: true });
36
44
  }
@@ -0,0 +1,14 @@
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
+ }
@@ -0,0 +1,38 @@
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);