@chevre/domain 21.8.0-alpha.34 → 21.8.0-alpha.36
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.
|
@@ -11,9 +11,12 @@ async function main() {
|
|
|
11
11
|
|
|
12
12
|
const offers = await offerRepo.search(
|
|
13
13
|
{
|
|
14
|
-
limit:
|
|
14
|
+
limit: 10,
|
|
15
15
|
page: 1,
|
|
16
|
-
sort: {
|
|
16
|
+
sort: {
|
|
17
|
+
'priceSpecification.price': 1,
|
|
18
|
+
identifier: 1
|
|
19
|
+
},
|
|
17
20
|
project: { id: { $eq: String(process.env.PROJECT_ID) } },
|
|
18
21
|
availability: { $eq: chevre.factory.itemAvailability.InStock },
|
|
19
22
|
itemOffered: {
|
|
@@ -101,8 +104,8 @@ async function main() {
|
|
|
101
104
|
}
|
|
102
105
|
},
|
|
103
106
|
price: {
|
|
104
|
-
// $gte:
|
|
105
|
-
// $lte:
|
|
107
|
+
// $gte: 2000,
|
|
108
|
+
// $lte: 2000
|
|
106
109
|
},
|
|
107
110
|
referenceQuantity: {
|
|
108
111
|
value: {
|
|
@@ -147,14 +150,16 @@ async function main() {
|
|
|
147
150
|
identifier: 1,
|
|
148
151
|
name: 1,
|
|
149
152
|
alternateName: 1,
|
|
150
|
-
priceSpecification: 1
|
|
153
|
+
priceSpecification: 1,
|
|
154
|
+
project: 1
|
|
151
155
|
}
|
|
152
156
|
);
|
|
153
157
|
console.log(offers);
|
|
154
158
|
console.log(offers.map((offer) => {
|
|
155
|
-
return `${offer.project?.id} ${offer.
|
|
159
|
+
return `${offer.project?.id} ${offer.identifier} ${offer.priceSpecification?.price} ${offer.name?.ja} ${offer.id}`;
|
|
156
160
|
}));
|
|
157
161
|
console.log(offers.length);
|
|
162
|
+
console.log('USE_AGGREGATE_OFFERS_AS_PRIMARY:', process.env.USE_AGGREGATE_OFFERS_AS_PRIMARY);
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
main()
|
|
@@ -26,9 +26,10 @@ import { BulkWriteResult as BulkWriteOpResultObject } from 'mongodb';
|
|
|
26
26
|
import { AnyExpression, Connection, PipelineStage } from 'mongoose';
|
|
27
27
|
import * as factory from '../factory';
|
|
28
28
|
type IMatchStage = PipelineStage.Match;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
type KeyOfUnitPriceOffer = keyof factory.unitPriceOffer.IUnitPriceOffer;
|
|
30
|
+
type IProjection = {
|
|
31
|
+
[key in KeyOfUnitPriceOffer]?: 0 | 1;
|
|
32
|
+
};
|
|
32
33
|
/**
|
|
33
34
|
* オファーリポジトリ
|
|
34
35
|
*/
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -48,7 +48,7 @@ class MongoRepository {
|
|
|
48
48
|
}
|
|
49
49
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
50
50
|
static CREATE_OFFER_MONGO_CONDITIONS(params) {
|
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;
|
|
52
52
|
// MongoDB検索条件
|
|
53
53
|
const andConditions = [];
|
|
54
54
|
const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
@@ -303,13 +303,16 @@ class MongoRepository {
|
|
|
303
303
|
const addOnItemOfferedIdEq = (_29 = (_28 = (_27 = params.addOn) === null || _27 === void 0 ? void 0 : _27.itemOffered) === null || _28 === void 0 ? void 0 : _28.id) === null || _29 === void 0 ? void 0 : _29.$eq;
|
|
304
304
|
if (typeof addOnItemOfferedIdEq === 'string') {
|
|
305
305
|
andConditions.push({
|
|
306
|
-
'addOn.itemOffered.id': {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
306
|
+
'addOn.itemOffered.id': { $exists: true, $eq: addOnItemOfferedIdEq }
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
const addOnItemOfferedIdIn = (_32 = (_31 = (_30 = params.addOn) === null || _30 === void 0 ? void 0 : _30.itemOffered) === null || _31 === void 0 ? void 0 : _31.id) === null || _32 === void 0 ? void 0 : _32.$in;
|
|
310
|
+
if (Array.isArray(addOnItemOfferedIdIn)) {
|
|
311
|
+
andConditions.push({
|
|
312
|
+
'addOn.itemOffered.id': { $exists: true, $in: addOnItemOfferedIdIn }
|
|
310
313
|
});
|
|
311
314
|
}
|
|
312
|
-
const hasMerchantReturnPolicyIdEq = (
|
|
315
|
+
const hasMerchantReturnPolicyIdEq = (_34 = (_33 = params.hasMerchantReturnPolicy) === null || _33 === void 0 ? void 0 : _33.id) === null || _34 === void 0 ? void 0 : _34.$eq;
|
|
313
316
|
if (typeof hasMerchantReturnPolicyIdEq === 'string') {
|
|
314
317
|
andConditions.push({
|
|
315
318
|
'hasMerchantReturnPolicy.id': {
|
|
@@ -318,7 +321,7 @@ class MongoRepository {
|
|
|
318
321
|
}
|
|
319
322
|
});
|
|
320
323
|
}
|
|
321
|
-
const additionalPropertyAll = (
|
|
324
|
+
const additionalPropertyAll = (_35 = params.additionalProperty) === null || _35 === void 0 ? void 0 : _35.$all;
|
|
322
325
|
if (Array.isArray(additionalPropertyAll)) {
|
|
323
326
|
andConditions.push({
|
|
324
327
|
additionalProperty: {
|
|
@@ -327,7 +330,7 @@ class MongoRepository {
|
|
|
327
330
|
}
|
|
328
331
|
});
|
|
329
332
|
}
|
|
330
|
-
const additionalPropertyElemMatch = (
|
|
333
|
+
const additionalPropertyElemMatch = (_36 = params.additionalProperty) === null || _36 === void 0 ? void 0 : _36.$elemMatch;
|
|
331
334
|
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
332
335
|
andConditions.push({
|
|
333
336
|
additionalProperty: {
|
|
@@ -354,7 +357,7 @@ class MongoRepository {
|
|
|
354
357
|
}
|
|
355
358
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
356
359
|
static CREATE_AGGREGATE_OFFERS_MATCH_CONDITIONS(params) {
|
|
357
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33;
|
|
360
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;
|
|
358
361
|
const matchStages = [];
|
|
359
362
|
const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
360
363
|
if (typeof projectIdEq === 'string') {
|
|
@@ -659,14 +662,19 @@ class MongoRepository {
|
|
|
659
662
|
if (typeof addOnItemOfferedIdEq === 'string') {
|
|
660
663
|
matchStages.push({
|
|
661
664
|
$match: {
|
|
662
|
-
'offers.addOn.itemOffered.id': {
|
|
663
|
-
$exists: true,
|
|
664
|
-
$eq: addOnItemOfferedIdEq
|
|
665
|
-
}
|
|
665
|
+
'offers.addOn.itemOffered.id': { $exists: true, $eq: addOnItemOfferedIdEq }
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
|
-
const
|
|
669
|
+
const addOnItemOfferedIdIn = (_32 = (_31 = (_30 = params.addOn) === null || _30 === void 0 ? void 0 : _30.itemOffered) === null || _31 === void 0 ? void 0 : _31.id) === null || _32 === void 0 ? void 0 : _32.$in;
|
|
670
|
+
if (Array.isArray(addOnItemOfferedIdIn)) {
|
|
671
|
+
matchStages.push({
|
|
672
|
+
$match: {
|
|
673
|
+
'offers.addOn.itemOffered.id': { $exists: true, $in: addOnItemOfferedIdIn }
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
const hasMerchantReturnPolicyIdEq = (_34 = (_33 = params.hasMerchantReturnPolicy) === null || _33 === void 0 ? void 0 : _33.id) === null || _34 === void 0 ? void 0 : _34.$eq;
|
|
670
678
|
if (typeof hasMerchantReturnPolicyIdEq === 'string') {
|
|
671
679
|
matchStages.push({
|
|
672
680
|
$match: {
|
|
@@ -677,7 +685,7 @@ class MongoRepository {
|
|
|
677
685
|
}
|
|
678
686
|
});
|
|
679
687
|
}
|
|
680
|
-
const additionalPropertyAll = (
|
|
688
|
+
const additionalPropertyAll = (_35 = params.additionalProperty) === null || _35 === void 0 ? void 0 : _35.$all;
|
|
681
689
|
if (Array.isArray(additionalPropertyAll)) {
|
|
682
690
|
matchStages.push({
|
|
683
691
|
$match: {
|
|
@@ -688,7 +696,7 @@ class MongoRepository {
|
|
|
688
696
|
}
|
|
689
697
|
});
|
|
690
698
|
}
|
|
691
|
-
const additionalPropertyElemMatch = (
|
|
699
|
+
const additionalPropertyElemMatch = (_36 = params.additionalProperty) === null || _36 === void 0 ? void 0 : _36.$elemMatch;
|
|
692
700
|
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
693
701
|
matchStages.push({
|
|
694
702
|
$match: {
|
|
@@ -824,8 +832,8 @@ class MongoRepository {
|
|
|
824
832
|
}, onlyValid: params.onlyValid === true }), (typeof params.limit === 'number' && typeof params.page === 'number')
|
|
825
833
|
? { sort: { _id: factory.sortType.Ascending } }
|
|
826
834
|
: undefined), (typeof params.limit === 'number') ? { limit: params.limit } : undefined), (typeof params.page === 'number') ? { page: params.page } : undefined);
|
|
827
|
-
//
|
|
828
|
-
offers = yield this.search(searchOffersConditions, params.projection, settings_1.
|
|
835
|
+
// USE_AGGREGATE_OFFERS_AS_PRIMARY_ON_SEARCH_BY_CATALOG対応(2023-09-06~)
|
|
836
|
+
offers = yield this.search(searchOffersConditions, params.projection, settings_1.USE_AGGREGATE_OFFERS_AS_PRIMARY_ON_SEARCH_BY_CATALOG);
|
|
829
837
|
// 完全廃止(基本的にsortedOfferIdsと合わせて利用する想定)(2023-09-04~)
|
|
830
838
|
// if (params.sort) {
|
|
831
839
|
// // sorting
|
|
@@ -897,7 +905,7 @@ class MongoRepository {
|
|
|
897
905
|
* 強制的にoffersコレクションを使用する
|
|
898
906
|
*/
|
|
899
907
|
useOffersAsPrimary) {
|
|
900
|
-
var _a;
|
|
908
|
+
var _a, _b;
|
|
901
909
|
return __awaiter(this, void 0, void 0, function* () {
|
|
902
910
|
// primaryコレクションをコントロール(2023-09-05~)
|
|
903
911
|
const useAggregateOfferAsPrimary = settings_1.USE_AGGREGATE_OFFERS_AS_PRIMARY && (useOffersAsPrimary !== true);
|
|
@@ -920,8 +928,10 @@ class MongoRepository {
|
|
|
920
928
|
}
|
|
921
929
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
922
930
|
/* istanbul ignore else */
|
|
923
|
-
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a['priceSpecification.price'])
|
|
924
|
-
query.sort({ 'priceSpecification.price': params.sort['priceSpecification.price'] })
|
|
931
|
+
if (typeof ((_a = params.sort) === null || _a === void 0 ? void 0 : _a['priceSpecification.price']) === 'number') {
|
|
932
|
+
query.sort(Object.assign({ 'priceSpecification.price': params.sort['priceSpecification.price'] }, (typeof ((_b = params.sort) === null || _b === void 0 ? void 0 : _b.identifier) === 'number')
|
|
933
|
+
? { identifier: params.sort.identifier }
|
|
934
|
+
: undefined));
|
|
925
935
|
}
|
|
926
936
|
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
927
937
|
.exec()
|
|
@@ -959,7 +969,7 @@ class MongoRepository {
|
|
|
959
969
|
// 上書き禁止属性を除外
|
|
960
970
|
const { id, identifier, project, typeOf } = params, updateFields = __rest(params, ["id", "identifier", "project", "typeOf"]);
|
|
961
971
|
savedUnitPriceOffer = Object.assign(Object.assign({}, updateFields), { id: originalUnitPriceOffer.id, identifier: originalUnitPriceOffer.identifier, project: originalUnitPriceOffer.project, typeOf: originalUnitPriceOffer.typeOf });
|
|
962
|
-
doc = yield this.
|
|
972
|
+
doc = yield this.aggregateOfferModel.findOneAndUpdate({ 'offers.id': params.id }, {
|
|
963
973
|
$set: {
|
|
964
974
|
'offers.$[offer]': savedUnitPriceOffer
|
|
965
975
|
}
|
|
@@ -1079,10 +1089,36 @@ class MongoRepository {
|
|
|
1079
1089
|
if (params.addOn.itemOffered.id.$in.length === 0) {
|
|
1080
1090
|
return;
|
|
1081
1091
|
}
|
|
1082
|
-
//
|
|
1083
|
-
// TODO USE_AGGREGATE_OFFERS_AS_PRIMARY対応(2023-09-05~)
|
|
1092
|
+
// USE_AGGREGATE_OFFERS_AS_PRIMARY対応(2023-09-05~)
|
|
1084
1093
|
if (settings_1.USE_AGGREGATE_OFFERS_AS_PRIMARY) {
|
|
1085
|
-
|
|
1094
|
+
const conditions = {
|
|
1095
|
+
'project.id': { $eq: params.project.id },
|
|
1096
|
+
'offers.addOn.itemOffered.id': { $exists: true, $in: params.addOn.itemOffered.id.$in }
|
|
1097
|
+
};
|
|
1098
|
+
const updatingOffers = yield this.searchFromAggregateOffer({
|
|
1099
|
+
project: { id: { $eq: params.project.id } },
|
|
1100
|
+
addOn: { itemOffered: { id: { $in: params.addOn.itemOffered.id.$in } } }
|
|
1101
|
+
}, { id: 1 });
|
|
1102
|
+
const result = yield this.aggregateOfferModel.updateMany(conditions, {
|
|
1103
|
+
$pull: {
|
|
1104
|
+
'offers.addOn': {
|
|
1105
|
+
'itemOffered.id': { $in: params.addOn.itemOffered.id.$in }
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
})
|
|
1109
|
+
.exec();
|
|
1110
|
+
// 同期タスク作成(2023-09-05~)
|
|
1111
|
+
if (updatingOffers.length > 0) {
|
|
1112
|
+
yield this.saveSyncTask({
|
|
1113
|
+
project: { id: params.project.id },
|
|
1114
|
+
id: { $in: updatingOffers.map((offer) => String(offer.id)) },
|
|
1115
|
+
identifier: { $in: [] },
|
|
1116
|
+
isDeleted: false,
|
|
1117
|
+
typeOf: factory.offerType.AggregateOffer,
|
|
1118
|
+
options: { emitImmediately: true }
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
return result;
|
|
1086
1122
|
}
|
|
1087
1123
|
else {
|
|
1088
1124
|
const conditions = {
|
|
@@ -1117,13 +1153,22 @@ class MongoRepository {
|
|
|
1117
1153
|
}
|
|
1118
1154
|
deleteById(params) {
|
|
1119
1155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1120
|
-
//
|
|
1121
|
-
// TODO USE_AGGREGATE_OFFERS_AS_PRIMARY対応(2023-09-05~)
|
|
1156
|
+
// USE_AGGREGATE_OFFERS_AS_PRIMARY対応(2023-09-05~)
|
|
1122
1157
|
if (settings_1.USE_AGGREGATE_OFFERS_AS_PRIMARY) {
|
|
1123
|
-
|
|
1158
|
+
yield this.aggregateOfferModel.findOneAndRemove({ _id: { $eq: params.id } }, { projection: { _id: 1 } })
|
|
1159
|
+
.exec();
|
|
1160
|
+
// 同期タスク作成(2023-09-03~)
|
|
1161
|
+
yield this.saveSyncTask({
|
|
1162
|
+
project: { id: params.project.id },
|
|
1163
|
+
id: { $in: [params.id] },
|
|
1164
|
+
identifier: { $in: [] },
|
|
1165
|
+
isDeleted: true,
|
|
1166
|
+
typeOf: factory.offerType.AggregateOffer,
|
|
1167
|
+
options: { emitImmediately: true }
|
|
1168
|
+
});
|
|
1124
1169
|
}
|
|
1125
1170
|
else {
|
|
1126
|
-
yield this.offerModel.findOneAndRemove({ _id: params.id }, { projection: { _id: 1 } })
|
|
1171
|
+
yield this.offerModel.findOneAndRemove({ _id: { $eq: params.id } }, { projection: { _id: 1 } })
|
|
1127
1172
|
.exec();
|
|
1128
1173
|
// 同期タスク作成(2023-09-03~)
|
|
1129
1174
|
yield this.saveSyncTask({
|
|
@@ -1248,7 +1293,13 @@ class MongoRepository {
|
|
|
1248
1293
|
const idIn = (_c = params.id) === null || _c === void 0 ? void 0 : _c.$in;
|
|
1249
1294
|
const identifierIn = (_d = params.identifier) === null || _d === void 0 ? void 0 : _d.$in;
|
|
1250
1295
|
if (params.isDeleted === true) {
|
|
1251
|
-
|
|
1296
|
+
if (Array.isArray(idIn) && idIn.length > 0) {
|
|
1297
|
+
yield this.offerModel.deleteMany({
|
|
1298
|
+
'project.id': { $eq: params.project.id },
|
|
1299
|
+
_id: { $in: idIn }
|
|
1300
|
+
})
|
|
1301
|
+
.exec();
|
|
1302
|
+
}
|
|
1252
1303
|
}
|
|
1253
1304
|
else {
|
|
1254
1305
|
let aggregateOffers = [];
|
|
@@ -1256,8 +1307,7 @@ class MongoRepository {
|
|
|
1256
1307
|
aggregateOffers = yield this.aggregateOfferModel.aggregate([
|
|
1257
1308
|
{
|
|
1258
1309
|
$unwind: {
|
|
1259
|
-
path: '$offers'
|
|
1260
|
-
includeArrayIndex: OFFERS_ARRAY_INDEX_NAME
|
|
1310
|
+
path: '$offers'
|
|
1261
1311
|
}
|
|
1262
1312
|
},
|
|
1263
1313
|
{
|
|
@@ -1345,7 +1395,7 @@ class MongoRepository {
|
|
|
1345
1395
|
});
|
|
1346
1396
|
}
|
|
1347
1397
|
searchFromAggregateOffer(params, projection) {
|
|
1348
|
-
var _a;
|
|
1398
|
+
var _a, _b;
|
|
1349
1399
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1350
1400
|
const matchStages = MongoRepository.CREATE_AGGREGATE_OFFERS_MATCH_CONDITIONS(params);
|
|
1351
1401
|
const projectStage = MongoRepository.CREATE_AGGREGATE_OFFERS_PROJECTION(Object.assign({}, projection));
|
|
@@ -1358,7 +1408,13 @@ class MongoRepository {
|
|
|
1358
1408
|
},
|
|
1359
1409
|
...matchStages,
|
|
1360
1410
|
...(typeof ((_a = params.sort) === null || _a === void 0 ? void 0 : _a['priceSpecification.price']) === 'number')
|
|
1361
|
-
? [
|
|
1411
|
+
? [
|
|
1412
|
+
{
|
|
1413
|
+
$sort: Object.assign({ 'offers.priceSpecification.price': params.sort['priceSpecification.price'] }, (typeof ((_b = params.sort) === null || _b === void 0 ? void 0 : _b.identifier) === 'number')
|
|
1414
|
+
? { 'offers.identifier': params.sort.identifier }
|
|
1415
|
+
: undefined)
|
|
1416
|
+
}
|
|
1417
|
+
]
|
|
1362
1418
|
: [],
|
|
1363
1419
|
{ $project: projectStage }
|
|
1364
1420
|
]);
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare const USE_CUSTOM_SENDER_EMAIL: boolean;
|
|
|
44
44
|
export declare const USE_ORDER_PAYMENT_DUE_ON_PLACED: boolean;
|
|
45
45
|
export declare const USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY: boolean;
|
|
46
46
|
export declare const USE_AGGREGATE_OFFERS_AS_PRIMARY: boolean;
|
|
47
|
+
export declare const USE_AGGREGATE_OFFERS_AS_PRIMARY_ON_SEARCH_BY_CATALOG: boolean;
|
|
47
48
|
export declare const MONGO_MAX_TIME_MS: number;
|
|
48
49
|
/**
|
|
49
50
|
* グローバル設定
|
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.USE_AGGREGATE_OFFERS_AS_PRIMARY = exports.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY = 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_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;
|
|
3
|
+
exports.settings = exports.MONGO_MAX_TIME_MS = exports.USE_AGGREGATE_OFFERS_AS_PRIMARY_ON_SEARCH_BY_CATALOG = exports.USE_AGGREGATE_OFFERS_AS_PRIMARY = exports.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY = 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_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')
|
|
@@ -76,6 +76,7 @@ exports.USE_CUSTOM_SENDER_EMAIL = process.env.USE_CUSTOM_SENDER_EMAIL === '1';
|
|
|
76
76
|
exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = process.env.USE_ORDER_PAYMENT_DUE_ON_PLACED === '1';
|
|
77
77
|
exports.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY = process.env.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY === '1';
|
|
78
78
|
exports.USE_AGGREGATE_OFFERS_AS_PRIMARY = process.env.USE_AGGREGATE_OFFERS_AS_PRIMARY === '1';
|
|
79
|
+
exports.USE_AGGREGATE_OFFERS_AS_PRIMARY_ON_SEARCH_BY_CATALOG = process.env.USE_AGGREGATE_OFFERS_AS_PRIMARY_ON_SEARCH_BY_CATALOG === '1';
|
|
79
80
|
exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string')
|
|
80
81
|
? Number(process.env.MONGO_MAX_TIME_MS)
|
|
81
82
|
// tslint:disable-next-line:no-magic-numbers
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.329.0-alpha.
|
|
13
|
-
"@cinerino/sdk": "3.166.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.329.0-alpha.7",
|
|
13
|
+
"@cinerino/sdk": "3.166.0-alpha.7",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"postversion": "git push origin --tags",
|
|
118
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
119
119
|
},
|
|
120
|
-
"version": "21.8.0-alpha.
|
|
120
|
+
"version": "21.8.0-alpha.36"
|
|
121
121
|
}
|