@chevre/domain 24.0.0-alpha.40 → 24.0.0-alpha.41

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 (228) hide show
  1. package/lib/chevre/repo/accountTitle.d.ts +3 -3
  2. package/lib/chevre/repo/action/pay.d.ts +9 -0
  3. package/lib/chevre/repo/action/pay.js +13 -0
  4. package/lib/chevre/repo/action/refund.d.ts +9 -0
  5. package/lib/chevre/repo/action/refund.js +13 -0
  6. package/lib/chevre/repo/action.d.ts +3 -3
  7. package/lib/chevre/repo/additionalProperty.js +2 -2
  8. package/lib/chevre/repo/advanceBookingRequirement.d.ts +1 -3
  9. package/lib/chevre/repo/advanceBookingRequirement.js +2 -2
  10. package/lib/chevre/repo/aggregateOffer.d.ts +5 -9
  11. package/lib/chevre/repo/aggregateOffer.js +3 -3
  12. package/lib/chevre/repo/assetTransaction.d.ts +3 -3
  13. package/lib/chevre/repo/assetTransaction.js +12 -6
  14. package/lib/chevre/repo/categoryCode.d.ts +4 -6
  15. package/lib/chevre/repo/categoryCode.js +2 -2
  16. package/lib/chevre/repo/comment.d.ts +3 -3
  17. package/lib/chevre/repo/creativeWork.d.ts +3 -3
  18. package/lib/chevre/repo/creativeWork.js +3 -3
  19. package/lib/chevre/repo/customer.d.ts +3 -3
  20. package/lib/chevre/repo/customer.js +2 -2
  21. package/lib/chevre/repo/emailMessage.js +1 -1
  22. package/lib/chevre/repo/event.d.ts +6 -6
  23. package/lib/chevre/repo/event.js +10 -4
  24. package/lib/chevre/repo/eventSeries.d.ts +6 -6
  25. package/lib/chevre/repo/eventSeries.js +2 -2
  26. package/lib/chevre/repo/identity.d.ts +4 -6
  27. package/lib/chevre/repo/identityProvider.d.ts +4 -6
  28. package/lib/chevre/repo/identityProvider.js +2 -2
  29. package/lib/chevre/repo/issuer.d.ts +3 -3
  30. package/lib/chevre/repo/issuer.js +3 -3
  31. package/lib/chevre/repo/member.d.ts +3 -3
  32. package/lib/chevre/repo/merchantReturnPolicy.d.ts +3 -3
  33. package/lib/chevre/repo/merchantReturnPolicy.js +1 -1
  34. package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +2 -2
  35. package/lib/chevre/repo/mongoose/schemas/account.d.ts +2 -2
  36. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +2 -2
  37. package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +2 -2
  38. package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +2 -2
  39. package/lib/chevre/repo/mongoose/schemas/action.d.ts +2 -2
  40. package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +2 -2
  41. package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +2 -2
  42. package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.d.ts +2 -2
  43. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +2 -2
  44. package/lib/chevre/repo/mongoose/schemas/aggregateOrder.d.ts +2 -2
  45. package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +2 -2
  46. package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +2 -2
  47. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +2 -2
  48. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +2 -2
  49. package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +2 -2
  50. package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +2 -2
  51. package/lib/chevre/repo/mongoose/schemas/comments.d.ts +2 -2
  52. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +2 -2
  53. package/lib/chevre/repo/mongoose/schemas/customer.d.ts +2 -2
  54. package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +2 -2
  55. package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +2 -2
  56. package/lib/chevre/repo/mongoose/schemas/event.d.ts +2 -2
  57. package/lib/chevre/repo/mongoose/schemas/eventOffer.d.ts +2 -2
  58. package/lib/chevre/repo/mongoose/schemas/eventSeries.d.ts +2 -2
  59. package/lib/chevre/repo/mongoose/schemas/identity.d.ts +2 -2
  60. package/lib/chevre/repo/mongoose/schemas/identityProvider.d.ts +2 -2
  61. package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +2 -2
  62. package/lib/chevre/repo/mongoose/schemas/member/global.d.ts +2 -2
  63. package/lib/chevre/repo/mongoose/schemas/member.d.ts +2 -2
  64. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +2 -2
  65. package/lib/chevre/repo/mongoose/schemas/message.d.ts +2 -2
  66. package/lib/chevre/repo/mongoose/schemas/movieTicketTypes.d.ts +2 -2
  67. package/lib/chevre/repo/mongoose/schemas/note.d.ts +2 -2
  68. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +2 -2
  69. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +2 -2
  70. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +2 -2
  71. package/lib/chevre/repo/mongoose/schemas/order.d.ts +2 -2
  72. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +2 -2
  73. package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +2 -2
  74. package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +2 -2
  75. package/lib/chevre/repo/mongoose/schemas/pendingReservation.d.ts +2 -2
  76. package/lib/chevre/repo/mongoose/schemas/pendingReservationAggregate.d.ts +2 -2
  77. package/lib/chevre/repo/mongoose/schemas/place.d.ts +2 -2
  78. package/lib/chevre/repo/mongoose/schemas/potentialAction.d.ts +2 -2
  79. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +2 -2
  80. package/lib/chevre/repo/mongoose/schemas/product.d.ts +2 -2
  81. package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +2 -2
  82. package/lib/chevre/repo/mongoose/schemas/productOffer.d.ts +2 -2
  83. package/lib/chevre/repo/mongoose/schemas/project.d.ts +2 -2
  84. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +2 -2
  85. package/lib/chevre/repo/mongoose/schemas/reserveInterface.d.ts +2 -2
  86. package/lib/chevre/repo/mongoose/schemas/role.d.ts +2 -2
  87. package/lib/chevre/repo/mongoose/schemas/schedule.d.ts +2 -2
  88. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +2 -2
  89. package/lib/chevre/repo/mongoose/schemas/sellerReturnPolicy.d.ts +2 -2
  90. package/lib/chevre/repo/mongoose/schemas/service/availableHour.d.ts +2 -2
  91. package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +2 -2
  92. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +2 -2
  93. package/lib/chevre/repo/mongoose/schemas/task.d.ts +2 -2
  94. package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +2 -2
  95. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +2 -2
  96. package/lib/chevre/repo/mongoose/schemas/transactionNumber.d.ts +2 -2
  97. package/lib/chevre/repo/mongoose/schemas/trip.d.ts +2 -2
  98. package/lib/chevre/repo/mongoose/schemas/webSite.d.ts +2 -2
  99. package/lib/chevre/repo/movieTicketType.d.ts +1 -3
  100. package/lib/chevre/repo/movieTicketType.js +2 -2
  101. package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +1 -3
  102. package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +1 -3
  103. package/lib/chevre/repo/offerCatalog.d.ts +3 -3
  104. package/lib/chevre/repo/offerCatalog.js +5 -4
  105. package/lib/chevre/repo/offerCatalogItem.js +4 -4
  106. package/lib/chevre/repo/offerItemCondition.js +2 -2
  107. package/lib/chevre/repo/order.d.ts +3 -3
  108. package/lib/chevre/repo/ownershipInfo.d.ts +3 -3
  109. package/lib/chevre/repo/passport.js +1 -1
  110. package/lib/chevre/repo/paymentService.d.ts +1 -3
  111. package/lib/chevre/repo/paymentService.js +2 -2
  112. package/lib/chevre/repo/paymentServiceChannel.d.ts +1 -3
  113. package/lib/chevre/repo/paymentServiceChannel.js +2 -2
  114. package/lib/chevre/repo/person.js +2 -2
  115. package/lib/chevre/repo/place/busStop.js +1 -1
  116. package/lib/chevre/repo/place/movieTheater.d.ts +3 -3
  117. package/lib/chevre/repo/place/movieTheater.js +10 -4
  118. package/lib/chevre/repo/place/screeningRoom.d.ts +3 -3
  119. package/lib/chevre/repo/place/screeningRoom.js +2 -2
  120. package/lib/chevre/repo/place/seat.d.ts +2 -4
  121. package/lib/chevre/repo/potentialAction.d.ts +4 -6
  122. package/lib/chevre/repo/potentialAction.js +2 -2
  123. package/lib/chevre/repo/priceSpecification.d.ts +3 -3
  124. package/lib/chevre/repo/priceSpecification.js +2 -2
  125. package/lib/chevre/repo/product.d.ts +5 -9
  126. package/lib/chevre/repo/product.js +3 -3
  127. package/lib/chevre/repo/productModel.js +2 -2
  128. package/lib/chevre/repo/project.d.ts +3 -3
  129. package/lib/chevre/repo/rateLimit/offer.js +1 -1
  130. package/lib/chevre/repo/reservation.d.ts +4 -6
  131. package/lib/chevre/repo/seller.d.ts +5 -9
  132. package/lib/chevre/repo/seller.js +2 -2
  133. package/lib/chevre/repo/sellerReturnPolicy.d.ts +1 -3
  134. package/lib/chevre/repo/sellerReturnPolicy.js +2 -2
  135. package/lib/chevre/repo/task.d.ts +3 -3
  136. package/lib/chevre/repo/task.js +1 -1
  137. package/lib/chevre/repo/transaction.d.ts +3 -3
  138. package/lib/chevre/repo/transactionProcess.js +1 -1
  139. package/lib/chevre/repo/trip.d.ts +4 -12
  140. package/lib/chevre/repo/trip.js +3 -3
  141. package/lib/chevre/repo/webSite.d.ts +1 -3
  142. package/lib/chevre/repo/webSite.js +3 -2
  143. package/lib/chevre/repository.d.ts +10 -0
  144. package/lib/chevre/repository.js +22 -0
  145. package/lib/chevre/service/assetTransaction/moneyTransfer.js +8 -5
  146. package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +1 -1
  147. package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +2 -1
  148. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +2 -1
  149. package/lib/chevre/service/assetTransaction/pay/start/factory.js +2 -1
  150. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +6 -0
  151. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +6 -0
  152. package/lib/chevre/service/assetTransaction/pay/start.d.ts +6 -0
  153. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +6 -3
  154. package/lib/chevre/service/delivery/factory.js +2 -1
  155. package/lib/chevre/service/event/saveScreeningEvents.js +2 -2
  156. package/lib/chevre/service/event.js +1 -1
  157. package/lib/chevre/service/notification/notifyByEmail.d.ts +1 -1
  158. package/lib/chevre/service/notification/triggerWebhook.js +1 -1
  159. package/lib/chevre/service/offer/event/authorize.js +2 -1
  160. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +2 -1
  161. package/lib/chevre/service/offer/event/searchOffersByIds.js +2 -1
  162. package/lib/chevre/service/offer/event/voidTransaction.js +6 -3
  163. package/lib/chevre/service/offer/event/voidTransactionByActionId.js +2 -1
  164. package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +1 -1
  165. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.d.ts +1 -1
  166. package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +2 -1
  167. package/lib/chevre/service/offer/product.js +1 -1
  168. package/lib/chevre/service/order/confirmPayTransaction.d.ts +1 -1
  169. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -1
  170. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +4 -2
  171. package/lib/chevre/service/payment/any/authorize.d.ts +6 -0
  172. package/lib/chevre/service/payment/any/findAcceptAction.js +2 -1
  173. package/lib/chevre/service/payment/any/findAuthorizeAction.js +2 -1
  174. package/lib/chevre/service/payment/any/findCheckAction.js +2 -1
  175. package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +2 -1
  176. package/lib/chevre/service/payment/any/onPayActionCompleted.d.ts +6 -2
  177. package/lib/chevre/service/payment/any/onPayActionCompleted.js +7 -2
  178. package/lib/chevre/service/payment/any/onPaymentStatusChanged.d.ts +10 -5
  179. package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +21 -11
  180. package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.d.ts +12 -10
  181. package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +9 -6
  182. package/lib/chevre/service/payment/any/processVoidPayTransaction.js +2 -1
  183. package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +2 -1
  184. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +1 -1
  185. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +6 -0
  186. package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +6 -0
  187. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
  188. package/lib/chevre/service/payment/faceToFace.d.ts +10 -0
  189. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +2 -1
  190. package/lib/chevre/service/payment/factory.js +4 -2
  191. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +6 -0
  192. package/lib/chevre/service/payment/movieTicket/authorize.js +1 -1
  193. package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.d.ts +12 -0
  194. package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +72 -0
  195. package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.d.ts +8 -0
  196. package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.js +29 -0
  197. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +7 -1
  198. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +4 -71
  199. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +6 -0
  200. package/lib/chevre/service/payment/movieTicket/validation.d.ts +1 -2
  201. package/lib/chevre/service/payment/movieTicket/validation.js +37 -29
  202. package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +6 -0
  203. package/lib/chevre/service/payment/paymentCard.d.ts +10 -0
  204. package/lib/chevre/service/permit.js +4 -2
  205. package/lib/chevre/service/reserve/factory.d.ts +1 -1
  206. package/lib/chevre/service/reserve/findByCode.js +2 -1
  207. package/lib/chevre/service/reserve/searchByOrder.js +2 -1
  208. package/lib/chevre/service/reserve/verifyToken4reservation.js +2 -1
  209. package/lib/chevre/service/task/authorizePayment.js +6 -0
  210. package/lib/chevre/service/task/confirmReserveTransaction.js +4 -2
  211. package/lib/chevre/service/task/invalidatePaymentUrl.js +6 -0
  212. package/lib/chevre/service/task/onResourceUpdated.js +1 -1
  213. package/lib/chevre/service/task/pay.js +6 -0
  214. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +6 -0
  215. package/lib/chevre/service/task/payment/payByTask.d.ts +6 -0
  216. package/lib/chevre/service/task/payment/payByTask.js +2 -1
  217. package/lib/chevre/service/task/payment/refundByTask.d.ts +6 -0
  218. package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +6 -0
  219. package/lib/chevre/service/task/refund.js +6 -0
  220. package/lib/chevre/service/task/returnReserveTransaction.js +2 -1
  221. package/lib/chevre/service/task/voidPayment.js +6 -0
  222. package/lib/chevre/service/transaction/deleteTransaction.js +4 -2
  223. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +2 -1
  224. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +2 -1
  225. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +2 -2
  226. package/lib/chevre/service/transaction/returnOrder/preStart/getReturnPolicyByProject.js +5 -3
  227. package/lib/chevre/service/validation/validateOrder.js +4 -2
  228. package/package.json +1 -1
@@ -347,7 +347,7 @@ function acceptedOfferWithoutDetail2acceptedOffer(params) {
347
347
  // };
348
348
  // itemOfferedServiceOutput = serviceOutputAsBusReservation;
349
349
  // break;
350
- case factory.reservationType.EventReservation:
350
+ case factory.reservationType.EventReservation: {
351
351
  const serviceOutputAsEventReservation = {
352
352
  typeOf,
353
353
  ...(Array.isArray(additionalProperty)) ? { additionalProperty } : undefined,
@@ -365,6 +365,7 @@ function acceptedOfferWithoutDetail2acceptedOffer(params) {
365
365
  };
366
366
  itemOfferedServiceOutput = serviceOutputAsEventReservation;
367
367
  break;
368
+ }
368
369
  default:
369
370
  throw new factory.errors.NotImplemented(`serviceOutput not implemented. typeOf:${typeOf}`);
370
371
  // no op
@@ -243,7 +243,7 @@ function searchEventTicketOffers(params) {
243
243
  switch (eventOffers.offeredThrough.identifier) {
244
244
  case factory.service.webAPI.Identifier.COA:
245
245
  throw new factory.errors.NotImplemented(`booking service '${eventOffers.offeredThrough.identifier}' not implemented`);
246
- default:
246
+ default: {
247
247
  const searchOffersResult = await searchEventTicketOffersByEvent({
248
248
  event,
249
249
  store: params.store,
@@ -258,6 +258,7 @@ function searchEventTicketOffers(params) {
258
258
  })(repos);
259
259
  offers = searchOffersResult.ticketOffers;
260
260
  unitPriceOffers = searchOffersResult.unitPriceOffers;
261
+ }
261
262
  }
262
263
  return { ticketOffers: offers, unitPriceOffers };
263
264
  };
@@ -230,7 +230,7 @@ function searchOffersByIds(params) {
230
230
  switch (eventOffers.offeredThrough.identifier) {
231
231
  case factory.service.webAPI.Identifier.COA:
232
232
  throw new factory.errors.NotImplemented(`booking service '${eventOffers.offeredThrough.identifier}' not implemented`);
233
- default:
233
+ default: {
234
234
  const searchOffersResult = await searchEventTicketOffersByEvent({
235
235
  ids: params.ids,
236
236
  event,
@@ -246,6 +246,7 @@ function searchOffersByIds(params) {
246
246
  })(repos);
247
247
  offers = searchOffersResult.ticketOffers;
248
248
  unitPriceOffers = searchOffersResult.unitPriceOffers;
249
+ }
249
250
  }
250
251
  return { ticketOffers: offers, unitPriceOffers };
251
252
  };
@@ -59,7 +59,7 @@ function voidTransaction(params) {
59
59
  case factory.transactionStatusType.InProgress:
60
60
  throw new factory.errors.NotImplemented(`${transaction.status} not implemented`);
61
61
  // 確定取引に対応(2023-05-07~)
62
- case factory.transactionStatusType.Confirmed:
62
+ case factory.transactionStatusType.Confirmed: {
63
63
  // OrderCancelledを考慮(2023-08-30~)
64
64
  const orderCancelled = params.purpose.result?.order?.orderStatus === factory.orderStatus.OrderCancelled;
65
65
  if (!orderCancelled) {
@@ -67,6 +67,7 @@ function voidTransaction(params) {
67
67
  authorizeActions = authorizeActions.filter((a) => a.actionStatus !== factory.actionStatusType.CompletedActionStatus);
68
68
  }
69
69
  break;
70
+ }
70
71
  default:
71
72
  // no op
72
73
  }
@@ -92,7 +93,7 @@ function voidTransaction(params) {
92
93
  await repos.authorizeOfferAction.cancelWithVoid({ typeOf: action.typeOf, id: action.id, cancelAction });
93
94
  switch (action.instrument.typeOf) {
94
95
  // case WebAPIIdentifier.COA:
95
- case factory.assetTransactionType.COAReserveTransaction:
96
+ case factory.assetTransactionType.COAReserveTransaction: {
96
97
  const { reserveService } = repos;
97
98
  if (reserveService === undefined) {
98
99
  throw new factory.errors.Internal('repos.reserveService required');
@@ -103,6 +104,7 @@ function voidTransaction(params) {
103
104
  task: repos.task
104
105
  });
105
106
  break;
107
+ }
106
108
  default:
107
109
  await (0, processVoidTransaction4chevre_1.processVoidTransaction4chevre)({
108
110
  // action: <factory.action.authorize.offer.eventService.IAction<WebAPIIdentifier.Chevre>>action
@@ -150,7 +152,7 @@ function cancelAcceptActions(params) {
150
152
  switch (transaction.status) {
151
153
  case factory.transactionStatusType.InProgress:
152
154
  throw new factory.errors.NotImplemented(`${transaction.status} not implemented`);
153
- case factory.transactionStatusType.Confirmed:
155
+ case factory.transactionStatusType.Confirmed: {
154
156
  // OrderCancelledを考慮
155
157
  const orderCancelled = params.purpose.result?.order?.orderStatus === factory.orderStatus.OrderCancelled;
156
158
  if (!orderCancelled) {
@@ -168,6 +170,7 @@ function cancelAcceptActions(params) {
168
170
  });
169
171
  }
170
172
  break;
173
+ }
171
174
  default:
172
175
  // no op
173
176
  }
@@ -69,7 +69,7 @@ function voidTransactionByActionId(params) {
69
69
  })(repos);
70
70
  }
71
71
  switch (action.instrument.typeOf) {
72
- case factory.assetTransactionType.COAReserveTransaction:
72
+ case factory.assetTransactionType.COAReserveTransaction: {
73
73
  const { reserveService } = repos;
74
74
  if (reserveService === undefined) {
75
75
  throw new factory.errors.Internal('repos.reserveService required');
@@ -80,6 +80,7 @@ function voidTransactionByActionId(params) {
80
80
  task: repos.task
81
81
  });
82
82
  break;
83
+ }
83
84
  default:
84
85
  await (0, processVoidTransaction4chevre_1.processVoidTransaction4chevre)({
85
86
  action
@@ -53,7 +53,7 @@ export declare function authorize(params: {
53
53
  requestBody: IRequestBody;
54
54
  responseBody: IResponseBody;
55
55
  };
56
- options: {};
56
+ options: Record<string, never>;
57
57
  }): IAuthorizeOperation<Pick<IAuthorizeOfferAction, 'id' | 'instrument'> & {
58
58
  result: IAuthorizeOfferAction['result'];
59
59
  }>;
@@ -17,7 +17,7 @@ export declare function changeOffers(params: {
17
17
  transaction: {
18
18
  id: string;
19
19
  };
20
- options: {};
20
+ options: Record<string, never>;
21
21
  }): IAuthorizeOperation<Pick<IAuthorizeOfferAction, 'id' | 'instrument'> & {
22
22
  result: IAuthorizeOfferAction['result'];
23
23
  }>;
@@ -53,7 +53,7 @@ function findAcceptAction(params) {
53
53
  switch (task.status) {
54
54
  case factory.taskStatus.Ready:
55
55
  break;
56
- default:
56
+ default: {
57
57
  // タスクがReadyでなければアクション検索
58
58
  const acceptAction = (await repos.action.searchBySameAs({
59
59
  sameAs: { id: { $eq: task.id } },
@@ -77,6 +77,7 @@ function findAcceptAction(params) {
77
77
  : undefined
78
78
  };
79
79
  }
80
+ }
80
81
  }
81
82
  return action;
82
83
  };
@@ -128,7 +128,7 @@ function authorize(params) {
128
128
  availableOffers,
129
129
  seller: transaction.seller,
130
130
  orderNumber
131
- })(repos);
131
+ })({});
132
132
  acceptedOffer = await createServiceOutputIdentifier({ acceptedOffer, product })(repos);
133
133
  let requestBody;
134
134
  let responseBody;
@@ -12,7 +12,7 @@ declare function confirmPayTransaction(data: factory.task.IData<factory.taskName
12
12
  id: string;
13
13
  typeOf: factory.organizationType.Project;
14
14
  };
15
- }, options: {}): (repos: {
15
+ }, options: Record<string, never>): (repos: {
16
16
  acceptedOffer: AcceptedOfferRepo;
17
17
  action: ActionRepo;
18
18
  assetTransaction: AssetTransactionRepo;
@@ -40,7 +40,7 @@ function onAssetTransactionStatusChanged(params) {
40
40
  throw new factory.errors.Argument('useOnOrderStatusChanged', 'must be boolean');
41
41
  }
42
42
  switch (params.object.status) {
43
- case factory.transactionStatusType.Confirmed:
43
+ case factory.transactionStatusType.Confirmed: {
44
44
  const orderNumber = params.purpose?.orderNumber;
45
45
  const confirmationNumber = params.purpose?.confirmationNumber;
46
46
  switch (params.object.typeOf) {
@@ -109,6 +109,7 @@ function onAssetTransactionStatusChanged(params) {
109
109
  // no op
110
110
  }
111
111
  break;
112
+ }
112
113
  case factory.transactionStatusType.Canceled:
113
114
  case factory.transactionStatusType.Expired:
114
115
  switch (params.object.typeOf) {
@@ -59,7 +59,7 @@ function onOrderReturned(params) {
59
59
  orderDate: params.order.orderDate
60
60
  };
61
61
  switch (params.order.orderStatus) {
62
- case factory.orderStatus.OrderReturned:
62
+ case factory.orderStatus.OrderReturned: {
63
63
  const potentialActionsByTransaction = params.returnOrderTransaction?.potentialActions?.returnOrder?.find((returnOrderActionByTransaction) => {
64
64
  return returnOrderActionByTransaction.object.orderNumber === params.order.orderNumber;
65
65
  })?.potentialActions;
@@ -97,6 +97,7 @@ function onOrderReturned(params) {
97
97
  // : []
98
98
  ];
99
99
  break;
100
+ }
100
101
  default:
101
102
  throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
102
103
  }
@@ -119,7 +120,7 @@ function createReturnReserveTransactionTasks(order, simpleOrder) {
119
120
  // 予約番号ごとに返却アクションを作成する
120
121
  let returnReserveTransactionAction;
121
122
  switch (order.offeredThroughIdentifier) {
122
- case factory.service.webAPI.Identifier.COA:
123
+ case factory.service.webAPI.Identifier.COA: {
123
124
  // const superEventLocationBranchCode =
124
125
  // (<factory.order.IEventReservation>reservation).reservationFor?.superEvent.location.branchCode;
125
126
  // ↓1注文に複数施設はない想定なので、これで問題ない
@@ -148,6 +149,7 @@ function createReturnReserveTransactionTasks(order, simpleOrder) {
148
149
  recipient: returnActionRecipient
149
150
  };
150
151
  break;
152
+ }
151
153
  default:
152
154
  returnReserveTransactionAction = {
153
155
  project: order.project,
@@ -3,6 +3,8 @@ import { Settings } from '../../../settings';
3
3
  import type { AcceptedPaymentMethodRepo } from '../../../repo/acceptedPaymentMethod';
4
4
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
5
5
  import type { ActionRepo } from '../../../repo/action';
6
+ import type { PayActionRepo } from '../../../repo/action/pay';
7
+ import type { RefundActionRepo } from '../../../repo/action/refund';
6
8
  import type { CheckMovieTicketActionRepo } from '../../../repo/action/checkMovieTicket';
7
9
  import type { AcceptPayActionRepo } from '../../../repo/action/acceptPay';
8
10
  import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
@@ -28,6 +30,10 @@ interface IAuthorizeRepos {
28
30
  acceptedPaymentMethod: AcceptedPaymentMethodRepo;
29
31
  accountingReport: AccountingReportRepo;
30
32
  action: ActionRepo;
33
+ actions: {
34
+ pay: PayActionRepo;
35
+ refund: RefundActionRepo;
36
+ };
31
37
  checkMovieTicketAction: CheckMovieTicketActionRepo;
32
38
  acceptPayAction: AcceptPayActionRepo;
33
39
  authorizeInvoiceAction: AuthorizeInvoiceActionRepo;
@@ -53,7 +53,7 @@ function findAcceptAction(params) {
53
53
  switch (task.status) {
54
54
  case factory.taskStatus.Ready:
55
55
  break;
56
- default:
56
+ default: {
57
57
  // タスクがReadyでなければアクション検索
58
58
  const acceptAction = (await repos.acceptPayAction.searchBySameAs({
59
59
  sameAs: { id: { $eq: task.id } },
@@ -88,6 +88,7 @@ function findAcceptAction(params) {
88
88
  : undefined
89
89
  };
90
90
  }
91
+ }
91
92
  }
92
93
  return action;
93
94
  };
@@ -53,7 +53,7 @@ function findAuthorizeAction(params) {
53
53
  switch (task.status) {
54
54
  case factory.taskStatus.Ready:
55
55
  break;
56
- default:
56
+ default: {
57
57
  // タスクがReadyでなければアクション検索
58
58
  const authorizeAction = (await repos.authorizePaymentMethodAction.searchBySameAs({
59
59
  sameAs: { id: { $eq: task.id } },
@@ -77,6 +77,7 @@ function findAuthorizeAction(params) {
77
77
  : undefined
78
78
  };
79
79
  }
80
+ }
80
81
  }
81
82
  return action;
82
83
  };
@@ -53,7 +53,7 @@ function findCheckAction(params) {
53
53
  switch (task.status) {
54
54
  case factory.taskStatus.Ready:
55
55
  break;
56
- default:
56
+ default: {
57
57
  // タスクがReadyでなければアクション検索
58
58
  const authorizeAction = (await repos.checkMovieTicketAction.searchBySameAs({
59
59
  sameAs: { id: { $eq: task.id } },
@@ -83,6 +83,7 @@ function findCheckAction(params) {
83
83
  ...(purchaseNumberAuthResult !== undefined) ? { result: { purchaseNumberAuthResult } } : undefined
84
84
  };
85
85
  }
86
+ }
86
87
  }
87
88
  return action;
88
89
  };
@@ -62,7 +62,7 @@ function invalidatePaymentUrl(params) {
62
62
  switch (transaction.status) {
63
63
  case factory.transactionStatusType.InProgress:
64
64
  throw new factory.errors.NotImplemented(`${transaction.status} not implemented`);
65
- case factory.transactionStatusType.Confirmed:
65
+ case factory.transactionStatusType.Confirmed: {
66
66
  // support OrderCanceled(2025-02-25~)
67
67
  const orderCancelled = params.purpose.result?.order?.orderStatus === factory.orderStatus.OrderCancelled;
68
68
  if (!orderCancelled) {
@@ -72,6 +72,7 @@ function invalidatePaymentUrl(params) {
72
72
  }
73
73
  }
74
74
  break;
75
+ }
75
76
  default:
76
77
  // no op
77
78
  }
@@ -3,10 +3,14 @@
3
3
  */
4
4
  import * as factory from '../../../factory';
5
5
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
6
- import type { ActionRepo } from '../../../repo/action';
6
+ import type { PayActionRepo } from '../../../repo/action/pay';
7
+ import type { RefundActionRepo } from '../../../repo/action/refund';
7
8
  import type { TaskRepo } from '../../../repo/task';
8
9
  interface IOnPayActionCompletedRepos {
9
- action: ActionRepo;
10
+ actions: {
11
+ pay: PayActionRepo;
12
+ refund: RefundActionRepo;
13
+ };
10
14
  accountingReport: AccountingReportRepo;
11
15
  task: TaskRepo;
12
16
  }
@@ -45,12 +45,15 @@ function onPayActionCompleted(payAction) {
45
45
  await (0, onPaymentStatusChanged_1.onPaymentStatusChanged)(aciton4inform)(repos);
46
46
  }
47
47
  const informPayment = potentialActions?.informPayment;
48
+ /* istanbul ignore else -- @preserve */
48
49
  if (Array.isArray(informPayment)) {
49
50
  taskAttributes.push(...informPayment.map(({ purpose, id }) => {
50
51
  let data;
51
52
  if (typeof id === 'string' && id !== '') {
52
53
  let about;
54
+ /* istanbul ignore else -- @preserve */
53
55
  if (payAction.purpose.typeOf === factory.order.OrderType.Order) {
56
+ /* istanbul ignore else -- @preserve */
54
57
  if (typeof payAction.purpose.orderNumber === 'string') {
55
58
  about = { orderNumber: payAction.purpose.orderNumber, typeOf: factory.order.OrderType.Order };
56
59
  }
@@ -64,8 +67,10 @@ function onPayActionCompleted(payAction) {
64
67
  object: aciton4inform,
65
68
  id, // add potentialAction(2025-02-05~)
66
69
  typeOf: factory.actionType.InformAction,
67
- ...(typeof purpose?.typeOf === 'string') ? { purpose } : undefined,
68
- ...(typeof about?.typeOf === 'string') ? { about } : undefined // add(2025-02-14~)
70
+ // ...(typeof purpose?.typeOf === 'string') ? { purpose } : {},
71
+ // ...(typeof about?.typeOf === 'string') ? { about } : {}, // add(2025-02-14~)
72
+ ...(typeof purpose?.typeOf === 'string' && { purpose }),
73
+ ...(typeof about?.typeOf === 'string' && { about }),
69
74
  };
70
75
  }
71
76
  else {
@@ -1,10 +1,15 @@
1
1
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
2
- import type { ActionRepo } from '../../../repo/action';
2
+ import type { PayActionRepo } from '../../../repo/action/pay';
3
+ import type { RefundActionRepo } from '../../../repo/action/refund';
3
4
  import { INotification } from './factory';
5
+ export interface IOnPaymentStatusChangedRepos {
6
+ actions: {
7
+ pay: PayActionRepo;
8
+ refund: RefundActionRepo;
9
+ };
10
+ accountingReport: AccountingReportRepo;
11
+ }
4
12
  /**
5
13
  * 決済ステータス変更イベント
6
14
  */
7
- export declare function onPaymentStatusChanged(params: INotification): (repos: {
8
- action: ActionRepo;
9
- accountingReport: AccountingReportRepo;
10
- }) => Promise<void>;
15
+ export declare function onPaymentStatusChanged(params: Pick<INotification, 'id' | 'typeOf'>): (repos: IOnPaymentStatusChangedRepos) => Promise<void>;
@@ -32,19 +32,27 @@ const onRefunded_1 = require("./onPaymentStatusChanged/onRefunded");
32
32
  */
33
33
  function onPaymentStatusChanged(params) {
34
34
  return async (repos) => {
35
- // アクションリポジトリから実アクションを参照する
36
- // そうすることで、通知する情報は最低限で済む
37
- const action = await repos.action.findById({ id: params.id, typeOf: params.typeOf });
38
- const optimizedAction = optimizeAction4report(action);
39
- switch (optimizedAction.typeOf) {
40
- case factory.actionType.PayAction:
35
+ switch (params.typeOf) {
36
+ case factory.actionType.PayAction: {
37
+ // アクションリポジトリから実アクションを参照する
38
+ // そうすることで、通知する情報は最低限で済む
39
+ const action = await repos.actions.pay.findById({ id: params.id, typeOf: params.typeOf });
40
+ const optimizedAction = optimizeAction4report((action));
41
41
  await (0, onPaid_1.onPaid)(optimizedAction, { id: action.project.id })(repos);
42
42
  break;
43
- case factory.actionType.RefundAction:
43
+ }
44
+ case factory.actionType.RefundAction: {
45
+ // アクションリポジトリから実アクションを参照する
46
+ // そうすることで、通知する情報は最低限で済む
47
+ const action = await repos.actions.refund.findById({ id: params.id, typeOf: params.typeOf });
48
+ const optimizedAction = optimizeAction4report((action));
44
49
  await (0, onRefunded_1.onRefunded)(optimizedAction, { id: action.project.id })(repos);
45
50
  break;
46
- default:
47
- // no op
51
+ }
52
+ /* istanbul ignore next */
53
+ default: {
54
+ // no op
55
+ }
48
56
  }
49
57
  };
50
58
  }
@@ -56,7 +64,7 @@ function optimizeAction4report(action) {
56
64
  // 現時点で経理レポートで使用されているのは、typeOf,object,purpose,startDate
57
65
  const actionTypeOf = action.typeOf;
58
66
  switch (actionTypeOf) {
59
- case factory.actionType.PayAction:
67
+ case factory.actionType.PayAction: {
60
68
  const optimizedPayActionObject = action.object.map((o) => {
61
69
  return {
62
70
  id: o.id,
@@ -77,7 +85,8 @@ function optimizeAction4report(action) {
77
85
  };
78
86
  optimizedAction = optimizedPayAction;
79
87
  break;
80
- case factory.actionType.RefundAction:
88
+ }
89
+ case factory.actionType.RefundAction: {
81
90
  const optimizedRefundActionObject = action.object.map((o) => {
82
91
  return {
83
92
  id: o.id,
@@ -100,6 +109,7 @@ function optimizeAction4report(action) {
100
109
  };
101
110
  optimizedAction = optimizedRefundAction;
102
111
  break;
112
+ }
103
113
  default:
104
114
  throw new factory.errors.NotImplemented(`action type '${actionTypeOf}' not implemented`);
105
115
  }
@@ -1,18 +1,20 @@
1
- /**
2
- * 汎用決済サービス
3
- */
4
1
  import * as factory from '../../../factory';
5
2
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
6
- import type { ActionRepo } from '../../../repo/action';
3
+ import type { PayActionRepo } from '../../../repo/action/pay';
4
+ import type { RefundActionRepo } from '../../../repo/action/refund';
7
5
  import type { TaskRepo } from '../../../repo/task';
6
+ interface IOnRefundActionCompletedOrFailedRepos {
7
+ actions: {
8
+ pay: PayActionRepo;
9
+ refund: RefundActionRepo;
10
+ };
11
+ accountingReport: AccountingReportRepo;
12
+ task: TaskRepo;
13
+ }
8
14
  /**
9
15
  * 返金後のアクション
10
16
  */
11
17
  declare function onRefundActionCompletedOrFailed(refundAction: Pick<factory.action.trade.refund.IAction, 'id' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'typeOf'> & {
12
18
  actionStatus: factory.actionStatusType.CompletedActionStatus | factory.actionStatusType.FailedActionStatus;
13
- }): (repos: {
14
- action: ActionRepo;
15
- accountingReport: AccountingReportRepo;
16
- task: TaskRepo;
17
- }) => Promise<void>;
18
- export { onRefundActionCompletedOrFailed };
19
+ }): (repos: IOnRefundActionCompletedOrFailedRepos) => Promise<void>;
20
+ export { IOnRefundActionCompletedOrFailedRepos, onRefundActionCompletedOrFailed };
@@ -24,9 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.onRefundActionCompletedOrFailed = onRefundActionCompletedOrFailed;
27
- /**
28
- * 汎用決済サービス
29
- */
30
27
  const factory = __importStar(require("../../../factory"));
31
28
  const factory_1 = require("./factory");
32
29
  const onPaymentStatusChanged_1 = require("./onPaymentStatusChanged");
@@ -54,12 +51,14 @@ function onRefundActionCompletedOrFailed(refundAction) {
54
51
  // CreditCardIFのみ(2023-06-29~)
55
52
  const firstObject = refundAction.object[0];
56
53
  const paymentServiceType = firstObject?.typeOf;
54
+ /* istanbul ignore else -- @preserve */
57
55
  if (paymentServiceType === factory.service.paymentService.PaymentServiceType.CreditCard) {
58
56
  const refundFee = firstObject?.refundFee;
59
57
  if (typeof refundFee === 'number' && refundFee > 0) {
60
58
  // purpose.typeOf:PlaceOrderは外部決済URL無効化における返金アクションのみなので、手数料決済から除外してよい(2024-03-19~)
61
59
  // purpose.typeOf:Orderは決済カード承認時着券の取消なので、手数料決済から除外してよい
62
60
  // 手数料決済は注文返品による返金アクションからしか発生しないはず(2024-06-13~)
61
+ /* istanbul ignore else -- @preserve */
63
62
  if (refundAction.purpose.typeOf === factory.actionType.ReturnAction) {
64
63
  const payReturnFeeObject = [{
65
64
  typeOf: firstObject.typeOf,
@@ -86,7 +85,7 @@ function onRefundActionCompletedOrFailed(refundAction) {
86
85
  object: payReturnFeeObject,
87
86
  purpose: refundAction.purpose,
88
87
  potentialActions: {
89
- informPayment: (Array.isArray(informPayment)) ? informPayment : [],
88
+ informPayment: (Array.isArray(informPayment)) ? informPayment : /* istanbul ignore next -- @preserve */ [],
90
89
  add2report: true
91
90
  },
92
91
  instrument // add(2025-02-19~)
@@ -105,11 +104,13 @@ function onRefundActionCompletedOrFailed(refundAction) {
105
104
  }
106
105
  }
107
106
  }
107
+ /* istanbul ignore else -- @preserve */
108
108
  if (Array.isArray(informPayment)) {
109
109
  taskAttributes.push(...informPayment.map(({ purpose, id }) => {
110
110
  let data;
111
111
  if (typeof id === 'string' && id !== '') {
112
112
  let about;
113
+ /* istanbul ignore else -- @preserve */
113
114
  if (refundAction.purpose.typeOf === factory.actionType.ReturnAction) {
114
115
  about = {
115
116
  orderNumber: refundAction.purpose.object.orderNumber,
@@ -122,8 +123,10 @@ function onRefundActionCompletedOrFailed(refundAction) {
122
123
  object: aciton4inform,
123
124
  id, // add potentialAction(2025-02-05~)
124
125
  typeOf: factory.actionType.InformAction,
125
- ...(typeof purpose?.typeOf === 'string') ? { purpose } : undefined,
126
- ...(typeof about?.typeOf === 'string') ? { about } : undefined // add(2025-02-14~)
126
+ // ...(typeof purpose?.typeOf === 'string') ? { purpose } : undefined,
127
+ // ...(typeof about?.typeOf === 'string') ? { about } : undefined // add(2025-02-14~)
128
+ ...(typeof purpose?.typeOf === 'string' && { purpose }),
129
+ ...(typeof about?.typeOf === 'string' && { about }),
127
130
  };
128
131
  }
129
132
  else {
@@ -64,7 +64,7 @@ function processVoidPayTransaction(params) {
64
64
  switch (transaction.status) {
65
65
  case factory.transactionStatusType.InProgress:
66
66
  throw new factory.errors.NotImplemented(`${transaction.status} not implemented`);
67
- case factory.transactionStatusType.Confirmed:
67
+ case factory.transactionStatusType.Confirmed: {
68
68
  // OrderCancelledを考慮(2023-08-30~)
69
69
  const orderCancelled = params.purpose.result?.order?.orderStatus === factory.orderStatus.OrderCancelled;
70
70
  if (!orderCancelled) {
@@ -86,6 +86,7 @@ function processVoidPayTransaction(params) {
86
86
  authorizeActions.filter(({ object }) => !authorizedPaymentMethodIds.includes(object.paymentMethodId));
87
87
  }
88
88
  break;
89
+ }
89
90
  default:
90
91
  // no op
91
92
  }
@@ -35,7 +35,7 @@ function verifyTicketTokenAsNeeded(params) {
35
35
  switch (paymentServiceType) {
36
36
  case factory.service.paymentService.PaymentServiceType.CreditCard:
37
37
  case factory.service.paymentService.PaymentServiceType.MovieTicket:
38
- case factory.service.paymentService.PaymentServiceType.FaceToFace:
38
+ case factory.service.paymentService.PaymentServiceType.FaceToFace: {
39
39
  const ticket = (await repos.ticket.findTickets({
40
40
  limit: 1,
41
41
  page: 1,
@@ -88,6 +88,7 @@ function verifyTicketTokenAsNeeded(params) {
88
88
  throw new factory.errors.Argument('ticketToken', 'must be OwnershipInfo');
89
89
  }
90
90
  break;
91
+ }
91
92
  default:
92
93
  // no op
93
94
  throw new factory.errors.NotImplemented(`ticketToken issued through ${paymentServiceType} not implemented`);
@@ -45,7 +45,7 @@ function processAuthorizeCreditCard(params) {
45
45
  try {
46
46
  returnUrlObject = new URL(retUrl);
47
47
  }
48
- catch (error) {
48
+ catch (_error) {
49
49
  throw new factory.errors.Argument('object.creditCard.retUrl', 'retUrl unparsable');
50
50
  }
51
51
  const returnUrlShouldBeIncluded = `${returnUrlObject.origin}${returnUrlObject.pathname}`;
@@ -1,5 +1,7 @@
1
1
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
2
2
  import type { ActionRepo } from '../../../repo/action';
3
+ import type { PayActionRepo } from '../../../repo/action/pay';
4
+ import type { RefundActionRepo } from '../../../repo/action/refund';
3
5
  import type { PaymentServiceRepo } from '../../../repo/paymentService';
4
6
  import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
5
7
  import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
@@ -11,6 +13,10 @@ import { Settings } from '../../../settings';
11
13
  */
12
14
  declare function payCreditCard(params: factory.action.trade.pay.IAttributes): (repos: {
13
15
  action: ActionRepo;
16
+ actions: {
17
+ pay: PayActionRepo;
18
+ refund: RefundActionRepo;
19
+ };
14
20
  accountingReport: AccountingReportRepo;
15
21
  paymentAccepted: SellerPaymentAcceptedRepo;
16
22
  paymentService: PaymentServiceRepo;
@@ -1,5 +1,7 @@
1
1
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
2
2
  import type { ActionRepo } from '../../../repo/action';
3
+ import type { PayActionRepo } from '../../../repo/action/pay';
4
+ import type { RefundActionRepo } from '../../../repo/action/refund';
3
5
  import type { PaymentServiceRepo } from '../../../repo/paymentService';
4
6
  import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
5
7
  import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
@@ -16,6 +18,10 @@ declare function refundCreditCard(params: Pick<factory.action.trade.refund.IAttr
16
18
  };
17
19
  }): (repos: {
18
20
  action: ActionRepo;
21
+ actions: {
22
+ pay: PayActionRepo;
23
+ refund: RefundActionRepo;
24
+ };
19
25
  accountingReport: AccountingReportRepo;
20
26
  paymentAccepted: SellerPaymentAcceptedRepo;
21
27
  paymentService: PaymentServiceRepo;
@@ -72,7 +72,7 @@ function refundCreditCard(params
72
72
  project: params.project,
73
73
  id: paymentServiceId
74
74
  });
75
- const { sameAs, ...startingActionParams } = params;
75
+ const { sameAs, ...startingActionParams } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
76
76
  const action = await repos.action.start({
77
77
  ...startingActionParams,
78
78
  ...(typeof params.sameAs?.id === 'string') ? { sameAs: { id: params.sameAs.id, typeOf: 'Task' } } : undefined