@chevre/domain 21.20.0-alpha.14 → 21.20.0-alpha.15
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.
|
@@ -16,6 +16,7 @@ exports.onOrderProcessing = void 0;
|
|
|
16
16
|
const createDebug = require("debug");
|
|
17
17
|
const factory = require("../../../factory");
|
|
18
18
|
const order_1 = require("../../../factory/order");
|
|
19
|
+
const settings_1 = require("../../../settings");
|
|
19
20
|
const factory_1 = require("./onOrderProcessing/factory");
|
|
20
21
|
const debug = createDebug('chevre-domain:service:order');
|
|
21
22
|
const USE_CONFIRM_REGISTER_SERVICE_TRANSACTION = process.env.USE_CONFIRM_REGISTER_SERVICE_TRANSACTION === '1';
|
|
@@ -53,11 +54,13 @@ function onOrderProcessing(params) {
|
|
|
53
54
|
case factory.orderStatus.OrderProcessing:
|
|
54
55
|
// 冗長なconfirmReserveTransactionタスク作成を回避(2023-08-25~)
|
|
55
56
|
yield createConfirmReserveTransactionTasksIfNotExist(params.order, simpleOrder)(repos);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
if (settings_1.USE_SEND_ORDER_ON_ORDER_PROCESSING) {
|
|
58
|
+
// 冗長なsendOrderタスク作成を回避(2023-08-25~)
|
|
59
|
+
yield createSendOrderTransactionTaskIfNotExist({
|
|
60
|
+
object: params.order,
|
|
61
|
+
potentialActions: (_c = (_b = (_a = params.placeOrderTransaction) === null || _a === void 0 ? void 0 : _a.potentialActions) === null || _b === void 0 ? void 0 : _b.order) === null || _c === void 0 ? void 0 : _c.potentialActions
|
|
62
|
+
})(repos);
|
|
63
|
+
}
|
|
61
64
|
yield createGivePointAwardTaskIfNotExist({
|
|
62
65
|
potentialActions: (_f = (_e = (_d = params.placeOrderTransaction) === null || _d === void 0 ? void 0 : _d.potentialActions) === null || _e === void 0 ? void 0 : _e.order) === null || _f === void 0 ? void 0 : _f.potentialActions
|
|
63
66
|
})(repos);
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare const USE_DELETE_EVENT_BY_ORDER: boolean;
|
|
|
40
40
|
export declare const USE_OPTIMIZE_TICKET_OFFER: boolean;
|
|
41
41
|
export declare const USE_ORDER_PAYMENT_METHOD_TYPE_OF: boolean;
|
|
42
42
|
export declare const USE_FETCH_API: boolean;
|
|
43
|
+
export declare const USE_SEND_ORDER_ON_ORDER_PROCESSING: boolean;
|
|
43
44
|
export declare const MONGO_MAX_TIME_MS: number;
|
|
44
45
|
export declare const MONGO_READ_PREFERENCE: string;
|
|
45
46
|
export declare const MONGO_AUTO_INDEX: boolean;
|
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.DELIVER_ORDER_LIMIT = 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_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_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(' ')
|
|
@@ -64,6 +64,7 @@ exports.USE_DELETE_EVENT_BY_ORDER = process.env.USE_DELETE_EVENT_BY_ORDER === '1
|
|
|
64
64
|
exports.USE_OPTIMIZE_TICKET_OFFER = process.env.USE_OPTIMIZE_TICKET_OFFER === '1';
|
|
65
65
|
exports.USE_ORDER_PAYMENT_METHOD_TYPE_OF = process.env.USE_ORDER_PAYMENT_METHOD_TYPE_OF === '1';
|
|
66
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';
|
|
67
68
|
exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string')
|
|
68
69
|
? Number(process.env.MONGO_MAX_TIME_MS)
|
|
69
70
|
// tslint:disable-next-line:no-magic-numbers
|
package/package.json
CHANGED