@chevre/domain 21.20.0-alpha.14 → 21.20.0-alpha.16
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/repo/task.d.ts +0 -2
- package/lib/chevre/repo/task.js +56 -46
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +18 -19
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +38 -25
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +4 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +17 -11
- package/lib/chevre/settings.d.ts +1 -0
- package/lib/chevre/settings.js +2 -1
- package/package.json +1 -1
|
@@ -39,9 +39,7 @@ export declare class MongoRepository {
|
|
|
39
39
|
* 取引削除タスク冪等作成
|
|
40
40
|
*/
|
|
41
41
|
createDeleteTransactionTaskIfNotExist(params: factory.task.IAttributes<factory.taskName.DeleteTransaction>, options: IOptionOnCreate): Promise<void>;
|
|
42
|
-
createConfirmReserveTransactionTaskIfNotExist(params: factory.task.IAttributes<factory.taskName.ConfirmReserveTransaction>, options: IOptionOnCreate): Promise<void>;
|
|
43
42
|
createOnAssetTransactionStatusChangedTaskIfNotExist(params: factory.task.IAttributes<factory.taskName.OnAssetTransactionStatusChanged>, options: IOptionOnCreate): Promise<void>;
|
|
44
|
-
createSendOrderTaskIfNotExist(params: factory.task.IAttributes<factory.taskName.SendOrder>, options: IOptionOnCreate): Promise<void>;
|
|
45
43
|
executeById(params: {
|
|
46
44
|
id: string;
|
|
47
45
|
executor: {
|
package/lib/chevre/repo/task.js
CHANGED
|
@@ -243,31 +243,36 @@ class MongoRepository {
|
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
createConfirmReserveTransactionTaskIfNotExist(
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
246
|
+
// public async createConfirmReserveTransactionTaskIfNotExist(
|
|
247
|
+
// params: factory.task.IAttributes<factory.taskName.ConfirmReserveTransaction>,
|
|
248
|
+
// options: IOptionOnCreate
|
|
249
|
+
// ): Promise<void> {
|
|
250
|
+
// const createdTask = await this.taskModel.findOneAndUpdate(
|
|
251
|
+
// {
|
|
252
|
+
// 'project.id': { $eq: params.project.id },
|
|
253
|
+
// name: { $eq: params.name },
|
|
254
|
+
// 'data.object.transactionNumber': {
|
|
255
|
+
// $exists: true,
|
|
256
|
+
// $eq: String(params.data.object.transactionNumber)
|
|
257
|
+
// },
|
|
258
|
+
// 'data.purpose.orderNumber': {
|
|
259
|
+
// $exists: true,
|
|
260
|
+
// $eq: String(params.data.purpose.orderNumber)
|
|
261
|
+
// }
|
|
262
|
+
// },
|
|
263
|
+
// { $setOnInsert: params },
|
|
264
|
+
// { new: true, upsert: true }
|
|
265
|
+
// )
|
|
266
|
+
// .select({ _id: 1 })
|
|
267
|
+
// .exec();
|
|
268
|
+
// if (options.emitImmediately) {
|
|
269
|
+
// taskEventEmitter.emitTaskStatusChanged({
|
|
270
|
+
// id: createdTask.id,
|
|
271
|
+
// name: params.name,
|
|
272
|
+
// status: factory.taskStatus.Ready
|
|
273
|
+
// });
|
|
274
|
+
// }
|
|
275
|
+
// }
|
|
271
276
|
createOnAssetTransactionStatusChangedTaskIfNotExist(params, options) {
|
|
272
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
278
|
const createdTask = yield this.taskModel.findOneAndUpdate({
|
|
@@ -293,27 +298,32 @@ class MongoRepository {
|
|
|
293
298
|
}
|
|
294
299
|
});
|
|
295
300
|
}
|
|
296
|
-
createSendOrderTaskIfNotExist(
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
301
|
+
// public async createSendOrderTaskIfNotExist(
|
|
302
|
+
// params: factory.task.IAttributes<factory.taskName.SendOrder>,
|
|
303
|
+
// options: IOptionOnCreate
|
|
304
|
+
// ): Promise<void> {
|
|
305
|
+
// const createdTask = await this.taskModel.findOneAndUpdate(
|
|
306
|
+
// {
|
|
307
|
+
// 'project.id': { $eq: params.project.id },
|
|
308
|
+
// name: { $eq: params.name },
|
|
309
|
+
// 'data.object.orderNumber': {
|
|
310
|
+
// $exists: true,
|
|
311
|
+
// $eq: String(params.data.object.orderNumber)
|
|
312
|
+
// }
|
|
313
|
+
// },
|
|
314
|
+
// { $setOnInsert: params },
|
|
315
|
+
// { new: true, upsert: true }
|
|
316
|
+
// )
|
|
317
|
+
// .select({ _id: 1 })
|
|
318
|
+
// .exec();
|
|
319
|
+
// if (options.emitImmediately) {
|
|
320
|
+
// taskEventEmitter.emitTaskStatusChanged({
|
|
321
|
+
// id: createdTask.id,
|
|
322
|
+
// name: params.name,
|
|
323
|
+
// status: factory.taskStatus.Ready
|
|
324
|
+
// });
|
|
325
|
+
// }
|
|
326
|
+
// }
|
|
317
327
|
// public async createOnOrderPaymentCompletedTaskIfNotExist(
|
|
318
328
|
// params: factory.task.IAttributes<factory.taskName.OnOrderPaymentCompleted>,
|
|
319
329
|
// options: IOptionOnCreate
|
|
@@ -86,25 +86,24 @@ function createOnOrderSentTasksByTransaction(params) {
|
|
|
86
86
|
};
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
89
|
+
// createSendEmailMessageTaskIfNotExistへ移行(2024-01-12~)
|
|
90
|
+
// if (Array.isArray(potentialActions.sendEmailMessage)) {
|
|
91
|
+
// potentialActions.sendEmailMessage.forEach((s) => {
|
|
92
|
+
// const sendEmailMessageTask: factory.task.IAttributes<factory.taskName.SendEmailMessage> = {
|
|
93
|
+
// project: s.project,
|
|
94
|
+
// name: factory.taskName.SendEmailMessage,
|
|
95
|
+
// status: factory.taskStatus.Ready,
|
|
96
|
+
// runsAt: now, // なるはやで実行
|
|
97
|
+
// remainingNumberOfTries: 3,
|
|
98
|
+
// numberOfTried: 0,
|
|
99
|
+
// executionResults: [],
|
|
100
|
+
// data: {
|
|
101
|
+
// actionAttributes: s
|
|
102
|
+
// }
|
|
103
|
+
// };
|
|
104
|
+
// taskAttributes.push(sendEmailMessageTask);
|
|
105
|
+
// });
|
|
106
|
+
// }
|
|
108
107
|
}
|
|
109
108
|
return taskAttributes;
|
|
110
109
|
}
|
|
@@ -14,6 +14,7 @@ exports.onOrderDelivered = void 0;
|
|
|
14
14
|
* 注文ステータス変更時処理
|
|
15
15
|
*/
|
|
16
16
|
const createDebug = require("debug");
|
|
17
|
+
const util = require("util");
|
|
17
18
|
const factory = require("../../../factory");
|
|
18
19
|
const factory_1 = require("./onOrderDelivered/factory");
|
|
19
20
|
const debug = createDebug('chevre-domain:service:order');
|
|
@@ -22,43 +23,55 @@ function onOrderDelivered(params) {
|
|
|
22
23
|
var _a, _b, _c, _d, _e;
|
|
23
24
|
debug('onOrderStatusChanged called.', params.order.orderNumber, params.order.orderStatus, params.order.orderDate);
|
|
24
25
|
let tasks = [];
|
|
26
|
+
const sendOrderPotentialActions = (_e = (_d = (_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) === null || _d === void 0 ? void 0 : _d.sendOrder) === null || _e === void 0 ? void 0 : _e.potentialActions;
|
|
25
27
|
switch (params.order.orderStatus) {
|
|
26
28
|
case factory.orderStatus.OrderDelivered:
|
|
27
29
|
tasks = [
|
|
28
30
|
...(0, factory_1.createInformTasks)(params.order),
|
|
29
|
-
// 取引のpotentialActionsを適用(2023-08-17~)
|
|
30
31
|
...(0, factory_1.createOnOrderSentTasksByTransaction)({
|
|
31
|
-
potentialActions:
|
|
32
|
+
potentialActions: sendOrderPotentialActions
|
|
32
33
|
})
|
|
33
34
|
];
|
|
34
|
-
// プロダクト登録プロセスロック解除
|
|
35
|
-
try {
|
|
36
|
-
const placeOrderTransaction = params.placeOrderTransaction;
|
|
37
|
-
if (typeof (placeOrderTransaction === null || placeOrderTransaction === void 0 ? void 0 : placeOrderTransaction.id) === 'string') {
|
|
38
|
-
// 廃止(2023-12-07~)
|
|
39
|
-
// プロダクト登録プロセスロック解除(orderからproductIdを抽出する)
|
|
40
|
-
// const productIds4unlock = params.order.acceptedOffers
|
|
41
|
-
// .filter((o) => o.itemOffered.typeOf === factory.permit.PermitType.Permit
|
|
42
|
-
// && typeof o.itemOffered.issuedThrough?.id === 'string'
|
|
43
|
-
// && o.itemOffered.issuedThrough.id.length > 0)
|
|
44
|
-
// .map((o) => String((<factory.order.IPermit>o.itemOffered).issuedThrough?.id));
|
|
45
|
-
// await Promise.all(productIds4unlock.map(async (productId) => {
|
|
46
|
-
// await processUnlockRegisterMembershipService({
|
|
47
|
-
// agent: { id: String(params.order.customer.id) },
|
|
48
|
-
// product: { id: productId },
|
|
49
|
-
// purpose: { typeOf: placeOrderTransaction.typeOf, id: placeOrderTransaction.id }
|
|
50
|
-
// })(repos);
|
|
51
|
-
// }));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
throw error;
|
|
56
|
-
}
|
|
57
35
|
break;
|
|
58
36
|
default:
|
|
59
37
|
throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
|
|
60
38
|
}
|
|
61
39
|
yield repos.task.saveMany(tasks, { emitImmediately: true });
|
|
40
|
+
switch (params.order.orderStatus) {
|
|
41
|
+
case factory.orderStatus.OrderDelivered:
|
|
42
|
+
yield createSendEmailMessageTaskIfNotExist({
|
|
43
|
+
potentialActions: sendOrderPotentialActions
|
|
44
|
+
})(repos);
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
|
|
48
|
+
}
|
|
62
49
|
});
|
|
63
50
|
}
|
|
64
51
|
exports.onOrderDelivered = onOrderDelivered;
|
|
52
|
+
function createSendEmailMessageTaskIfNotExist(params) {
|
|
53
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
var _a;
|
|
55
|
+
const sendEmailMessageActions = (_a = params.potentialActions) === null || _a === void 0 ? void 0 : _a.sendEmailMessage;
|
|
56
|
+
const now = new Date();
|
|
57
|
+
if (Array.isArray(sendEmailMessageActions)) {
|
|
58
|
+
yield Promise.all(sendEmailMessageActions.map((sendEmailMessageAction, index) => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const taskIdentifier = util.format('%s:%s:%s:%s:%s:%s', sendEmailMessageAction.project.id, factory.taskName.SendEmailMessage, sendEmailMessageAction.purpose.typeOf, sendEmailMessageAction.purpose.orderNumber, factory.orderStatus.OrderDelivered, index);
|
|
60
|
+
const sendEmailMessageTask = {
|
|
61
|
+
identifier: taskIdentifier,
|
|
62
|
+
project: sendEmailMessageAction.project,
|
|
63
|
+
name: factory.taskName.SendEmailMessage,
|
|
64
|
+
status: factory.taskStatus.Ready,
|
|
65
|
+
runsAt: now,
|
|
66
|
+
remainingNumberOfTries: 10,
|
|
67
|
+
numberOfTried: 0,
|
|
68
|
+
executionResults: [],
|
|
69
|
+
data: {
|
|
70
|
+
actionAttributes: sendEmailMessageAction
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
yield repos.task.createIfNotExistByIdentifier(sendEmailMessageTask, { emitImmediately: true });
|
|
74
|
+
})));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -66,7 +66,9 @@ function createSendOrderTransactionTaskIfNotExist(params) {
|
|
|
66
66
|
project: params.order.project,
|
|
67
67
|
object: Object.assign(Object.assign({}, sendOrderObject), { confirmationNumber: params.order.confirmationNumber })
|
|
68
68
|
};
|
|
69
|
+
const taskIdentifier = `${sendOrderTaskData.project.id}:${factory.taskName.SendOrder}:${sendOrderTaskData.object.typeOf}:${sendOrderTaskData.object.orderNumber}`;
|
|
69
70
|
const sendOrderTask = {
|
|
71
|
+
identifier: taskIdentifier,
|
|
70
72
|
project: params.order.project,
|
|
71
73
|
name: factory.taskName.SendOrder,
|
|
72
74
|
status: factory.taskStatus.Ready,
|
|
@@ -77,6 +79,7 @@ function createSendOrderTransactionTaskIfNotExist(params) {
|
|
|
77
79
|
data: sendOrderTaskData
|
|
78
80
|
};
|
|
79
81
|
debug('processing createSendOrderTaskIfNotExist...', sendOrderTask);
|
|
80
|
-
|
|
82
|
+
// await repos.task.createSendOrderTaskIfNotExist(sendOrderTask, { emitImmediately: true });
|
|
83
|
+
yield repos.task.createIfNotExistByIdentifier(sendOrderTask, { emitImmediately: true });
|
|
81
84
|
});
|
|
82
85
|
}
|
|
@@ -14,8 +14,10 @@ exports.onOrderProcessing = void 0;
|
|
|
14
14
|
* 注文処理時処理
|
|
15
15
|
*/
|
|
16
16
|
const createDebug = require("debug");
|
|
17
|
+
const util = require("util");
|
|
17
18
|
const factory = require("../../../factory");
|
|
18
19
|
const order_1 = require("../../../factory/order");
|
|
20
|
+
const settings_1 = require("../../../settings");
|
|
19
21
|
const factory_1 = require("./onOrderProcessing/factory");
|
|
20
22
|
const debug = createDebug('chevre-domain:service:order');
|
|
21
23
|
const USE_CONFIRM_REGISTER_SERVICE_TRANSACTION = process.env.USE_CONFIRM_REGISTER_SERVICE_TRANSACTION === '1';
|
|
@@ -53,11 +55,13 @@ function onOrderProcessing(params) {
|
|
|
53
55
|
case factory.orderStatus.OrderProcessing:
|
|
54
56
|
// 冗長なconfirmReserveTransactionタスク作成を回避(2023-08-25~)
|
|
55
57
|
yield createConfirmReserveTransactionTasksIfNotExist(params.order, simpleOrder)(repos);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
if (settings_1.USE_SEND_ORDER_ON_ORDER_PROCESSING) {
|
|
59
|
+
// 冗長なsendOrderタスク作成を回避(2023-08-25~)
|
|
60
|
+
yield createSendOrderTransactionTaskIfNotExist({
|
|
61
|
+
object: params.order,
|
|
62
|
+
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
|
|
63
|
+
})(repos);
|
|
64
|
+
}
|
|
61
65
|
yield createGivePointAwardTaskIfNotExist({
|
|
62
66
|
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
67
|
})(repos);
|
|
@@ -67,14 +71,10 @@ function onOrderProcessing(params) {
|
|
|
67
71
|
});
|
|
68
72
|
}
|
|
69
73
|
exports.onOrderProcessing = onOrderProcessing;
|
|
70
|
-
// const COA_TASK_DELAY_IN_SECONDS = 0;
|
|
71
74
|
function createConfirmReserveTransactionTasksIfNotExist(order, simpleOrder) {
|
|
72
75
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
73
76
|
const taskRunsAt = new Date();
|
|
74
77
|
const taskRunsAt4coa = new Date();
|
|
75
|
-
// const taskRunsAt4coa = moment(order.orderDate)
|
|
76
|
-
// .add(COA_TASK_DELAY_IN_SECONDS, 'seconds')
|
|
77
|
-
// .toDate();
|
|
78
78
|
const confirmObjects = [
|
|
79
79
|
...(0, factory_1.createConfirmReservationActionObject4ChevreByOrder)({ order }),
|
|
80
80
|
...(0, factory_1.createConfirmReservationActionObject4COAByOrder)({ order })
|
|
@@ -93,7 +93,9 @@ function createConfirmReserveTransactionTasksIfNotExist(order, simpleOrder) {
|
|
|
93
93
|
: factory.service.webAPI.Identifier.Chevre
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
+
const taskIdentifier = util.format('%s:%s:%s:%s:%s:%s', data.project.id, factory.taskName.ConfirmReserveTransaction, data.purpose.typeOf, data.purpose.orderNumber, data.object.typeOf, data.object.transactionNumber);
|
|
96
97
|
const confirmReserveTransactionTask = {
|
|
98
|
+
identifier: taskIdentifier,
|
|
97
99
|
project: order.project,
|
|
98
100
|
name: factory.taskName.ConfirmReserveTransaction,
|
|
99
101
|
status: factory.taskStatus.Ready,
|
|
@@ -103,7 +105,8 @@ function createConfirmReserveTransactionTasksIfNotExist(order, simpleOrder) {
|
|
|
103
105
|
executionResults: [],
|
|
104
106
|
data
|
|
105
107
|
};
|
|
106
|
-
|
|
108
|
+
// await repos.task.createConfirmReserveTransactionTaskIfNotExist(confirmReserveTransactionTask, { emitImmediately: true });
|
|
109
|
+
yield repos.task.createIfNotExistByIdentifier(confirmReserveTransactionTask, { emitImmediately: true });
|
|
107
110
|
})));
|
|
108
111
|
});
|
|
109
112
|
}
|
|
@@ -169,7 +172,9 @@ function createSendOrderTransactionTaskIfNotExist(params) {
|
|
|
169
172
|
project: sendOrderByTransaction.project,
|
|
170
173
|
object: Object.assign(Object.assign({}, sendOrderByTransaction.object), { confirmationNumber: params.object.confirmationNumber })
|
|
171
174
|
};
|
|
175
|
+
const taskIdentifier = `${sendOrderTaskData.project.id}:${factory.taskName.SendOrder}:${sendOrderTaskData.object.typeOf}:${sendOrderTaskData.object.orderNumber}`;
|
|
172
176
|
const sendOrderTask = {
|
|
177
|
+
identifier: taskIdentifier,
|
|
173
178
|
project: sendOrderByTransaction.project,
|
|
174
179
|
name: factory.taskName.SendOrder,
|
|
175
180
|
status: factory.taskStatus.Ready,
|
|
@@ -179,7 +184,8 @@ function createSendOrderTransactionTaskIfNotExist(params) {
|
|
|
179
184
|
executionResults: [],
|
|
180
185
|
data: sendOrderTaskData
|
|
181
186
|
};
|
|
182
|
-
|
|
187
|
+
// await repos.task.createSendOrderTaskIfNotExist(sendOrderTask, { emitImmediately: true });
|
|
188
|
+
yield repos.task.createIfNotExistByIdentifier(sendOrderTask, { emitImmediately: true });
|
|
183
189
|
}
|
|
184
190
|
});
|
|
185
191
|
}
|
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