@chevre/domain 20.2.0-alpha.9 → 20.2.0

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 (135) hide show
  1. package/example/src/chevre/aggregateEventReservation.ts +37 -0
  2. package/example/src/chevre/aggregation/aggregateSystem.ts +116 -0
  3. package/example/src/chevre/attendIfNotAttended.ts +22 -0
  4. package/example/src/chevre/createManyEventsIfNotExist.ts +209 -0
  5. package/example/src/chevre/findByOrderNumberAndReservationId.ts +20 -0
  6. package/example/src/chevre/findScreeningRoomsByBranchCode.ts +27 -0
  7. package/example/src/chevre/importEventsFromCOA.ts +8 -1
  8. package/example/src/chevre/migrateEventOffersItemOfferedAvailableChannel.ts +2 -1
  9. package/example/src/chevre/migrateOwnershipInfos2newUserPool.ts +1 -1
  10. package/example/src/chevre/migrateProjectSubscription.ts +51 -0
  11. package/example/src/chevre/ownershipInfosCsv2peopleJson.ts +2 -2
  12. package/example/src/chevre/processReserve.ts +2 -0
  13. package/example/src/chevre/searchEventIds.ts +24 -0
  14. package/example/src/chevre/searchEventTicketOffers.ts +5 -4
  15. package/example/src/chevre/searchEvents.ts +20 -41
  16. package/example/src/chevre/searchOffersByCatalog.ts +27 -0
  17. package/example/src/chevre/updateTransaction.ts +38 -0
  18. package/lib/chevre/factory/event.d.ts +2 -0
  19. package/lib/chevre/factory/event.js +2 -0
  20. package/lib/chevre/repo/action.d.ts +77 -1
  21. package/lib/chevre/repo/action.js +249 -6
  22. package/lib/chevre/repo/aggregation.d.ts +38 -0
  23. package/lib/chevre/repo/aggregation.js +68 -0
  24. package/lib/chevre/repo/assetTransaction.d.ts +32 -0
  25. package/lib/chevre/repo/assetTransaction.js +148 -0
  26. package/lib/chevre/repo/code.d.ts +13 -16
  27. package/lib/chevre/repo/code.js +33 -19
  28. package/lib/chevre/repo/creativeWork.js +13 -12
  29. package/lib/chevre/repo/event.d.ts +64 -17
  30. package/lib/chevre/repo/event.js +456 -156
  31. package/lib/chevre/repo/mongoose/model/aggregation.d.ts +7 -0
  32. package/lib/chevre/repo/mongoose/model/aggregation.js +47 -0
  33. package/lib/chevre/repo/mongoose/model/event.js +4 -3
  34. package/lib/chevre/repo/mongoose/model/offer.js +2 -1
  35. package/lib/chevre/repo/mongoose/model/project.js +7 -1
  36. package/lib/chevre/repo/mongoose/model/telemetry.js +4 -28
  37. package/lib/chevre/repo/offer.d.ts +10 -0
  38. package/lib/chevre/repo/offer.js +47 -16
  39. package/lib/chevre/repo/order.d.ts +6 -0
  40. package/lib/chevre/repo/order.js +53 -7
  41. package/lib/chevre/repo/place.d.ts +26 -1
  42. package/lib/chevre/repo/place.js +216 -12
  43. package/lib/chevre/repo/product.d.ts +1 -0
  44. package/lib/chevre/repo/product.js +5 -0
  45. package/lib/chevre/repo/project.d.ts +7 -1
  46. package/lib/chevre/repo/project.js +15 -6
  47. package/lib/chevre/repo/reservation.d.ts +7 -8
  48. package/lib/chevre/repo/reservation.js +181 -76
  49. package/lib/chevre/repo/task.d.ts +31 -4
  50. package/lib/chevre/repo/task.js +146 -33
  51. package/lib/chevre/repo/transaction.d.ts +57 -5
  52. package/lib/chevre/repo/transaction.js +228 -34
  53. package/lib/chevre/repo/trip.js +33 -27
  54. package/lib/chevre/repository.d.ts +3 -0
  55. package/lib/chevre/repository.js +5 -1
  56. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +72 -60
  57. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +5 -8
  58. package/lib/chevre/service/aggregation/system.d.ts +100 -0
  59. package/lib/chevre/service/aggregation/system.js +409 -0
  60. package/lib/chevre/service/aggregation.d.ts +2 -0
  61. package/lib/chevre/service/aggregation.js +3 -1
  62. package/lib/chevre/service/assetTransaction/pay/movieTicket/validation.js +5 -1
  63. package/lib/chevre/service/assetTransaction/pay/potentialActions.js +0 -3
  64. package/lib/chevre/service/assetTransaction/pay.d.ts +19 -4
  65. package/lib/chevre/service/assetTransaction/pay.js +65 -32
  66. package/lib/chevre/service/assetTransaction/registerService.js +4 -1
  67. package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +3 -0
  68. package/lib/chevre/service/assetTransaction/reserve/factory.js +33 -2
  69. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.d.ts +16 -0
  70. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.js +84 -0
  71. package/lib/chevre/service/assetTransaction/reserve.d.ts +38 -6
  72. package/lib/chevre/service/assetTransaction/reserve.js +120 -94
  73. package/lib/chevre/service/assetTransaction.d.ts +1 -1
  74. package/lib/chevre/service/code.d.ts +2 -3
  75. package/lib/chevre/service/delivery/factory.d.ts +1 -1
  76. package/lib/chevre/service/delivery/product/factory.js +9 -3
  77. package/lib/chevre/service/event.d.ts +2 -4
  78. package/lib/chevre/service/event.js +35 -14
  79. package/lib/chevre/service/offer/event/authorize.d.ts +4 -7
  80. package/lib/chevre/service/offer/event/authorize.js +33 -87
  81. package/lib/chevre/service/offer/event/cancel.js +0 -1
  82. package/lib/chevre/service/offer/event/factory.d.ts +3 -2
  83. package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +14 -7
  84. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +95 -53
  85. package/lib/chevre/service/offer/event/voidTransaction.js +0 -2
  86. package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +2 -1
  87. package/lib/chevre/service/offer/eventServiceByCOA.js +10 -2
  88. package/lib/chevre/service/offer/factory.js +10 -3
  89. package/lib/chevre/service/offer/product/searchProductOffers.d.ts +1 -0
  90. package/lib/chevre/service/offer/product/searchProductOffers.js +1 -1
  91. package/lib/chevre/service/offer/product.d.ts +1 -0
  92. package/lib/chevre/service/offer/product.js +7 -2
  93. package/lib/chevre/service/offer.d.ts +13 -2
  94. package/lib/chevre/service/offer.js +68 -46
  95. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +23 -26
  96. package/lib/chevre/service/order/returnOrder.js +6 -4
  97. package/lib/chevre/service/order/sendOrder.js +4 -2
  98. package/lib/chevre/service/payment/any.d.ts +9 -0
  99. package/lib/chevre/service/payment/any.js +16 -1
  100. package/lib/chevre/service/payment/movieTicket.d.ts +2 -2
  101. package/lib/chevre/service/payment/movieTicket.js +8 -2
  102. package/lib/chevre/service/product.js +5 -3
  103. package/lib/chevre/service/report/telemetry.js +1 -1
  104. package/lib/chevre/service/reserve/checkInReservation.js +2 -2
  105. package/lib/chevre/service/reserve/confirmReservation.js +7 -10
  106. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +2 -1
  107. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -1
  108. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -1
  109. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +32 -35
  110. package/lib/chevre/service/reserve/useReservation.d.ts +0 -3
  111. package/lib/chevre/service/reserve/useReservation.js +58 -33
  112. package/lib/chevre/service/task/confirmPayTransaction.js +20 -1
  113. package/lib/chevre/service/task/confirmReserveTransaction.d.ts +4 -0
  114. package/lib/chevre/service/task/confirmReserveTransaction.js +5 -5
  115. package/lib/chevre/service/task/importEventsFromCOA.js +3 -1
  116. package/lib/chevre/service/task/returnPayTransaction.js +10 -4
  117. package/lib/chevre/service/task.js +6 -9
  118. package/lib/chevre/service/transaction/moneyTransfer.js +9 -1
  119. package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.d.ts +1 -1
  120. package/lib/chevre/service/transaction/orderProgramMembership.js +6 -6
  121. package/lib/chevre/service/transaction/placeOrder.js +5 -3
  122. package/lib/chevre/service/transaction/placeOrderInProgress/factory.d.ts +1 -1
  123. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +0 -2
  124. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +2 -11
  125. package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateSeller.d.ts +1 -1
  126. package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +3 -8
  127. package/lib/chevre/service/transaction/placeOrderInProgress.js +92 -107
  128. package/lib/chevre/service/transaction/returnOrder.js +8 -6
  129. package/lib/chevre/settings.d.ts +2 -0
  130. package/lib/chevre/settings.js +20 -12
  131. package/package.json +3 -3
  132. package/example/src/chevre/aggregateReservationOnProject.ts +0 -32
  133. package/example/src/chevre/migratePlaceAdditionalProperties.ts +0 -162
  134. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmPay.d.ts +0 -6
  135. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmPay.js +0 -65
@@ -15,6 +15,7 @@ exports.aggregateByEvent = exports.aggregateScreeningEvent = void 0;
15
15
  */
16
16
  const createDebug = require("debug");
17
17
  const moment = require("moment-timezone");
18
+ const event_1 = require("../../../repo/event");
18
19
  const factory = require("../../../factory");
19
20
  const debug = createDebug('chevre-domain:service');
20
21
  /**
@@ -23,7 +24,9 @@ const debug = createDebug('chevre-domain:service');
23
24
  function aggregateScreeningEvent(params) {
24
25
  return (repos) => __awaiter(this, void 0, void 0, function* () {
25
26
  // 集計対象イベント検索
26
- const event = yield repos.event.findById(params);
27
+ // イベント取得属性最適化(2023-01-23~)
28
+ // const event = await repos.event.findById<factory.eventType.ScreeningEvent | factory.eventType.Event>(params);
29
+ const event = yield repos.event.findMinimizedIndividualEventById(params);
27
30
  let aggregatingEvents = [event];
28
31
  const availableOffers = yield findOffers({ event })(repos);
29
32
  const offerRateLimitExists = availableOffers.some((o) => { var _a; return typeof ((_a = o.validRateLimit) === null || _a === void 0 ? void 0 : _a.scope) === 'string'; });
@@ -36,6 +39,7 @@ function aggregateScreeningEvent(params) {
36
39
  .add(1, 'hour')
37
40
  .add(-1, 'second')
38
41
  .toDate();
42
+ // 取得属性最適化(2023-01-25~)
39
43
  aggregatingEvents = yield repos.event.search({
40
44
  limit: 100,
41
45
  page: 1,
@@ -45,7 +49,7 @@ function aggregateScreeningEvent(params) {
45
49
  startFrom: startFrom,
46
50
  startThrough: startThrough,
47
51
  location: { branchCode: { $eq: event.location.branchCode } }
48
- });
52
+ }, event_1.PROJECTION_MINIMIZED_EVENT);
49
53
  // ID指定されたイベントについてはEventScheduledでなくても集計したいので、集計対象を調整
50
54
  aggregatingEvents = aggregatingEvents.filter((e) => e.id !== event.id);
51
55
  aggregatingEvents = [event, ...aggregatingEvents];
@@ -59,22 +63,36 @@ function aggregateScreeningEvent(params) {
59
63
  exports.aggregateScreeningEvent = aggregateScreeningEvent;
60
64
  function aggregateByEvent(params) {
61
65
  return (repos) => __awaiter(this, void 0, void 0, function* () {
66
+ var _a;
62
67
  const now = new Date();
63
68
  // 集計対象イベント検索
64
69
  let event = params.event;
65
- // 施設取得
66
- const movieTheater = yield findLocation(params)(repos);
67
- // 万が一施設が存在しなければ処理終了
68
- if (movieTheater === undefined) {
69
- return;
70
+ // 施設取得は冗長なので、ルーム検索に変更(2023-01-30~)
71
+ let movieTheaterId;
72
+ if (params.event.typeOf === factory.eventType.ScreeningEvent) {
73
+ movieTheaterId = params.event.superEvent.location.id;
70
74
  }
71
- const screeningRoom = movieTheater.containsPlace.find((p) => p.branchCode === event.location.branchCode);
72
- if (screeningRoom === undefined) {
73
- // 基本的にありえないはずだが、万が一スクリーンが見つからなければcapacityは0のまま
74
- // tslint:disable-next-line:no-console
75
- console.error(new Error(`Screening room not found. branchCode: ${event.location.branchCode}`));
76
- return;
75
+ else {
76
+ movieTheaterId = String((_a = params.event.offers) === null || _a === void 0 ? void 0 : _a.itemOffered.availableChannel.serviceLocation.containedInPlace.id);
77
77
  }
78
+ const screeningRoom = yield repos.place.findScreeningRoomsByBranchCode({
79
+ branchCode: { $eq: event.location.branchCode },
80
+ containedInPlace: { id: { $eq: movieTheaterId } }
81
+ });
82
+ // 施設取得
83
+ // const movieTheater = await findLocation(params)(repos);
84
+ // // 万が一施設が存在しなければ処理終了
85
+ // if (movieTheater === undefined) {
86
+ // return;
87
+ // }
88
+ // const screeningRoom = <factory.place.screeningRoom.IPlace | undefined>
89
+ // movieTheater.containsPlace.find((p) => p.branchCode === event.location.branchCode);
90
+ // if (screeningRoom === undefined) {
91
+ // // 基本的にありえないはずだが、万が一スクリーンが見つからなければcapacityは0のまま
92
+ // // tslint:disable-next-line:no-console
93
+ // console.error(new Error(`Screening room not found. branchCode: ${event.location.branchCode}`));
94
+ // return;
95
+ // }
78
96
  // 予約集計
79
97
  const { maximumAttendeeCapacity, remainingAttendeeCapacity, aggregateReservation } = yield aggregateReservationByEvent({
80
98
  aggregateDate: now,
@@ -89,13 +107,6 @@ function aggregateByEvent(params) {
89
107
  screeningRoom: screeningRoom
90
108
  })(repos);
91
109
  debug('offers aggregated', aggregateOffer);
92
- // 入場ゲートごとの集計
93
- // const aggregateEntranceGate = await aggregateEntranceGateByEvent({
94
- // aggregateDate: now,
95
- // event,
96
- // entranceGates: movieTheater.hasEntranceGate
97
- // })(repos);
98
- // debug('entrances aggregated', aggregateEntranceGate);
99
110
  // 値がundefinedの場合に更新しないように注意
100
111
  const update = {
101
112
  $set: Object.assign(Object.assign(Object.assign(Object.assign({ updatedAt: new Date(), // $setオブジェクトが空だとMongoエラーになるので
@@ -118,31 +129,33 @@ exports.aggregateByEvent = aggregateByEvent;
118
129
  * イベントロケーション取得
119
130
  * NotFoundエラーをハンドリングする
120
131
  */
121
- function findLocation(params) {
122
- return (repos) => __awaiter(this, void 0, void 0, function* () {
123
- var _a;
124
- let movieTheater;
125
- try {
126
- if (params.event.typeOf === factory.eventType.ScreeningEvent) {
127
- movieTheater = yield repos.place.findById({ id: params.event.superEvent.location.id });
128
- }
129
- else {
130
- const movieTheaterId = String((_a = params.event.offers) === null || _a === void 0 ? void 0 : _a.itemOffered.availableChannel.serviceLocation.containedInPlace.id);
131
- movieTheater = yield repos.place.findById({ id: movieTheaterId });
132
- }
133
- }
134
- catch (error) {
135
- let throwsError = true;
136
- if (error instanceof factory.errors.NotFound) {
137
- throwsError = false;
138
- }
139
- if (throwsError) {
140
- throw error;
141
- }
142
- }
143
- return movieTheater;
144
- });
145
- }
132
+ // function findLocation(params: {
133
+ // event: factory.event.screeningEvent.IEvent | factory.event.event.IEvent;
134
+ // }) {
135
+ // return async (repos: {
136
+ // place: PlaceRepo;
137
+ // }): Promise<factory.place.movieTheater.IPlace | undefined> => {
138
+ // let movieTheater: factory.place.movieTheater.IPlace | undefined;
139
+ // try {
140
+ // if (params.event.typeOf === factory.eventType.ScreeningEvent) {
141
+ // movieTheater = await repos.place.findById({ id: params.event.superEvent.location.id });
142
+ // } else {
143
+ // const movieTheaterId: string =
144
+ // String(params.event.offers?.itemOffered.availableChannel.serviceLocation.containedInPlace.id);
145
+ // movieTheater = await repos.place.findById({ id: movieTheaterId });
146
+ // }
147
+ // } catch (error) {
148
+ // let throwsError = true;
149
+ // if (error instanceof factory.errors.NotFound) {
150
+ // throwsError = false;
151
+ // }
152
+ // if (throwsError) {
153
+ // throw error;
154
+ // }
155
+ // }
156
+ // return movieTheater;
157
+ // };
158
+ // }
146
159
  /**
147
160
  * 集計後アクション
148
161
  */
@@ -196,20 +209,13 @@ function findOffers(params) {
196
209
  const eventService = yield repos.product.findById({ id: eventOffers.itemOffered.id });
197
210
  if (typeof ((_b = eventService.hasOfferCatalog) === null || _b === void 0 ? void 0 : _b.id) === 'string') {
198
211
  availableOffers = yield repos.offer.findOffersByOfferCatalogId({
199
- offerCatalog: { id: eventService.hasOfferCatalog.id }
212
+ offerCatalog: { id: eventService.hasOfferCatalog.id },
213
+ sort: false // ソート不要(2023-01-27~)
200
214
  });
201
215
  }
202
216
  }
203
217
  else {
204
- // hasOfferCatalog参照廃止(2022-09-02~)
205
218
  throw new factory.errors.NotFound('event.offers.itemOffered.id');
206
- // if (typeof params.event.hasOfferCatalog?.id === 'string') {
207
- // availableOffers = await repos.offer.findOffersByOfferCatalogId({
208
- // offerCatalog: {
209
- // id: params.event.hasOfferCatalog.id
210
- // }
211
- // });
212
- // }
213
219
  }
214
220
  }
215
221
  catch (error) {
@@ -236,20 +242,23 @@ function aggregateReservationByOffer(params) {
236
242
  }
237
243
  reservationCount4offer = yield repos.reservation.count({
238
244
  typeOf: reservationType,
239
- reservationFor: { ids: [params.event.id] },
245
+ // reservationFor: { ids: [params.event.id] },
246
+ reservationFor: { id: { $eq: params.event.id } },
240
247
  reservationStatuses: [factory.reservationStatusType.ReservationConfirmed],
241
248
  reservedTicket: { ticketType: { ids: [params.offer.id] } }
242
249
  });
243
250
  attendeeCount4offer = yield repos.reservation.count({
244
251
  typeOf: reservationType,
245
- reservationFor: { ids: [params.event.id] },
252
+ // reservationFor: { ids: [params.event.id] },
253
+ reservationFor: { id: { $eq: params.event.id } },
246
254
  reservationStatuses: [factory.reservationStatusType.ReservationConfirmed],
247
255
  reservedTicket: { ticketType: { ids: [params.offer.id] } },
248
256
  attended: true
249
257
  });
250
258
  checkInCount4offer = yield repos.reservation.count({
251
259
  typeOf: reservationType,
252
- reservationFor: { ids: [params.event.id] },
260
+ // reservationFor: { ids: [params.event.id] },
261
+ reservationFor: { id: { $eq: params.event.id } },
253
262
  reservationStatuses: [factory.reservationStatusType.ReservationConfirmed],
254
263
  reservedTicket: { ticketType: { ids: [params.offer.id] } },
255
264
  checkedIn: true
@@ -407,7 +416,8 @@ function aggregateReservationByEvent(params) {
407
416
  }
408
417
  reservationCount = yield repos.reservation.count({
409
418
  typeOf: reservationType,
410
- reservationFor: { ids: [params.event.id] },
419
+ // reservationFor: { ids: [params.event.id] },
420
+ reservationFor: { id: { $eq: params.event.id } },
411
421
  reservationStatuses: [factory.reservationStatusType.ReservationConfirmed]
412
422
  });
413
423
  // maximumAttendeeCapacityを決定
@@ -437,13 +447,15 @@ function aggregateReservationByEvent(params) {
437
447
  }
438
448
  attendeeCount = yield repos.reservation.count({
439
449
  typeOf: reservationType,
440
- reservationFor: { ids: [params.event.id] },
450
+ // reservationFor: { ids: [params.event.id] },
451
+ reservationFor: { id: { $eq: params.event.id } },
441
452
  // reservationStatuses: [factory.reservationStatusType.ReservationConfirmed],
442
453
  attended: true
443
454
  });
444
455
  checkInCount = yield repos.reservation.count({
445
456
  typeOf: reservationType,
446
- reservationFor: { ids: [params.event.id] },
457
+ // reservationFor: { ids: [params.event.id] },
458
+ reservationFor: { id: { $eq: params.event.id } },
447
459
  // reservationStatuses: [factory.reservationStatusType.ReservationConfirmed],
448
460
  checkedIn: true
449
461
  });
@@ -20,7 +20,9 @@ function aggregateUseActionsOnEvent(params) {
20
20
  return (repos) => __awaiter(this, void 0, void 0, function* () {
21
21
  const now = new Date();
22
22
  // 集計対象イベント検索
23
- const event = yield repos.event.findById(params);
23
+ // イベント取得属性最適化(2023-01-23~)
24
+ // const event = await repos.event.findById<factory.eventType.ScreeningEvent>(params);
25
+ const event = yield repos.event.findMinimizedIndividualEventById(params);
24
26
  // 入場ゲート検索
25
27
  const entranceGates = yield findEntranceGates({ event })(repos);
26
28
  // 入場ゲートごとの集計
@@ -90,18 +92,13 @@ function findOffers(params) {
90
92
  const eventService = yield repos.product.findById({ id: eventOffers.itemOffered.id });
91
93
  if (typeof ((_b = eventService.hasOfferCatalog) === null || _b === void 0 ? void 0 : _b.id) === 'string') {
92
94
  availableOffers = yield repos.offer.findOffersByOfferCatalogId({
93
- offerCatalog: { id: eventService.hasOfferCatalog.id }
95
+ offerCatalog: { id: eventService.hasOfferCatalog.id },
96
+ sort: false // ソート不要(2023-01-27~)
94
97
  });
95
98
  }
96
99
  }
97
100
  else {
98
- // hasOfferCatalog参照廃止(2022-09-02~)
99
101
  throw new factory.errors.NotFound('event.offers.itemOffered.id');
100
- // if (typeof params.event.hasOfferCatalog?.id === 'string') {
101
- // availableOffers = await repos.offer.findOffersByOfferCatalogId({
102
- // offerCatalog: { id: params.event.hasOfferCatalog.id }
103
- // });
104
- // }
105
102
  }
106
103
  }
107
104
  catch (error) {
@@ -0,0 +1,100 @@
1
+ import { MongoRepository as ActionRepo } from '../../repo/action';
2
+ import { MongoRepository as AggregationRepo } from '../../repo/aggregation';
3
+ import { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
4
+ import { MongoRepository as EventRepo } from '../../repo/event';
5
+ import { MongoRepository as TasKRepo } from '../../repo/task';
6
+ import { MongoRepository as TransactionRepo } from '../../repo/transaction';
7
+ declare function aggregateEvent(params: {
8
+ aggregationDays: number;
9
+ excludedProjectId?: string;
10
+ }): (repos: {
11
+ agregation: AggregationRepo;
12
+ event: EventRepo;
13
+ }) => Promise<void>;
14
+ /**
15
+ * 注文取引集計
16
+ */
17
+ declare function aggregatePlaceOrder(params: {
18
+ aggregationDays: number;
19
+ excludedProjectId?: string;
20
+ clientIds?: string[];
21
+ }): (repos: {
22
+ agregation: AggregationRepo;
23
+ transaction: TransactionRepo;
24
+ }) => Promise<void>;
25
+ /**
26
+ * 興行オファー承認アクション集計
27
+ */
28
+ declare function aggregateAuthorizeEventServiceOfferAction(params: {
29
+ aggregationDays: number;
30
+ excludedProjectId?: string;
31
+ }): (repos: {
32
+ agregation: AggregationRepo;
33
+ action: ActionRepo;
34
+ }) => Promise<void>;
35
+ /**
36
+ * 決済承認アクション集計
37
+ */
38
+ declare function aggregateAuthorizePaymentAction(params: {
39
+ aggregationDays: number;
40
+ excludedProjectId?: string;
41
+ }): (repos: {
42
+ agregation: AggregationRepo;
43
+ action: ActionRepo;
44
+ }) => Promise<void>;
45
+ declare function aggregateAuthorizeOrderAction(params: {
46
+ aggregationDays: number;
47
+ excludedProjectId?: string;
48
+ }): (repos: {
49
+ agregation: AggregationRepo;
50
+ action: ActionRepo;
51
+ }) => Promise<void>;
52
+ /**
53
+ * 使用アクション集計
54
+ */
55
+ declare function aggregateUseAction(params: {
56
+ aggregationDays: number;
57
+ excludedProjectId?: string;
58
+ }): (repos: {
59
+ agregation: AggregationRepo;
60
+ action: ActionRepo;
61
+ }) => Promise<void>;
62
+ declare function aggregateCheckMovieTicketAction(params: {
63
+ aggregationDays: number;
64
+ excludedProjectId?: string;
65
+ }): (repos: {
66
+ agregation: AggregationRepo;
67
+ action: ActionRepo;
68
+ }) => Promise<void>;
69
+ declare function aggregatePayMovieTicketAction(params: {
70
+ aggregationDays: number;
71
+ excludedProjectId?: string;
72
+ }): (repos: {
73
+ agregation: AggregationRepo;
74
+ action: ActionRepo;
75
+ }) => Promise<void>;
76
+ declare function aggregatePayTransaction(params: {
77
+ aggregationDays: number;
78
+ excludedProjectId?: string;
79
+ }): (repos: {
80
+ agregation: AggregationRepo;
81
+ assetTransaction: AssetTransactionRepo;
82
+ }) => Promise<void>;
83
+ /**
84
+ * 予約集計
85
+ */
86
+ declare function aggregateReserveTransaction(params: {
87
+ aggregationDays: number;
88
+ excludedProjectId?: string;
89
+ }): (repos: {
90
+ agregation: AggregationRepo;
91
+ assetTransaction: AssetTransactionRepo;
92
+ }) => Promise<void>;
93
+ declare function aggregateTask(params: {
94
+ aggregationDays: number;
95
+ excludedProjectId?: string;
96
+ }): (repos: {
97
+ agregation: AggregationRepo;
98
+ task: TasKRepo;
99
+ }) => Promise<void>;
100
+ export { aggregateAuthorizeEventServiceOfferAction, aggregateAuthorizeOrderAction, aggregateAuthorizePaymentAction, aggregateCheckMovieTicketAction, aggregateEvent, aggregatePayMovieTicketAction, aggregatePayTransaction, aggregatePlaceOrder, aggregateReserveTransaction, aggregateTask, aggregateUseAction };