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

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 (105) 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/order.d.ts +2 -83
  20. package/lib/chevre/repo/order.js +171 -364
  21. package/lib/chevre/repo/orderInTransaction.d.ts +39 -3
  22. package/lib/chevre/repo/orderInTransaction.js +43 -1
  23. package/lib/chevre/repo/reservation.d.ts +20 -7
  24. package/lib/chevre/repo/reservation.js +14 -10
  25. package/lib/chevre/repo/role.d.ts +1 -15
  26. package/lib/chevre/repo/role.js +7 -14
  27. package/lib/chevre/repo/transaction.d.ts +6 -6
  28. package/lib/chevre/service/aggregation/event/aggregateOffers.js +22 -26
  29. package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +14 -11
  30. package/lib/chevre/service/assetTransaction/cancelReservation/start.d.ts +1 -1
  31. package/lib/chevre/service/assetTransaction/cancelReservation/start.js +1 -1
  32. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +0 -12
  33. package/lib/chevre/service/assetTransaction/reserve/start/factory/price.d.ts +1 -1
  34. package/lib/chevre/service/delivery/factory.d.ts +6 -1
  35. package/lib/chevre/service/delivery/factory.js +1 -1
  36. package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -3
  37. package/lib/chevre/service/delivery/reservation/factory.js +0 -17
  38. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +1 -1
  39. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +1 -1
  40. package/lib/chevre/service/offer/any.d.ts +6 -1
  41. package/lib/chevre/service/offer/event/authorize/factory.d.ts +6 -3
  42. package/lib/chevre/service/offer/event/authorize/factory.js +4 -7
  43. package/lib/chevre/service/offer/event/authorize.d.ts +6 -0
  44. package/lib/chevre/service/offer/event/authorize.js +11 -3
  45. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -3
  46. package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -3
  47. package/lib/chevre/service/order/createAccountingReportIfNotExist.js +67 -72
  48. package/lib/chevre/service/order/deleteOrder.js +21 -44
  49. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +9 -11
  50. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +6 -1
  51. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
  52. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +2 -1
  53. package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
  54. package/lib/chevre/service/order/placeOrder/factory/orderedItem.js +0 -5
  55. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  56. package/lib/chevre/service/order/sendOrder.js +2 -4
  57. package/lib/chevre/service/payment/creditCard/authorize.js +3 -3
  58. package/lib/chevre/service/payment/creditCard/payCreditCard.js +1 -1
  59. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
  60. package/lib/chevre/service/payment/creditCard/searchGMOTrade.js +1 -1
  61. package/lib/chevre/service/payment/creditCard/voidTransaction.js +1 -1
  62. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +8 -1
  63. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +1 -1
  64. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
  65. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +1 -1
  66. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +2 -2
  67. package/lib/chevre/service/reserve/confirmReservation.js +7 -7
  68. package/lib/chevre/service/reserve/factory.js +2 -1
  69. package/lib/chevre/service/reserve/findByCode.d.ts +1 -1
  70. package/lib/chevre/service/reserve/findByCode.js +2 -1
  71. package/lib/chevre/service/reserve/findReservations.d.ts +4 -4
  72. package/lib/chevre/service/reserve/findReservations.js +16 -26
  73. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +4 -3
  74. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +1 -9
  75. package/lib/chevre/service/reserve/searchByOrder.js +8 -3
  76. package/lib/chevre/service/reserve/useReservation.d.ts +1 -1
  77. package/lib/chevre/service/reserve/useReservation.js +20 -24
  78. package/lib/chevre/service/task/acceptCOAOffer.js +2 -2
  79. package/lib/chevre/service/task/authorizePayment.js +1 -1
  80. package/lib/chevre/service/task/cancelPendingReservation.js +1 -1
  81. package/lib/chevre/service/task/checkMovieTicket.js +1 -1
  82. package/lib/chevre/service/task/confirmReserveTransaction.js +3 -2
  83. package/lib/chevre/service/task/createAccountingReport.js +7 -9
  84. package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +1 -1
  85. package/lib/chevre/service/task/importEventsFromCOA.js +1 -1
  86. package/lib/chevre/service/task/importOffersFromCOA.js +1 -1
  87. package/lib/chevre/service/task/pay.js +1 -1
  88. package/lib/chevre/service/task/payment/payByTask.js +3 -2
  89. package/lib/chevre/service/task/refund.js +1 -1
  90. package/lib/chevre/service/task/returnReserveTransaction.js +1 -1
  91. package/lib/chevre/service/task/syncResourcesFromCOA.js +1 -1
  92. package/lib/chevre/service/task/useReservation.d.ts +2 -2
  93. package/lib/chevre/service/task/useReservation.js +6 -18
  94. package/lib/chevre/service/task/voidPayment.js +1 -1
  95. package/lib/chevre/service/task/voidReserveTransaction.js +1 -1
  96. package/lib/chevre/service/taskHandler.js +1 -0
  97. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
  98. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
  99. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
  100. package/lib/chevre/service/transaction/placeOrder/confirm.js +5 -2
  101. package/lib/chevre/service/transaction/returnOrder/preStart.js +2 -4
  102. package/lib/chevre/service/validation/validateOrder.js +5 -79
  103. package/lib/chevre/settings.d.ts +15 -16
  104. package/lib/chevre/settings.js +53 -19
  105. 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 {};