@yolo-croket-dev/amqp-access 0.7.441-sj → 0.7.441-sj1

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.
Files changed (21) hide show
  1. package/order-server/dto/purchasedinfos/query/atlas/store-item/get-purchased-item-payment-counts-by-window.dto.d.ts +1 -3
  2. package/order-server/dto/purchasedinfos/query/atlas/store-item/get-purchased-item-payment-counts-by-window.dto.js +1 -7
  3. package/package.json +2 -2
  4. package/store-item-server/dto/store-item/command/index.d.ts +1 -1
  5. package/store-item-server/dto/store-item/command/index.js +1 -1
  6. package/store-item-server/dto/store-item/command/process-store-item-hourly-payment-counts.dto.d.ts +10 -0
  7. package/store-item-server/dto/store-item/command/{process-store-md-theme-last-hour-ranking.dto.js → process-store-item-hourly-payment-counts.dto.js} +7 -7
  8. package/store-item-server/dto/store-item/query/index.d.ts +0 -1
  9. package/store-item-server/dto/store-item/query/index.js +0 -1
  10. package/store-item-server/services/amqp.store-item.service.d.ts +6 -5
  11. package/store-item-server/services/amqp.store-item.service.js +6 -6
  12. package/user-service/dto/store-md-theme/command/index.d.ts +1 -1
  13. package/user-service/dto/store-md-theme/command/index.js +1 -1
  14. package/user-service/dto/store-md-theme/command/request-store-md-theme-admin-refresh.dto.d.ts +14 -0
  15. package/{store-item-server/dto/store-item/query/get-store-item-ranking-candidate-metas.dto.js → user-service/dto/store-md-theme/command/request-store-md-theme-admin-refresh.dto.js} +11 -11
  16. package/user-service/services/amqp.store-md-theme.service.d.ts +3 -3
  17. package/user-service/services/amqp.store-md-theme.service.js +3 -5
  18. package/store-item-server/dto/store-item/command/process-store-md-theme-last-hour-ranking.dto.d.ts +0 -10
  19. package/store-item-server/dto/store-item/query/get-store-item-ranking-candidate-metas.dto.d.ts +0 -16
  20. package/user-service/dto/store-md-theme/command/refresh-store-md-theme-ranking-snapshot.dto.d.ts +0 -27
  21. package/user-service/dto/store-md-theme/command/refresh-store-md-theme-ranking-snapshot.dto.js +0 -72
@@ -1,10 +1,8 @@
1
- /** 최근 1시간 랭킹용 결제 완료 건 집계 요청입니다. */
1
+ /** 상품별 1시간 결제 건수 집계 요청입니다. 구간 안에 결제된 모든 상품을 집계합니다(상품 지정 없음). */
2
2
  export declare class GetPurchasedItemPaymentCountsByWindowPayload {
3
3
  startedAt: string;
4
4
  endedAt: string;
5
5
  runId: string;
6
- /** 테마전 실시간 랭킹에 실제로 포함된 bounded 후보만 집계합니다. */
7
- storeItemIds: string[];
8
6
  }
9
7
  export declare class PurchasedItemPaymentCount {
10
8
  storeItemId: string;
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.GetPurchasedItemPaymentCountsByWindowResult = exports.PurchasedItemPaymentCount = exports.GetPurchasedItemPaymentCountsByWindowPayload = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- /** 최근 1시간 랭킹용 결제 완료 건 집계 요청입니다. */
14
+ /** 상품별 1시간 결제 건수 집계 요청입니다. 구간 안에 결제된 모든 상품을 집계합니다(상품 지정 없음). */
15
15
  class GetPurchasedItemPaymentCountsByWindowPayload {
16
16
  }
17
17
  exports.GetPurchasedItemPaymentCountsByWindowPayload = GetPurchasedItemPaymentCountsByWindowPayload;
@@ -27,12 +27,6 @@ __decorate([
27
27
  (0, class_validator_1.IsUUID)(),
28
28
  __metadata("design:type", String)
29
29
  ], GetPurchasedItemPaymentCountsByWindowPayload.prototype, "runId", void 0);
30
- __decorate([
31
- (0, class_validator_1.IsArray)(),
32
- (0, class_validator_1.ArrayMaxSize)(500),
33
- (0, class_validator_1.IsMongoId)({ each: true }),
34
- __metadata("design:type", Array)
35
- ], GetPurchasedItemPaymentCountsByWindowPayload.prototype, "storeItemIds", void 0);
36
30
  class PurchasedItemPaymentCount {
37
31
  }
38
32
  exports.PurchasedItemPaymentCount = PurchasedItemPaymentCount;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.441-sj",
3
+ "version": "0.7.441-sj1",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -30,4 +30,4 @@
30
30
  "dotenv": "^16.3.1",
31
31
  "@yolo-croket-dev/function": "0.3.7"
32
32
  }
33
- }
33
+ }
@@ -29,4 +29,4 @@ export * from './used-selling-bulk.dto';
29
29
  export * from './refresh-shipping-lead-time-stats.dto';
30
30
  export * from './create-additional-payment-store-item.dto';
31
31
  export * from './instant-selection-sync.dto';
32
- export * from './process-store-md-theme-last-hour-ranking.dto';
32
+ export * from './process-store-item-hourly-payment-counts.dto';
@@ -45,4 +45,4 @@ __exportStar(require("./used-selling-bulk.dto"), exports);
45
45
  __exportStar(require("./refresh-shipping-lead-time-stats.dto"), exports);
46
46
  __exportStar(require("./create-additional-payment-store-item.dto"), exports);
47
47
  __exportStar(require("./instant-selection-sync.dto"), exports);
48
- __exportStar(require("./process-store-md-theme-last-hour-ranking.dto"), exports);
48
+ __exportStar(require("./process-store-item-hourly-payment-counts.dto"), exports);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @author sj
3
+ * @description scheduler가 store-item-server에 보내는 상품별 1시간 결제 건수 정시 집계 요청입니다. 테마전과 무관합니다.
4
+ * @process store-item-server는 requestedAt을 가장 가까운 정시로 반올림해 집계 구간 종료 시각으로 쓰고,
5
+ * 아직 오지 않은 정시(1분 이내)면 그 시각까지 기다렸다가 처리합니다.
6
+ */
7
+ export declare class ProcessStoreItemHourlyPaymentCountsPayload {
8
+ /** scheduler 실행 시각(UTC ISO-8601). 없으면 수신 시각을 사용합니다. */
9
+ requestedAt?: string;
10
+ }
@@ -9,19 +9,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ProcessStoreMDThemeLastHourRankingPayload = void 0;
12
+ exports.ProcessStoreItemHourlyPaymentCountsPayload = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  /**
15
15
  * @author sj
16
- * @description 매 정시 테마전 실시간 랭킹 집계 요청입니다.
17
- * scheduler가 실행된 시각을 함께 보내면 store-item-server는 그 시각에 가장 가까운 정시를 집계 구간 종료 시각으로 사용합니다.
18
- * 수신 서버와 scheduler의 시계가 조금 달라도 정시 경계에서 구간이 누락되지 않게 하기 위함입니다.
16
+ * @description scheduler가 store-item-server에 보내는 상품별 1시간 결제 건수 정시 집계 요청입니다. 테마전과 무관합니다.
17
+ * @process store-item-server는 requestedAt을 가장 가까운 정시로 반올림해 집계 구간 종료 시각으로 쓰고,
18
+ * 아직 오지 않은 정시(1분 이내)면 그 시각까지 기다렸다가 처리합니다.
19
19
  */
20
- class ProcessStoreMDThemeLastHourRankingPayload {
20
+ class ProcessStoreItemHourlyPaymentCountsPayload {
21
21
  }
22
- exports.ProcessStoreMDThemeLastHourRankingPayload = ProcessStoreMDThemeLastHourRankingPayload;
22
+ exports.ProcessStoreItemHourlyPaymentCountsPayload = ProcessStoreItemHourlyPaymentCountsPayload;
23
23
  __decorate([
24
24
  (0, class_validator_1.IsOptional)(),
25
25
  (0, class_validator_1.IsDateString)(),
26
26
  __metadata("design:type", String)
27
- ], ProcessStoreMDThemeLastHourRankingPayload.prototype, "requestedAt", void 0);
27
+ ], ProcessStoreItemHourlyPaymentCountsPayload.prototype, "requestedAt", void 0);
@@ -38,4 +38,3 @@ export * from './get-used-store-items-by-brand-category.dto';
38
38
  export * from './check-customs-duty-and-tax-occurrence.dto';
39
39
  export * from './get-selling-store-item-ids.dto';
40
40
  export * from './get-store-items-for-admin-excel.dto';
41
- export * from './get-store-item-ranking-candidate-metas.dto';
@@ -54,4 +54,3 @@ __exportStar(require("./get-used-store-items-by-brand-category.dto"), exports);
54
54
  __exportStar(require("./check-customs-duty-and-tax-occurrence.dto"), exports);
55
55
  __exportStar(require("./get-selling-store-item-ids.dto"), exports);
56
56
  __exportStar(require("./get-store-items-for-admin-excel.dto"), exports);
57
- __exportStar(require("./get-store-item-ranking-candidate-metas.dto"), exports);
@@ -1,8 +1,7 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { ProcessStoreMDThemeLastHourRankingPayload } from '../dto/store-item/command/process-store-md-theme-last-hour-ranking.dto';
4
3
  import { GetSellingStoreItemIdsPayload, GetSellingStoreItemIdsResult } from '../dto/store-item/query/get-selling-store-item-ids.dto';
5
- import { GetStoreItemLegaciesPayload, GetStoreItemLegaciesResult, GetSellingItemIdsByStoreIdPayload, GetSellingItemIdsByStoreIdResult, GetSellerStoreCouponRegistrationStatusResult, SearchSellingStoreItemsPayload, SearchSellingStoreItemsResult, GetStoreItemsForAdminExcelPayload, GetStoreItemsForAdminExcelResult, SearchNormalSellingStoreItemsForBulkStopPayload, SearchNormalSellingStoreItemsForBulkStopResult, GetStoreItemsForESPayload, GetStoreItemsForESResult, GetLegacyStoreItemsByAtlasSearchPayload, GetLegacyStoreItemsByAtlasSearchResult, GetStoreItemIdsByAtlasSearchPayload, GetStoreItemIdsByAtlasSearchResult, GetStoreItemRankingCandidateMetasPayload, GetStoreItemRankingCandidateMetasResult, GetStoreItemInfoByIdPayload, GetStoreItemInfoByIdResult, GetSellingItemIdsByThemeIdPayload, GetSellingItemIdsByThemeIdResult, SearchStoreItemNameByIdPayload, SearchStoreItemNameByIdResult, GetSellerOwnedStoreItemByIdPayload, GetSellerOwnedStoreItemByIdResult, GetItemGroupNumsPayload, GetItemGroupNumsResult, GetRandomItemIdsPayload, GetRandomItemIdsResult, GetUsedImgItemIdsPayload, GetUsedImgItemIdsResult, GetUsedImgsItemIdsPayload, GetUsedImgsItemIdsResult, GetSellingItemIdsByCatagoryPayload, GetSellingItemIdsByCatagoryResult, PatchSoldOutItemOptionsPayload, PatchSoldOutItemOptionsResult, RegStoreItemPayload, RegStoreItemResult, EditStoreItemPayload, EditItemResult, CheckCustomsDutyAndTaxOccurrencePayload, CheckCustomsDutyAndTaxOccurrenceResult, GetStoreItemsForUpdateBrandPayload, GetStoreItemsForUpdateBrandResult, RegStoreItemBulkPayload, RegStoreItemBulkResult, GetStoreItemInfoByIdsPayload, GetStoreItemInfoByIdsResult, SearchStoreItemsForSeduceAddCartPayload, SearchStoreItemsForSeduceAddCartResult, GetStoreItemBindIssuedCouponForPaymentPayload, GetStoreItemBindIssuedCouponForPaymentResult, GetStaleStoreItemsForExcelResult, GetStaleStoreItemsForExcelPayload, GetStoreItemTooltipForCartPayload, GetStoreItemTooltipForCartResult, GetStoreItemsByBrandNamePayload, GetStoreItemsByBrandNameResult, SearchStoreItemsForTestApiPayload, SearchStoreItemsForTestApiResult, UpdateBrandNameBulkPayload, UpdateBrandEngNameBulkPayload, DeleteBrandInfoBulkPayload, DalphaUpdateBrandNameBulkPayload, PatchStoreItemOptionRemainCountByChangePurchasedOptionPayload, PatchStoreItemOptionRemainCountByChangePurchasedOptionResult, UpdateIsSellingBulkPayload, GetAreaResult, GetCityPayload, GetCityResult, GetNationPayload, GetNationResult, GetStoreItemsForExtractionByTypeResult, ResizeItemImgPayload, GetStoreInfosByItemIdsPayload, GetStoreInfosByItemIdsResult, CopyStoreItemPayload, CopyStoreItemListPayload, GetCouponCodesBySellingItemPayload, GetCouponCodesBySellingItemResult, UpdateStoreItemSecretPayload, GetSellingStoreItemsForChatPayload, GetSellingStoreItemsForChatResult, GetStoreItemsByPreBlackFridayIdPayload, GetStoreItemsByPreBlackFridayIdResult, UpdateBrandInfosPayload, UpdateBrandInfosResult, SearchRegularPriceItemsForAdminResult, SearchRegularPriceItemsForAdminPayload, UpdateRegularPriceByAdminPayload, RegRegularPriceBulkByAdminPayload, DeleteRegularPriceByAdminPayload, SearchSecretItemsForAdminPayload, SearchSecretItemsForAdminResult, RegItemNameEngBulkByAdminPayload, UpdateStoreItemGlobalInfoBulkPayload, UpdateNaverEnabledBulkPayload, UpdateIsRequiredPCCCBulkPayload, UpdateIsRequiredPCCCBulkResult, UpdateStoreItemSellerMemoPayload, UpdateStoreItemSellerMemoResult, GetStoreItemSellerMemoPayload, GetStoreItemSellerMemoResult, ResumeSellingSelectedBulkPayload, ResumeSellingAllBulkPayload, ResumeSellingBulkResult, StopSellingSelectedBulkPayload, StopSellingAllBulkPayload, StopSellingBulkResult, UsedSellingSelectedBulkPayload, UsedSellingAllBulkPayload, UsedSellingBulkResult, GetCroCareStoreItemInfoPayload, GetCroCareStoreItemInfoResult, GetStoreItemsForProductFeedPayload, GetStoreItemsForProductFeedResult, GetStoreItemsForKakaoCatalogPayload, GetStoreItemsForKakaoCatalogResult, GetMetaProductFeedSyncStatusByItemIdsPayload, GetMetaProductFeedSyncStatusByItemIdsResult, UpdateItemKeywordsBulkPayload, UpdateItemKeywordsBulkResult, SearchStoreItemsForEnuriSummaryEpPayload, SearchStoreItemsForEnuriSummaryEpResult, RefreshShippingLeadTimeStatsPayload, GetAbroadShippingStoreItemExistsResult, CreateAdditionalPaymentStoreItemPayload, CreateAdditionalPaymentStoreItemResult, GetUsedStoreItemsByBrandCategoryPayload, GetUsedStoreItemsByBrandCategoryResult, RunInstantSelectionSyncPayload, RunInstantSelectionSyncResult, BackfillInstantSelectionSyncPayload, BackfillInstantSelectionSyncResult, ResetInstantSelectionSyncPayload, ResetInstantSelectionSyncResult } from '../dto/store-item';
4
+ import { ProcessStoreItemHourlyPaymentCountsPayload, GetStoreItemLegaciesPayload, GetStoreItemLegaciesResult, GetSellingItemIdsByStoreIdPayload, GetSellingItemIdsByStoreIdResult, GetSellerStoreCouponRegistrationStatusResult, SearchSellingStoreItemsPayload, SearchSellingStoreItemsResult, GetStoreItemsForAdminExcelPayload, GetStoreItemsForAdminExcelResult, SearchNormalSellingStoreItemsForBulkStopPayload, SearchNormalSellingStoreItemsForBulkStopResult, GetStoreItemsForESPayload, GetStoreItemsForESResult, GetLegacyStoreItemsByAtlasSearchPayload, GetLegacyStoreItemsByAtlasSearchResult, GetStoreItemIdsByAtlasSearchPayload, GetStoreItemIdsByAtlasSearchResult, GetStoreItemInfoByIdPayload, GetStoreItemInfoByIdResult, GetSellingItemIdsByThemeIdPayload, GetSellingItemIdsByThemeIdResult, SearchStoreItemNameByIdPayload, SearchStoreItemNameByIdResult, GetSellerOwnedStoreItemByIdPayload, GetSellerOwnedStoreItemByIdResult, GetItemGroupNumsPayload, GetItemGroupNumsResult, GetRandomItemIdsPayload, GetRandomItemIdsResult, GetUsedImgItemIdsPayload, GetUsedImgItemIdsResult, GetUsedImgsItemIdsPayload, GetUsedImgsItemIdsResult, GetSellingItemIdsByCatagoryPayload, GetSellingItemIdsByCatagoryResult, PatchSoldOutItemOptionsPayload, PatchSoldOutItemOptionsResult, RegStoreItemPayload, RegStoreItemResult, EditStoreItemPayload, EditItemResult, CheckCustomsDutyAndTaxOccurrencePayload, CheckCustomsDutyAndTaxOccurrenceResult, GetStoreItemsForUpdateBrandPayload, GetStoreItemsForUpdateBrandResult, RegStoreItemBulkPayload, RegStoreItemBulkResult, GetStoreItemInfoByIdsPayload, GetStoreItemInfoByIdsResult, SearchStoreItemsForSeduceAddCartPayload, SearchStoreItemsForSeduceAddCartResult, GetStoreItemBindIssuedCouponForPaymentPayload, GetStoreItemBindIssuedCouponForPaymentResult, GetStaleStoreItemsForExcelResult, GetStaleStoreItemsForExcelPayload, GetStoreItemTooltipForCartPayload, GetStoreItemTooltipForCartResult, GetStoreItemsByBrandNamePayload, GetStoreItemsByBrandNameResult, SearchStoreItemsForTestApiPayload, SearchStoreItemsForTestApiResult, UpdateBrandNameBulkPayload, UpdateBrandEngNameBulkPayload, DeleteBrandInfoBulkPayload, DalphaUpdateBrandNameBulkPayload, PatchStoreItemOptionRemainCountByChangePurchasedOptionPayload, PatchStoreItemOptionRemainCountByChangePurchasedOptionResult, UpdateIsSellingBulkPayload, GetAreaResult, GetCityPayload, GetCityResult, GetNationPayload, GetNationResult, GetStoreItemsForExtractionByTypeResult, ResizeItemImgPayload, GetStoreInfosByItemIdsPayload, GetStoreInfosByItemIdsResult, CopyStoreItemPayload, CopyStoreItemListPayload, GetCouponCodesBySellingItemPayload, GetCouponCodesBySellingItemResult, UpdateStoreItemSecretPayload, GetSellingStoreItemsForChatPayload, GetSellingStoreItemsForChatResult, GetStoreItemsByPreBlackFridayIdPayload, GetStoreItemsByPreBlackFridayIdResult, UpdateBrandInfosPayload, UpdateBrandInfosResult, SearchRegularPriceItemsForAdminResult, SearchRegularPriceItemsForAdminPayload, UpdateRegularPriceByAdminPayload, RegRegularPriceBulkByAdminPayload, DeleteRegularPriceByAdminPayload, SearchSecretItemsForAdminPayload, SearchSecretItemsForAdminResult, RegItemNameEngBulkByAdminPayload, UpdateStoreItemGlobalInfoBulkPayload, UpdateNaverEnabledBulkPayload, UpdateIsRequiredPCCCBulkPayload, UpdateIsRequiredPCCCBulkResult, UpdateStoreItemSellerMemoPayload, UpdateStoreItemSellerMemoResult, GetStoreItemSellerMemoPayload, GetStoreItemSellerMemoResult, ResumeSellingSelectedBulkPayload, ResumeSellingAllBulkPayload, ResumeSellingBulkResult, StopSellingSelectedBulkPayload, StopSellingAllBulkPayload, StopSellingBulkResult, UsedSellingSelectedBulkPayload, UsedSellingAllBulkPayload, UsedSellingBulkResult, GetCroCareStoreItemInfoPayload, GetCroCareStoreItemInfoResult, GetStoreItemsForProductFeedPayload, GetStoreItemsForProductFeedResult, GetStoreItemsForKakaoCatalogPayload, GetStoreItemsForKakaoCatalogResult, GetMetaProductFeedSyncStatusByItemIdsPayload, GetMetaProductFeedSyncStatusByItemIdsResult, UpdateItemKeywordsBulkPayload, UpdateItemKeywordsBulkResult, SearchStoreItemsForEnuriSummaryEpPayload, SearchStoreItemsForEnuriSummaryEpResult, RefreshShippingLeadTimeStatsPayload, GetAbroadShippingStoreItemExistsResult, CreateAdditionalPaymentStoreItemPayload, CreateAdditionalPaymentStoreItemResult, GetUsedStoreItemsByBrandCategoryPayload, GetUsedStoreItemsByBrandCategoryResult, RunInstantSelectionSyncPayload, RunInstantSelectionSyncResult, BackfillInstantSelectionSyncPayload, BackfillInstantSelectionSyncResult, ResetInstantSelectionSyncPayload, ResetInstantSelectionSyncResult } from '../dto/store-item';
6
5
  export declare class AmqpStoreItemService {
7
6
  private readonly client;
8
7
  private readonly amqpManager;
@@ -27,8 +26,11 @@ export declare class AmqpStoreItemService {
27
26
  getLegacyStoreItemsByAtlasSearch(payload: GetLegacyStoreItemsByAtlasSearchPayload, param: AbstractParam): Promise<GetLegacyStoreItemsByAtlasSearchResult>;
28
27
  /** atlas 상품 itemIds 검색 */
29
28
  getStoreItemIdsByAtlasSearch(payload: GetStoreItemIdsByAtlasSearchPayload, param: AbstractParam): Promise<GetStoreItemIdsByAtlasSearchResult>;
30
- /** MD 테마전 랭킹의 bounded 후보에 대한 현재 판매 가능·인기순 메타만 조회한다. */
31
- getStoreItemRankingCandidateMetas(payload: GetStoreItemRankingCandidateMetasPayload, param: AbstractParam): Promise<GetStoreItemRankingCandidateMetasResult>;
29
+ /**
30
+ * 매 정시 상품별 1시간 결제 건수 집계를 요청합니다. 테마전과 무관하며, 결과는 storeitems의
31
+ * lastHourPaymentCount·lastHourPaymentWindowEndedAt에 저장됩니다.
32
+ */
33
+ processStoreItemHourlyPaymentCounts(payload: ProcessStoreItemHourlyPaymentCountsPayload, param: AbstractParam): Promise<void>;
32
34
  getSellingItemIdsByStoreId(payload: GetSellingItemIdsByStoreIdPayload, param: AbstractParam): Promise<GetSellingItemIdsByStoreIdResult>;
33
35
  getSellerStoreCouponRegistrationStatus(param: AbstractParam): Promise<GetSellerStoreCouponRegistrationStatusResult>;
34
36
  getSellingItemIdsByThemeId(payload: GetSellingItemIdsByThemeIdPayload, param: AbstractParam): Promise<GetSellingItemIdsByThemeIdResult>;
@@ -65,7 +67,6 @@ export declare class AmqpStoreItemService {
65
67
  getSellerOwnedStoreItemById(payload: GetSellerOwnedStoreItemByIdPayload, param: AbstractParam): Promise<GetSellerOwnedStoreItemByIdResult>;
66
68
  migrationStoreItemBrandInfo(param: AbstractParam): Promise<void>;
67
69
  processSoldNumsLastNDays(param: AbstractParam): Promise<void>;
68
- processStoreMDThemeLastHourRanking(payload: ProcessStoreMDThemeLastHourRankingPayload, param: AbstractParam): Promise<void>;
69
70
  processBookNumsLastNDays(param: AbstractParam): Promise<void>;
70
71
  processReviewNumsLastNDays(param: AbstractParam): Promise<void>;
71
72
  getItemGroupNums(payload: GetItemGroupNumsPayload, param: AbstractParam): Promise<GetItemGroupNumsResult>;
@@ -59,9 +59,12 @@ let AmqpStoreItemService = class AmqpStoreItemService {
59
59
  async getStoreItemIdsByAtlasSearch(payload, param) {
60
60
  return this.amqpManager.call('atlas 상품 itemIds 검색', 'store-item.get.store-item-ids-by-atlas-search', payload, param, { isErrorThrowing: true });
61
61
  }
62
- /** MD 테마전 랭킹의 bounded 후보에 대한 현재 판매 가능·인기순 메타만 조회한다. */
63
- async getStoreItemRankingCandidateMetas(payload, param) {
64
- return this.amqpManager.call('MD 테마전 랭킹 후보 메타 조회', 'store-item.get.ranking-candidate-metas', payload, param, { isErrorThrowing: true });
62
+ /**
63
+ * 매 정시 상품별 1시간 결제 건수 집계를 요청합니다. 테마전과 무관하며, 결과는 storeitems의
64
+ * lastHourPaymentCount·lastHourPaymentWindowEndedAt에 저장됩니다.
65
+ */
66
+ async processStoreItemHourlyPaymentCounts(payload, param) {
67
+ return this.amqpManager.call('상품별 1시간 결제 건수 정시 집계', 'store-item.process.hourly-payment-counts', payload, param, { isErrorThrowing: true });
65
68
  }
66
69
  async getSellingItemIdsByStoreId(payload, param) {
67
70
  return this.amqpManager.call('해당 스토어에 판매중인 상품 아이디 리스트 호출', 'store-item.get.selling-item-ids-by-store-id', payload, param, { isErrorThrowing: true });
@@ -133,9 +136,6 @@ let AmqpStoreItemService = class AmqpStoreItemService {
133
136
  async processSoldNumsLastNDays(param) {
134
137
  return this.amqpManager.call('상품 판매량 N일간 집계', 'store-item.process.sold-nums-last-n-days', {}, param, { isErrorThrowing: true });
135
138
  }
136
- async processStoreMDThemeLastHourRanking(payload, param) {
137
- return this.amqpManager.call('MDTheme 최근 1시간 랭킹 집계', 'store-item.process.store-md-theme-last-hour-ranking', payload, param, { isErrorThrowing: true });
138
- }
139
139
  async processBookNumsLastNDays(param) {
140
140
  return this.amqpManager.call('상품 찜수 N일간 집계', 'store-item.process.book-nums-last-n-days', {}, param, { isErrorThrowing: true });
141
141
  }
@@ -2,4 +2,4 @@ export * from './delete-md-theme-brand-id.dto';
2
2
  export * from './block-store-md-theme-item-index.dto';
3
3
  export * from './enqueue-due-store-md-theme-item-index-rebuilds.dto';
4
4
  export * from './request-store-md-theme-item-index-rebuild.dto';
5
- export * from './refresh-store-md-theme-ranking-snapshot.dto';
5
+ export * from './request-store-md-theme-admin-refresh.dto';
@@ -18,4 +18,4 @@ __exportStar(require("./delete-md-theme-brand-id.dto"), exports);
18
18
  __exportStar(require("./block-store-md-theme-item-index.dto"), exports);
19
19
  __exportStar(require("./enqueue-due-store-md-theme-item-index-rebuilds.dto"), exports);
20
20
  __exportStar(require("./request-store-md-theme-item-index-rebuild.dto"), exports);
21
- __exportStar(require("./refresh-store-md-theme-ranking-snapshot.dto"), exports);
21
+ __exportStar(require("./request-store-md-theme-admin-refresh.dto"), exports);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @author sj
3
+ * @description 관리자 "지금 갱신" 요청입니다. 해당 테마전의 item-index 리빌드를 즉시 요청합니다.
4
+ * @process 같은 테마는 1분에 한 번만 접수하며, 1분 안의 재요청은 429(STORE_MD_THEME_ADMIN_REFRESH_TOO_MANY_REQUESTS)입니다.
5
+ */
6
+ export declare class RequestStoreMDThemeAdminRefreshPayload {
7
+ storeMDThemeId: string;
8
+ }
9
+ export interface RequestStoreMDThemeAdminRefreshResult {
10
+ /** 접수된 rebuild revision입니다. */
11
+ revision: number;
12
+ /** 접수 시각(UTC ISO-8601)입니다. 같은 테마의 다음 요청은 이 시각부터 1분 뒤에 가능합니다. */
13
+ requestedAt: string;
14
+ }
@@ -9,17 +9,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.GetStoreItemRankingCandidateMetasResult = exports.GetStoreItemRankingCandidateMetasPayload = void 0;
12
+ exports.RequestStoreMDThemeAdminRefreshPayload = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- /** 호출 측(user-service)이 chunk 단위로 나눠 요청합니다. 후보 수 자체에는 상한을 두지 않습니다. */
15
- class GetStoreItemRankingCandidateMetasPayload {
14
+ /**
15
+ * @author sj
16
+ * @description 관리자 "지금 갱신" 요청입니다. 해당 테마전의 item-index 리빌드를 즉시 요청합니다.
17
+ * @process 같은 테마는 1분에 한 번만 접수하며, 1분 안의 재요청은 429(STORE_MD_THEME_ADMIN_REFRESH_TOO_MANY_REQUESTS)입니다.
18
+ */
19
+ class RequestStoreMDThemeAdminRefreshPayload {
16
20
  }
17
- exports.GetStoreItemRankingCandidateMetasPayload = GetStoreItemRankingCandidateMetasPayload;
21
+ exports.RequestStoreMDThemeAdminRefreshPayload = RequestStoreMDThemeAdminRefreshPayload;
18
22
  __decorate([
19
- (0, class_validator_1.IsArray)(),
20
- (0, class_validator_1.IsMongoId)({ each: true }),
21
- __metadata("design:type", Array)
22
- ], GetStoreItemRankingCandidateMetasPayload.prototype, "storeItemIds", void 0);
23
- class GetStoreItemRankingCandidateMetasResult {
24
- }
25
- exports.GetStoreItemRankingCandidateMetasResult = GetStoreItemRankingCandidateMetasResult;
23
+ (0, class_validator_1.IsMongoId)(),
24
+ __metadata("design:type", String)
25
+ ], RequestStoreMDThemeAdminRefreshPayload.prototype, "storeMDThemeId", void 0);
@@ -1,7 +1,7 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
3
  import { StoreMDThemeEntity } from '@yolo-croket-dev/entity/src/storemdtheme';
4
- import { GetStoreMDThemeByIdPayload, GetStoreMDThemeAdminPreviewPayload, GetStoreMDThemeAdminPreviewResult, SearchStoreMDThemeDetailByIdPayload, SearchStoreMDThemeDetailByIdResult, SearchStoreMDThemeIdsByItemIdPayload, SearchStoreMDThemeIdsByItemIdResult, GetStoreMDThemesByBrandNamePayload, GetStoreMDThemesByBrandNameResult, DeleteMDThemeBrandIdPayload, BlockStoreMDThemeItemIndexPayload, GetStoreMDThemePagedPayload, GetStoreMDThemeTimeDealPayload, GetStoreMDThemeRealTimeRankingPayload, GetStoreMDThemeRealTimeRankingResult, GetStoreMDThemeGroupItemsPayload, GetStoreMDThemeGroupCategoryFacetsPayload, SearchStoreMDThemeItemsPayload, EnqueueDueStoreMDThemeItemIndexRebuildsPayload, EnqueueDueStoreMDThemeItemIndexRebuildsResult, RequestStoreMDThemeItemIndexRebuildPayload, GetStoreMDThemeRankingCandidatesResult, RefreshStoreMDThemeRankingSnapshotsPayload, RequestStoreMDThemeItemIndexRebuildResult, GetStoreMDThemePagedResult, GetStoreMDThemeGroupItemsResult, GetStoreMDThemeGroupCategoryFacetsResult, SearchStoreMDThemeItemsResult } from '../dto/store-md-theme';
4
+ import { GetStoreMDThemeByIdPayload, GetStoreMDThemeAdminPreviewPayload, GetStoreMDThemeAdminPreviewResult, SearchStoreMDThemeDetailByIdPayload, SearchStoreMDThemeDetailByIdResult, SearchStoreMDThemeIdsByItemIdPayload, SearchStoreMDThemeIdsByItemIdResult, GetStoreMDThemesByBrandNamePayload, GetStoreMDThemesByBrandNameResult, DeleteMDThemeBrandIdPayload, BlockStoreMDThemeItemIndexPayload, GetStoreMDThemePagedPayload, GetStoreMDThemeTimeDealPayload, GetStoreMDThemeRealTimeRankingPayload, GetStoreMDThemeRealTimeRankingResult, GetStoreMDThemeGroupItemsPayload, GetStoreMDThemeGroupCategoryFacetsPayload, SearchStoreMDThemeItemsPayload, EnqueueDueStoreMDThemeItemIndexRebuildsPayload, EnqueueDueStoreMDThemeItemIndexRebuildsResult, RequestStoreMDThemeItemIndexRebuildPayload, RequestStoreMDThemeAdminRefreshPayload, RequestStoreMDThemeAdminRefreshResult, RequestStoreMDThemeItemIndexRebuildResult, GetStoreMDThemePagedResult, GetStoreMDThemeGroupItemsResult, GetStoreMDThemeGroupCategoryFacetsResult, SearchStoreMDThemeItemsResult } from '../dto/store-md-theme';
5
5
  export declare class AmqpStoreMdThemeService {
6
6
  private readonly client;
7
7
  private readonly amqpManager;
@@ -26,6 +26,6 @@ export declare class AmqpStoreMdThemeService {
26
26
  blockStoreMDThemeItemIndex(payload: BlockStoreMDThemeItemIndexPayload, param: AbstractParam): Promise<void>;
27
27
  enqueueDueStoreMDThemeItemIndexRebuilds(payload: EnqueueDueStoreMDThemeItemIndexRebuildsPayload, param: AbstractParam): Promise<EnqueueDueStoreMDThemeItemIndexRebuildsResult>;
28
28
  requestStoreMDThemeItemIndexRebuild(payload: RequestStoreMDThemeItemIndexRebuildPayload, param: AbstractParam): Promise<RequestStoreMDThemeItemIndexRebuildResult>;
29
- getStoreMDThemeRankingCandidates(param: AbstractParam): Promise<GetStoreMDThemeRankingCandidatesResult>;
30
- refreshStoreMDThemeRankingSnapshots(payload: RefreshStoreMDThemeRankingSnapshotsPayload, param: AbstractParam): Promise<void>;
29
+ /** 관리자 "지금 갱신": 테마전 item-index 리빌드를 즉시 요청합니다(같은 테마 1분 쿨다운). */
30
+ requestStoreMDThemeAdminRefresh(payload: RequestStoreMDThemeAdminRefreshPayload, param: AbstractParam): Promise<RequestStoreMDThemeAdminRefreshResult>;
31
31
  }
@@ -69,11 +69,9 @@ let AmqpStoreMdThemeService = class AmqpStoreMdThemeService {
69
69
  async requestStoreMDThemeItemIndexRebuild(payload, param) {
70
70
  return this.amqpManager.call('MDTheme item index rebuild request', 'store-md-theme.request-item-index-rebuild', payload, param, { isErrorThrowing: true });
71
71
  }
72
- async getStoreMDThemeRankingCandidates(param) {
73
- return this.amqpManager.call('MDTheme 실시간 랭킹 후보 조회', 'store-md-theme.get.ranking-candidates', undefined, param, { isErrorThrowing: true });
74
- }
75
- async refreshStoreMDThemeRankingSnapshots(payload, param) {
76
- return this.amqpManager.call('MDTheme 실시간 랭킹 snapshot 갱신', 'store-md-theme.refresh.ranking-snapshots', payload, param, { isErrorThrowing: true });
72
+ /** 관리자 "지금 갱신": 테마전 item-index 리빌드를 즉시 요청합니다(같은 테마 1분 쿨다운). */
73
+ async requestStoreMDThemeAdminRefresh(payload, param) {
74
+ return this.amqpManager.call('MDTheme 관리자 즉시 갱신', 'store-md-theme.request-admin-refresh', payload, param, { isErrorThrowing: true });
77
75
  }
78
76
  };
79
77
  exports.AmqpStoreMdThemeService = AmqpStoreMdThemeService;
@@ -1,10 +0,0 @@
1
- /**
2
- * @author sj
3
- * @description 매 정시 테마전 실시간 랭킹 집계 요청입니다.
4
- * scheduler가 실행된 시각을 함께 보내면 store-item-server는 그 시각에 가장 가까운 정시를 집계 구간 종료 시각으로 사용합니다.
5
- * 수신 서버와 scheduler의 시계가 조금 달라도 정시 경계에서 구간이 누락되지 않게 하기 위함입니다.
6
- */
7
- export declare class ProcessStoreMDThemeLastHourRankingPayload {
8
- /** scheduler 실행 시각(UTC ISO-8601). 없으면 수신 서버의 현재 시각을 사용합니다. */
9
- requestedAt?: string;
10
- }
@@ -1,16 +0,0 @@
1
- /** 호출 측(user-service)이 chunk 단위로 나눠 요청합니다. 후보 수 자체에는 상한을 두지 않습니다. */
2
- export declare class GetStoreItemRankingCandidateMetasPayload {
3
- storeItemIds: string[];
4
- }
5
- export declare class GetStoreItemRankingCandidateMetasResult {
6
- items: Array<{
7
- itemId: string;
8
- mainCategory: string;
9
- popularitySortValues: {
10
- clickNums: number;
11
- soldNumsLastNdays: number;
12
- reviewCount: number;
13
- regDate: string;
14
- };
15
- }>;
16
- }
@@ -1,27 +0,0 @@
1
- /** 실시간 랭킹 집계 대상으로 공개 중인 테마전의 active generation 후보입니다. */
2
- export declare class StoreMDThemeRankingCandidate {
3
- storeMDThemeId: string;
4
- generationId: string;
5
- storeItemIds: string[];
6
- }
7
- export declare class GetStoreMDThemeRankingCandidatesResult {
8
- themes: StoreMDThemeRankingCandidate[];
9
- }
10
- export declare class StoreMDThemeRankingScore {
11
- storeItemId: string;
12
- paymentCount: number;
13
- }
14
- export declare class StoreMDThemeRankingSnapshotTheme {
15
- storeMDThemeId: string;
16
- generationId: string;
17
- scores: StoreMDThemeRankingScore[];
18
- }
19
- /**
20
- * store-item-server가 최근 완료 1시간 구간의 결제 건수를 계산한 뒤 user-service에 전달하는 payload입니다.
21
- * 후보에 없는 상품과 stale generation은 user-service가 저장하지 않습니다.
22
- */
23
- export declare class RefreshStoreMDThemeRankingSnapshotsPayload {
24
- windowEndedAt: string;
25
- processedAt: string;
26
- themes: StoreMDThemeRankingSnapshotTheme[];
27
- }
@@ -1,72 +0,0 @@
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.RefreshStoreMDThemeRankingSnapshotsPayload = exports.StoreMDThemeRankingSnapshotTheme = exports.StoreMDThemeRankingScore = exports.GetStoreMDThemeRankingCandidatesResult = exports.StoreMDThemeRankingCandidate = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const class_transformer_1 = require("class-transformer");
15
- /** 실시간 랭킹 집계 대상으로 공개 중인 테마전의 active generation 후보입니다. */
16
- class StoreMDThemeRankingCandidate {
17
- }
18
- exports.StoreMDThemeRankingCandidate = StoreMDThemeRankingCandidate;
19
- class GetStoreMDThemeRankingCandidatesResult {
20
- }
21
- exports.GetStoreMDThemeRankingCandidatesResult = GetStoreMDThemeRankingCandidatesResult;
22
- class StoreMDThemeRankingScore {
23
- }
24
- exports.StoreMDThemeRankingScore = StoreMDThemeRankingScore;
25
- __decorate([
26
- (0, class_validator_1.IsMongoId)(),
27
- __metadata("design:type", String)
28
- ], StoreMDThemeRankingScore.prototype, "storeItemId", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsInt)(),
31
- (0, class_validator_1.Min)(1),
32
- (0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
33
- __metadata("design:type", Number)
34
- ], StoreMDThemeRankingScore.prototype, "paymentCount", void 0);
35
- class StoreMDThemeRankingSnapshotTheme {
36
- }
37
- exports.StoreMDThemeRankingSnapshotTheme = StoreMDThemeRankingSnapshotTheme;
38
- __decorate([
39
- (0, class_validator_1.IsMongoId)(),
40
- __metadata("design:type", String)
41
- ], StoreMDThemeRankingSnapshotTheme.prototype, "storeMDThemeId", void 0);
42
- __decorate([
43
- (0, class_validator_1.IsString)(),
44
- __metadata("design:type", String)
45
- ], StoreMDThemeRankingSnapshotTheme.prototype, "generationId", void 0);
46
- __decorate([
47
- (0, class_validator_1.IsArray)(),
48
- (0, class_validator_1.ValidateNested)({ each: true }),
49
- (0, class_transformer_1.Type)(() => StoreMDThemeRankingScore),
50
- __metadata("design:type", Array)
51
- ], StoreMDThemeRankingSnapshotTheme.prototype, "scores", void 0);
52
- /**
53
- * store-item-server가 최근 완료 1시간 구간의 결제 건수를 계산한 뒤 user-service에 전달하는 payload입니다.
54
- * 후보에 없는 상품과 stale generation은 user-service가 저장하지 않습니다.
55
- */
56
- class RefreshStoreMDThemeRankingSnapshotsPayload {
57
- }
58
- exports.RefreshStoreMDThemeRankingSnapshotsPayload = RefreshStoreMDThemeRankingSnapshotsPayload;
59
- __decorate([
60
- (0, class_validator_1.IsDateString)(),
61
- __metadata("design:type", String)
62
- ], RefreshStoreMDThemeRankingSnapshotsPayload.prototype, "windowEndedAt", void 0);
63
- __decorate([
64
- (0, class_validator_1.IsDateString)(),
65
- __metadata("design:type", String)
66
- ], RefreshStoreMDThemeRankingSnapshotsPayload.prototype, "processedAt", void 0);
67
- __decorate([
68
- (0, class_validator_1.IsArray)(),
69
- (0, class_validator_1.ValidateNested)({ each: true }),
70
- (0, class_transformer_1.Type)(() => StoreMDThemeRankingSnapshotTheme),
71
- __metadata("design:type", Array)
72
- ], RefreshStoreMDThemeRankingSnapshotsPayload.prototype, "themes", void 0);