@chevre/domain 21.20.0-alpha.2 → 21.20.0-alpha.20

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 (106) hide show
  1. package/example/src/chevre/onAssetTransactionStatusChanged.ts +36 -0
  2. package/example/src/chevre/retryTasks.ts +39 -0
  3. package/example/src/chevre/searchOrders.ts +13 -15
  4. package/example/src/chevre/searchSlicedAcceptedOffersByOrderNumber.ts +28 -0
  5. package/example/src/chevre/sendOrder.ts +37 -0
  6. package/example/src/chevre/transaction/processAcceptOffer.ts +48 -0
  7. package/example/src/chevre/transaction/processPlaceOrder.ts +82 -53
  8. package/lib/chevre/repo/acceptedOffer.d.ts +21 -1
  9. package/lib/chevre/repo/acceptedOffer.js +32 -2
  10. package/lib/chevre/repo/action.d.ts +3 -3
  11. package/lib/chevre/repo/action.js +4 -6
  12. package/lib/chevre/repo/mongoose/schemas/order.d.ts +1 -1
  13. package/lib/chevre/repo/mongoose/schemas/order.js +20 -11
  14. package/lib/chevre/repo/order.js +28 -9
  15. package/lib/chevre/repo/orderInTransaction.d.ts +27 -0
  16. package/lib/chevre/repo/orderInTransaction.js +77 -0
  17. package/lib/chevre/repo/task.d.ts +0 -2
  18. package/lib/chevre/repo/task.js +56 -46
  19. package/lib/chevre/repo/transaction.d.ts +1 -1
  20. package/lib/chevre/repository.d.ts +5 -0
  21. package/lib/chevre/repository.js +15 -2
  22. package/lib/chevre/service/assetTransaction/pay.d.ts +0 -10
  23. package/lib/chevre/service/assetTransaction/pay.js +4 -4
  24. package/lib/chevre/service/code.js +1 -1
  25. package/lib/chevre/service/delivery.js +2 -2
  26. package/lib/chevre/service/event/createEvent.js +1 -1
  27. package/lib/chevre/service/event.js +2 -2
  28. package/lib/chevre/service/moneyTransfer.js +1 -1
  29. package/lib/chevre/service/notification.js +2 -5
  30. package/lib/chevre/service/offer/any.d.ts +29 -0
  31. package/lib/chevre/service/offer/any.js +55 -0
  32. package/lib/chevre/service/offer/event/authorize.d.ts +7 -0
  33. package/lib/chevre/service/offer/event/authorize.js +11 -0
  34. package/lib/chevre/service/offer/event/cancel.d.ts +2 -0
  35. package/lib/chevre/service/offer/event/cancel.js +12 -1
  36. package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
  37. package/lib/chevre/service/offer/event/voidTransaction.js +12 -5
  38. package/lib/chevre/service/offer/eventServiceByCOA.js +2 -2
  39. package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +6 -1
  40. package/lib/chevre/service/offer/moneyTransfer/authorize.js +2 -1
  41. package/lib/chevre/service/offer/moneyTransfer/returnMoneyTransfer.js +1 -1
  42. package/lib/chevre/service/offer/moneyTransfer/settleTransaction.js +1 -1
  43. package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +1 -1
  44. package/lib/chevre/service/offer/product.js +1 -1
  45. package/lib/chevre/service/order/confirmPayTransaction.js +3 -3
  46. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +11 -1
  47. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +113 -5
  48. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +18 -19
  49. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +38 -25
  50. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +11 -0
  51. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +45 -0
  52. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.d.ts +14 -0
  53. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +37 -0
  54. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +10 -0
  55. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +86 -0
  56. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +18 -12
  57. package/lib/chevre/service/order/onOrderStatusChanged.d.ts +3 -1
  58. package/lib/chevre/service/order/onOrderStatusChanged.js +5 -1
  59. package/lib/chevre/service/order/placeOrder.d.ts +2 -0
  60. package/lib/chevre/service/order/placeOrder.js +28 -29
  61. package/lib/chevre/service/order/returnOrder.js +25 -16
  62. package/lib/chevre/service/order/sendOrder.d.ts +5 -0
  63. package/lib/chevre/service/order/sendOrder.js +68 -30
  64. package/lib/chevre/service/payment/any.d.ts +6 -8
  65. package/lib/chevre/service/payment/any.js +46 -10
  66. package/lib/chevre/service/payment/creditCard.d.ts +9 -8
  67. package/lib/chevre/service/payment/creditCard.js +102 -133
  68. package/lib/chevre/service/payment/faceToFace.d.ts +0 -4
  69. package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +0 -2
  70. package/lib/chevre/service/payment/movieTicket/checkByIdentifier.js +1 -0
  71. package/lib/chevre/service/payment/movieTicket/validation.d.ts +0 -2
  72. package/lib/chevre/service/payment/movieTicket.d.ts +0 -6
  73. package/lib/chevre/service/payment/movieTicket.js +1 -1
  74. package/lib/chevre/service/payment/paymentCard.d.ts +0 -2
  75. package/lib/chevre/service/payment/paymentCard.js +6 -6
  76. package/lib/chevre/service/payment.js +1 -1
  77. package/lib/chevre/service/product.js +1 -1
  78. package/lib/chevre/service/reserve/cancelReservation.js +2 -2
  79. package/lib/chevre/service/reserve/confirmReservation.js +1 -1
  80. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +1 -1
  81. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +4 -4
  82. package/lib/chevre/service/reserve/useReservation.d.ts +1 -2
  83. package/lib/chevre/service/reserve/useReservation.js +4 -4
  84. package/lib/chevre/service/reserve/verifyToken4reservation.js +2 -0
  85. package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +1 -1
  86. package/lib/chevre/service/task/confirmReserveTransaction.d.ts +4 -1
  87. package/lib/chevre/service/task/confirmReserveTransaction.js +42 -3
  88. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +7 -7
  89. package/lib/chevre/service/task/placeOrder.js +9 -10
  90. package/lib/chevre/service/task/returnOrder.js +0 -3
  91. package/lib/chevre/service/task/returnPayTransaction.js +1 -1
  92. package/lib/chevre/service/task/returnReserveTransaction.js +1 -1
  93. package/lib/chevre/service/task/sendOrder.js +8 -4
  94. package/lib/chevre/service/task/voidPayTransaction.js +2 -2
  95. package/lib/chevre/service/task/voidReserveTransaction.js +8 -12
  96. package/lib/chevre/service/transaction/deleteTransaction.js +1 -1
  97. package/lib/chevre/service/transaction/moneyTransfer.js +1 -5
  98. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +6 -2
  99. package/lib/chevre/service/transaction/placeOrderInProgress.js +2 -2
  100. package/lib/chevre/service/transaction/returnOrder/preStart.d.ts +32 -0
  101. package/lib/chevre/service/transaction/returnOrder/preStart.js +632 -0
  102. package/lib/chevre/service/transaction/returnOrder.d.ts +8 -6
  103. package/lib/chevre/service/transaction/returnOrder.js +4 -616
  104. package/lib/chevre/settings.d.ts +3 -1
  105. package/lib/chevre/settings.js +7 -2
  106. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.settings = exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = exports.USE_FETCH_API = exports.USE_ORDER_PAYMENT_METHOD_TYPE_OF = exports.USE_OPTIMIZE_TICKET_OFFER = exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = exports.USE_DELETE_EVENT_BY_ORDER = exports.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT = exports.USE_ASSET_TRANSACTION_SYNC_PROCESSING = exports.DEFAULT_TASKS_EXPORT_AGENT_NAME = exports.DEFAULT_SENDER_EMAIL = exports.TRANSACTION_CANCELED_STORAGE_PERIOD_IN_DAYS = exports.TRANSACTION_CONFIRMED_STORAGE_PERIOD_IN_DAYS = exports.ASSET_TRANSACTION_STORAGE_PERIOD_IN_DAYS = exports.MAX_NUM_CREDIT_CARD_PAYMENT_METHOD = exports.ABORTED_TASKS_WITHOUT_REPORT = exports.TRIGGER_WEBHOOK_RETRY_INTERVAL_IN_MS = exports.TRIGGER_WEBHOOK_MAX_RETRY_COUNT = void 0;
3
+ exports.settings = exports.DELIVER_ORDER_LIMIT = exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = exports.USE_ORDER_IN_TRANSIT = exports.USE_SEND_ORDER_ON_ORDER_PROCESSING = exports.USE_FETCH_API = exports.USE_ORDER_PAYMENT_METHOD_TYPE_OF = exports.USE_OPTIMIZE_TICKET_OFFER = exports.USE_DELETE_EVENT_BY_ORDER = exports.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT = exports.USE_ASSET_TRANSACTION_SYNC_PROCESSING = exports.DEFAULT_TASKS_EXPORT_AGENT_NAME = exports.DEFAULT_SENDER_EMAIL = exports.TRANSACTION_CANCELED_STORAGE_PERIOD_IN_DAYS = exports.TRANSACTION_CONFIRMED_STORAGE_PERIOD_IN_DAYS = exports.ASSET_TRANSACTION_STORAGE_PERIOD_IN_DAYS = exports.MAX_NUM_CREDIT_CARD_PAYMENT_METHOD = exports.ABORTED_TASKS_WITHOUT_REPORT = exports.TRIGGER_WEBHOOK_RETRY_INTERVAL_IN_MS = exports.TRIGGER_WEBHOOK_MAX_RETRY_COUNT = void 0;
4
4
  const factory = require("./factory");
5
5
  const transactionWebhookUrls = (typeof process.env.INFORM_TRANSACTION_URL === 'string')
6
6
  ? process.env.INFORM_TRANSACTION_URL.split(' ')
@@ -61,10 +61,11 @@ exports.DEFAULT_TASKS_EXPORT_AGENT_NAME = `${process.env.GAE_APPLICATION}:${proc
61
61
  exports.USE_ASSET_TRANSACTION_SYNC_PROCESSING = process.env.USE_ASSET_TRANSACTION_SYNC_PROCESSING === '1';
62
62
  exports.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT = process.env.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT === '1';
63
63
  exports.USE_DELETE_EVENT_BY_ORDER = process.env.USE_DELETE_EVENT_BY_ORDER === '1';
64
- exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = process.env.USE_ORDER_PAYMENT_DUE_ON_PLACED === '1';
65
64
  exports.USE_OPTIMIZE_TICKET_OFFER = process.env.USE_OPTIMIZE_TICKET_OFFER === '1';
66
65
  exports.USE_ORDER_PAYMENT_METHOD_TYPE_OF = process.env.USE_ORDER_PAYMENT_METHOD_TYPE_OF === '1';
67
66
  exports.USE_FETCH_API = process.env.USE_FETCH_API === '1';
67
+ exports.USE_SEND_ORDER_ON_ORDER_PROCESSING = process.env.USE_SEND_ORDER_ON_ORDER_PROCESSING === '1';
68
+ exports.USE_ORDER_IN_TRANSIT = process.env.USE_ORDER_IN_TRANSIT === '1';
68
69
  exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string')
69
70
  ? Number(process.env.MONGO_MAX_TIME_MS)
70
71
  // tslint:disable-next-line:no-magic-numbers
@@ -73,6 +74,10 @@ exports.MONGO_READ_PREFERENCE = (typeof process.env.MONGO_READ_PREFERENCE === 's
73
74
  ? process.env.MONGO_READ_PREFERENCE
74
75
  : 'primaryPreferred';
75
76
  exports.MONGO_AUTO_INDEX = process.env.MONGO_AUTO_INDEX === '1';
77
+ exports.DELIVER_ORDER_LIMIT = (typeof process.env.DELIVER_ORDER_LIMIT === 'string')
78
+ ? Number(process.env.DELIVER_ORDER_LIMIT)
79
+ // tslint:disable-next-line:no-magic-numbers
80
+ : 50;
76
81
  /**
77
82
  * グローバル設定
78
83
  */
package/package.json CHANGED
@@ -10,8 +10,8 @@
10
10
  ],
11
11
  "dependencies": {
12
12
  "@aws-sdk/credential-providers": "3.433.0",
13
- "@chevre/factory": "4.351.0-alpha.2",
14
- "@cinerino/sdk": "5.6.0",
13
+ "@chevre/factory": "4.351.0-alpha.9",
14
+ "@cinerino/sdk": "5.8.0",
15
15
  "@motionpicture/coa-service": "9.2.0",
16
16
  "@motionpicture/gmo-service": "5.3.0-alpha.0",
17
17
  "@sendgrid/mail": "6.4.0",
@@ -115,5 +115,5 @@
115
115
  "postversion": "git push origin --tags",
116
116
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
117
117
  },
118
- "version": "21.20.0-alpha.2"
118
+ "version": "21.20.0-alpha.20"
119
119
  }