@chevre/domain 24.1.0-alpha.6 → 24.1.0-alpha.60

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 (215) hide show
  1. package/lib/chevre/emailMessageBuilder.d.ts +1 -1
  2. package/lib/chevre/emailMessageBuilder.js +4 -12
  3. package/lib/chevre/factory/transaction/placeOrder.d.ts +0 -3
  4. package/lib/chevre/index.d.ts +1 -2
  5. package/lib/chevre/index.js +1 -3
  6. package/lib/chevre/repo/acceptedOffer.d.ts +25 -27
  7. package/lib/chevre/repo/acceptedOffer.js +102 -67
  8. package/lib/chevre/repo/acceptedOfferInReserve.d.ts +34 -0
  9. package/lib/chevre/repo/acceptedOfferInReserve.js +86 -0
  10. package/lib/chevre/repo/accountingReport.js +2 -30
  11. package/lib/chevre/repo/action/actionProcess.d.ts +1 -1
  12. package/lib/chevre/repo/assetTransaction/reserve.d.ts +1 -2
  13. package/lib/chevre/repo/assetTransaction/reserve.js +4 -50
  14. package/lib/chevre/repo/event.js +12 -8
  15. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +9 -0
  16. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.js +76 -0
  17. package/lib/chevre/repo/factory/reservation/createMongoConditions.d.ts +1 -1
  18. package/lib/chevre/repo/factory/reservation/createMongoConditions.js +171 -362
  19. package/lib/chevre/repo/mongoose/schemas/accountingReport.js +42 -42
  20. package/lib/chevre/repo/mongoose/schemas/order.js +134 -131
  21. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +3 -1
  22. package/lib/chevre/repo/mongoose/schemas/reservation.js +96 -147
  23. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +84 -0
  24. package/lib/chevre/repo/mongoose/schemas/setting.js +2 -1
  25. package/lib/chevre/repo/order.d.ts +3 -83
  26. package/lib/chevre/repo/order.js +16 -376
  27. package/lib/chevre/repo/orderInTransaction.d.ts +58 -7
  28. package/lib/chevre/repo/orderInTransaction.js +58 -4
  29. package/lib/chevre/repo/place/hasPOS.js +2 -1
  30. package/lib/chevre/repo/reservation.d.ts +20 -7
  31. package/lib/chevre/repo/reservation.js +16 -12
  32. package/lib/chevre/repo/role.d.ts +1 -15
  33. package/lib/chevre/repo/role.js +7 -14
  34. package/lib/chevre/repo/setting/integration.d.ts +27 -0
  35. package/lib/chevre/repo/setting/integration.js +102 -0
  36. package/lib/chevre/repo/transaction.d.ts +6 -6
  37. package/lib/chevre/repository.d.ts +5 -0
  38. package/lib/chevre/repository.js +11 -0
  39. package/lib/chevre/service/aggregation/event/aggregateOffers.js +6 -1
  40. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +0 -1
  41. package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +14 -11
  42. package/lib/chevre/service/assetTransaction/cancelReservation/start.d.ts +1 -1
  43. package/lib/chevre/service/assetTransaction/cancelReservation/start.js +1 -1
  44. package/lib/chevre/service/assetTransaction/pay/check.d.ts +1 -1
  45. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.d.ts +1 -1
  46. package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +1 -1
  47. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -1
  48. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.d.ts +1 -1
  49. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -1
  50. package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
  51. package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +1 -1
  52. package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +1 -1
  53. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +2 -2
  54. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.d.ts +1 -8
  55. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +20 -32
  56. package/lib/chevre/service/assetTransaction/reserve/start/factory/price.d.ts +1 -1
  57. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +1 -1
  58. package/lib/chevre/service/delivery/factory.d.ts +6 -1
  59. package/lib/chevre/service/delivery/factory.js +1 -1
  60. package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -3
  61. package/lib/chevre/service/delivery/reservation/factory.js +0 -17
  62. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +2 -4
  63. package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +3 -3
  64. package/lib/chevre/service/notification/notifyByEmail.d.ts +3 -3
  65. package/lib/chevre/service/notification/notifyByEmail.js +7 -12
  66. package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -3
  67. package/lib/chevre/service/notification/sendEmailMessage.js +5 -4
  68. package/lib/chevre/service/offer/any.d.ts +7 -2
  69. package/lib/chevre/service/offer/event/authorize/factory.d.ts +6 -3
  70. package/lib/chevre/service/offer/event/authorize/factory.js +17 -18
  71. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  72. package/lib/chevre/service/offer/event/authorize.d.ts +2 -2
  73. package/lib/chevre/service/offer/event/authorize.js +55 -107
  74. package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +1 -1
  75. package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
  76. package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
  77. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -3
  78. package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -1
  79. package/lib/chevre/service/order/createAccountingReportIfNotExist.js +15 -15
  80. package/lib/chevre/service/order/deleteOrder.d.ts +1 -1
  81. package/lib/chevre/service/order/deleteOrder.js +19 -46
  82. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +1 -1
  83. package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts +1 -1
  84. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +1 -1
  85. package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +9 -11
  86. package/lib/chevre/service/order/onAssetTransactionStatusChanged/processing2inTransit.d.ts +1 -1
  87. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +1 -1
  88. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +0 -1
  89. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +6 -1
  90. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +0 -1
  91. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +1 -1
  92. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
  93. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
  94. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +2 -1
  95. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +0 -1
  96. package/lib/chevre/service/order/onOrderUpdated.js +0 -1
  97. package/lib/chevre/service/order/payOrder.d.ts +1 -1
  98. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +1 -1
  99. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +4 -1
  100. package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
  101. package/lib/chevre/service/order/placeOrder/factory/orderedItem.js +0 -5
  102. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  103. package/lib/chevre/service/order/placeOrder/factory.js +13 -17
  104. package/lib/chevre/service/order/placeOrder.d.ts +3 -2
  105. package/lib/chevre/service/order/placeOrder.js +0 -9
  106. package/lib/chevre/service/order/returnOrder.js +0 -1
  107. package/lib/chevre/service/order/sendOrder.js +1 -7
  108. package/lib/chevre/service/payment/any/authorize.d.ts +1 -1
  109. package/lib/chevre/service/payment/any/factory.js +7 -6
  110. package/lib/chevre/service/payment/any/person2username.js +0 -1
  111. package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +1 -1
  112. package/lib/chevre/service/payment/creditCard/authorize.d.ts +1 -1
  113. package/lib/chevre/service/payment/creditCard/authorize.js +4 -3
  114. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -1
  115. package/lib/chevre/service/payment/creditCard/payCreditCard.js +1 -1
  116. package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +1 -1
  117. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
  118. package/lib/chevre/service/payment/creditCard/searchGMOTrade.d.ts +1 -1
  119. package/lib/chevre/service/payment/creditCard/searchGMOTrade.js +1 -1
  120. package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +1 -1
  121. package/lib/chevre/service/payment/creditCard/voidTransaction.js +1 -1
  122. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +8 -1
  123. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +1 -1
  124. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -1
  125. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +1 -1
  126. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -1
  127. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
  128. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +1 -1
  129. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +1 -1
  130. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +1 -1
  131. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +2 -2
  132. package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +1 -1
  133. package/lib/chevre/service/reserve/confirmReservation.js +7 -7
  134. package/lib/chevre/service/reserve/factory.js +2 -1
  135. package/lib/chevre/service/reserve/findByCode.d.ts +1 -1
  136. package/lib/chevre/service/reserve/findByCode.js +1 -1
  137. package/lib/chevre/service/reserve/findReservations.d.ts +14 -6
  138. package/lib/chevre/service/reserve/findReservations.js +26 -36
  139. package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +0 -1
  140. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
  141. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +4 -3
  142. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +1 -10
  143. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
  144. package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +0 -1
  145. package/lib/chevre/service/reserve/searchByOrder.js +7 -3
  146. package/lib/chevre/service/task/acceptCOAOffer.js +6 -3
  147. package/lib/chevre/service/task/authorizePayment.js +4 -2
  148. package/lib/chevre/service/task/cancelPendingReservation.js +4 -2
  149. package/lib/chevre/service/task/checkMovieTicket.js +4 -2
  150. package/lib/chevre/service/task/confirmReserveTransaction.d.ts +1 -1
  151. package/lib/chevre/service/task/confirmReserveTransaction.js +5 -3
  152. package/lib/chevre/service/task/createAccountingReport.js +4 -8
  153. package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +4 -2
  154. package/lib/chevre/service/task/importEventsFromCOA.js +4 -2
  155. package/lib/chevre/service/task/importOffersFromCOA.js +4 -2
  156. package/lib/chevre/service/task/invalidatePaymentUrl.js +3 -1
  157. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +3 -1
  158. package/lib/chevre/service/task/onOrderPaymentCompleted.js +3 -1
  159. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
  160. package/lib/chevre/service/task/pay.js +4 -2
  161. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +1 -1
  162. package/lib/chevre/service/task/payment/payByTask.d.ts +1 -1
  163. package/lib/chevre/service/task/payment/payByTask.js +6 -7
  164. package/lib/chevre/service/task/payment/refundByTask.d.ts +1 -1
  165. package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +1 -1
  166. package/lib/chevre/service/task/placeOrder.js +3 -1
  167. package/lib/chevre/service/task/publishPaymentUrl.js +3 -1
  168. package/lib/chevre/service/task/refund.js +4 -2
  169. package/lib/chevre/service/task/returnReserveTransaction.js +4 -2
  170. package/lib/chevre/service/task/sendEmailMessage.js +5 -3
  171. package/lib/chevre/service/task/syncResourcesFromCOA.js +4 -2
  172. package/lib/chevre/service/task/voidPayment.js +4 -2
  173. package/lib/chevre/service/task/voidReserveTransaction.js +4 -2
  174. package/lib/chevre/service/task.d.ts +0 -7
  175. package/lib/chevre/service/transaction/placeOrder/confirm/factory/result.d.ts +0 -1
  176. package/lib/chevre/service/transaction/placeOrder/confirm/factory/result.js +7 -17
  177. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +7 -1
  178. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +0 -1
  179. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +7 -1
  180. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -1
  181. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
  182. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
  183. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +5 -3
  184. package/lib/chevre/service/transaction/placeOrder/confirm.js +28 -40
  185. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +0 -1
  186. package/lib/chevre/service/transaction/placeOrder/start/factory.d.ts +11 -2
  187. package/lib/chevre/service/transaction/placeOrder/start/factory.js +12 -10
  188. package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.d.ts +1 -2
  189. package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.js +5 -16
  190. package/lib/chevre/service/transaction/placeOrder/start.d.ts +3 -4
  191. package/lib/chevre/service/transaction/placeOrder/start.js +2 -2
  192. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +0 -1
  193. package/lib/chevre/service/transaction/placeOrder.d.ts +2 -2
  194. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
  195. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.d.ts +1 -1
  196. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +0 -1
  197. package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.d.ts +1 -1
  198. package/lib/chevre/service/transaction/returnOrder/potentialActions.d.ts +1 -1
  199. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +0 -1
  200. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -4
  201. package/lib/chevre/service/transaction/returnOrder.js +1 -1
  202. package/lib/chevre/service/validation/validateOrder.js +4 -79
  203. package/lib/chevre/settings.d.ts +0 -55
  204. package/lib/chevre/settings.js +1 -29
  205. package/lib/chevre/taskSettings.d.ts +0 -22
  206. package/lib/chevre/taskSettings.js +1 -7
  207. package/package.json +2 -2
  208. package/lib/chevre/credentials/customSearch.d.ts +0 -13
  209. package/lib/chevre/credentials/customSearch.js +0 -16
  210. package/lib/chevre/credentials/lineNotify.d.ts +0 -17
  211. package/lib/chevre/credentials/lineNotify.js +0 -20
  212. package/lib/chevre/credentials/sendGrid.d.ts +0 -24
  213. package/lib/chevre/credentials/sendGrid.js +0 -18
  214. package/lib/chevre/credentials.d.ts +0 -20
  215. package/lib/chevre/credentials.js +0 -42
@@ -1,24 +0,0 @@
1
- interface IAlert {
2
- sender?: {
3
- name: string;
4
- email: string;
5
- };
6
- toRecipient?: [
7
- {
8
- email: string;
9
- }
10
- ];
11
- }
12
- interface IOptions {
13
- apiKey: string;
14
- alert?: IAlert;
15
- }
16
- /**
17
- * SendGrid認証情報
18
- */
19
- declare class SendGridCredentials {
20
- readonly apiKey: string;
21
- readonly alert?: IAlert;
22
- constructor(options: IOptions);
23
- }
24
- export { SendGridCredentials };
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SendGridCredentials = void 0;
4
- /**
5
- * SendGrid認証情報
6
- */
7
- class SendGridCredentials {
8
- apiKey;
9
- alert;
10
- constructor(options) {
11
- const { apiKey, alert } = options;
12
- this.apiKey = apiKey;
13
- if (alert !== undefined) {
14
- this.alert = alert;
15
- }
16
- }
17
- }
18
- exports.SendGridCredentials = SendGridCredentials;
@@ -1,20 +0,0 @@
1
- import type { CustomSearchCredentials } from './credentials/customSearch';
2
- import type { LINENotifyCredentials } from './credentials/lineNotify';
3
- import type { SendGridCredentials } from './credentials/sendGrid';
4
- /**
5
- * 外部サービス認証情報
6
- */
7
- export declare namespace credentials {
8
- type CustomSearch = CustomSearchCredentials;
9
- namespace CustomSearch {
10
- function createInstance(...params: ConstructorParameters<typeof CustomSearchCredentials>): Promise<CustomSearchCredentials>;
11
- }
12
- type LINENotify = LINENotifyCredentials;
13
- namespace LINENotify {
14
- function createInstance(...params: ConstructorParameters<typeof LINENotifyCredentials>): Promise<LINENotifyCredentials>;
15
- }
16
- type SendGrid = SendGridCredentials;
17
- namespace SendGrid {
18
- function createInstance(...params: ConstructorParameters<typeof SendGridCredentials>): Promise<SendGridCredentials>;
19
- }
20
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.credentials = void 0;
4
- /**
5
- * 外部サービス認証情報
6
- */
7
- var credentials;
8
- (function (credentials) {
9
- let CustomSearch;
10
- (function (CustomSearch) {
11
- let cred;
12
- async function createInstance(...params) {
13
- if (cred === undefined) {
14
- cred = (await import('./credentials/customSearch.js')).CustomSearchCredentials;
15
- }
16
- return new cred(...params);
17
- }
18
- CustomSearch.createInstance = createInstance;
19
- })(CustomSearch = credentials.CustomSearch || (credentials.CustomSearch = {}));
20
- let LINENotify;
21
- (function (LINENotify) {
22
- let cred;
23
- async function createInstance(...params) {
24
- if (cred === undefined) {
25
- cred = (await import('./credentials/lineNotify.js')).LINENotifyCredentials;
26
- }
27
- return new cred(...params);
28
- }
29
- LINENotify.createInstance = createInstance;
30
- })(LINENotify = credentials.LINENotify || (credentials.LINENotify = {}));
31
- let SendGrid;
32
- (function (SendGrid) {
33
- let cred;
34
- async function createInstance(...params) {
35
- if (cred === undefined) {
36
- cred = (await import('./credentials/sendGrid.js')).SendGridCredentials;
37
- }
38
- return new cred(...params);
39
- }
40
- SendGrid.createInstance = createInstance;
41
- })(SendGrid = credentials.SendGrid || (credentials.SendGrid = {}));
42
- })(credentials || (exports.credentials = credentials = {}));