@yolo-croket-dev/amqp-access 0.7.54-jun.16 → 0.7.54-jun.18

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,34 @@
1
+ /**
2
+ * @author jun
3
+ * @description NicePay 빌링 결제 취소 요청 Payload
4
+ * @process order-server의 CancelBillingPaymentService에 전달되는 데이터
5
+ */
6
+ export declare class CancelBillingPaymentPayload {
7
+ /** 승인 시 받은 거래 ID */
8
+ tid: string;
9
+ /** 취소 금액 */
10
+ cancelAmt: number;
11
+ /** 취소 사유 */
12
+ cancelMsg: string;
13
+ /** 부분취소 여부 (0: 전체취소, 1: 부분취소) */
14
+ partialCancelCode: string;
15
+ /** 유저 ID (로그 저장용) */
16
+ userId: string;
17
+ /** 유저 카드 빌링 ID (로그 저장용) */
18
+ userCardBillingId: string;
19
+ /** 구매 정보 ID (로그 저장용) */
20
+ pInfoId: string;
21
+ }
22
+ /**
23
+ * @description NicePay 빌링 결제 취소 결과
24
+ */
25
+ export declare class CancelBillingPaymentResult {
26
+ /** 거래 ID */
27
+ tid?: string;
28
+ /** 취소 금액 */
29
+ cancelAmt: number;
30
+ /** 취소 일자 (YYYYMMDD) */
31
+ cancelDate?: string;
32
+ /** 취소 시각 (HHmmss) */
33
+ cancelTime?: string;
34
+ }
@@ -0,0 +1,62 @@
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.CancelBillingPaymentResult = exports.CancelBillingPaymentPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * @author jun
16
+ * @description NicePay 빌링 결제 취소 요청 Payload
17
+ * @process order-server의 CancelBillingPaymentService에 전달되는 데이터
18
+ */
19
+ class CancelBillingPaymentPayload {
20
+ }
21
+ exports.CancelBillingPaymentPayload = CancelBillingPaymentPayload;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], CancelBillingPaymentPayload.prototype, "tid", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsNumber)(),
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", Number)
31
+ ], CancelBillingPaymentPayload.prototype, "cancelAmt", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ __metadata("design:type", String)
36
+ ], CancelBillingPaymentPayload.prototype, "cancelMsg", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsString)(),
39
+ (0, class_validator_1.IsNotEmpty)(),
40
+ __metadata("design:type", String)
41
+ ], CancelBillingPaymentPayload.prototype, "partialCancelCode", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsString)(),
44
+ (0, class_validator_1.IsNotEmpty)(),
45
+ __metadata("design:type", String)
46
+ ], CancelBillingPaymentPayload.prototype, "userId", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsString)(),
49
+ (0, class_validator_1.IsNotEmpty)(),
50
+ __metadata("design:type", String)
51
+ ], CancelBillingPaymentPayload.prototype, "userCardBillingId", void 0);
52
+ __decorate([
53
+ (0, class_validator_1.IsString)(),
54
+ (0, class_validator_1.IsNotEmpty)(),
55
+ __metadata("design:type", String)
56
+ ], CancelBillingPaymentPayload.prototype, "pInfoId", void 0);
57
+ /**
58
+ * @description NicePay 빌링 결제 취소 결과
59
+ */
60
+ class CancelBillingPaymentResult {
61
+ }
62
+ exports.CancelBillingPaymentResult = CancelBillingPaymentResult;
@@ -1,2 +1,3 @@
1
1
  export * from './issue-billing-key.dto';
2
2
  export * from './register-billing-card.dto';
3
+ export * from './cancel-billing-payment.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("./issue-billing-key.dto"), exports);
18
18
  __exportStar(require("./register-billing-card.dto"), exports);
19
+ __exportStar(require("./cancel-billing-payment.dto"), exports);
@@ -1,6 +1,6 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { GetNicepayBillingAuthFormPayload, GetNicepayBillingAuthFormResult, IssueBillingKeyPayload, IssueBillingKeyResult, RegisterBillingCardPayload, RegisterBillingCardResult } from '../dto/nicepay';
3
+ import { GetNicepayBillingAuthFormPayload, GetNicepayBillingAuthFormResult, IssueBillingKeyPayload, IssueBillingKeyResult, RegisterBillingCardPayload, RegisterBillingCardResult, GetCardInterestFreeResult, CancelBillingPaymentPayload, CancelBillingPaymentResult } from '../dto/nicepay';
4
4
  /**
5
5
  * @author jun
6
6
  * @description NicePay 관련 AMQP 서비스
@@ -16,4 +16,8 @@ export declare class AmqpNicepayService {
16
16
  issueBillingKey(payload: IssueBillingKeyPayload, param: AbstractParam): Promise<IssueBillingKeyResult>;
17
17
  /** NicePay 빌링키 발급 + 유저 카드 정보 등록 */
18
18
  registerBillingCard(payload: RegisterBillingCardPayload, param: AbstractParam): Promise<RegisterBillingCardResult>;
19
+ /** NicePay 카드 무이자 할부 정보 조회 */
20
+ getCardInterestFree(param: AbstractParam): Promise<GetCardInterestFreeResult>;
21
+ /** NicePay 빌링 결제 취소 */
22
+ cancelBillingPayment(payload: CancelBillingPaymentPayload, param: AbstractParam): Promise<CancelBillingPaymentResult>;
19
23
  }
@@ -38,6 +38,14 @@ let AmqpNicepayService = class AmqpNicepayService {
38
38
  async registerBillingCard(payload, param) {
39
39
  return this.amqpManager.call('NicePay 빌링키 발급 + 유저 카드 등록', 'nicepay.register.billing-card', payload, param, { isErrorThrowing: true });
40
40
  }
41
+ /** NicePay 카드 무이자 할부 정보 조회 */
42
+ async getCardInterestFree(param) {
43
+ return this.amqpManager.call('NicePay 카드 무이자 할부 정보 조회', 'nicepay.get.card-interest-free', {}, param, { isErrorThrowing: true });
44
+ }
45
+ /** NicePay 빌링 결제 취소 */
46
+ async cancelBillingPayment(payload, param) {
47
+ return this.amqpManager.call('NicePay 빌링 결제 취소', 'nicepay.cancel.billing-payment', payload, param, { isErrorThrowing: true });
48
+ }
41
49
  };
42
50
  exports.AmqpNicepayService = AmqpNicepayService;
43
51
  exports.AmqpNicepayService = AmqpNicepayService = __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.54-jun.16",
3
+ "version": "0.7.54-jun.18",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",