@yolo-croket-dev/amqp-access 0.7.47-jun.35 → 0.7.47-jun.37

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,21 @@
1
+ /** @description 개별 실패 정보 */
2
+ export interface BulkApproveFailInfo {
3
+ failType: string;
4
+ reason: string;
5
+ }
6
+ /** @description 개별 처리 결과 */
7
+ export interface BulkApproveResultItem {
8
+ pInfoId: string;
9
+ fails?: BulkApproveFailInfo[];
10
+ }
11
+ /** @description 예약 상품 일괄 빌링 결제 승인 Payload */
12
+ export declare class ApproveReservationBillingPaymentBulkPayload {
13
+ pInfoIds: string[];
14
+ }
15
+ /** @description 예약 상품 일괄 빌링 결제 승인 Result */
16
+ export declare class ApproveReservationBillingPaymentBulkResult {
17
+ allCount: number;
18
+ successCount: number;
19
+ failCount: number;
20
+ results: BulkApproveResultItem[];
21
+ }
@@ -0,0 +1,26 @@
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.ApproveReservationBillingPaymentBulkResult = exports.ApproveReservationBillingPaymentBulkPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /** @description 예약 상품 일괄 빌링 결제 승인 Payload */
15
+ class ApproveReservationBillingPaymentBulkPayload {
16
+ }
17
+ exports.ApproveReservationBillingPaymentBulkPayload = ApproveReservationBillingPaymentBulkPayload;
18
+ __decorate([
19
+ (0, class_validator_1.IsArray)(),
20
+ (0, class_validator_1.IsMongoId)({ each: true }),
21
+ __metadata("design:type", Array)
22
+ ], ApproveReservationBillingPaymentBulkPayload.prototype, "pInfoIds", void 0);
23
+ /** @description 예약 상품 일괄 빌링 결제 승인 Result */
24
+ class ApproveReservationBillingPaymentBulkResult {
25
+ }
26
+ exports.ApproveReservationBillingPaymentBulkResult = ApproveReservationBillingPaymentBulkResult;
@@ -2,3 +2,4 @@ export * from './write-store-item-reservation-pay-try-log-init.dto';
2
2
  export * from './write-store-item-reservation-pay-try-log-after.dto';
3
3
  export * from './write-store-item-reservation-pay-try-log-done.dto';
4
4
  export * from './update-issued-coupon-reservation.dto';
5
+ export * from './approve-reservation-billing-payment-bulk.dto';
@@ -18,3 +18,4 @@ __exportStar(require("./write-store-item-reservation-pay-try-log-init.dto"), exp
18
18
  __exportStar(require("./write-store-item-reservation-pay-try-log-after.dto"), exports);
19
19
  __exportStar(require("./write-store-item-reservation-pay-try-log-done.dto"), exports);
20
20
  __exportStar(require("./update-issued-coupon-reservation.dto"), exports);
21
+ __exportStar(require("./approve-reservation-billing-payment-bulk.dto"), exports);
@@ -1,3 +1,4 @@
1
+ import { AttributionDeviceTypeEnum } from '@yolo-croket-dev/entity-v2';
1
2
  /** @description 예약 상품 결제 시도 에러 코드 */
2
3
  export declare enum ReservationPayTryLogErrorEnum {
3
4
  /** 로그인 필요 */
@@ -46,7 +47,7 @@ export declare class WriteStoreItemReservationPayTryLogInitPayload {
46
47
  /** 유저 트래킹 ID (어트리뷰션) */
47
48
  userTrackingId?: string;
48
49
  /** 어트리뷰션 디바이스 타입 */
49
- attributionDeviceType?: string;
50
+ attributionDeviceType?: AttributionDeviceTypeEnum;
50
51
  }
51
52
  export declare class WriteStoreItemReservationPayTryLogInitResult {
52
53
  payTryLogId: string;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.WriteStoreItemReservationPayTryLogInitResult = exports.WriteStoreItemReservationPayTryLogInitPayload = exports.WriteStoreItemReservationPayTryLogInitPOptionInfo = exports.WriteStoreItemReservationPayTryLogInitPOptionInfoChild = exports.ReservationPayTryLogErrorEnum = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const class_transformer_1 = require("class-transformer");
15
+ const entity_v2_1 = require("@yolo-croket-dev/entity-v2");
15
16
  /** @description 예약 상품 결제 시도 에러 코드 */
16
17
  var ReservationPayTryLogErrorEnum;
17
18
  (function (ReservationPayTryLogErrorEnum) {
@@ -96,7 +97,7 @@ __decorate([
96
97
  __metadata("design:type", String)
97
98
  ], WriteStoreItemReservationPayTryLogInitPayload.prototype, "userTrackingId", void 0);
98
99
  __decorate([
99
- (0, class_validator_1.IsString)(),
100
+ (0, class_validator_1.IsEnum)(entity_v2_1.AttributionDeviceTypeEnum),
100
101
  (0, class_validator_1.IsOptional)(),
101
102
  __metadata("design:type", String)
102
103
  ], WriteStoreItemReservationPayTryLogInitPayload.prototype, "attributionDeviceType", void 0);
@@ -1,6 +1,6 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { WriteStoreItemReservationPayTryLogInitPayload, WriteStoreItemReservationPayTryLogInitResult, WriteStoreItemReservationPayTryLogAfterPayload, WriteStoreItemReservationPayTryLogDonePayload, UpdateIssuedCouponReservationPayload } from '../dto/pay-try-log.modules/pay-try-log-reservation';
3
+ import { WriteStoreItemReservationPayTryLogInitPayload, WriteStoreItemReservationPayTryLogInitResult, WriteStoreItemReservationPayTryLogAfterPayload, WriteStoreItemReservationPayTryLogDonePayload, UpdateIssuedCouponReservationPayload, ApproveReservationBillingPaymentBulkPayload, ApproveReservationBillingPaymentBulkResult } from '../dto/pay-try-log.modules/pay-try-log-reservation';
4
4
  /**
5
5
  * @author jun
6
6
  * @description 예약 상품 결제 시도 로그 AMQP 서비스
@@ -16,6 +16,8 @@ export declare class AmqpPayTryLogReservationService {
16
16
  writeStoreItemReservationPayTryLogAfter(payload: WriteStoreItemReservationPayTryLogAfterPayload, param: AbstractParam): Promise<void>;
17
17
  /** 예약 상품 결제 시도 로그 완료 처리 */
18
18
  writeStoreItemReservationPayTryLogDone(payload: WriteStoreItemReservationPayTryLogDonePayload, param: AbstractParam): Promise<void>;
19
+ /** 예약 상품 일괄 빌링 결제 승인 (확보 처리) */
20
+ approveReservationBillingPaymentBulk(payload: ApproveReservationBillingPaymentBulkPayload, param: AbstractParam): Promise<ApproveReservationBillingPaymentBulkResult>;
19
21
  /** 예약 상품 결제 사용할 쿠폰 적용 */
20
22
  updateIssuedCouponReservation(payload: UpdateIssuedCouponReservationPayload, param: AbstractParam): Promise<void>;
21
23
  }
@@ -41,6 +41,10 @@ let AmqpPayTryLogReservationService = class AmqpPayTryLogReservationService {
41
41
  // eslint-disable-next-line max-len
42
42
  return this.amqpManager.call('예약 상품 결제 시도 로그 완료 처리', 'pay-try-log.create.store-item-reservation-done', payload, param, { isErrorThrowing: true });
43
43
  }
44
+ /** 예약 상품 일괄 빌링 결제 승인 (확보 처리) */
45
+ async approveReservationBillingPaymentBulk(payload, param) {
46
+ return this.amqpManager.call('예약 상품 일괄 빌링 결제 승인', 'pay-try-log.approve.reservation-billing-payment-bulk', payload, param, { isErrorThrowing: true });
47
+ }
44
48
  /** 예약 상품 결제 사용할 쿠폰 적용 */
45
49
  async updateIssuedCouponReservation(payload, param) {
46
50
  // eslint-disable-next-line max-len
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.47-jun.35",
3
+ "version": "0.7.47-jun.37",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",