@chevre/domain 24.1.0-alpha.3 → 24.1.0-alpha.31

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 (173) hide show
  1. package/README.md +0 -2
  2. package/lib/chevre/repo/acceptedOffer.d.ts +14 -13
  3. package/lib/chevre/repo/acceptedOffer.js +135 -51
  4. package/lib/chevre/repo/acceptedOfferInReserve.d.ts +30 -0
  5. package/lib/chevre/repo/acceptedOfferInReserve.js +78 -0
  6. package/lib/chevre/repo/accountingReport.d.ts +9 -2
  7. package/lib/chevre/repo/accountingReport.js +6 -34
  8. package/lib/chevre/repo/action/actionProcess.d.ts +1 -1
  9. package/lib/chevre/repo/assetTransaction/reserve.d.ts +0 -1
  10. package/lib/chevre/repo/assetTransaction/reserve.js +4 -50
  11. package/lib/chevre/repo/event.js +12 -8
  12. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +7 -0
  13. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.js +74 -0
  14. package/lib/chevre/repo/factory/reservation/createMongoConditions.js +155 -180
  15. package/lib/chevre/repo/mongoose/schemas/accountingReport.js +42 -42
  16. package/lib/chevre/repo/mongoose/schemas/order.js +108 -108
  17. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +3 -1
  18. package/lib/chevre/repo/mongoose/schemas/reservation.js +128 -146
  19. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +43 -0
  20. package/lib/chevre/repo/mongoose/schemas/setting.js +2 -1
  21. package/lib/chevre/repo/order.d.ts +2 -83
  22. package/lib/chevre/repo/order.js +171 -364
  23. package/lib/chevre/repo/orderInTransaction.d.ts +39 -3
  24. package/lib/chevre/repo/orderInTransaction.js +43 -1
  25. package/lib/chevre/repo/reservation.d.ts +20 -7
  26. package/lib/chevre/repo/reservation.js +14 -10
  27. package/lib/chevre/repo/role.d.ts +1 -15
  28. package/lib/chevre/repo/role.js +7 -14
  29. package/lib/chevre/repo/setting/integration.d.ts +19 -0
  30. package/lib/chevre/repo/setting/integration.js +72 -0
  31. package/lib/chevre/repo/transaction.d.ts +6 -6
  32. package/lib/chevre/repository.d.ts +5 -0
  33. package/lib/chevre/repository.js +11 -0
  34. package/lib/chevre/service/aggregation/event/aggregateOffers.js +22 -26
  35. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +0 -1
  36. package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +14 -11
  37. package/lib/chevre/service/assetTransaction/cancelReservation/start.d.ts +1 -1
  38. package/lib/chevre/service/assetTransaction/cancelReservation/start.js +1 -1
  39. package/lib/chevre/service/assetTransaction/pay/check.d.ts +1 -1
  40. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.d.ts +1 -1
  41. package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +1 -1
  42. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -1
  43. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.d.ts +1 -1
  44. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -1
  45. package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
  46. package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +1 -1
  47. package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +1 -1
  48. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +0 -12
  49. package/lib/chevre/service/assetTransaction/reserve/start/factory/price.d.ts +1 -1
  50. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +1 -1
  51. package/lib/chevre/service/delivery/factory.d.ts +6 -1
  52. package/lib/chevre/service/delivery/factory.js +1 -1
  53. package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -3
  54. package/lib/chevre/service/delivery/reservation/factory.js +0 -17
  55. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +2 -2
  56. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +1 -1
  57. package/lib/chevre/service/offer/any.d.ts +6 -1
  58. package/lib/chevre/service/offer/event/authorize/factory.d.ts +6 -3
  59. package/lib/chevre/service/offer/event/authorize/factory.js +4 -7
  60. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  61. package/lib/chevre/service/offer/event/authorize.d.ts +7 -1
  62. package/lib/chevre/service/offer/event/authorize.js +11 -3
  63. package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +1 -1
  64. package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
  65. package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
  66. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -3
  67. package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -3
  68. package/lib/chevre/service/order/createAccountingReportIfNotExist.js +67 -72
  69. package/lib/chevre/service/order/deleteOrder.js +21 -44
  70. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +1 -1
  71. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts +1 -1
  72. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +1 -1
  73. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +9 -11
  74. package/lib/chevre/service/order/onAssetTransactionStatusChanged/processing2inTransit.d.ts +1 -1
  75. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +1 -1
  76. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +0 -1
  77. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +6 -1
  78. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +0 -1
  79. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +1 -1
  80. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
  81. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
  82. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +2 -1
  83. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +0 -1
  84. package/lib/chevre/service/order/onOrderUpdated.js +0 -1
  85. package/lib/chevre/service/order/payOrder.d.ts +1 -1
  86. package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
  87. package/lib/chevre/service/order/placeOrder/factory/orderedItem.js +0 -5
  88. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  89. package/lib/chevre/service/order/placeOrder.d.ts +1 -1
  90. package/lib/chevre/service/order/returnOrder.js +0 -1
  91. package/lib/chevre/service/order/sendOrder.js +2 -5
  92. package/lib/chevre/service/payment/any/authorize.d.ts +1 -1
  93. package/lib/chevre/service/payment/any/person2username.js +0 -1
  94. package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +1 -1
  95. package/lib/chevre/service/payment/creditCard/authorize.d.ts +1 -1
  96. package/lib/chevre/service/payment/creditCard/authorize.js +3 -3
  97. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -1
  98. package/lib/chevre/service/payment/creditCard/payCreditCard.js +1 -1
  99. package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +1 -1
  100. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
  101. package/lib/chevre/service/payment/creditCard/searchGMOTrade.d.ts +1 -1
  102. package/lib/chevre/service/payment/creditCard/searchGMOTrade.js +1 -1
  103. package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +1 -1
  104. package/lib/chevre/service/payment/creditCard/voidTransaction.js +1 -1
  105. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +8 -1
  106. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +1 -1
  107. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -1
  108. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +1 -1
  109. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -1
  110. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
  111. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +1 -1
  112. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +1 -1
  113. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +1 -1
  114. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +2 -2
  115. package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +1 -1
  116. package/lib/chevre/service/reserve/confirmReservation.js +7 -7
  117. package/lib/chevre/service/reserve/factory.js +2 -1
  118. package/lib/chevre/service/reserve/findByCode.d.ts +1 -1
  119. package/lib/chevre/service/reserve/findByCode.js +2 -1
  120. package/lib/chevre/service/reserve/findReservations.d.ts +4 -4
  121. package/lib/chevre/service/reserve/findReservations.js +16 -26
  122. package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +0 -1
  123. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
  124. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +4 -3
  125. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +1 -10
  126. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
  127. package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +0 -1
  128. package/lib/chevre/service/reserve/searchByOrder.js +8 -3
  129. package/lib/chevre/service/reserve/useReservation.d.ts +1 -1
  130. package/lib/chevre/service/reserve/useReservation.js +20 -24
  131. package/lib/chevre/service/task/acceptCOAOffer.js +2 -2
  132. package/lib/chevre/service/task/authorizePayment.js +1 -1
  133. package/lib/chevre/service/task/cancelPendingReservation.js +1 -1
  134. package/lib/chevre/service/task/checkMovieTicket.js +1 -1
  135. package/lib/chevre/service/task/confirmReserveTransaction.d.ts +1 -1
  136. package/lib/chevre/service/task/confirmReserveTransaction.js +3 -2
  137. package/lib/chevre/service/task/createAccountingReport.js +7 -9
  138. package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +1 -1
  139. package/lib/chevre/service/task/importEventsFromCOA.js +1 -1
  140. package/lib/chevre/service/task/importOffersFromCOA.js +1 -1
  141. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
  142. package/lib/chevre/service/task/pay.js +1 -1
  143. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +1 -1
  144. package/lib/chevre/service/task/payment/payByTask.d.ts +1 -1
  145. package/lib/chevre/service/task/payment/payByTask.js +3 -2
  146. package/lib/chevre/service/task/payment/refundByTask.d.ts +1 -1
  147. package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +1 -1
  148. package/lib/chevre/service/task/refund.js +1 -1
  149. package/lib/chevre/service/task/returnReserveTransaction.js +1 -1
  150. package/lib/chevre/service/task/syncResourcesFromCOA.js +1 -1
  151. package/lib/chevre/service/task/useReservation.d.ts +2 -2
  152. package/lib/chevre/service/task/useReservation.js +6 -18
  153. package/lib/chevre/service/task/voidPayment.js +1 -1
  154. package/lib/chevre/service/task/voidReserveTransaction.js +1 -1
  155. package/lib/chevre/service/task.d.ts +1 -1
  156. package/lib/chevre/service/taskHandler.js +1 -0
  157. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +0 -1
  158. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -1
  159. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
  160. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
  161. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
  162. package/lib/chevre/service/transaction/placeOrder/confirm.js +5 -3
  163. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +0 -1
  164. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +0 -1
  165. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
  166. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +0 -1
  167. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +0 -1
  168. package/lib/chevre/service/transaction/returnOrder/preStart.js +2 -4
  169. package/lib/chevre/service/validation/validateOrder.js +5 -79
  170. package/lib/chevre/settings.d.ts +0 -55
  171. package/lib/chevre/settings.js +1 -29
  172. package/lib/chevre/taskSettings.d.ts +1 -1
  173. package/package.json +2 -2
@@ -17,12 +17,6 @@ interface IAggregation {
17
17
  maxPrice: number;
18
18
  minPrice: number;
19
19
  }
20
- interface IGlobalAggregateOrder {
21
- orderCount: number;
22
- aggregateProject: {
23
- projectCount: number;
24
- };
25
- }
26
20
  interface IAggregateOrder {
27
21
  aggregation: IAggregation;
28
22
  }
@@ -32,13 +26,14 @@ interface IAggregateOrder {
32
26
  export type IOrderOnStatusChanged = Pick<IOrderWithoutAcceptedOffers & {
33
27
  id: string;
34
28
  }, 'id' | 'orderNumber' | 'broker' | 'confirmationNumber' | 'customer' | 'dateReturned' | 'name' | 'orderDate' | 'orderStatus' | 'orderedItem' | 'paymentMethods' | 'previousOrderStatus' | 'price' | 'priceCurrency' | 'project' | 'returner' | 'seller' | 'typeOf'>;
29
+ type ISearchConditions = Pick<factory.order.ISearchConditions, 'acceptedOffers' | 'broker' | 'confirmationNumbers' | 'customer' | 'name' | 'orderDate' | 'orderNumbers' | 'orderStatuses' | 'paymentMethods' | 'project' | 'provider' | 'seller'>;
35
30
  /**
36
31
  * 注文リポジトリ
37
32
  */
38
33
  export declare class OrderRepo {
39
34
  private readonly orderModel;
40
35
  constructor(connection: Connection);
41
- static CREATE_MONGO_CONDITIONS(params: Omit<factory.order.ISearchConditions, 'limit' | 'page' | 'sort'>): FilterQuery<factory.order.IOrder>[];
36
+ static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<factory.order.IOrder>[];
42
37
  /**
43
38
  * なければ作成する
44
39
  */
@@ -171,81 +166,5 @@ export declare class OrderRepo {
171
166
  $lte: Date;
172
167
  };
173
168
  }): Promise<IAggregateOrder>;
174
- aggregateOrderOfSeat(params: {
175
- project: {
176
- id: {
177
- $eq: string;
178
- };
179
- };
180
- orderDate: {
181
- $gte: Date;
182
- $lte: Date;
183
- };
184
- acceptedOffers: {
185
- itemOffered: {
186
- reservationFor: {
187
- location: {
188
- branchCode: string;
189
- };
190
- superEvent: {
191
- location: {
192
- branchCode: string;
193
- };
194
- };
195
- };
196
- reservedTicket: {
197
- ticketedSeat: {
198
- seatNumber: string;
199
- };
200
- };
201
- };
202
- };
203
- customer?: {
204
- email?: {
205
- $in?: string[];
206
- };
207
- };
208
- }): Promise<{
209
- aggregation: Pick<IAggregation, 'orderCount'> & {
210
- sumGraceTime?: number;
211
- emailCount?: number;
212
- };
213
- }>;
214
- aggregateOrderOfCustomerByProject(params: {
215
- project?: {
216
- id: {
217
- $eq: string;
218
- };
219
- };
220
- orderDate: {
221
- $gte: Date;
222
- $lte: Date;
223
- };
224
- customer: {
225
- email: {
226
- $eq: string;
227
- };
228
- };
229
- }): Promise<{
230
- aggregation: Pick<IAggregation, 'orderCount'> & {
231
- sumGraceTime?: number;
232
- emailCount?: number;
233
- };
234
- }>;
235
- aggregateOrderOfCustomerGlobally(params: {
236
- orderDate: {
237
- $gte: Date;
238
- $lte: Date;
239
- };
240
- customer: {
241
- email: {
242
- $eq: string;
243
- };
244
- };
245
- }): Promise<{
246
- aggregation: IGlobalAggregateOrder & {
247
- sumGraceTime?: never;
248
- };
249
- }>;
250
169
  }
251
170
  export {};