@yolo-croket-dev/amqp-access 0.7.397 → 0.7.399

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.
@@ -1,11 +1,17 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { SendTemplateNotificationPayload, SendTemplateNotificationBulkPayload, SendTemplateNotificationBulkResult, SendSellerOverseasPhoneVerificationSmsPayload, SendSellerOverseasPhoneVerificationSmsResult } from '../dto/notification';
3
+ import { SendTemplateNotificationConcurrencyPayload, SendTemplateNotificationConcurrencyResult, SendTemplateNotificationPayload, SendTemplateNotificationBulkPayload, SendTemplateNotificationBulkResult, SendSellerOverseasPhoneVerificationSmsPayload, SendSellerOverseasPhoneVerificationSmsResult } from '../dto/notification';
4
4
  export declare class AmqpSendNotificationService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
7
7
  constructor(client: ClientProxy);
8
8
  sendTemplateNotification(payload: SendTemplateNotificationPayload, param: AbstractParam): Promise<boolean>;
9
+ /**
10
+ * @author 홍준
11
+ * @description 기존 notification-service 동시성 제한 발송 경로 호출
12
+ * @process 서비스 내부 worker 수를 제한하여 완료 즉시 다음 알림 처리
13
+ */
14
+ sendTemplateNotificationConcurrency(payload: SendTemplateNotificationConcurrencyPayload, param: AbstractParam): Promise<SendTemplateNotificationConcurrencyResult>;
9
15
  sendTemplateNotificationBulk(payload: SendTemplateNotificationBulkPayload, param: AbstractParam): Promise<SendTemplateNotificationBulkResult>;
10
16
  /**
11
17
  * @author sj
@@ -24,6 +24,14 @@ let AmqpSendNotificationService = class AmqpSendNotificationService {
24
24
  async sendTemplateNotification(payload, param) {
25
25
  return this.amqpManager.call('알림 보내기', 'notification.template.send', payload, param, { isErrorThrowing: true });
26
26
  }
27
+ /**
28
+ * @author 홍준
29
+ * @description 기존 notification-service 동시성 제한 발송 경로 호출
30
+ * @process 서비스 내부 worker 수를 제한하여 완료 즉시 다음 알림 처리
31
+ */
32
+ async sendTemplateNotificationConcurrency(payload, param) {
33
+ return this.amqpManager.call('알림 동시성 제한 발송', 'notification.send.template-notification-concurrency', payload, param, { isErrorThrowing: true });
34
+ }
27
35
  async sendTemplateNotificationBulk(payload, param) {
28
36
  return this.amqpManager.call('알림 보내기 Bulk', 'notification.template.bulk-send', payload, param, { isErrorThrowing: true });
29
37
  }
@@ -6,3 +6,5 @@ export * from './change-reservation-card-quota.dto';
6
6
  export * from './change-reservation-billing-card.dto';
7
7
  export * from './retry-reservation-billing-payment.dto';
8
8
  export * from './send-reservation-period-changed-notification.dto';
9
+ export * from './reservation-period-changed-notification-by-ids.dto';
10
+ export * from './reservation-period-changed-notification-bulk.policy';
@@ -22,3 +22,5 @@ __exportStar(require("./change-reservation-card-quota.dto"), exports);
22
22
  __exportStar(require("./change-reservation-billing-card.dto"), exports);
23
23
  __exportStar(require("./retry-reservation-billing-payment.dto"), exports);
24
24
  __exportStar(require("./send-reservation-period-changed-notification.dto"), exports);
25
+ __exportStar(require("./reservation-period-changed-notification-by-ids.dto"), exports);
26
+ __exportStar(require("./reservation-period-changed-notification-bulk.policy"), exports);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @author 홍준
3
+ * @description 관리자 예약 기간 변경 알림의 입력·배치·간격 상한
4
+ * @process 클라이언트와 서버에서 동일한 제한 사용
5
+ */
6
+ export declare const RESERVATION_NOTIFICATION_MAX_IDS = 2000;
7
+ export declare const RESERVATION_NOTIFICATION_BATCH_SIZE = 100;
8
+ export declare const RESERVATION_NOTIFICATION_CONCURRENCY = 5;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RESERVATION_NOTIFICATION_CONCURRENCY = exports.RESERVATION_NOTIFICATION_BATCH_SIZE = exports.RESERVATION_NOTIFICATION_MAX_IDS = void 0;
4
+ /**
5
+ * @author 홍준
6
+ * @description 관리자 예약 기간 변경 알림의 입력·배치·간격 상한
7
+ * @process 클라이언트와 서버에서 동일한 제한 사용
8
+ */
9
+ exports.RESERVATION_NOTIFICATION_MAX_IDS = 2000;
10
+ exports.RESERVATION_NOTIFICATION_BATCH_SIZE = 100;
11
+ exports.RESERVATION_NOTIFICATION_CONCURRENCY = 5;
@@ -0,0 +1,25 @@
1
+ export declare class PrepareReservationPeriodChangedNotificationByIdsPayload {
2
+ purchasedInfoIds: string[];
3
+ }
4
+ export declare class SendReservationPeriodChangedNotificationByIdsPayload {
5
+ purchasedInfoIds: string[];
6
+ }
7
+ export interface ReservationPeriodChangedNotificationTarget {
8
+ purchasedInfoId: string;
9
+ buyerId: string;
10
+ itemId: string;
11
+ itemName: string;
12
+ buyerUsername: string;
13
+ purchaseReceiptId: string;
14
+ reservationPeriod: string;
15
+ }
16
+ export interface PrepareReservationPeriodChangedNotificationByIdsResult {
17
+ inputCount: number;
18
+ targetCount: number;
19
+ targets: ReservationPeriodChangedNotificationTarget[];
20
+ }
21
+ export interface SendReservationPeriodChangedNotificationByIdsResult {
22
+ targetCount: number;
23
+ successCount: number;
24
+ failCount: number;
25
+ }
@@ -0,0 +1,39 @@
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.SendReservationPeriodChangedNotificationByIdsPayload = exports.PrepareReservationPeriodChangedNotificationByIdsPayload = void 0;
13
+ /**
14
+ * @author 홍준
15
+ * @description 결제 ID 목록을 통한 예약 기간 변경 알림의 조회·발송 계약
16
+ * @process 전체 대상 미리보기 → 대표 결제 ID를 소량씩 발송
17
+ */
18
+ const class_validator_1 = require("class-validator");
19
+ const reservation_period_changed_notification_bulk_policy_1 = require("./reservation-period-changed-notification-bulk.policy");
20
+ class PrepareReservationPeriodChangedNotificationByIdsPayload {
21
+ }
22
+ exports.PrepareReservationPeriodChangedNotificationByIdsPayload = PrepareReservationPeriodChangedNotificationByIdsPayload;
23
+ __decorate([
24
+ (0, class_validator_1.IsArray)(),
25
+ (0, class_validator_1.ArrayMinSize)(1),
26
+ (0, class_validator_1.ArrayMaxSize)(reservation_period_changed_notification_bulk_policy_1.RESERVATION_NOTIFICATION_MAX_IDS),
27
+ (0, class_validator_1.IsMongoId)({ each: true }),
28
+ __metadata("design:type", Array)
29
+ ], PrepareReservationPeriodChangedNotificationByIdsPayload.prototype, "purchasedInfoIds", void 0);
30
+ class SendReservationPeriodChangedNotificationByIdsPayload {
31
+ }
32
+ exports.SendReservationPeriodChangedNotificationByIdsPayload = SendReservationPeriodChangedNotificationByIdsPayload;
33
+ __decorate([
34
+ (0, class_validator_1.IsArray)(),
35
+ (0, class_validator_1.ArrayMinSize)(1),
36
+ (0, class_validator_1.ArrayMaxSize)(reservation_period_changed_notification_bulk_policy_1.RESERVATION_NOTIFICATION_BATCH_SIZE),
37
+ (0, class_validator_1.IsMongoId)({ each: true }),
38
+ __metadata("design:type", Array)
39
+ ], SendReservationPeriodChangedNotificationByIdsPayload.prototype, "purchasedInfoIds", void 0);
@@ -1,6 +1,6 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { SendReservationPeriodChangedNotificationPayload, SendReservationPeriodChangedNotificationResult, ApproveReservationBillingPaymentBulkPayload, ApproveReservationBillingPaymentBulkResult, CancelReservationByBuyerPayload, CancelReservationResult, CancelReservationByAdminPayload, CancelReservationByAdminBulkPayload, CancelReservationByAdminBulkResult, ChangeReservationCardQuotaPayload, ChangeReservationBillingCardPayload, RetryReservationBillingPaymentPayload, RetryReservationBillingPaymentResult, GetReservationForExcelByAdminPayload, GetReservationForExcelByAdminResult, GetReservationListForAdminPayload, GetReservationListForAdminResult } from '../../dto/purchased-info.modules/purchased-info-reservation';
3
+ import { PrepareReservationPeriodChangedNotificationByIdsPayload, PrepareReservationPeriodChangedNotificationByIdsResult, SendReservationPeriodChangedNotificationByIdsPayload, SendReservationPeriodChangedNotificationByIdsResult, SendReservationPeriodChangedNotificationPayload, SendReservationPeriodChangedNotificationResult, ApproveReservationBillingPaymentBulkPayload, ApproveReservationBillingPaymentBulkResult, CancelReservationByBuyerPayload, CancelReservationResult, CancelReservationByAdminPayload, CancelReservationByAdminBulkPayload, CancelReservationByAdminBulkResult, ChangeReservationCardQuotaPayload, ChangeReservationBillingCardPayload, RetryReservationBillingPaymentPayload, RetryReservationBillingPaymentResult, GetReservationForExcelByAdminPayload, GetReservationForExcelByAdminResult, GetReservationListForAdminPayload, GetReservationListForAdminResult } from '../../dto/purchased-info.modules/purchased-info-reservation';
4
4
  export declare class AmqpPurchasedInfoReservationService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
@@ -11,6 +11,18 @@ export declare class AmqpPurchasedInfoReservationService {
11
11
  * @process order-server의 구매자 중복 제거 및 템플릿 발송 결과 반환
12
12
  */
13
13
  sendReservationPeriodChangedNotification(payload: SendReservationPeriodChangedNotificationPayload, param: AbstractParam): Promise<SendReservationPeriodChangedNotificationResult>;
14
+ /**
15
+ * @author 홍준
16
+ * @description 결제 ID 목록 예약 기간 변경 알림 prepare
17
+ * @process order-server에 인증 문맥과 ID 목록 전달
18
+ */
19
+ prepareReservationPeriodChangedNotificationByIds(payload: PrepareReservationPeriodChangedNotificationByIdsPayload, param: AbstractParam): Promise<PrepareReservationPeriodChangedNotificationByIdsResult>;
20
+ /**
21
+ * @author 홍준
22
+ * @description 결제 ID 목록 예약 기간 변경 알림 send
23
+ * @process order-server에 인증 문맥과 ID 목록 전달
24
+ */
25
+ sendReservationPeriodChangedNotificationByIds(payload: SendReservationPeriodChangedNotificationByIdsPayload, param: AbstractParam): Promise<SendReservationPeriodChangedNotificationByIdsResult>;
14
26
  /** 예약 상품 일괄 빌링 결제 승인 (확보 처리) */
15
27
  approveReservationBillingPaymentBulk(payload: ApproveReservationBillingPaymentBulkPayload, param: AbstractParam): Promise<ApproveReservationBillingPaymentBulkResult>;
16
28
  /** 구매자의 예약 취소 */
@@ -34,6 +34,22 @@ let AmqpPurchasedInfoReservationService = class AmqpPurchasedInfoReservationServ
34
34
  async sendReservationPeriodChangedNotification(payload, param) {
35
35
  return this.amqpManager.call('예약 기간 변경 알림 발송', 'purchased-info-reservation.send.period-changed-notification', payload, param, { isErrorThrowing: true });
36
36
  }
37
+ /**
38
+ * @author 홍준
39
+ * @description 결제 ID 목록 예약 기간 변경 알림 prepare
40
+ * @process order-server에 인증 문맥과 ID 목록 전달
41
+ */
42
+ async prepareReservationPeriodChangedNotificationByIds(payload, param) {
43
+ return this.amqpManager.call('결제 ID별 예약 기간 변경 알림 prepare', 'purchased-info-reservation.prepare.period-changed-notification-by-ids', payload, param, { isErrorThrowing: true });
44
+ }
45
+ /**
46
+ * @author 홍준
47
+ * @description 결제 ID 목록 예약 기간 변경 알림 send
48
+ * @process order-server에 인증 문맥과 ID 목록 전달
49
+ */
50
+ async sendReservationPeriodChangedNotificationByIds(payload, param) {
51
+ return this.amqpManager.call('결제 ID별 예약 기간 변경 알림 send', 'purchased-info-reservation.send.period-changed-notification-by-ids', payload, param, { isErrorThrowing: true });
52
+ }
37
53
  /** 예약 상품 일괄 빌링 결제 승인 (확보 처리) */
38
54
  async approveReservationBillingPaymentBulk(payload, param) {
39
55
  return this.amqpManager.call('예약 상품 일괄 빌링 결제 승인', 'purchased-info-reservation.approve.billing-payment-bulk', 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.397",
3
+ "version": "0.7.399",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -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" | "couponInfo" | "publicId" | "pastStoreInfo" | "expectedSettleDateString" | "adType" | "adCenterStartDateString" | "adCenterEndDateString" | "actualSettleDateString" | "PInfoId" | "transactionInfo" | "subtractionSettleAmountInfo" | "bizMemo" | "financeMemo" | "settlementManagerInfo" | "googleSheetInfo">>;
3
+ declare const AdCenterSettleForGoogleSheet_base: import("@nestjs/common/interfaces").Type<Pick<AdCenterSettle, "_id" | "sellerId" | "couponInfo" | "publicId" | "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: {