@chevre/domain 25.2.0-alpha.5 → 25.2.0-alpha.51

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 (202) hide show
  1. package/lib/chevre/eventEmitter/task.d.ts +2 -1
  2. package/lib/chevre/factory/customerTelephone2COATelNum.d.ts +3 -0
  3. package/lib/chevre/factory/customerTelephone2COATelNum.js +22 -0
  4. package/lib/chevre/repo/action/acceptPay.d.ts +15 -0
  5. package/lib/chevre/repo/action/acceptPay.js +47 -19
  6. package/lib/chevre/repo/action/actionProcess.js +57 -57
  7. package/lib/chevre/repo/action.d.ts +16 -9
  8. package/lib/chevre/repo/action.js +99 -180
  9. package/lib/chevre/repo/aggregateOffer.d.ts +3 -14
  10. package/lib/chevre/repo/aggregateOffer.js +16 -125
  11. package/lib/chevre/repo/asyncAction.d.ts +69 -0
  12. package/lib/chevre/repo/asyncAction.js +237 -0
  13. package/lib/chevre/repo/concurrentLock.d.ts +3 -1
  14. package/lib/chevre/repo/creativeWork.d.ts +2 -3
  15. package/lib/chevre/repo/credentials.d.ts +2 -1
  16. package/lib/chevre/repo/customerType.d.ts +2 -3
  17. package/lib/chevre/repo/event.d.ts +10 -11
  18. package/lib/chevre/repo/eventOffer.d.ts +4 -5
  19. package/lib/chevre/repo/eventSellerMakesOffer.d.ts +2 -3
  20. package/lib/chevre/repo/eventSeries.d.ts +4 -5
  21. package/lib/chevre/repo/message.d.ts +1 -1
  22. package/lib/chevre/repo/message.js +1 -1
  23. package/lib/chevre/repo/mongoose/schemas/action.js +67 -66
  24. package/lib/chevre/repo/mongoose/schemas/asyncAction.d.ts +11 -0
  25. package/lib/chevre/repo/mongoose/schemas/asyncAction.js +89 -0
  26. package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
  27. package/lib/chevre/repo/mongoose/schemas/order.js +10 -0
  28. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -0
  29. package/lib/chevre/repo/mongoose/schemas/task.js +12 -12
  30. package/lib/chevre/repo/note.d.ts +3 -4
  31. package/lib/chevre/repo/noteAboutOrder.d.ts +2 -3
  32. package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +2 -2
  33. package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +2 -2
  34. package/lib/chevre/repo/offer/unitPriceInCatalog.js +59 -11
  35. package/lib/chevre/repo/offerCatalog.d.ts +2 -3
  36. package/lib/chevre/repo/offerCatalogItem.d.ts +2 -3
  37. package/lib/chevre/repo/order.d.ts +2 -0
  38. package/lib/chevre/repo/order.js +14 -14
  39. package/lib/chevre/repo/orderInTransaction.d.ts +68 -1
  40. package/lib/chevre/repo/orderInTransaction.js +181 -3
  41. package/lib/chevre/repo/passport.d.ts +2 -1
  42. package/lib/chevre/repo/person.d.ts +0 -15
  43. package/lib/chevre/repo/person.js +122 -108
  44. package/lib/chevre/repo/place/entranceGate.d.ts +4 -5
  45. package/lib/chevre/repo/place/movieTheater.d.ts +3 -4
  46. package/lib/chevre/repo/place/screeningRoom.d.ts +4 -5
  47. package/lib/chevre/repo/place/seat.d.ts +4 -5
  48. package/lib/chevre/repo/place/section.d.ts +3 -4
  49. package/lib/chevre/repo/priceSpecification.d.ts +4 -4
  50. package/lib/chevre/repo/product.d.ts +3 -4
  51. package/lib/chevre/repo/rateLimit/offer.d.ts +3 -1
  52. package/lib/chevre/repo/rateLimit/offer.js +0 -12
  53. package/lib/chevre/repo/reservation.d.ts +2 -3
  54. package/lib/chevre/repo/sellerMakesOffer.d.ts +3 -4
  55. package/lib/chevre/repo/stockHolder.d.ts +1 -1
  56. package/lib/chevre/repo/stockHolder.js +0 -146
  57. package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -45
  58. package/lib/chevre/repo/transaction/placeOrder.js +43 -83
  59. package/lib/chevre/repo/transaction.d.ts +2 -2
  60. package/lib/chevre/repo/transactionNumberCounter.js +0 -34
  61. package/lib/chevre/repo/transactionProcess.d.ts +2 -1
  62. package/lib/chevre/repo/transactionProcess.js +0 -13
  63. package/lib/chevre/repository.d.ts +5 -0
  64. package/lib/chevre/repository.js +12 -1
  65. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +1 -1
  66. package/lib/chevre/service/assetTransaction/pay/start/factory.d.ts +1 -1
  67. package/lib/chevre/service/assetTransaction/pay/start/factory.js +3 -4
  68. package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
  69. package/lib/chevre/service/asyncAction.d.ts +16 -0
  70. package/lib/chevre/service/asyncAction.js +36 -0
  71. package/lib/chevre/service/asyncActionHandler/onOperationFailed.d.ts +15 -0
  72. package/lib/chevre/service/asyncActionHandler/onOperationFailed.js +42 -0
  73. package/lib/chevre/service/asyncActionHandler.d.ts +13 -0
  74. package/lib/chevre/service/asyncActionHandler.js +89 -0
  75. package/lib/chevre/service/notification/factory.d.ts +2 -4
  76. package/lib/chevre/service/notification/factory.js +26 -24
  77. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +11 -5
  78. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +11 -3
  79. package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -5
  80. package/lib/chevre/service/offer/event/authorize/factory.js +93 -75
  81. package/lib/chevre/service/offer/event/authorize.d.ts +0 -4
  82. package/lib/chevre/service/offer/event/authorize.js +2 -2
  83. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +6 -7
  84. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +10 -10
  85. package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +2 -1
  86. package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +0 -5
  87. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +15 -12
  88. package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +0 -5
  89. package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.js +2 -2
  90. package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.d.ts +4 -0
  91. package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +22 -9
  92. package/lib/chevre/service/order/deleteOrder.d.ts +5 -1
  93. package/lib/chevre/service/order/deleteOrder.js +8 -1
  94. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionCanceled.js +19 -11
  95. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +2 -0
  96. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +2 -2
  97. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +1 -7
  98. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +2 -0
  99. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -0
  100. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +5 -1
  101. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +95 -33
  102. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +2 -2
  103. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +4 -2
  104. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +2 -6
  105. package/lib/chevre/service/order/payOrder.d.ts +2 -0
  106. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +2 -1
  107. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +13 -58
  108. package/lib/chevre/service/order/placeOrder/factory.js +3 -21
  109. package/lib/chevre/service/order/placeOrder.d.ts +4 -5
  110. package/lib/chevre/service/order/placeOrder.js +20 -31
  111. package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +1 -2
  112. package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +3 -2
  113. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +4 -3
  114. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +3 -31
  115. package/lib/chevre/service/payment/any/authorize.js +13 -37
  116. package/lib/chevre/service/payment/any/factory.d.ts +7 -7
  117. package/lib/chevre/service/payment/any/factory.js +19 -22
  118. package/lib/chevre/service/payment/any/findAcceptAction.d.ts +3 -1
  119. package/lib/chevre/service/payment/any/findAcceptAction.js +14 -6
  120. package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +2 -0
  121. package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +4 -66
  122. package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +4 -0
  123. package/lib/chevre/service/payment/any/publishPaymentUrl.js +4 -18
  124. package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +2 -0
  125. package/lib/chevre/service/payment/any/voidPayTransaction.js +1 -23
  126. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +1 -1
  127. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +5 -9
  128. package/lib/chevre/service/reserve/adminFindReservations.d.ts +15 -0
  129. package/lib/chevre/service/reserve/adminFindReservations.js +35 -0
  130. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +17 -8
  131. package/lib/chevre/service/reserve/searchByOrder.js +2 -6
  132. package/lib/chevre/service/reserve.d.ts +2 -2
  133. package/lib/chevre/service/reserve.js +3 -3
  134. package/lib/chevre/service/task/aggregateOffers.d.ts +2 -2
  135. package/lib/chevre/service/task/aggregateOffers.js +2 -1
  136. package/lib/chevre/service/task/aggregateScreeningEvent.d.ts +2 -2
  137. package/lib/chevre/service/task/aggregateScreeningEvent.js +2 -1
  138. package/lib/chevre/service/task/authorizePayment.js +3 -1
  139. package/lib/chevre/service/task/cancelReservation.d.ts +2 -2
  140. package/lib/chevre/service/task/cancelReservation.js +2 -1
  141. package/lib/chevre/service/task/confirmPayTransaction.js +0 -1
  142. package/lib/chevre/service/task/confirmReserveTransaction.js +2 -7
  143. package/lib/chevre/service/task/deleteTransaction.d.ts +2 -2
  144. package/lib/chevre/service/task/deleteTransaction.js +2 -1
  145. package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +2 -2
  146. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +4 -3
  147. package/lib/chevre/service/task/onEventChanged.d.ts +2 -2
  148. package/lib/chevre/service/task/onEventChanged.js +2 -1
  149. package/lib/chevre/service/task/onOrderPaymentCompleted.d.ts +2 -2
  150. package/lib/chevre/service/task/onOrderPaymentCompleted.js +4 -1
  151. package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.js +1 -1
  152. package/lib/chevre/service/task/onResourceUpdated.d.ts +2 -2
  153. package/lib/chevre/service/task/onResourceUpdated.js +2 -1
  154. package/lib/chevre/service/task/placeOrder.d.ts +2 -2
  155. package/lib/chevre/service/task/placeOrder.js +6 -3
  156. package/lib/chevre/service/task/publishPaymentUrl.js +7 -3
  157. package/lib/chevre/service/task/refund.d.ts +2 -2
  158. package/lib/chevre/service/task/refund.js +4 -10
  159. package/lib/chevre/service/task/reserve.d.ts +2 -2
  160. package/lib/chevre/service/task/reserve.js +2 -1
  161. package/lib/chevre/service/task/returnOrder.d.ts +2 -2
  162. package/lib/chevre/service/task/returnOrder.js +2 -1
  163. package/lib/chevre/service/task/sendOrder.d.ts +2 -2
  164. package/lib/chevre/service/task/sendOrder.js +2 -1
  165. package/lib/chevre/service/task/voidPayTransaction.js +3 -7
  166. package/lib/chevre/service/task/voidPayment.d.ts +2 -2
  167. package/lib/chevre/service/task/voidPayment.js +2 -1
  168. package/lib/chevre/service/taskHandler/onOperationFailed.js +1 -1
  169. package/lib/chevre/service/taskHandler.d.ts +2 -2
  170. package/lib/chevre/service/taskHandler.js +36 -37
  171. package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.d.ts +15 -0
  172. package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +51 -0
  173. package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.d.ts +23 -0
  174. package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +64 -0
  175. package/lib/chevre/service/transaction/deleteTransaction.js +15 -152
  176. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +28 -2
  177. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +11 -12
  178. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +4 -2
  179. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +6 -7
  180. package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +35 -2
  181. package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.js +15 -11
  182. package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +5 -1
  183. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +11 -2
  184. package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +53 -32
  185. package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +6 -5
  186. package/lib/chevre/service/transaction/placeOrder/confirm.js +33 -78
  187. package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.d.ts +4 -7
  188. package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.js +33 -15
  189. package/lib/chevre/service/transaction/placeOrder/start.d.ts +1 -1
  190. package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.d.ts +20 -0
  191. package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.js +63 -0
  192. package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +0 -1
  193. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +17 -86
  194. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
  195. package/lib/chevre/service.d.ts +4 -0
  196. package/lib/chevre/service.js +12 -1
  197. package/lib/chevre/taskSettings.d.ts +1 -3
  198. package/package.json +8 -11
  199. package/lib/chevre/service/order/findConfirmedPlaceOrder.d.ts +0 -13
  200. package/lib/chevre/service/order/findConfirmedPlaceOrder.js +0 -32
  201. package/lib/chevre/service/reserve/findReservations.d.ts +0 -33
  202. package/lib/chevre/service/reserve/findReservations.js +0 -61
@@ -8,7 +8,7 @@ exports.onOrderReturned = onOrderReturned;
8
8
  * 注文返品時処理
9
9
  */
10
10
  const debug_1 = __importDefault(require("debug"));
11
- const google_libphonenumber_1 = require("google-libphonenumber");
11
+ const customerTelephone2COATelNum_1 = require("../../../factory/customerTelephone2COATelNum");
12
12
  const factory_1 = require("../../../factory");
13
13
  // import { createMaskedCustomer } from '../../../factory/order';
14
14
  const factory_2 = require("./onOrderReturned/factory");
@@ -104,11 +104,7 @@ function createReturnReserveTransactionTasks(order, simpleOrder) {
104
104
  if (typeof superEventLocationBranchCode !== 'string') {
105
105
  throw new factory_1.factory.errors.ArgumentNull('order.reservationForSuperEventLocationBranchCodes');
106
106
  }
107
- const phoneUtil = google_libphonenumber_1.PhoneNumberUtil.getInstance();
108
- const phoneNumber = phoneUtil.parse(order.customer.telephone, 'JP');
109
- let telNum = phoneUtil.format(phoneNumber, google_libphonenumber_1.PhoneNumberFormat.NATIONAL);
110
- // COAでは数字のみ受け付けるので数字以外を除去
111
- telNum = telNum.replace(/[^\d]/g, '');
107
+ const telNum = (0, customerTelephone2COATelNum_1.customerTelephone2COATelNum)({ telephone: String(order.customer.telephone) });
112
108
  returnReserveTransactionAction = {
113
109
  project: order.project,
114
110
  typeOf: factory_1.factory.actionType.ReturnAction,
@@ -1,4 +1,5 @@
1
1
  import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
2
+ import type { MessageRepo } from '../../repo/message';
2
3
  import type { OrderRepo } from '../../repo/order';
3
4
  import type { SettingRepo } from '../../repo/setting';
4
5
  import type { TaskRepo } from '../../repo/task';
@@ -10,6 +11,7 @@ import type { IntegrationSettingRepo as Settings } from '../../repo/setting/inte
10
11
  */
11
12
  declare function payOrder(params: factory.task.IData<factory.taskName.OnOrderPaymentCompleted>): (repos: {
12
13
  acceptedOffer: AcceptedOfferRepo;
14
+ message: MessageRepo;
13
15
  order: OrderRepo;
14
16
  setting: SettingRepo;
15
17
  task: TaskRepo;
@@ -5,7 +5,6 @@ import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
5
5
  import { factory } from '../../../factory';
6
6
  type IPlaceOrderTransaction = Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'project' | 'typeOf' | 'result' | 'object' | 'seller'>;
7
7
  interface ICreatePlacingOrderFromExistingTransactionRepos {
8
- action?: never;
9
8
  authorizeOfferAction: AuthorizeOfferActionRepo;
10
9
  authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
11
10
  orderInTransaction: OrderInTransactionRepo;
@@ -18,6 +17,8 @@ declare function createPlacingOrderFromExistingTransaction(params: {
18
17
  confirmationNumber: string;
19
18
  orderNumber: string;
20
19
  }): (repos: ICreatePlacingOrderFromExistingTransactionRepos) => Promise<{
20
+ orderNumber: string;
21
+ confirmationNumber: string;
21
22
  order: IPlacingOrder;
22
23
  placeOrderTransaction: IPlaceOrderTransaction;
23
24
  serialNumbers: string[];
@@ -17,12 +17,6 @@ function createPlacingOrderFromExistingTransaction(params) {
17
17
  object: {
18
18
  orderNumber: { $eq: orderNumber },
19
19
  },
20
- // result: {
21
- // order: {
22
- // confirmationNumber: { $eq: confirmationNumber },
23
- // orderNumbers: [orderNumber]
24
- // }
25
- // },
26
20
  inclusion: ['project', 'typeOf', 'result', 'object', 'seller']
27
21
  });
28
22
  const placeOrderTransactionWithResult = placeOrderTransactions.shift();
@@ -39,43 +33,12 @@ function createPlacingOrderFromExistingTransaction(params) {
39
33
  const authorizeActionsAsResult = placeOrderTransactionWithResult.result?.authorizeActions;
40
34
  if (Array.isArray(authorizeActionsAsResult) && authorizeActionsAsResult.length > 0) {
41
35
  const completedAuthorizeActionIds = authorizeActionsAsResult.map(({ id }) => id);
36
+ /* istanbul ignore else -- @preserve */
42
37
  if (completedAuthorizeActionIds.length > 0) {
43
- // authorizePaymentActions = <Pick<factory.action.authorize.paymentMethod.any.IAction, 'result'>[]>
44
- // await repos.action.search<factory.actionType.AuthorizeAction>(
45
- // {
46
- // typeOf: factory.actionType.AuthorizeAction,
47
- // purpose: {
48
- // typeOf: { $in: [factory.transactionType.PlaceOrder] },
49
- // id: { $in: [placeOrderTransactionWithResult.id] }
50
- // },
51
- // object: { typeOf: { $eq: factory.action.authorize.paymentMethod.any.ResultType.Payment } },
52
- // id: { $in: completedAuthorizeActionIds }
53
- // },
54
- // ['result']
55
- // );
56
38
  authorizePaymentActions = await repos.authorizePaymentMethodAction.findAuthorizePaymentMethodResultsById({
57
39
  purpose: { id: placeOrderTransactionWithResult.id },
58
40
  ids: completedAuthorizeActionIds
59
41
  });
60
- // authorizeOfferActionsWithInstrument = <IAuthorizeActionWithInstrument[]>await repos.action.search<factory.actionType.AuthorizeAction>(
61
- // {
62
- // typeOf: factory.actionType.AuthorizeAction,
63
- // purpose: {
64
- // typeOf: { $in: [factory.transactionType.PlaceOrder] },
65
- // id: { $in: [placeOrderTransactionWithResult.id] }
66
- // },
67
- // object: {
68
- // typeOf: {
69
- // $in: [
70
- // factory.action.authorize.offer.eventService.ObjectType.SeatReservation,
71
- // factory.offerType.Offer
72
- // ]
73
- // }
74
- // },
75
- // id: { $in: completedAuthorizeActionIds }
76
- // },
77
- // ['instrument']
78
- // );
79
42
  authorizeOfferActionsWithInstrument = await repos.authorizeOfferAction.findAuthorizeOfferInstrumentsByIds({
80
43
  purpose: { id: placeOrderTransactionWithResult.id },
81
44
  ids: completedAuthorizeActionIds
@@ -87,26 +50,18 @@ function createPlacingOrderFromExistingTransaction(params) {
87
50
  const serialNumbers = authorizeOfferActionsWithInstrument
88
51
  .filter(({ instrument }) => typeof instrument.transactionNumber === 'string')
89
52
  .map(({ instrument }) => String(instrument.transactionNumber));
90
- try {
91
- // すでにtypeOf: Orderに変更済の場合acceptedOffersは空になるが、そもそもorderedItemはその後上書きされないので、空のまま処理して問題なし
92
- acceptedOffers = (await repos.orderInTransaction.findAcceptedOffersWithPriceByIdentifier({
93
- // orderNumber,
94
- identifier: placeOrderTransactionWithResult.id,
95
- project: { id: params.project.id }
96
- }))
97
- .filter(({ serialNumber }) => typeof serialNumber === 'string' && serialNumbers.includes(serialNumber));
98
- }
99
- catch (error) {
100
- let throwsError = true;
101
- // すでにtypeOf: Orderに変更済の場合、NotFoundとなる
102
- if (error instanceof factory_1.factory.errors.NotFound) {
103
- throwsError = false;
104
- }
105
- if (throwsError) {
106
- throw error;
107
- }
108
- }
53
+ // すでにtypeOf: Orderに変更済の場合acceptedOffersは空になるが、そもそもorderedItemはその後上書きされないので、空のまま処理して問題なし
54
+ acceptedOffers = (await repos.orderInTransaction.findAcceptedOffersWithPriceByIdentifier({
55
+ identifier: placeOrderTransactionWithResult.id,
56
+ project: { id: params.project.id }
57
+ }, { onlyPlaceOrder: false } // typeOf:PlaceOrderフィルターを無効化したのでもうNotFoundになる心配はなし(2026-07-20~)
58
+ ))
59
+ .filter(({ serialNumber }) => typeof serialNumber === 'string' && serialNumbers.includes(serialNumber));
109
60
  const order = (0, factory_2.createPlacingOrder)({ transaction: placeOrderTransactionWithResult, authorizePaymentActions, acceptedOffers });
110
- return { order, placeOrderTransaction: placeOrderTransactionWithResult, serialNumbers };
61
+ return {
62
+ orderNumber,
63
+ confirmationNumber,
64
+ order, placeOrderTransaction: placeOrderTransactionWithResult, serialNumbers
65
+ };
111
66
  };
112
67
  }
@@ -68,7 +68,6 @@ function createSeller(params) {
68
68
  }
69
69
  function createPlacingOrder(params) {
70
70
  const { transaction, authorizePaymentActions } = params;
71
- let orderDateByTransaction;
72
71
  const { confirmationNumber, orderDate, orderNumber } = transaction.object;
73
72
  if (typeof confirmationNumber !== 'string') {
74
73
  // 事前に発行済なはずなので、ありえないフロー
@@ -79,25 +78,8 @@ function createPlacingOrder(params) {
79
78
  throw new factory_1.factory.errors.Internal('object.orderNumber undefined');
80
79
  }
81
80
  if (orderDate === undefined) {
82
- // orderDateByTransaction = transaction.result?.order?.orderDate
83
- }
84
- else {
85
- orderDateByTransaction = orderDate;
86
- }
87
- if (orderDateByTransaction === undefined) {
88
81
  throw new factory_1.factory.errors.NotFound('orderDate in the transaction');
89
82
  }
90
- // const orderByTransaction = transaction.result?.order;
91
- // if (orderByTransaction === undefined) {
92
- // throw new factory.errors.NotFound('transaction.result.order');
93
- // }
94
- // const seller = createSeller({ transaction });
95
- // discontinue(2026-06-11~)
96
- // const name: string | undefined =
97
- // (typeof transaction.object.name === 'string') ? transaction.object.name : undefined;
98
- // discontinue(2026-06-22~)
99
- // const broker: factory.order.IBroker | undefined =
100
- // (typeof transaction.object.broker?.typeOf === 'string') ? transaction.object.broker : undefined;
101
83
  const { paymentMethods, price } = createPaymentMethods({ authorizePaymentActions });
102
84
  const eventReservationAcceptedOffers = [];
103
85
  params.acceptedOffers.forEach((acceptedOffer) => {
@@ -115,15 +97,15 @@ function createPlacingOrder(params) {
115
97
  });
116
98
  return {
117
99
  // ...orderByTransaction, // transaction.result.orderへの依存廃止(2026-06-15~)
118
- confirmationNumber,
119
- orderNumber,
100
+ // confirmationNumber, // placeOrder時に上書きする必要なし(2026-07-20~)
101
+ // orderNumber, // placeOrder時に上書きする必要なし(2026-07-20~)
120
102
  typeOf: factory_1.factory.order.OrderType.Order, // 取引保管を廃止するためにここで指定(2026-06-14~)
121
103
  orderStatus: factory_1.factory.orderStatus.OrderPaymentDue, // 取引保管を廃止するためにここで指定(2026-06-14~)
122
104
  // seller, // 取引開始時の注文ドキュメント作成へ移行(2026-06-25~)
123
105
  paymentMethods, // 2024-06-17~
124
106
  price, // 2024-06-17~
125
107
  priceCurrency: factory_1.factory.priceCurrency.JPY, // 取引保管を廃止するためにここで指定(2026-06-14~)
126
- orderDate: (0, moment_1.default)(orderDateByTransaction)
108
+ orderDate: (0, moment_1.default)(orderDate)
127
109
  .toDate(),
128
110
  orderedItem, // 2024-06-18~
129
111
  // ...(typeof name === 'string') ? { name } : undefined, // discontinue(2026-06-11~)
@@ -3,6 +3,7 @@ import type { AccountingReportRepo } from '../../repo/accountingReport';
3
3
  import type { ActionRepo } from '../../repo/action';
4
4
  import type { AuthorizeOfferActionRepo } from '../../repo/action/authorizeOffer';
5
5
  import type { AuthorizePaymentMethodActionRepo } from '../../repo/action/authorizePaymentMethod';
6
+ import type { MessageRepo } from '../../repo/message';
6
7
  import type { OrderRepo } from '../../repo/order';
7
8
  import type { OrderInTransactionRepo } from '../../repo/orderInTransaction';
8
9
  import type { SettingRepo } from '../../repo/setting';
@@ -10,13 +11,13 @@ import type { TaskRepo } from '../../repo/task';
10
11
  import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
11
12
  import { factory } from '../../factory';
12
13
  import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
13
- import { IPlacingOrder } from './placeOrder/createPlacingOrderFromExistingTransaction';
14
14
  interface IPlaceOrderRepos {
15
15
  acceptedOffer: AcceptedOfferRepo;
16
16
  accountingReport: AccountingReportRepo;
17
17
  action: ActionRepo;
18
18
  authorizeOfferAction: AuthorizeOfferActionRepo;
19
19
  authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
20
+ message: MessageRepo;
20
21
  order: OrderRepo;
21
22
  orderInTransaction: OrderInTransactionRepo;
22
23
  setting: SettingRepo;
@@ -27,7 +28,7 @@ interface IPlaceOrderRepos {
27
28
  * 注文を作成する
28
29
  */
29
30
  declare function placeOrder(params: {
30
- agent?: factory.action.trade.order.IAgent;
31
+ agent: factory.action.trade.order.IAgent;
31
32
  project: {
32
33
  id: string;
33
34
  };
@@ -36,7 +37,5 @@ declare function placeOrder(params: {
36
37
  orderNumber: string;
37
38
  };
38
39
  useOnOrderStatusChanged: boolean;
39
- }): (repos: IPlaceOrderRepos, settings: Settings) => Promise<{
40
- order: IPlacingOrder;
41
- }>;
40
+ }): (repos: IPlaceOrderRepos, settings: Settings) => Promise<void>;
42
41
  export { IPlaceOrderRepos, placeOrder };
@@ -11,11 +11,8 @@ const voidAcceptedOfferIfNecessary_1 = require("./placeOrder/voidAcceptedOfferIf
11
11
  */
12
12
  function placeOrder(params) {
13
13
  return async (repos, settings) => {
14
- if (typeof params.useOnOrderStatusChanged !== 'boolean') {
15
- throw new factory_1.factory.errors.Argument('useOnOrderStatusChanged', 'must be boolean');
16
- }
17
14
  // 注文番号から取引と注文をfixする
18
- const { order, placeOrderTransaction, serialNumbers } = await (0, createPlacingOrderFromExistingTransaction_1.createPlacingOrderFromExistingTransaction)({
15
+ const { orderNumber, confirmationNumber, order, placeOrderTransaction, serialNumbers } = await (0, createPlacingOrderFromExistingTransaction_1.createPlacingOrderFromExistingTransaction)({
19
16
  project: { id: params.project.id },
20
17
  confirmationNumber: params.object.confirmationNumber,
21
18
  orderNumber: params.object.orderNumber
@@ -31,14 +28,14 @@ function placeOrder(params) {
31
28
  }
32
29
  const simpleOrder = {
33
30
  typeOf: order.typeOf,
34
- orderNumber: order.orderNumber,
31
+ orderNumber,
35
32
  orderDate: order.orderDate
36
33
  };
37
34
  const orderActionPurpose = {
38
35
  typeOf: placeOrderTransaction.typeOf, id: placeOrderTransaction.id
39
36
  };
40
37
  const orderActionAttributes = {
41
- agent: (typeof params.agent?.typeOf === 'string') ? params.agent : placeOrderTransaction.project,
38
+ agent: params.agent,
42
39
  object: simpleOrder,
43
40
  project: placeOrderTransaction.project,
44
41
  purpose: orderActionPurpose,
@@ -61,7 +58,6 @@ function placeOrder(params) {
61
58
  try {
62
59
  // 冗長なオファーを除外する(念のため)
63
60
  await (0, voidAcceptedOfferIfNecessary_1.voidAcceptedOfferIfNecessary)({
64
- // object: { orderNumber: order.orderNumber },
65
61
  placeOrderId: placeOrderTransaction.id,
66
62
  serialNumbers
67
63
  })(repos);
@@ -81,38 +77,31 @@ function placeOrder(params) {
81
77
  if (params.useOnOrderStatusChanged) {
82
78
  // 経理レポートを保管->CreateAccountingReportへ移行(2024-02-02~)
83
79
  // PaymentDueであればonOrderStatusChangedを実行(2023-08-23~)
84
- if (order.orderStatus === factory_1.factory.orderStatus.OrderPaymentDue) {
85
- await (0, onOrderStatusChanged_1.onOrderPaymentDue)({
86
- order: {
87
- paymentMethods: order.paymentMethods,
88
- project: placeOrderTransaction.project,
89
- orderNumber: order.orderNumber,
90
- confirmationNumber: order.confirmationNumber,
91
- orderDate: order.orderDate,
92
- // seller: order.seller,
93
- typeOf: order.typeOf,
94
- // price: order.price,
95
- // priceCurrency: order.priceCurrency,
96
- orderStatus: order.orderStatus
97
- }
98
- })({
99
- task: repos.task
100
- });
101
- }
102
- else {
103
- throw new factory_1.factory.errors.NotImplemented(`placing an order on the status '${order.orderStatus}' not implemented`);
104
- }
80
+ await (0, onOrderStatusChanged_1.onOrderPaymentDue)({
81
+ order: {
82
+ paymentMethods: order.paymentMethods,
83
+ project: placeOrderTransaction.project,
84
+ orderNumber,
85
+ confirmationNumber,
86
+ orderDate: order.orderDate,
87
+ typeOf: order.typeOf,
88
+ orderStatus: order.orderStatus
89
+ }
90
+ })({
91
+ task: repos.task
92
+ });
105
93
  // paymentMethods.length: 0の場合を考慮(2023-08-24~)
94
+ /* istanbul ignore else -- @preserve */
106
95
  if (order.paymentMethods.length === 0) {
107
96
  // paymentMethods.length: 0の場合に、confirmPayTransactionは実行されないので、ここで強制的にpaymentDue2Processingを実行する必要がある
108
97
  await (0, onAssetTransactionStatusChanged_1.paymentDue2Processing)({
109
98
  project: { id: placeOrderTransaction.project.id },
110
- confirmationNumber: order.confirmationNumber,
111
- orderNumber: order.orderNumber,
99
+ confirmationNumber,
100
+ orderNumber,
112
101
  useOnOrderStatusChanged: params.useOnOrderStatusChanged === true
113
102
  })(repos, settings);
114
103
  }
115
104
  }
116
- return { order };
105
+ // return { order };
117
106
  };
118
107
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fixOrderAsNeeded = fixOrderAsNeeded;
4
- const factory_1 = require("../../../../factory");
5
4
  const publishConfirmationNumberIfNotExist_1 = require("../../../transaction/placeOrder/publishConfirmationNumberIfNotExist");
6
5
  function fixOrderAsNeeded(params) {
7
6
  return async (repos) => {
@@ -12,7 +11,7 @@ function fixOrderAsNeeded(params) {
12
11
  // if (params.paymentServiceType === factory.service.paymentService.PaymentServiceType.MovieTicket) {
13
12
  const confirmationNumber = await (0, publishConfirmationNumberIfNotExist_1.publishConfirmationNumberIfNotExist)({
14
13
  id: params.purpose.id,
15
- status: { $in: [factory_1.factory.transactionStatusType.InProgress] },
14
+ // status: { $in: [factory.transactionStatusType.InProgress] },
16
15
  object: { orderDate }
17
16
  })(repos);
18
17
  // }
@@ -3,7 +3,8 @@ import type { AcceptPayActionRepo } from '../../../../repo/action/acceptPay';
3
3
  import type { AuthorizePaymentMethodActionRepo } from '../../../../repo/action/authorizePaymentMethod';
4
4
  import type { AuthorizationRepo } from '../../../../repo/authorization';
5
5
  import type { TicketRepo } from '../../../../repo/ticket';
6
- import type { ITransactionInProgress, PlaceOrderRepo } from '../../../../repo/transaction/placeOrder';
6
+ import type { OrderInTransactionRepo } from '../../../../repo/orderInTransaction';
7
+ import type { ITransactionInProgress } from '../../../../repo/transaction/placeOrder';
7
8
  import type { TransactionNumberRepo } from '../../../../repo/transactionNumber';
8
9
  import * as PayTransactionService from '../../../assetTransaction/pay';
9
10
  import { IInvoiceByTicketToken } from '../factory';
@@ -13,7 +14,7 @@ interface IFixTransactionNumberRepos {
13
14
  authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
14
15
  authorization: AuthorizationRepo;
15
16
  ticket: TicketRepo;
16
- placeOrder: PlaceOrderRepo;
17
+ orderInTransaction: OrderInTransactionRepo;
17
18
  transactionNumber: TransactionNumberRepo;
18
19
  }
19
20
  type IFixTransactionNumberOperation<T> = (repos: IFixTransactionNumberRepos) => Promise<T>;
@@ -3,7 +3,8 @@ import type { AcceptPayActionRepo } from '../../../../repo/action/acceptPay';
3
3
  import type { AuthorizePaymentMethodActionRepo } from '../../../../repo/action/authorizePaymentMethod';
4
4
  import type { AuthorizationRepo } from '../../../../repo/authorization';
5
5
  import type { TicketRepo } from '../../../../repo/ticket';
6
- import type { ITransactionInProgress, PlaceOrderRepo } from '../../../../repo/transaction/placeOrder';
6
+ import type { OrderInTransactionRepo } from '../../../../repo/orderInTransaction';
7
+ import type { ITransactionInProgress } from '../../../../repo/transaction/placeOrder';
7
8
  import * as PayTransactionService from '../../../assetTransaction/pay';
8
9
  import type { IInvoiceByTicketToken } from '../factory';
9
10
  type IObjectWithoutDetail = factory.action.authorize.paymentMethod.any.IObjectWithoutDetail;
@@ -17,7 +18,7 @@ interface IHandlePrePublishedPaymentMethodIdOnAuthorizingRepos {
17
18
  authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
18
19
  authorization: AuthorizationRepo;
19
20
  ticket: TicketRepo;
20
- placeOrder: PlaceOrderRepo;
21
+ orderInTransaction: OrderInTransactionRepo;
21
22
  }
22
23
  /**
23
24
  * 決済承認前の決済採用アクションを参照する
@@ -29,9 +30,9 @@ declare function handlePrePublishedPaymentMethodIdOnAuthorizing(params: {
29
30
  }): (repos: IHandlePrePublishedPaymentMethodIdOnAuthorizingRepos) => Promise<{
30
31
  authorizeParams?: {
31
32
  creditCard: factory.action.authorize.paymentMethod.any.ICreditCard;
32
- paymentMethodByTransaction: factory.transaction.placeOrder.IPaymentMethodByPaymentUrl;
33
33
  pendingPaymentAgencyTransaction: PayTransactionService.IPaymentAgencyTransaction;
34
34
  acceptAction2ticketResult?: IAcceptAction2ticketResult;
35
+ paymentMethodByTransaction?: never;
35
36
  };
36
37
  existingCompletedAuthorizeAction?: never;
37
38
  } | {
@@ -98,25 +98,8 @@ function handlePrePublishedPaymentMethodIdOnAuthorizing(params) {
98
98
  let existingCompletedAuthorizeAction;
99
99
  let acceptPayAction;
100
100
  // transaction.objectへのアクセス回避(2024-05-30~)
101
- // const paymentMethodByTransaction = transaction.object.paymentMethods;
102
- const paymentMethodByTransaction = await repos.placeOrder.findInProgressPaymentMethodId({ id: params.transaction.id });
103
- if (params.prePublishedPaymentMethodId === paymentMethodByTransaction?.paymentMethodId) {
104
- // check existence of acceptAction when authorizing payment(2024-06-01~)
105
- // acceptPayAction = (<Pick<IAcceptPayAction, 'object' | 'result' | 'id' | 'instrument'>[]>await repos.action.search<factory.actionType.AcceptAction>(
106
- // {
107
- // limit: 1,
108
- // page: 1,
109
- // project: { id: { $eq: params.transaction.project.id } },
110
- // typeOf: { $eq: factory.actionType.AcceptAction },
111
- // actionStatus: { $in: [factory.actionStatusType.CompletedActionStatus] },
112
- // purpose: { id: { $in: [params.transaction.id] } },
113
- // object: {
114
- // transactionNumber: { $eq: params.prePublishedPaymentMethodId },
115
- // typeOf: { $eq: factory.assetTransactionType.Pay }
116
- // }
117
- // },
118
- // ['object', 'result', 'instrument']
119
- // )).shift();
101
+ const paymentMethodIdByTransaction = await repos.orderInTransaction.findInProgressPaymentMethodId({ id: params.transaction.id });
102
+ if (params.prePublishedPaymentMethodId === paymentMethodIdByTransaction) {
120
103
  acceptPayAction = (await repos.acceptPayAction.findCompletedAcceptActionsByTransactionNumber({
121
104
  project: { id: params.transaction.project.id },
122
105
  purpose: { id: params.transaction.id },
@@ -154,17 +137,6 @@ function handlePrePublishedPaymentMethodIdOnAuthorizing(params) {
154
137
  throw new factory_1.factory.errors.Argument('paymentMethodId', 'pendingPaymentAgencyTransaction not found');
155
138
  }
156
139
  // 既に承認済であれば何もしない(2023-05-15~)
157
- // const existingCompletedAuthorizeActions = <IAuthorizePaymentAction[]>
158
- // await repos.action.searchByPurpose<factory.actionType.AuthorizeAction>({
159
- // typeOf: factory.actionType.AuthorizeAction,
160
- // purpose: { id: params.transaction.id, typeOf: params.transaction.typeOf },
161
- // actionStatus: { $eq: factory.actionStatusType.CompletedActionStatus },
162
- // object: {
163
- // paymentMethodId: { $eq: params.prePublishedPaymentMethodId },
164
- // typeOf: { $eq: factory.action.authorize.paymentMethod.any.ResultType.Payment }
165
- // },
166
- // sort: { startDate: factory.sortType.Ascending }
167
- // });
168
140
  const existingCompletedAuthorizeActions = await repos.authorizePaymentMethodAction.findAuthorizePaymentMethodActionsByPurpose({
169
141
  purpose: { id: params.transaction.id, typeOf: params.transaction.typeOf },
170
142
  actionStatus: { $eq: factory_1.factory.actionStatusType.CompletedActionStatus },
@@ -185,7 +157,7 @@ function handlePrePublishedPaymentMethodIdOnAuthorizing(params) {
185
157
  acceptPayAction
186
158
  })(repos);
187
159
  return {
188
- authorizeParams: { creditCard, pendingPaymentAgencyTransaction, paymentMethodByTransaction, acceptAction2ticketResult }
160
+ authorizeParams: { creditCard, pendingPaymentAgencyTransaction, acceptAction2ticketResult }
189
161
  };
190
162
  }
191
163
  else {
@@ -78,13 +78,15 @@ function authorize(params) {
78
78
  authorizePaymentMethodAction: repos.authorizePaymentMethodAction,
79
79
  authorization: repos.authorization,
80
80
  ticket: repos.ticket,
81
- placeOrder: repos.placeOrder,
81
+ orderInTransaction: repos.orderInTransaction,
82
82
  transactionNumber: repos.transactionNumber
83
83
  });
84
84
  if (typeof fixTransactionNumberResult.id === 'string') {
85
85
  return { id: fixTransactionNumberResult.id };
86
86
  }
87
- const { transactionNumber, pendingPaymentAgencyTransaction, creditCard, invoiceByTicketToken, ticketToken } = fixTransactionNumberResult;
87
+ const { transactionNumber, pendingPaymentAgencyTransaction, creditCard,
88
+ // invoiceByTicketToken,
89
+ ticketToken } = fixTransactionNumberResult;
88
90
  const movieTickets = (Array.isArray(params.object.movieTickets)) ? params.object.movieTickets.map(factory_2.createMovieTicket) : undefined;
89
91
  const { accountId } = await fixAccountIdIfPossible({
90
92
  object: params.object, project: { id: transaction.project.id }
@@ -196,10 +198,10 @@ function authorize(params) {
196
198
  throw error;
197
199
  }
198
200
  }
199
- const result = (0, factory_2.createAuthorizeResult)({
201
+ const result = (0, factory_2.payTransaction2actionResult)({
200
202
  payTransaction,
201
- object: authorizeObjectIncludingPaymentMethodDetails,
202
- invoiceByTicketToken
203
+ // object: authorizeObjectIncludingPaymentMethodDetails,
204
+ // invoiceByTicketToken
203
205
  });
204
206
  await repos.authorizePaymentMethodAction.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: result });
205
207
  return { id: action.id };
@@ -209,40 +211,14 @@ function authorize(params) {
209
211
  * 承認しようとしているobjectからaccountIdを決定する
210
212
  */
211
213
  function fixAccountIdIfPossible(params) {
212
- return async (
213
- // repos: {
214
- // action: ActionRepo;
215
- // authorization: AuthorizationRepo;
216
- // ticket: TicketRepo;
217
- // }
218
- // credentials: {
219
- // jwt: JWTCredentials;
220
- // }
221
- ) => {
214
+ return async () => {
222
215
  let accountId = '';
223
- const fromLocation = params.object?.fromLocation;
216
+ // const fromLocation = params.object?.fromLocation;
224
217
  const movieTickets = params.object?.movieTickets;
225
- // discontinue token as fromLocation(ticketTokenへ移行するべき)(2024-12-18~)
226
- if (typeof fromLocation === 'string') {
227
- throw new factory_1.factory.errors.NotImplemented('object.fromLocation as string not implemented');
228
- // トークン化されたペイメントカード情報でリクエストされた場合、実ペイメントカード情報へ変換する
229
- // const { authorizedObject } = await verifyToken({
230
- // project: { id: params.project.id },
231
- // agent: { id: params.project.id, typeOf: factory.organizationType.Project },
232
- // token: fromLocation
233
- // })(repos);
234
- // const paymentCardOwnershipInfo = authorizedObject;
235
- // if (Array.isArray(paymentCardOwnershipInfo)) {
236
- // throw new factory.errors.NotImplemented('fromLocation as an array not implemented');
237
- // }
238
- // if (paymentCardOwnershipInfo.typeOf !== 'OwnershipInfo') {
239
- // throw new factory.errors.Argument('fromLocation', 'must be OwnershipInfo');
240
- // }
241
- // if (paymentCardOwnershipInfo.typeOfGood.typeOf !== factory.permit.PermitType.Permit) {
242
- // throw new factory.errors.Argument('fromLocation', 'must be Permit');
243
- // }
244
- // accountId = paymentCardOwnershipInfo.typeOfGood.identifier;
245
- }
218
+ // // discontinue token as fromLocation(ticketTokenへ移行するべき)(2024-12-18~)
219
+ // if (typeof fromLocation === 'string') {
220
+ // throw new factory.errors.NotImplemented('object.fromLocation as string not implemented');
221
+ // }
246
222
  // 購入番号管理番号をaccountIdにセット(2024-03-24~)
247
223
  if (Array.isArray(movieTickets) && movieTickets.length > 0) {
248
224
  accountId = movieTickets[0].identifier; // 決済カードidentifierは1つのみ許可の前提
@@ -46,16 +46,16 @@ export declare function creatPayTransactionStartParams(params: {
46
46
  */
47
47
  instrument: factory.action.trade.pay.IAcceptedPaymentMethodOfferAsInstrument[];
48
48
  }): factory.assetTransaction.pay.IStartParamsWithoutDetail & {
49
- instrument: factory.action.trade.pay.IPlaceOrderRelatedInstrument[];
49
+ instrument: factory.action.trade.pay.IPayTransactionInstrument[];
50
50
  };
51
51
  export declare function createMovieTicket(params: factory.action.trade.pay.IMovieTicket): factory.action.trade.pay.IMovieTicket;
52
- export declare function createAuthorizeResult(params: {
53
- object: factory.action.authorize.paymentMethod.any.IObjectIncludingPaymentMethodDetails;
52
+ /**
53
+ * 決済取引から決済承認アクション結果を生成する
54
+ */
55
+ export declare function payTransaction2actionResult(params: {
54
56
  payTransaction: Pick<factory.assetTransaction.pay.ITransaction, 'object'>;
55
- /**
56
- * 決済方法チケットの承認対象
57
- */
58
- invoiceByTicketToken?: IInvoiceByTicketToken;
57
+ object?: never;
58
+ invoiceByTicketToken?: never;
59
59
  }): factory.action.authorize.paymentMethod.any.IResult;
60
60
  /**
61
61
  * 通知対象としてのアクションを最適化