@chevre/domain 21.8.0-alpha.11 → 21.8.0-alpha.13
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.
- package/lib/chevre/service/order.d.ts +2 -1
- package/lib/chevre/service/order.js +3 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +3 -0
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +1 -4
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +1 -5
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +3 -0
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +1 -4
- package/lib/chevre/settings.d.ts +0 -1
- package/lib/chevre/settings.js +1 -4
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { confirmPayTransaction } from './order/confirmPayTransaction';
|
|
|
5
5
|
import { deleteOrder } from './order/deleteOrder';
|
|
6
6
|
import { onOrderStatusChanged } from './order/onOrderStatusChanged';
|
|
7
7
|
import { onOrderUpdated } from './order/onOrderUpdated';
|
|
8
|
+
import { payOrder } from './order/payOrder';
|
|
8
9
|
import { placeOrder, placeOrderWithoutTransaction } from './order/placeOrder';
|
|
9
10
|
import { sendOrder } from './order/sendOrder';
|
|
10
|
-
export { confirmPayTransaction, deleteOrder, onOrderStatusChanged, onOrderUpdated, placeOrder, placeOrderWithoutTransaction, sendOrder };
|
|
11
|
+
export { confirmPayTransaction, deleteOrder, onOrderStatusChanged, onOrderUpdated, payOrder, placeOrder, placeOrderWithoutTransaction, sendOrder };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendOrder = exports.placeOrderWithoutTransaction = exports.placeOrder = exports.onOrderUpdated = exports.onOrderStatusChanged = exports.deleteOrder = exports.confirmPayTransaction = void 0;
|
|
3
|
+
exports.sendOrder = exports.placeOrderWithoutTransaction = exports.placeOrder = exports.payOrder = exports.onOrderUpdated = exports.onOrderStatusChanged = exports.deleteOrder = exports.confirmPayTransaction = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* 注文サービス
|
|
6
6
|
*/
|
|
@@ -12,9 +12,10 @@ const onOrderStatusChanged_1 = require("./order/onOrderStatusChanged");
|
|
|
12
12
|
Object.defineProperty(exports, "onOrderStatusChanged", { enumerable: true, get: function () { return onOrderStatusChanged_1.onOrderStatusChanged; } });
|
|
13
13
|
const onOrderUpdated_1 = require("./order/onOrderUpdated");
|
|
14
14
|
Object.defineProperty(exports, "onOrderUpdated", { enumerable: true, get: function () { return onOrderUpdated_1.onOrderUpdated; } });
|
|
15
|
+
const payOrder_1 = require("./order/payOrder");
|
|
16
|
+
Object.defineProperty(exports, "payOrder", { enumerable: true, get: function () { return payOrder_1.payOrder; } });
|
|
15
17
|
const placeOrder_1 = require("./order/placeOrder");
|
|
16
18
|
Object.defineProperty(exports, "placeOrder", { enumerable: true, get: function () { return placeOrder_1.placeOrder; } });
|
|
17
19
|
Object.defineProperty(exports, "placeOrderWithoutTransaction", { enumerable: true, get: function () { return placeOrder_1.placeOrderWithoutTransaction; } });
|
|
18
|
-
// import { returnOrder } from './order/returnOrder';
|
|
19
20
|
const sendOrder_1 = require("./order/sendOrder");
|
|
20
21
|
Object.defineProperty(exports, "sendOrder", { enumerable: true, get: function () { return sendOrder_1.sendOrder; } });
|
|
@@ -13,7 +13,6 @@ exports.onReservationCanceled = void 0;
|
|
|
13
13
|
/**
|
|
14
14
|
* 予約取消時アクション
|
|
15
15
|
*/
|
|
16
|
-
const moment = require("moment");
|
|
17
16
|
const factory = require("../../../factory");
|
|
18
17
|
const settings_1 = require("../../../settings");
|
|
19
18
|
const offer_1 = require("../../offer");
|
|
@@ -41,9 +40,7 @@ reservationFor) {
|
|
|
41
40
|
if (useInformReservation) {
|
|
42
41
|
if (Array.isArray(informReservations)) {
|
|
43
42
|
// やや遅延させる(確定通知が未達の可能性を考慮して)
|
|
44
|
-
const informTaskRunsAt =
|
|
45
|
-
.add(settings_1.INFORM_RESERVATION_TASK_DELAY_IN_SECONDS, 'seconds')
|
|
46
|
-
.toDate();
|
|
43
|
+
const informTaskRunsAt = now;
|
|
47
44
|
const reservations4inform = canceledReservations.map((r) => {
|
|
48
45
|
return {
|
|
49
46
|
typeOf: r.typeOf,
|
|
@@ -13,7 +13,6 @@ exports.onReservationCheckedIn = void 0;
|
|
|
13
13
|
/**
|
|
14
14
|
* 予約発券時アクション
|
|
15
15
|
*/
|
|
16
|
-
const moment = require("moment");
|
|
17
16
|
const factory = require("../../../factory");
|
|
18
17
|
const settings_1 = require("../../../settings");
|
|
19
18
|
const offer_1 = require("../../offer");
|
|
@@ -28,10 +27,7 @@ function onReservationCheckedIn(params) {
|
|
|
28
27
|
const project = { id: params.project.id, typeOf: factory.organizationType.Project };
|
|
29
28
|
// inform galobally
|
|
30
29
|
if (Array.isArray(informReservations)) {
|
|
31
|
-
|
|
32
|
-
const informTaskRunsAt = moment(params.now)
|
|
33
|
-
.add(settings_1.INFORM_RESERVATION_TASK_DELAY_IN_SECONDS, 'seconds')
|
|
34
|
-
.toDate();
|
|
30
|
+
const informTaskRunsAt = params.now;
|
|
35
31
|
informReservations.forEach((informReservation) => {
|
|
36
32
|
var _a;
|
|
37
33
|
const informUrl = String((_a = informReservation.recipient) === null || _a === void 0 ? void 0 : _a.url);
|
|
@@ -13,7 +13,6 @@ exports.onReservationUsed = void 0;
|
|
|
13
13
|
/**
|
|
14
14
|
* 予約使用時アクション
|
|
15
15
|
*/
|
|
16
|
-
const moment = require("moment");
|
|
17
16
|
const factory = require("../../../factory");
|
|
18
17
|
const settings_1 = require("../../../settings");
|
|
19
18
|
const offer_1 = require("../../offer");
|
|
@@ -30,9 +29,7 @@ function onReservationUsed(action, attendedReservation) {
|
|
|
30
29
|
// inform galobally
|
|
31
30
|
if (Array.isArray(informReservations)) {
|
|
32
31
|
// やや遅延させる(確定通知が未達の可能性を考慮して)
|
|
33
|
-
const informTaskRunsAt =
|
|
34
|
-
.add(settings_1.INFORM_RESERVATION_TASK_DELAY_IN_SECONDS, 'seconds')
|
|
35
|
-
.toDate();
|
|
32
|
+
const informTaskRunsAt = now;
|
|
36
33
|
const reservation4inform = {
|
|
37
34
|
typeOf: attendedReservation.typeOf,
|
|
38
35
|
project: attendedReservation.project,
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -43,7 +43,6 @@ export declare const USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT: boolean;
|
|
|
43
43
|
export declare const USE_DELETE_EVENT_BY_ORDER: boolean;
|
|
44
44
|
export declare const USE_CUSTOM_SENDER_EMAIL: boolean;
|
|
45
45
|
export declare const USE_ORDER_PAYMENT_DUE_ON_PLACED: boolean;
|
|
46
|
-
export declare const INFORM_RESERVATION_TASK_DELAY_IN_SECONDS: number;
|
|
47
46
|
export declare const MONGO_MAX_TIME_MS: number;
|
|
48
47
|
/**
|
|
49
48
|
* グローバル設定
|
package/lib/chevre/settings.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.settings = exports.MONGO_MAX_TIME_MS = exports.
|
|
3
|
+
exports.settings = exports.MONGO_MAX_TIME_MS = exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = exports.USE_CUSTOM_SENDER_EMAIL = exports.USE_DELETE_EVENT_BY_ORDER = exports.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT = exports.USE_ADVANCE_BOOKING_REQUIREMENT = exports.USE_NEW_EVENT_AVAILABILITY_KEY_FROM = exports.USE_PAY_ASSET_TRANSACTION_SYNC_PROCESSING = 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.ABORTED_TASKS_WITHOUT_REPORT = exports.TRIGGER_WEBHOOK_RETRY_INTERVAL_IN_MS = exports.TRIGGER_WEBHOOK_MAX_RETRY_COUNT = void 0;
|
|
4
4
|
const moment = require("moment");
|
|
5
5
|
const factory = require("./factory");
|
|
6
6
|
const transactionWebhookUrls = (typeof process.env.INFORM_TRANSACTION_URL === 'string')
|
|
@@ -75,9 +75,6 @@ exports.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT = process.env.USE_OBJECT_AS_PAY_TRA
|
|
|
75
75
|
exports.USE_DELETE_EVENT_BY_ORDER = process.env.USE_DELETE_EVENT_BY_ORDER === '1';
|
|
76
76
|
exports.USE_CUSTOM_SENDER_EMAIL = process.env.USE_CUSTOM_SENDER_EMAIL === '1';
|
|
77
77
|
exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = process.env.USE_ORDER_PAYMENT_DUE_ON_PLACED === '1';
|
|
78
|
-
exports.INFORM_RESERVATION_TASK_DELAY_IN_SECONDS = (typeof process.env.INFORM_RESERVATION_TASK_DELAY_IN_SECONDS === 'string')
|
|
79
|
-
? Number(process.env.INFORM_RESERVATION_TASK_DELAY_IN_SECONDS)
|
|
80
|
-
: 0;
|
|
81
78
|
exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string')
|
|
82
79
|
? Number(process.env.MONGO_MAX_TIME_MS)
|
|
83
80
|
// tslint:disable-next-line:no-magic-numbers
|
package/package.json
CHANGED