@yolo-croket-dev/amqp-access 0.7.312 → 0.7.314

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.312",
3
+ "version": "0.7.314",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -1,10 +1,11 @@
1
+ import { PortoneCertificationMode } from './start-portone-certification.dto';
1
2
  /**
2
3
  * @author 홍준
3
4
  * @description 포트원 V1 본인확인 완료 검증 요청값
4
5
  * @process 클라이언트가 전달한 식별자는 포트원 REST API 응답과 서버 세션 양쪽으로 검증한다.
5
6
  */
6
7
  export declare class CompletePortoneCertificationPayload {
7
- impUid: string;
8
+ impUid?: string;
8
9
  merchantUid: string;
9
10
  }
10
11
  /**
@@ -13,6 +14,7 @@ export declare class CompletePortoneCertificationPayload {
13
14
  * @process CI 원문과 HMAC은 외부 응답으로 반환하지 않는다.
14
15
  */
15
16
  export declare class CompletePortoneCertificationResult {
17
+ mode: PortoneCertificationMode;
16
18
  ciReceived: boolean;
17
19
  verifiedAt: Date;
18
20
  }
@@ -20,6 +20,7 @@ class CompletePortoneCertificationPayload {
20
20
  }
21
21
  exports.CompletePortoneCertificationPayload = CompletePortoneCertificationPayload;
22
22
  __decorate([
23
+ (0, class_validator_1.IsOptional)(),
23
24
  (0, class_validator_1.IsString)(),
24
25
  (0, class_validator_1.IsNotEmpty)(),
25
26
  __metadata("design:type", String)
@@ -1,3 +1,8 @@
1
+ /** @author 홍준 @description CI 인증 실행 모드 @process 서버가 환경 설정으로 결정하며 요청 본문에서는 받지 않는다. */
2
+ export declare enum PortoneCertificationMode {
3
+ MOCK = "mock",
4
+ LIVE = "live"
5
+ }
1
6
  /**
2
7
  * @author 홍준
3
8
  * @description 포트원 본인확인 요청에 사용할 단발성 상점 주문번호
@@ -5,4 +10,10 @@
5
10
  */
6
11
  export declare class StartPortoneCertificationResult {
7
12
  merchantUid: string;
13
+ mode: PortoneCertificationMode;
14
+ channelKey?: string;
15
+ }
16
+ /** @author 홍준 @description 가입 전 본인인증 시작 결과 @process 가입 시 인증 결과를 결속할 단발성 식별자를 함께 반환한다. */
17
+ export declare class StartSignupPortoneCertificationResult extends StartPortoneCertificationResult {
18
+ signupCertificationId: string;
8
19
  }
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StartPortoneCertificationResult = void 0;
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["LIVE"] = "live";
9
+ })(PortoneCertificationMode || (exports.PortoneCertificationMode = PortoneCertificationMode = {}));
4
10
  /**
5
11
  * @author 홍준
6
12
  * @description 포트원 본인확인 요청에 사용할 단발성 상점 주문번호
@@ -9,3 +15,7 @@ exports.StartPortoneCertificationResult = void 0;
9
15
  class StartPortoneCertificationResult {
10
16
  }
11
17
  exports.StartPortoneCertificationResult = StartPortoneCertificationResult;
18
+ /** @author 홍준 @description 가입 전 본인인증 시작 결과 @process 가입 시 인증 결과를 결속할 단발성 식별자를 함께 반환한다. */
19
+ class StartSignupPortoneCertificationResult extends StartPortoneCertificationResult {
20
+ }
21
+ exports.StartSignupPortoneCertificationResult = StartSignupPortoneCertificationResult;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @author 홍준
3
+ * @description 가입 전 완료한 본인인증을 현재 사용자에게 귀속하는 요청
4
+ * @process 서버가 발급한 고엔트로피 식별자를 일회성으로 소비한다.
5
+ */
6
+ export declare class ClaimSignupCertificationPayload {
7
+ signupCertificationId: string;
8
+ }
9
+ /**
10
+ * @author 홍준
11
+ * @description 가입 전 본인인증 귀속 결과
12
+ * @process 민감정보를 반환하지 않고 CI 인증 반영 여부만 반환한다.
13
+ */
14
+ export declare class ClaimSignupCertificationResult {
15
+ ciCertified: boolean;
16
+ }
@@ -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.ClaimSignupCertificationResult = exports.ClaimSignupCertificationPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * @author 홍준
16
+ * @description 가입 전 완료한 본인인증을 현재 사용자에게 귀속하는 요청
17
+ * @process 서버가 발급한 고엔트로피 식별자를 일회성으로 소비한다.
18
+ */
19
+ class ClaimSignupCertificationPayload {
20
+ }
21
+ exports.ClaimSignupCertificationPayload = ClaimSignupCertificationPayload;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ (0, class_validator_1.Matches)(/^[A-Za-z0-9_-]{43}$/),
26
+ __metadata("design:type", String)
27
+ ], ClaimSignupCertificationPayload.prototype, "signupCertificationId", void 0);
28
+ /**
29
+ * @author 홍준
30
+ * @description 가입 전 본인인증 귀속 결과
31
+ * @process 민감정보를 반환하지 않고 CI 인증 반영 여부만 반환한다.
32
+ */
33
+ class ClaimSignupCertificationResult {
34
+ }
35
+ exports.ClaimSignupCertificationResult = ClaimSignupCertificationResult;
@@ -0,0 +1 @@
1
+ export * from './claim-signup-certification.dto';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./claim-signup-certification.dto"), exports);
@@ -0,0 +1 @@
1
+ export * from './command';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./command"), exports);
@@ -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);