@yolo-croket-dev/amqp-access 0.7.341 → 0.7.342

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.
@@ -0,0 +1,13 @@
1
+ /** @author 홍준 @description 거래 목록의 OTP 조회 요청 @process 인증 ID 대신 주문 ID를 받아 서버에서 소유권과 확정 인증을 확인한다. */
2
+ export declare class GetOrderCustomsOtpsPayload {
3
+ orderType: 'purchasedInfo' | 'ask';
4
+ actor: 'buyer' | 'seller';
5
+ orderIds: string[];
6
+ }
7
+ /** @author 홍준 @description 권한이 있는 거래의 완료 인증번호 @process 미인증·미연결·다른 사용자의 거래는 결과에 포함하지 않는다. */
8
+ export declare class GetOrderCustomsOtpsResult {
9
+ items: {
10
+ orderId: string;
11
+ customsOtp: string;
12
+ }[];
13
+ }
@@ -0,0 +1,42 @@
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.GetOrderCustomsOtpsResult = exports.GetOrderCustomsOtpsPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /** @author 홍준 @description 거래 목록의 OTP 조회 요청 @process 인증 ID 대신 주문 ID를 받아 서버에서 소유권과 확정 인증을 확인한다. */
15
+ class GetOrderCustomsOtpsPayload {
16
+ }
17
+ exports.GetOrderCustomsOtpsPayload = GetOrderCustomsOtpsPayload;
18
+ __decorate([
19
+ (0, class_validator_1.IsIn)([
20
+ 'purchasedInfo',
21
+ 'ask',
22
+ ]),
23
+ __metadata("design:type", String)
24
+ ], GetOrderCustomsOtpsPayload.prototype, "orderType", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsIn)([
27
+ 'buyer',
28
+ 'seller',
29
+ ]),
30
+ __metadata("design:type", String)
31
+ ], GetOrderCustomsOtpsPayload.prototype, "actor", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsArray)(),
34
+ (0, class_validator_1.ArrayMinSize)(1),
35
+ (0, class_validator_1.ArrayMaxSize)(100),
36
+ (0, class_validator_1.IsMongoId)({ each: true }),
37
+ __metadata("design:type", Array)
38
+ ], GetOrderCustomsOtpsPayload.prototype, "orderIds", void 0);
39
+ /** @author 홍준 @description 권한이 있는 거래의 완료 인증번호 @process 미인증·미연결·다른 사용자의 거래는 결과에 포함하지 않는다. */
40
+ class GetOrderCustomsOtpsResult {
41
+ }
42
+ exports.GetOrderCustomsOtpsResult = GetOrderCustomsOtpsResult;
@@ -1,2 +1,3 @@
1
1
  export * from './command';
2
2
  export * from './query';
3
+ export * from './get-order-customs-otps.dto';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./command"), exports);
18
18
  __exportStar(require("./query"), exports);
19
+ __exportStar(require("./get-order-customs-otps.dto"), exports);
@@ -1,10 +1,12 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { SubmitInvoiceCustomsTradePayload, SubmitInvoiceCustomsTradeResult, CheckCheckoutCustomsReceiverPayload, CheckCheckoutCustomsReceiverResult, ValidateCheckoutCustomsVerificationPayload, ValidateCheckoutCustomsVerificationResult, ValidateShippingCustomsVerificationPayload, ValidateShippingCustomsVerificationResult, CreateCheckoutCustomsVerificationPayload, CreateCheckoutCustomsVerificationResult, CompleteCheckoutCustomsVerificationPayload, CompleteCheckoutCustomsVerificationResult, GetUnreadCustomsTradeErrorsResult, GetCustomsTradeSubmissionResult, GetCustomsTradeSubmissionResultPayload, PostProcessCustomsPcccValidationPayload, PostProcessCustomsPcccValidationResult, PollPendingCustomsTradeSubmissionsPayload, PollPendingCustomsTradeSubmissionsResult, RevalidateCustomsPcccPayload, RevalidateCustomsPcccResult, RequestCustomsPcccValidationPayload, RequestCustomsPcccValidationResult, RevokeCustomsAccessTokenResult, SubmitCustomsTradeInformationPayload, SubmitCustomsTradeInformationResult, VerifyCustomsPcccOtpPayload, VerifyCustomsPcccOtpResult } from '../dto/customs';
3
+ import { GetOrderCustomsOtpsPayload, GetOrderCustomsOtpsResult, SubmitInvoiceCustomsTradePayload, SubmitInvoiceCustomsTradeResult, CheckCheckoutCustomsReceiverPayload, CheckCheckoutCustomsReceiverResult, ValidateCheckoutCustomsVerificationPayload, ValidateCheckoutCustomsVerificationResult, ValidateShippingCustomsVerificationPayload, ValidateShippingCustomsVerificationResult, CreateCheckoutCustomsVerificationPayload, CreateCheckoutCustomsVerificationResult, CompleteCheckoutCustomsVerificationPayload, CompleteCheckoutCustomsVerificationResult, GetUnreadCustomsTradeErrorsResult, GetCustomsTradeSubmissionResult, GetCustomsTradeSubmissionResultPayload, PostProcessCustomsPcccValidationPayload, PostProcessCustomsPcccValidationResult, PollPendingCustomsTradeSubmissionsPayload, PollPendingCustomsTradeSubmissionsResult, RevalidateCustomsPcccPayload, RevalidateCustomsPcccResult, RequestCustomsPcccValidationPayload, RequestCustomsPcccValidationResult, RevokeCustomsAccessTokenResult, SubmitCustomsTradeInformationPayload, SubmitCustomsTradeInformationResult, VerifyCustomsPcccOtpPayload, VerifyCustomsPcccOtpResult } from '../dto/customs';
4
4
  export declare class AmqpCustomsService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
7
7
  constructor(client: ClientProxy);
8
+ /** @author 홍준 @description 거래 OTP 일괄 조회 @process 주문 서버에서 현재 거래 당사자의 권한을 재검증한다. */
9
+ getOrderCustomsOtps(payload: GetOrderCustomsOtpsPayload, param: AbstractParam): Promise<GetOrderCustomsOtpsResult>;
8
10
  /** @author 홍준 @description 송장 변경 후 통관 거래정보 제출 @process 저장된 이벤트 ID로 주문 서버에 위임한다. */
9
11
  submitInvoiceCustomsTrade(payload: SubmitInvoiceCustomsTradePayload, param: AbstractParam): Promise<SubmitInvoiceCustomsTradeResult>;
10
12
  /** @author 홍준 @description 수령인 일치 확인 @process 로그인 문맥을 유지해 읽기 전용 수령인 비교를 호출한다. */
@@ -21,6 +21,10 @@ let AmqpCustomsService = class AmqpCustomsService {
21
21
  this.client = client;
22
22
  this.amqpManager = new core_1.AmqpManagement(this.client);
23
23
  }
24
+ /** @author 홍준 @description 거래 OTP 일괄 조회 @process 주문 서버에서 현재 거래 당사자의 권한을 재검증한다. */
25
+ async getOrderCustomsOtps(payload, param) {
26
+ return this.amqpManager.call('거래 OTP 조회', 'customs.get.order-otps', payload, param, { isErrorThrowing: true });
27
+ }
24
28
  /** @author 홍준 @description 송장 변경 후 통관 거래정보 제출 @process 저장된 이벤트 ID로 주문 서버에 위임한다. */
25
29
  async submitInvoiceCustomsTrade(payload, param) {
26
30
  return this.amqpManager.call('송장 거래정보 제출', 'customs.submit.invoice-trade', payload, param, { isErrorThrowing: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.341",
3
+ "version": "0.7.342",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -23,7 +23,7 @@
23
23
  "@yolo-croket-dev/domain": "0.2.47",
24
24
  "@yolo-croket-dev/dto-v2": "0.2.30",
25
25
  "@yolo-croket-dev/entity": "0.2.109",
26
- "@yolo-croket-dev/entity-v2": "0.3.48",
26
+ "@yolo-croket-dev/entity-v2": "0.3.49",
27
27
  "class-transformer": "^0.5.1",
28
28
  "class-validator": "^0.13.2",
29
29
  "dotenv": "^16.3.1"
@@ -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);