@chevre/domain 24.1.0-alpha.5 → 24.1.0-alpha.50

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 (192) hide show
  1. package/lib/chevre/emailMessageBuilder.js +4 -12
  2. package/lib/chevre/index.d.ts +1 -2
  3. package/lib/chevre/index.js +1 -3
  4. package/lib/chevre/repo/acceptedOffer.d.ts +15 -26
  5. package/lib/chevre/repo/acceptedOffer.js +106 -67
  6. package/lib/chevre/repo/acceptedOfferInReserve.d.ts +30 -0
  7. package/lib/chevre/repo/acceptedOfferInReserve.js +86 -0
  8. package/lib/chevre/repo/accountingReport.js +2 -30
  9. package/lib/chevre/repo/action/actionProcess.d.ts +1 -1
  10. package/lib/chevre/repo/assetTransaction/reserve.d.ts +1 -2
  11. package/lib/chevre/repo/assetTransaction/reserve.js +4 -50
  12. package/lib/chevre/repo/event.js +12 -8
  13. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +7 -0
  14. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.js +74 -0
  15. package/lib/chevre/repo/factory/reservation/createMongoConditions.d.ts +1 -1
  16. package/lib/chevre/repo/factory/reservation/createMongoConditions.js +171 -362
  17. package/lib/chevre/repo/mongoose/schemas/accountingReport.js +42 -42
  18. package/lib/chevre/repo/mongoose/schemas/order.js +108 -108
  19. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +3 -1
  20. package/lib/chevre/repo/mongoose/schemas/reservation.js +128 -146
  21. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +84 -0
  22. package/lib/chevre/repo/mongoose/schemas/setting.js +2 -1
  23. package/lib/chevre/repo/order.d.ts +2 -83
  24. package/lib/chevre/repo/order.js +10 -373
  25. package/lib/chevre/repo/orderInTransaction.d.ts +56 -6
  26. package/lib/chevre/repo/orderInTransaction.js +58 -4
  27. package/lib/chevre/repo/place/hasPOS.js +2 -1
  28. package/lib/chevre/repo/reservation.d.ts +20 -7
  29. package/lib/chevre/repo/reservation.js +16 -12
  30. package/lib/chevre/repo/role.d.ts +1 -15
  31. package/lib/chevre/repo/role.js +7 -14
  32. package/lib/chevre/repo/setting/integration.d.ts +27 -0
  33. package/lib/chevre/repo/setting/integration.js +102 -0
  34. package/lib/chevre/repo/transaction.d.ts +6 -6
  35. package/lib/chevre/repository.d.ts +5 -0
  36. package/lib/chevre/repository.js +11 -0
  37. package/lib/chevre/service/aggregation/event/aggregateOffers.js +6 -1
  38. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +0 -1
  39. package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +14 -11
  40. package/lib/chevre/service/assetTransaction/cancelReservation/start.d.ts +1 -1
  41. package/lib/chevre/service/assetTransaction/cancelReservation/start.js +1 -1
  42. package/lib/chevre/service/assetTransaction/pay/check.d.ts +1 -1
  43. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.d.ts +1 -1
  44. package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +1 -1
  45. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -1
  46. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.d.ts +1 -1
  47. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -1
  48. package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
  49. package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +1 -1
  50. package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +1 -1
  51. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +0 -12
  52. package/lib/chevre/service/assetTransaction/reserve/start/factory/price.d.ts +1 -1
  53. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +1 -1
  54. package/lib/chevre/service/delivery/factory.d.ts +6 -1
  55. package/lib/chevre/service/delivery/factory.js +1 -1
  56. package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -3
  57. package/lib/chevre/service/delivery/reservation/factory.js +0 -17
  58. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +2 -4
  59. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +3 -3
  60. package/lib/chevre/service/notification/notifyByEmail.d.ts +3 -3
  61. package/lib/chevre/service/notification/notifyByEmail.js +7 -12
  62. package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -3
  63. package/lib/chevre/service/notification/sendEmailMessage.js +5 -4
  64. package/lib/chevre/service/offer/any.d.ts +7 -2
  65. package/lib/chevre/service/offer/event/authorize/factory.d.ts +6 -3
  66. package/lib/chevre/service/offer/event/authorize/factory.js +13 -15
  67. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  68. package/lib/chevre/service/offer/event/authorize.d.ts +16 -2
  69. package/lib/chevre/service/offer/event/authorize.js +62 -11
  70. package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +1 -1
  71. package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
  72. package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
  73. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -3
  74. package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -1
  75. package/lib/chevre/service/order/createAccountingReportIfNotExist.js +15 -15
  76. package/lib/chevre/service/order/deleteOrder.js +19 -43
  77. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +1 -1
  78. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts +1 -1
  79. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +1 -1
  80. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +9 -11
  81. package/lib/chevre/service/order/onAssetTransactionStatusChanged/processing2inTransit.d.ts +1 -1
  82. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +1 -1
  83. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +0 -1
  84. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +6 -1
  85. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +0 -1
  86. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +1 -1
  87. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
  88. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
  89. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +2 -1
  90. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +0 -1
  91. package/lib/chevre/service/order/onOrderUpdated.js +0 -1
  92. package/lib/chevre/service/order/payOrder.d.ts +1 -1
  93. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +4 -1
  94. package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
  95. package/lib/chevre/service/order/placeOrder/factory/orderedItem.js +0 -5
  96. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  97. package/lib/chevre/service/order/placeOrder.d.ts +1 -1
  98. package/lib/chevre/service/order/returnOrder.js +0 -1
  99. package/lib/chevre/service/order/sendOrder.js +0 -4
  100. package/lib/chevre/service/payment/any/authorize.d.ts +1 -1
  101. package/lib/chevre/service/payment/any/person2username.js +0 -1
  102. package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +1 -1
  103. package/lib/chevre/service/payment/creditCard/authorize.d.ts +1 -1
  104. package/lib/chevre/service/payment/creditCard/authorize.js +4 -3
  105. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -1
  106. package/lib/chevre/service/payment/creditCard/payCreditCard.js +1 -1
  107. package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +1 -1
  108. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
  109. package/lib/chevre/service/payment/creditCard/searchGMOTrade.d.ts +1 -1
  110. package/lib/chevre/service/payment/creditCard/searchGMOTrade.js +1 -1
  111. package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +1 -1
  112. package/lib/chevre/service/payment/creditCard/voidTransaction.js +1 -1
  113. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +8 -1
  114. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +1 -1
  115. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -1
  116. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +1 -1
  117. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -1
  118. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
  119. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +1 -1
  120. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +1 -1
  121. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +1 -1
  122. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +2 -2
  123. package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +1 -1
  124. package/lib/chevre/service/reserve/confirmReservation.js +7 -7
  125. package/lib/chevre/service/reserve/factory.js +2 -1
  126. package/lib/chevre/service/reserve/findByCode.d.ts +1 -1
  127. package/lib/chevre/service/reserve/findByCode.js +1 -1
  128. package/lib/chevre/service/reserve/findReservations.d.ts +14 -6
  129. package/lib/chevre/service/reserve/findReservations.js +26 -36
  130. package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +0 -1
  131. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
  132. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +4 -3
  133. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +1 -10
  134. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
  135. package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +0 -1
  136. package/lib/chevre/service/reserve/searchByOrder.js +7 -3
  137. package/lib/chevre/service/task/acceptCOAOffer.js +6 -3
  138. package/lib/chevre/service/task/authorizePayment.js +4 -2
  139. package/lib/chevre/service/task/cancelPendingReservation.js +4 -2
  140. package/lib/chevre/service/task/checkMovieTicket.js +4 -2
  141. package/lib/chevre/service/task/confirmReserveTransaction.d.ts +1 -1
  142. package/lib/chevre/service/task/confirmReserveTransaction.js +5 -3
  143. package/lib/chevre/service/task/createAccountingReport.js +4 -8
  144. package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +4 -2
  145. package/lib/chevre/service/task/importEventsFromCOA.js +4 -2
  146. package/lib/chevre/service/task/importOffersFromCOA.js +4 -2
  147. package/lib/chevre/service/task/invalidatePaymentUrl.js +3 -1
  148. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +3 -1
  149. package/lib/chevre/service/task/onOrderPaymentCompleted.js +3 -1
  150. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
  151. package/lib/chevre/service/task/pay.js +4 -2
  152. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +1 -1
  153. package/lib/chevre/service/task/payment/payByTask.d.ts +1 -1
  154. package/lib/chevre/service/task/payment/payByTask.js +6 -7
  155. package/lib/chevre/service/task/payment/refundByTask.d.ts +1 -1
  156. package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +1 -1
  157. package/lib/chevre/service/task/placeOrder.js +3 -1
  158. package/lib/chevre/service/task/publishPaymentUrl.js +3 -1
  159. package/lib/chevre/service/task/refund.js +4 -2
  160. package/lib/chevre/service/task/returnReserveTransaction.js +4 -2
  161. package/lib/chevre/service/task/sendEmailMessage.js +5 -3
  162. package/lib/chevre/service/task/syncResourcesFromCOA.js +4 -2
  163. package/lib/chevre/service/task/voidPayment.js +4 -2
  164. package/lib/chevre/service/task/voidReserveTransaction.js +4 -2
  165. package/lib/chevre/service/task.d.ts +0 -7
  166. package/lib/chevre/service/taskHandler.js +1 -0
  167. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +0 -1
  168. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -1
  169. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
  170. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
  171. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
  172. package/lib/chevre/service/transaction/placeOrder/confirm.js +5 -3
  173. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +0 -1
  174. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +0 -1
  175. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
  176. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +0 -1
  177. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +0 -1
  178. package/lib/chevre/service/transaction/returnOrder/preStart.js +0 -3
  179. package/lib/chevre/service/validation/validateOrder.js +3 -78
  180. package/lib/chevre/settings.d.ts +0 -55
  181. package/lib/chevre/settings.js +1 -29
  182. package/lib/chevre/taskSettings.d.ts +0 -22
  183. package/lib/chevre/taskSettings.js +1 -7
  184. package/package.json +2 -2
  185. package/lib/chevre/credentials/customSearch.d.ts +0 -13
  186. package/lib/chevre/credentials/customSearch.js +0 -16
  187. package/lib/chevre/credentials/lineNotify.d.ts +0 -17
  188. package/lib/chevre/credentials/lineNotify.js +0 -20
  189. package/lib/chevre/credentials/sendGrid.d.ts +0 -24
  190. package/lib/chevre/credentials/sendGrid.js +0 -18
  191. package/lib/chevre/credentials.d.ts +0 -20
  192. package/lib/chevre/credentials.js +0 -42
@@ -44,6 +44,7 @@ const movieTheater_1 = require("../../repo/place/movieTheater");
44
44
  const screeningRoom_1 = require("../../repo/place/screeningRoom");
45
45
  const reserveInterface_1 = require("../../repo/reserveInterface");
46
46
  const seller_1 = require("../../repo/seller");
47
+ const integration_1 = require("../../repo/setting/integration");
47
48
  const factory_1 = require("../../factory");
48
49
  const EventService = __importStar(require("../event"));
49
50
  let coaAuthClient;
@@ -51,7 +52,7 @@ let coaAuthClient;
51
52
  * タスク実行関数
52
53
  */
53
54
  function call(params) {
54
- return async ({ connection, settings }) => {
55
+ return async ({ connection }) => {
55
56
  if (coaAuthClient === undefined) {
56
57
  const reserveInterfaceRepo = new reserveInterface_1.ReserveInterfaceRepo(connection);
57
58
  const coaAPI = await reserveInterfaceRepo.findOne({ project: { id: { $eq: params.project.id } } });
@@ -61,10 +62,11 @@ function call(params) {
61
62
  }
62
63
  coaAuthClient = new coa_service_1.COA.auth.RefreshToken(credentials);
63
64
  }
65
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
64
66
  const masterService = new coa_service_1.COA.service.Master({
65
67
  endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
66
68
  auth: coaAuthClient
67
- }, { timeout: settings.coa.timeout });
69
+ }, { timeout: (await settings.getByKey('coa')).timeoutMaster });
68
70
  await EventService.importFromCOA(params.data)({
69
71
  action: new action_1.ActionRepo(connection),
70
72
  categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
@@ -38,6 +38,7 @@ const coa_service_1 = require("@motionpicture/coa-service");
38
38
  const aggregateOffer_1 = require("../../repo/aggregateOffer");
39
39
  const categoryCode_1 = require("../../repo/categoryCode");
40
40
  const reserveInterface_1 = require("../../repo/reserveInterface");
41
+ const integration_1 = require("../../repo/setting/integration");
41
42
  const factory_1 = require("../../factory");
42
43
  const OfferService = __importStar(require("../offer"));
43
44
  let coaAuthClient;
@@ -46,7 +47,7 @@ let paymentMethodType4membershipCoupon;
46
47
  * タスク実行関数
47
48
  */
48
49
  function call(params) {
49
- return async ({ connection, settings }) => {
50
+ return async ({ connection }) => {
50
51
  if (coaAuthClient === undefined || paymentMethodType4membershipCoupon === undefined) {
51
52
  const reserveInterfaceRepo = new reserveInterface_1.ReserveInterfaceRepo(connection);
52
53
  const coaAPI = await reserveInterfaceRepo.findOne({ project: { id: { $eq: params.project.id } } });
@@ -61,13 +62,14 @@ function call(params) {
61
62
  }
62
63
  paymentMethodType4membershipCoupon = paymentMethodType4membershipCouponByInterface;
63
64
  }
65
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
64
66
  const aggregateOfferRepo = new aggregateOffer_1.AggregateOfferRepo(connection);
65
67
  const categoryCodeRepo = new categoryCode_1.CategoryCodeRepo(connection);
66
68
  // const taskRepo = new TaskRepo(connection);
67
69
  const masterService = new coa_service_1.COA.service.Master({
68
70
  endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
69
71
  auth: coaAuthClient
70
- }, { timeout: settings.coa.timeout });
72
+ }, { timeout: (await settings.getByKey('coa')).timeoutMaster });
71
73
  await OfferService.event.importFromCOA({
72
74
  project: { id: params.data.project.id },
73
75
  theaterCode: params.data.theaterCode,
@@ -9,10 +9,12 @@ const assetTransaction_1 = require("../../repo/assetTransaction");
9
9
  const paymentService_1 = require("../../repo/paymentService");
10
10
  const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
11
11
  const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
12
+ const integration_1 = require("../../repo/setting/integration");
12
13
  const task_1 = require("../../repo/task");
13
14
  const invalidatePaymentUrlByTask_1 = require("./payment/invalidatePaymentUrlByTask");
14
15
  function call(params) {
15
- return async ({ connection, settings }) => {
16
+ return async ({ connection }) => {
17
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
16
18
  await (0, invalidatePaymentUrlByTask_1.invalidatePaymentUrlByTask)({
17
19
  ...params.data,
18
20
  sameAs: { id: params.id }
@@ -5,6 +5,7 @@ const acceptedOffer_1 = require("../../repo/acceptedOffer");
5
5
  const assetTransaction_1 = require("../../repo/assetTransaction");
6
6
  const order_1 = require("../../repo/order");
7
7
  const setting_1 = require("../../repo/setting");
8
+ const integration_1 = require("../../repo/setting/integration");
8
9
  const task_1 = require("../../repo/task");
9
10
  // import { TransactionRepo } from '../../repo/transaction';
10
11
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
@@ -13,7 +14,8 @@ const onAssetTransactionStatusChanged_1 = require("../order/onAssetTransactionSt
13
14
  * タスク実行関数
14
15
  */
15
16
  function call(data) {
16
- return async ({ connection, settings }) => {
17
+ return async ({ connection }) => {
18
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
17
19
  await (0, onAssetTransactionStatusChanged_1.onAssetTransactionStatusChanged)(data)({
18
20
  acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
19
21
  assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
@@ -4,6 +4,7 @@ exports.call = call;
4
4
  const acceptedOffer_1 = require("../../repo/acceptedOffer");
5
5
  const order_1 = require("../../repo/order");
6
6
  const setting_1 = require("../../repo/setting");
7
+ const integration_1 = require("../../repo/setting/integration");
7
8
  const task_1 = require("../../repo/task");
8
9
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
9
10
  const payOrder_1 = require("../order/payOrder");
@@ -11,7 +12,8 @@ const payOrder_1 = require("../order/payOrder");
11
12
  * タスク実行関数
12
13
  */
13
14
  function call(data) {
14
- return async ({ connection, settings }) => {
15
+ return async ({ connection }) => {
16
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
15
17
  await (0, payOrder_1.payOrder)(data)({
16
18
  acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
17
19
  order: new order_1.OrderRepo(connection),
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createInformHasPOSTasks = createInformHasPOSTasks;
4
4
  const factory_1 = require("../../../factory");
5
- // import { Settings } from '../../../settings';
6
5
  function createInformHasPOSTasks(params) {
7
6
  return async (repos
8
7
  // settings: Settings
@@ -17,16 +17,18 @@ const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
17
17
  const product_1 = require("../../repo/product");
18
18
  const project_1 = require("../../repo/project");
19
19
  const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
20
+ const integration_1 = require("../../repo/setting/integration");
20
21
  const task_1 = require("../../repo/task");
21
22
  const payByTask_1 = require("./payment/payByTask");
22
23
  /**
23
24
  * タスク実行関数
24
25
  */
25
26
  function call(params) {
26
- return async ({ connection, redisClient, settings }) => {
27
+ return async ({ connection, redisClient }) => {
27
28
  if (redisClient === undefined) {
28
29
  throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
29
30
  }
31
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
30
32
  const payActionAttributes = await (0, payByTask_1.payTask2payActionAttributes)({
31
33
  ...params.data,
32
34
  sameAs: { id: params.id, typeOf: 'Task' } // タスクIDを関連付け(2024-04-20~)
@@ -38,7 +40,7 @@ function call(params) {
38
40
  order: new order_1.OrderRepo(connection)
39
41
  });
40
42
  const paymentServiceId = payActionAttributes.object.at(0)?.id;
41
- const credentialsExpireInSeconds = settings.movieticketReserve.credentialsExpireInSeconds;
43
+ const credentialsExpireInSeconds = (await settings.getByKey('movieticketReserve')).credentialsExpireInSeconds;
42
44
  const useCredentialsRepo = typeof paymentServiceId === 'string' && paymentServiceId !== ''
43
45
  && typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
44
46
  await (0, payByTask_1.payByTask)(
@@ -1,5 +1,5 @@
1
1
  import { factory } from '../../../factory';
2
- import { Settings } from '../../../settings';
2
+ import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
3
3
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
4
4
  import type { PayActionRepo } from '../../../repo/action/pay';
5
5
  import type { RefundActionRepo } from '../../../repo/action/refund';
@@ -14,7 +14,7 @@ import type { ProjectRepo } from '../../../repo/project';
14
14
  import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
15
15
  import type { TaskRepo } from '../../../repo/task';
16
16
  import { factory } from '../../../factory';
17
- import { Settings } from '../../../settings';
17
+ import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
18
18
  interface IPayTask2payActionAttributesRepos {
19
19
  checkMovieTicketAction: CheckMovieTicketActionRepo;
20
20
  acceptedOffer: AcceptedOfferRepo;
@@ -64,20 +64,19 @@ function fixOrderAsPurpose(params, transaction) {
64
64
  let acceptedOffersMovieTicketUsed = [];
65
65
  const movieTickets = transaction.object.paymentMethod.movieTickets;
66
66
  if (Array.isArray(movieTickets) && movieTickets.length > 0) {
67
- const reservationForId = movieTickets[0].serviceOutput.reservationFor.id; // イベントIDは決済取引ごとにひとつのみ許可なので、これで問題ない
68
- const seatNumbers = movieTickets.map(({ serviceOutput }) => serviceOutput.reservedTicket.ticketedSeat.seatNumber);
67
+ // const reservationForId = movieTickets[0].serviceOutput.reservationFor.id; // イベントIDは決済取引ごとにひとつのみ許可なので、これで問題ない
68
+ // const seatNumbers = movieTickets.map(({ serviceOutput }) => serviceOutput.reservedTicket.ticketedSeat.seatNumber);
69
69
  acceptedOffersMovieTicketUsed = await repos.acceptedOffer.searchAcceptedOffersByOrderNumber({
70
70
  orderNumber: { $eq: orderWithoutAcceptedOffers.orderNumber },
71
71
  project: { id: { $eq: transaction.project.id } },
72
72
  acceptedOffers: {
73
73
  itemOffered: {
74
- typeOf: { $in: [factory_1.factory.reservationType.EventReservation] },
75
- // movieTicketsに結合されたイベントID,座席コードで絞る
76
- reservationFor: { id: { $in: [reservationForId] } },
77
- reservedTicket: { ticketedSeat: { seatNumber: { $in: seatNumbers } } }
74
+ // movieTicketsに結合されたイベントID,座席コードで絞る
75
+ // reservationFor: { id: { $in: [reservationForId] } }, // reservationForによる絞りは廃止(2026-06-04~)
76
+ // reservedTicket: { ticketedSeat: { seatNumber: { $in: seatNumbers } } } // 座席番号による絞りは廃止(2026-06-01~)
78
77
  }
79
78
  }
80
- }, ['itemOffered', 'priceSpecification']);
79
+ });
81
80
  }
82
81
  return {
83
82
  ...orderWithoutAcceptedOffers,
@@ -11,7 +11,7 @@ import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccep
11
11
  import type { TaskRepo } from '../../../repo/task';
12
12
  import type { TransactionNumberRepo } from '../../../repo/transactionNumber';
13
13
  import { factory } from '../../../factory';
14
- import { Settings } from '../../../settings';
14
+ import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
15
15
  declare function refundByTask(params: factory.task.refund.IData & {
16
16
  sameAs?: {
17
17
  id: string;
@@ -11,7 +11,7 @@ import type { ProjectRepo } from '../../../repo/project';
11
11
  import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
12
12
  import type { TaskRepo } from '../../../repo/task';
13
13
  import { factory } from '../../../factory';
14
- import { Settings } from '../../../settings';
14
+ import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
15
15
  declare function voidPaymentByTask(params: factory.task.voidPayment.IData): (repos: {
16
16
  action: ActionRepo;
17
17
  actions: {
@@ -9,6 +9,7 @@ const authorizePaymentMethod_1 = require("../../repo/action/authorizePaymentMeth
9
9
  const order_1 = require("../../repo/order");
10
10
  const orderInTransaction_1 = require("../../repo/orderInTransaction");
11
11
  const setting_1 = require("../../repo/setting");
12
+ const integration_1 = require("../../repo/setting/integration");
12
13
  const task_1 = require("../../repo/task");
13
14
  // import { TransactionRepo } from '../../repo/transaction';
14
15
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
@@ -17,7 +18,8 @@ const placeOrder_2 = require("../order/placeOrder");
17
18
  * タスク実行関数
18
19
  */
19
20
  function call(data) {
20
- return async ({ connection, settings }) => {
21
+ return async ({ connection }) => {
22
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
21
23
  await (0, placeOrder_2.placeOrder)({
22
24
  ...data,
23
25
  useOnOrderStatusChanged: true
@@ -15,6 +15,7 @@ const paymentService_1 = require("../../repo/paymentService");
15
15
  const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
16
16
  const project_1 = require("../../repo/project");
17
17
  const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
18
+ const integration_1 = require("../../repo/setting/integration");
18
19
  const ticket_1 = require("../../repo/ticket");
19
20
  // import { TransactionRepo } from '../../repo/transaction';
20
21
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
@@ -25,7 +26,7 @@ const any_1 = require("../payment/any");
25
26
  * タスク実行関数
26
27
  */
27
28
  function call(params) {
28
- return async ({ connection, redisClient, settings }, options) => {
29
+ return async ({ connection, redisClient }, options) => {
29
30
  if (redisClient === undefined) {
30
31
  throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
31
32
  }
@@ -33,6 +34,7 @@ function call(params) {
33
34
  if (!options.executeById) {
34
35
  return;
35
36
  }
37
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
36
38
  const actionRepo = new acceptPay_1.AcceptPayActionRepo(connection);
37
39
  // const transactionProcessRepo = new TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
38
40
  try {
@@ -13,6 +13,7 @@ const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
13
13
  const product_1 = require("../../repo/product");
14
14
  const project_1 = require("../../repo/project");
15
15
  const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
16
+ const integration_1 = require("../../repo/setting/integration");
16
17
  const task_1 = require("../../repo/task");
17
18
  const transactionNumber_1 = require("../../repo/transactionNumber");
18
19
  const refundByTask_1 = require("./payment/refundByTask");
@@ -20,10 +21,11 @@ const refundByTask_1 = require("./payment/refundByTask");
20
21
  * タスク実行関数
21
22
  */
22
23
  function call(params) {
23
- return async ({ connection, redisClient, settings }) => {
24
+ return async ({ connection, redisClient }) => {
24
25
  if (redisClient === undefined) {
25
26
  throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
26
27
  }
28
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
27
29
  let data;
28
30
  if (params.name === factory_1.factory.taskName.Refund) {
29
31
  data = {
@@ -35,7 +37,7 @@ function call(params) {
35
37
  data = params;
36
38
  }
37
39
  const paymentServiceId = data.object.at(0)?.id;
38
- const credentialsExpireInSeconds = settings.movieticketReserve.credentialsExpireInSeconds;
40
+ const credentialsExpireInSeconds = (await settings.getByKey('movieticketReserve')).credentialsExpireInSeconds;
39
41
  const useCredentialsRepo = typeof paymentServiceId === 'string' && paymentServiceId !== ''
40
42
  && typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
41
43
  await (0, refundByTask_1.refundByTask)(data)({
@@ -48,6 +48,7 @@ const assetTransaction_1 = require("../../repo/assetTransaction");
48
48
  const project_1 = require("../../repo/project");
49
49
  const reservation_1 = require("../../repo/reservation");
50
50
  const reserveInterface_1 = require("../../repo/reserveInterface");
51
+ const integration_1 = require("../../repo/setting/integration");
51
52
  const transactionNumber_1 = require("../../repo/transactionNumber");
52
53
  let coaAuthClientCreated = false;
53
54
  let coaAuthClient = new coa_service_1.COA.auth.RefreshToken({
@@ -59,7 +60,7 @@ let coaAuthClient = new coa_service_1.COA.auth.RefreshToken({
59
60
  * タスク実行関数
60
61
  */
61
62
  function call(params) {
62
- return async ({ connection, redisClient, settings }) => {
63
+ return async ({ connection, redisClient }) => {
63
64
  if (redisClient === undefined) {
64
65
  throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
65
66
  }
@@ -72,10 +73,11 @@ function call(params) {
72
73
  coaAuthClientCreated = true;
73
74
  }
74
75
  }
76
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
75
77
  const reserveService = new coa_service_1.COA.service.Reserve({
76
78
  endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
77
79
  auth: coaAuthClient
78
- }, { timeout: settings.coa.timeout });
80
+ }, { timeout: (await settings.getByKey('coa')).timeoutReserve });
79
81
  await returnReserve({
80
82
  ...params.data,
81
83
  sameAs: { id: params.id }
@@ -4,19 +4,21 @@ exports.call = call;
4
4
  const action_1 = require("../../repo/action");
5
5
  const message_1 = require("../../repo/message");
6
6
  const project_1 = require("../../repo/project");
7
+ const integration_1 = require("../../repo/setting/integration");
7
8
  const notification_1 = require("../notification");
8
9
  /**
9
10
  * タスク実行関数
10
11
  */
11
12
  function call(params) {
12
- return async ({ connection, credentials }) => {
13
+ return async ({ connection }) => {
13
14
  await (0, notification_1.sendEmailMessage)({
14
15
  ...params.data.actionAttributes,
15
16
  sameAs: { id: params.id } // タスクIDを関連付け(2024-06-25~)
16
17
  })({
17
18
  action: new action_1.ActionRepo(connection),
18
19
  message: new message_1.MessageRepo(connection),
19
- project: new project_1.ProjectRepo(connection)
20
- }, credentials);
20
+ project: new project_1.ProjectRepo(connection),
21
+ integrationSetting: new integration_1.IntegrationSettingRepo({ connection })
22
+ });
21
23
  };
22
24
  }
@@ -16,6 +16,7 @@ const eventSeries_1 = require("../../repo/eventSeries");
16
16
  const movieTheater_1 = require("../../repo/place/movieTheater");
17
17
  const screeningRoom_1 = require("../../repo/place/screeningRoom");
18
18
  const reserveInterface_1 = require("../../repo/reserveInterface");
19
+ const integration_1 = require("../../repo/setting/integration");
19
20
  const saveScreeningEvents_1 = require("../event/saveScreeningEvents");
20
21
  const saveScreeningEventSeries_1 = require("../event/saveScreeningEventSeries");
21
22
  let coaAuthClient;
@@ -23,7 +24,7 @@ let coaAuthClient;
23
24
  * タスク実行関数
24
25
  */
25
26
  function call(params) {
26
- return async ({ connection, redisClient, settings }, options) => {
27
+ return async ({ connection, redisClient }, options) => {
27
28
  if (redisClient === undefined) {
28
29
  throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
29
30
  }
@@ -31,6 +32,7 @@ function call(params) {
31
32
  if (!options.executeById) {
32
33
  return;
33
34
  }
35
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
34
36
  const reserveInterfaceRepo = new reserveInterface_1.ReserveInterfaceRepo(connection);
35
37
  const coaAPI = await reserveInterfaceRepo.findOne({ project: { id: { $eq: params.project.id } } });
36
38
  if (typeof coaAPI?.id !== 'string') {
@@ -60,7 +62,7 @@ function call(params) {
60
62
  const masterService = new coa_service_1.COA.service.Master({
61
63
  endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
62
64
  auth: coaAuthClient
63
- }, { timeout: settings.coa.timeout });
65
+ }, { timeout: (await settings.getByKey('coa')).timeoutMaster });
64
66
  const { agent, object } = params.data;
65
67
  if (object.typeOf === factory_1.factory.eventType.ScreeningEventSeries) {
66
68
  await syncEventSeries({
@@ -13,18 +13,20 @@ const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
13
13
  const product_1 = require("../../repo/product");
14
14
  const project_1 = require("../../repo/project");
15
15
  const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
16
+ const integration_1 = require("../../repo/setting/integration");
16
17
  const task_1 = require("../../repo/task");
17
18
  const voidPaymentByTask_1 = require("./payment/voidPaymentByTask");
18
19
  /**
19
20
  * タスク実行関数
20
21
  */
21
22
  function call(data) {
22
- return async ({ connection, redisClient, settings }) => {
23
+ return async ({ connection, redisClient }) => {
23
24
  if (redisClient === undefined) {
24
25
  throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
25
26
  }
27
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
26
28
  const paymentServiceId = data.object.object.id;
27
- const credentialsExpireInSeconds = settings.movieticketReserve.credentialsExpireInSeconds;
29
+ const credentialsExpireInSeconds = (await settings.getByKey('movieticketReserve')).credentialsExpireInSeconds;
28
30
  const useCredentialsRepo = typeof paymentServiceId === 'string' && paymentServiceId !== ''
29
31
  && typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
30
32
  await (0, voidPaymentByTask_1.voidPaymentByTask)(data)({
@@ -13,6 +13,7 @@ const offer_1 = require("../../repo/rateLimit/offer");
13
13
  const reservation_1 = require("../../repo/reservation");
14
14
  const reserveInterface_1 = require("../../repo/reserveInterface");
15
15
  const setting_1 = require("../../repo/setting");
16
+ const integration_1 = require("../../repo/setting/integration");
16
17
  const stockHolder_1 = require("../../repo/stockHolder");
17
18
  const task_1 = require("../../repo/task");
18
19
  // import { TransactionRepo } from '../../repo/transaction';
@@ -27,7 +28,7 @@ let coaAuthClient = new coa_service_1.COA.auth.RefreshToken({
27
28
  * タスク実行関数
28
29
  */
29
30
  function call(params) {
30
- return async ({ connection, redisClient, settings }, options) => {
31
+ return async ({ connection, redisClient }, options) => {
31
32
  if (redisClient === undefined) {
32
33
  throw new factory_1.factory.errors.Argument('settings', 'redisClient required');
33
34
  }
@@ -47,10 +48,11 @@ function call(params) {
47
48
  coaAuthClientCreated = true;
48
49
  }
49
50
  }
51
+ const settings = new integration_1.IntegrationSettingRepo({ connection });
50
52
  const reserveService = new coa_service_1.COA.service.Reserve({
51
53
  endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
52
54
  auth: coaAuthClient
53
- }, { timeout: settings.coa.timeout });
55
+ }, { timeout: (await settings.getByKey('coa')).timeoutReserve });
54
56
  // const transactionProcessRepo = new TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
55
57
  try {
56
58
  await (0, voidTransaction_1.voidTransaction)({
@@ -1,14 +1,7 @@
1
- import { SendGridCredentials } from '../credentials/sendGrid';
2
1
  import type { IExecuteSettings as IMinimumExecuteSettings, INextFunction, IReadyTask, IRunningTask } from '../eventEmitter/task';
3
2
  import { factory } from '../factory';
4
- import { Settings } from '../settings';
5
3
  import type { AggregationSettings } from '../taskSettings';
6
- interface ICredentialSettings {
7
- sendGrid: SendGridCredentials;
8
- }
9
4
  interface IExecuteSettings extends IMinimumExecuteSettings {
10
- credentials: ICredentialSettings;
11
- settings: Settings;
12
5
  aggregationSettings?: AggregationSettings;
13
6
  }
14
7
  type IOperation<T> = (settings: IExecuteSettings) => Promise<T>;
@@ -74,6 +74,7 @@ function executeTask(task, next) {
74
74
  case factory_1.factory.taskName.SendEmailMessage:
75
75
  case factory_1.factory.taskName.SyncResourcesFromCOA:
76
76
  case factory_1.factory.taskName.TriggerWebhook:
77
+ case factory_1.factory.taskName.UseReservation:
77
78
  callResult = await call(task)(settings, options);
78
79
  break;
79
80
  default:
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createSendEmailMessageActions = createSendEmailMessageActions;
4
4
  const emailMessageBuilder_1 = require("../../../../../emailMessageBuilder");
5
5
  const factory_1 = require("../../../../../factory");
6
- // import { Settings } from '../../../../../settings';
7
6
  async function createSendEmailMessageActions(params,
8
7
  // settings: Settings
9
8
  setting) {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createPotentialActions = createPotentialActions;
4
- // import { Settings } from '../../../../settings';
5
4
  const sendEmailMessage_1 = require("./potentialActions/sendEmailMessage");
6
5
  /**
7
6
  * 取引のポストアクションを作成する
@@ -4,5 +4,5 @@ declare function validateInvoiceReferencesOrder(authorizePaymentActions: IAuthor
4
4
  /**
5
5
  * 受け入れられた興行オファー
6
6
  */
7
- eventReservationAcceptedOffers: factory.order.IAcceptedOffer[]): void;
7
+ eventReservationAcceptedOffers: Pick<factory.order.IAcceptedOffer, 'itemOffered'>[]): void;
8
8
  export { validateInvoiceReferencesOrder };
@@ -18,4 +18,4 @@ authorizedMovieTickets: IMovieTicket4validate[],
18
18
  /**
19
19
  * 受け入れられた興行オファー
20
20
  */
21
- eventReservationAcceptedOffers: factory.order.IAcceptedOffer[]): void;
21
+ eventReservationAcceptedOffers: Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[]): void;
@@ -5,7 +5,7 @@ export { IAcceptPayAction, IAuthorizeEventServiceOffer, IAuthorizePaymentAction,
5
5
  /**
6
6
  * 取引が確定可能な状態かどうかをチェックする
7
7
  */
8
- export declare function validateTransaction(transaction: Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'object'>, acceptPayActions: IAcceptPayAction[], authorizePaymentActions: IAuthorizePaymentAction[], authorizeEventServiceOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[], eventReservationAcceptedOffers: factory.order.IAcceptedOffer[], payTransactions: IPayTransaction[], customer: factory.order.ICustomer): void;
8
+ export declare function validateTransaction(transaction: Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'object'>, acceptPayActions: IAcceptPayAction[], authorizePaymentActions: IAuthorizePaymentAction[], authorizeEventServiceOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[], eventReservationAcceptedOffers: Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[], payTransactions: IPayTransaction[], customer: factory.order.ICustomer): void;
9
9
  export type IOrderURLGenerator = (order: factory.order.IOrder) => string;
10
10
  /**
11
11
  * 注文オファー数検証
@@ -14,7 +14,7 @@ export declare function validateAcceptedOffers(params: {
14
14
  result: {
15
15
  order: PlaceOrderFactory.IResultOrderParams;
16
16
  };
17
- acceptedOffers: factory.order.IAcceptedOffer[];
17
+ acceptedOffers: (Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'offeredThrough' | 'serialNumber'>)[];
18
18
  }): void;
19
19
  export declare function validateOrderedItem(params: {
20
20
  order: Pick<factory.order.IOrder, 'orderedItem'>;
@@ -8,7 +8,6 @@ const debug_1 = __importDefault(require("debug"));
8
8
  const moment_1 = __importDefault(require("moment"));
9
9
  const errorHandler_1 = require("../../../errorHandler");
10
10
  const factory_1 = require("../../../factory");
11
- // import { Settings } from '../../../settings';
12
11
  const factory_2 = require("../../order/placeOrder/factory");
13
12
  const orderedItem_1 = require("../../order/placeOrder/factory/orderedItem");
14
13
  const result_1 = require("./confirm/factory/result");
@@ -99,7 +98,10 @@ function confirm(params, options) {
99
98
  // authorizeProductOfferActions,
100
99
  serialNumbers } = dissolveAuthorizeActions(completedAuthorizeActions);
101
100
  // orderInTransactionから検索する(2024-03-04~)
102
- const acceptedOffers = (await repos.orderInTransaction.findAcceptedOffersByOrderNumber({ orderNumber: { $eq: orderNumber } }))
101
+ const acceptedOffers = (await repos.orderInTransaction.findAcceptedOffersWithPriceByOrderNumber({
102
+ orderNumber,
103
+ project: { id: transaction.project.id }
104
+ }))
103
105
  .filter(({ serialNumber }) => typeof serialNumber === 'string' && serialNumbers.includes(serialNumber));
104
106
  // authorizePaymentActionsからpayTransactionsを参照(2024-06-20~)
105
107
  let payTransactions = [];
@@ -288,7 +290,7 @@ function createResult(params, options) {
288
290
  const itemOfferedTypeOf = acceptedOffer.itemOffered.typeOf;
289
291
  switch (itemOfferedTypeOf) {
290
292
  case factory_1.factory.reservationType.EventReservation:
291
- eventReservationAcceptedOffers.push(acceptedOffer);
293
+ eventReservationAcceptedOffers.push((acceptedOffer));
292
294
  break;
293
295
  // case factory.permit.PermitType.Permit:
294
296
  // productAcceptedOffers.push((acceptedOffer as factory.order.IAcceptedOffer<factory.order.IPermit>));
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.exportTasksById = exportTasksById;
7
7
  const moment_1 = __importDefault(require("moment"));
8
8
  const factory_1 = require("../../../factory");
9
- // import { Settings } from '../../../settings';
10
9
  const factory_2 = require("./exportTasks/factory");
11
10
  /**
12
11
  * 取引のタスクを出力します
@@ -4,7 +4,6 @@ exports.updateAgent = updateAgent;
4
4
  const google_libphonenumber_1 = require("google-libphonenumber");
5
5
  const factory_1 = require("../../../factory");
6
6
  const issueOrderNumberIfNotExist_1 = require("./issueOrderNumberIfNotExist");
7
- // import { Settings } from '../settings';
8
7
  // export type ITransactionOperation<T> = (repos: { transaction: TransactionRepo }) => Promise<T>;
9
8
  function fixCustomer(params) {
10
9
  return async (repos) => {
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createTasks = createTasks;
7
7
  const moment_1 = __importDefault(require("moment"));
8
8
  const factory_1 = require("../../../../factory");
9
- // import { Settings } from '../../../../settings';
10
9
  /**
11
10
  * 取引のタスクを作成する
12
11
  */
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createReturnPaymentMethodActions = createReturnPaymentMethodActions;
4
4
  const emailMessageBuilder_1 = require("../../../../emailMessageBuilder");
5
5
  const factory_1 = require("../../../../factory");
6
- // import { Settings } from '../../../../settings';
7
6
  async function createReturnInvoicePotentialActions(params,
8
7
  // settings: Settings
9
8
  setting) {
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createPotentialActions = createPotentialActions;
4
4
  const factory_1 = require("../../../factory");
5
- // import { Settings } from '../../../settings';
6
5
  const returnPaymentMethod_1 = require("./potentialActions/returnPaymentMethod");
7
6
  const sendEmailMessage_1 = require("./potentialActions/sendEmailMessage");
8
7
  async function createPotentialActions(params,
@@ -141,9 +141,6 @@ function fixOrders(params) {
141
141
  const eventIds = await repos.acceptedOffer.distinctValues({
142
142
  orderNumber: { $in: [params.object.order[0].orderNumber] }
143
143
  }, 'acceptedOffers.itemOffered.reservationFor.id');
144
- // const acceptedOffers = await repos.acceptedOffer.searchAcceptedOffersByOrderNumbers({
145
- // orderNumber: { $in: [params.object.order[0].orderNumber] }
146
- // });
147
144
  const acceptedOffers = await repos.acceptedOffer.searchAcceptedOffersByOrderNumber({
148
145
  orderNumber: { $eq: params.object.order[0].orderNumber },
149
146
  project: { id: { $eq: params.project.id } }