@chevre/domain 21.27.0-alpha.0 → 21.27.0-alpha.2

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.
@@ -0,0 +1,70 @@
1
+ // tslint:disable:no-console
2
+ import * as moment from 'moment';
3
+ import * as mongoose from 'mongoose';
4
+
5
+ import { chevre } from '../../../lib/index';
6
+
7
+ // tslint:disable-next-line:max-func-body-length
8
+ async function main() {
9
+ await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
10
+
11
+ const actionRepo = await chevre.repository.Action.createInstance(mongoose.connection);
12
+
13
+ const cursor = actionRepo.getCursor(
14
+ {
15
+ typeOf: { $eq: chevre.factory.actionType.CheckAction },
16
+ 'object.typeOf': { $eq: chevre.factory.service.paymentService.PaymentServiceType.MovieTicket },
17
+ // 'project.id': { $eq: project.id },
18
+ startDate: {
19
+ $gte: moment()
20
+ // tslint:disable-next-line:no-magic-numbers
21
+ .add(-90, 'days')
22
+ .toDate()
23
+ // $lte: moment('2023-08-01T21:20:43.133Z')
24
+ // .toDate()
25
+ }
26
+ },
27
+ {
28
+ startDate: 1,
29
+ object: 1,
30
+ project: 1,
31
+ instrument: 1,
32
+ purpose: 1
33
+ }
34
+ );
35
+ console.log('actions found');
36
+
37
+ let i = 0;
38
+ let updateCount = 0;
39
+ const actions: Pick<
40
+ chevre.factory.action.check.paymentMethod.movieTicket.IAction,
41
+ 'startDate' | 'object' | 'project' | 'instrument' | 'id' | 'purpose'
42
+ >[] = [];
43
+ await cursor.eachAsync(async (doc) => {
44
+ i += 1;
45
+ const action: Pick<
46
+ chevre.factory.action.check.paymentMethod.movieTicket.IAction,
47
+ 'startDate' | 'object' | 'project' | 'instrument' | 'id' | 'purpose'
48
+ > = doc.toObject();
49
+
50
+ const alreadyMigrated = typeof action.purpose?.id === 'string'
51
+ && action.purpose?.id.length > 0;
52
+
53
+ if (alreadyMigrated) {
54
+ console.log('already exist.', action.project.id, action.id, action.purpose?.typeOf, action.purpose?.id, action.startDate, i);
55
+ } else {
56
+ console.log('updating...', action.project.id, action.id, action.purpose?.typeOf, action.purpose?.id, action.startDate, i);
57
+ updateCount += 1;
58
+ actions.push(action);
59
+ console.log('updated.', action.project.id, action.id, action.purpose?.typeOf, action.purpose?.id, action.startDate, i);
60
+ }
61
+ });
62
+
63
+ console.log('invalidAction:', actions);
64
+ console.log(i, 'actions checked');
65
+ console.log(updateCount, 'actions updated');
66
+ }
67
+
68
+ main()
69
+ .then()
70
+ .catch(console.error);
@@ -7,14 +7,4 @@ declare function createPayActions(params: {
7
7
  acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
8
8
  };
9
9
  }): factory.action.trade.pay.IAttributes[];
10
- /**
11
- * 取引のポストアクションを作成する
12
- */
13
- declare function createPotentialActions(params: {
14
- transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Pay>;
15
- potentialActions?: factory.assetTransaction.pay.IPotentialActionsParams;
16
- order: Pick<factory.order.IOrder, 'typeOf' | 'confirmationNumber' | 'orderNumber'> & {
17
- acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
18
- };
19
- }): factory.assetTransaction.IPotentialActions<factory.assetTransactionType.Pay>;
20
- export { createPayActions, createPotentialActions, IAcceptedOfferMovieTicketUsed };
10
+ export { createPayActions, IAcceptedOfferMovieTicketUsed };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createPotentialActions = exports.createPayActions = void 0;
3
+ exports.createPayActions = void 0;
4
4
  const factory = require("../../../factory");
5
5
  const createPayObjectServiceOutput_1 = require("./potentialActions/createPayObjectServiceOutput");
6
6
  function createPayActions(params) {
@@ -151,13 +151,3 @@ function createInformPaymentActions(params) {
151
151
  }
152
152
  return informPaymentActions;
153
153
  }
154
- /**
155
- * 取引のポストアクションを作成する
156
- */
157
- function createPotentialActions(params) {
158
- const payActionAttributesList = createPayActions(params);
159
- return {
160
- pay: payActionAttributesList
161
- };
162
- }
163
- exports.createPotentialActions = createPotentialActions;
@@ -101,9 +101,7 @@ export declare function start(params: factory.assetTransaction.pay.IStartParamsW
101
101
  * 取引確定
102
102
  */
103
103
  export declare function confirm(params: factory.assetTransaction.pay.IConfirmParams & {
104
- options: {
105
- minimizePotentialActions: boolean;
106
- };
104
+ options: {};
107
105
  }): IConfirmOperation<void>;
108
106
  export declare function fixOrderAsPurpose(params: {
109
107
  potentialActions: {
@@ -18,7 +18,6 @@ const MovieTicketPayment = require("../payment/movieTicket");
18
18
  const PaymentCardPayment = require("../payment/paymentCard");
19
19
  const validation_1 = require("./pay/account/validation");
20
20
  const factory_1 = require("./pay/factory");
21
- const potentialActions_1 = require("./pay/potentialActions");
22
21
  const debug = createDebug('chevre-domain:service:assetTransaction');
23
22
  /**
24
23
  * 外部決済ロケーション発行
@@ -375,32 +374,22 @@ function confirm(params) {
375
374
  throw new factory.errors.ArgumentNull('potentialActions.pay.purpose');
376
375
  }
377
376
  let potentialActions;
378
- if (params.options.minimizePotentialActions) {
379
- // 注文検証
380
- const existingOrders = yield repos.order.search({
381
- limit: 1,
382
- page: 1,
383
- project: { id: { $eq: transaction.project.id } },
384
- confirmationNumbers: [confirmationNumber],
385
- orderNumbers: [orderNumber]
386
- }, { orderNumber: 1 });
387
- if (existingOrders.length === 0) {
388
- throw new factory.errors.NotFound(factory.order.OrderType.Order);
389
- }
390
- const payActionData4order = {
391
- object: { paymentMethod: { paymentMethodId: transaction.transactionNumber } },
392
- purpose: { confirmationNumber, orderNumber, typeOf: factory.order.OrderType.Order }
393
- };
394
- potentialActions = { pay: [payActionData4order] };
395
- }
396
- else {
397
- const order = yield fixOrderAsPurpose({ potentialActions: { pay: { purpose: { confirmationNumber, orderNumber } } } }, transaction)(repos);
398
- potentialActions = (0, potentialActions_1.createPotentialActions)({
399
- transaction: transaction,
400
- potentialActions: params.potentialActions,
401
- order
402
- });
377
+ // 注文検証
378
+ const existingOrders = yield repos.order.search({
379
+ limit: 1,
380
+ page: 1,
381
+ project: { id: { $eq: transaction.project.id } },
382
+ confirmationNumbers: [confirmationNumber],
383
+ orderNumbers: [orderNumber]
384
+ }, { orderNumber: 1 });
385
+ if (existingOrders.length === 0) {
386
+ throw new factory.errors.NotFound(factory.order.OrderType.Order);
403
387
  }
388
+ const payActionData4order = {
389
+ object: { paymentMethod: { paymentMethodId: transaction.transactionNumber } },
390
+ purpose: { confirmationNumber, orderNumber, typeOf: factory.order.OrderType.Order }
391
+ };
392
+ potentialActions = { pay: [payActionData4order] };
404
393
  yield repos.assetTransaction.confirm(Object.assign({ typeOf: factory.assetTransactionType.Pay, id: transaction.id, result: {}, potentialActions: potentialActions }, (typeof overwritingPaymentMethodIdentifier === 'string')
405
394
  ? { object: { paymentMethod: { identifier: overwritingPaymentMethodIdentifier } } }
406
395
  : undefined));
@@ -52,7 +52,7 @@ export declare function createAdditionalTicketText(params: {
52
52
  reservedTicket: factory.reservation.ITicket;
53
53
  }): string | undefined;
54
54
  export type IUnitPriceSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.UnitPriceSpecification>;
55
- export declare function createReservationFor(params: IMinimizedIndividualEvent<factory.eventType.ScreeningEvent> | IMinimizedIndividualEvent<factory.eventType.Event>): factory.assetTransaction.reserve.IReservationFor;
55
+ export declare function createReservationFor(params: IMinimizedIndividualEvent<factory.eventType.ScreeningEvent> | IMinimizedIndividualEvent<factory.eventType.Event>, useOptimizeReservation: boolean): factory.assetTransaction.reserve.IReservationFor;
56
56
  export declare function createIssuedThrough(params: {
57
57
  reservationFor: IMinimizedIndividualEvent<factory.eventType.ScreeningEvent> | IMinimizedIndividualEvent<factory.eventType.Event>;
58
58
  }): {
@@ -7,6 +7,7 @@ exports.createCancelPendingReservationAction = exports.createPotentialActions =
7
7
  const moment = require("moment");
8
8
  const factory = require("../../../factory");
9
9
  const accountTransactionIdentifier_1 = require("../../../factory/accountTransactionIdentifier");
10
+ const settings_1 = require("../../../settings");
10
11
  const price_1 = require("./factory/price");
11
12
  function createStartParams(params) {
12
13
  var _a;
@@ -331,10 +332,10 @@ function createAdditionalTicketText(params) {
331
332
  return (_b = (_a = params.acceptedOffer.itemOffered) === null || _a === void 0 ? void 0 : _a.serviceOutput) === null || _b === void 0 ? void 0 : _b.additionalTicketText;
332
333
  }
333
334
  exports.createAdditionalTicketText = createAdditionalTicketText;
334
- function createReservationFor(params) {
335
+ function createReservationFor(params, useOptimizeReservation) {
335
336
  var _a, _b;
336
337
  if (params.typeOf === factory.eventType.ScreeningEvent) {
337
- return Object.assign({ endDate: params.endDate, id: params.id, location: params.location, name: params.name, startDate: params.startDate, superEvent: optimizeReservationSuperEvent(params), typeOf: params.typeOf }, (params.doorTime instanceof Date)
338
+ return Object.assign({ endDate: params.endDate, id: params.id, location: params.location, name: params.name, startDate: params.startDate, superEvent: optimizeReservationSuperEvent(params, useOptimizeReservation), typeOf: params.typeOf }, (params.doorTime instanceof Date)
338
339
  ? { doorTime: params.doorTime }
339
340
  : undefined);
340
341
  }
@@ -347,15 +348,19 @@ function createReservationFor(params) {
347
348
  }
348
349
  }
349
350
  exports.createReservationFor = createReservationFor;
350
- function optimizeReservationSuperEvent(params) {
351
+ function optimizeReservationSuperEvent(params, useOptimizeReservation) {
351
352
  const superEvent = params.superEvent;
352
- return Object.assign({ additionalProperty: (Array.isArray(superEvent.additionalProperty))
353
- ? superEvent.additionalProperty
354
- : [], id: superEvent.id,
353
+ return Object.assign(Object.assign({ id: superEvent.id,
355
354
  // kanaName: superEvent.kanaName, // 廃止(2024-01-26~)
356
355
  location: superEvent.location, name: superEvent.name, soundFormat: superEvent.soundFormat, typeOf: superEvent.typeOf, videoFormat: superEvent.videoFormat, workPerformed: superEvent.workPerformed }, (superEvent.headline !== undefined)
357
356
  ? { headline: superEvent.headline }
358
- : undefined);
357
+ : undefined), (useOptimizeReservation)
358
+ ? {}
359
+ : {
360
+ additionalProperty: (Array.isArray(superEvent.additionalProperty))
361
+ ? superEvent.additionalProperty
362
+ : []
363
+ });
359
364
  }
360
365
  function createIssuedThrough(params) {
361
366
  var _a;
@@ -472,6 +477,7 @@ function createPotentialActions(params) {
472
477
  if (reservationFor === undefined) {
473
478
  throw new factory.errors.NotFound('transaction.object.reservationFor');
474
479
  }
480
+ const useOptimizeReservation = !settings_1.USE_OPTIMIZE_RESERVATION_EXCEPTIONS.includes(transaction.project.id);
475
481
  // 予約アクション属性作成
476
482
  const pendingReservations = (Array.isArray(transaction.object.subReservation)) ? transaction.object.subReservation : [];
477
483
  let reserveActionAttributes = [];
@@ -481,7 +487,7 @@ function createPotentialActions(params) {
481
487
  // ReservationPackageに対応(2022-12-22~)
482
488
  // purpose:Orderの指定があれば、underName,issuedByを調整(2022-05-23~)
483
489
  if (typeof ((_a = params.order) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') {
484
- const ordre2reservationUnderNameResult = ordre2reservationUnderName({ order: params.order });
490
+ const ordre2reservationUnderNameResult = ordre2reservationUnderName({ order: params.order, useOptimizeReservation });
485
491
  underName = ordre2reservationUnderNameResult.underName;
486
492
  }
487
493
  const moneyTransferActions = [];
@@ -532,22 +538,29 @@ function createPotentialActions(params) {
532
538
  };
533
539
  }
534
540
  exports.createPotentialActions = createPotentialActions;
541
+ /**
542
+ * 予約のunderName.identifierを決定する
543
+ */
535
544
  function createReservationUnderNameIdentifier(params) {
536
- // 予約のunderName.identifierを決定する
545
+ // 必要最低限の識別子のみ継承する(2024-03-16~)
546
+ let identifiersFromCustomer = (Array.isArray(params.order.customer.identifier)) ? params.order.customer.identifier : [];
547
+ if (params.useOptimizeReservation) {
548
+ identifiersFromCustomer = identifiersFromCustomer.filter(({ name }) => name === 'clientId');
549
+ }
537
550
  return [
538
551
  { name: 'orderNumber', value: params.order.orderNumber },
539
- ...(Array.isArray(params.order.customer.identifier)) ? params.order.customer.identifier : []
552
+ ...identifiersFromCustomer
540
553
  ];
541
554
  }
542
555
  function createReservationUnderName(params) {
543
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ identifier: createReservationUnderNameIdentifier({ order: params.order }), name: String(params.order.customer.name), typeOf: params.order.customer.typeOf }, (typeof params.order.customer.address === 'string') ? { address: params.order.customer.address } : undefined), (typeof params.order.customer.age === 'string') ? { age: params.order.customer.age } : undefined), (typeof params.order.customer.email === 'string') ? { email: params.order.customer.email } : undefined), (typeof params.order.customer.familyName === 'string') ? { familyName: params.order.customer.familyName } : undefined), (typeof params.order.customer.gender === 'string') ? { gender: params.order.customer.gender } : undefined), (typeof params.order.customer.givenName === 'string') ? { givenName: params.order.customer.givenName } : undefined), (typeof params.order.customer.id === 'string') ? { id: params.order.customer.id } : undefined), (typeof params.order.customer.telephone === 'string') ? { telephone: params.order.customer.telephone } : undefined), (typeof params.order.customer.url === 'string') ? { url: params.order.customer.url } : undefined);
556
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ identifier: createReservationUnderNameIdentifier({ order: params.order, useOptimizeReservation: params.useOptimizeReservation }), name: String(params.order.customer.name), typeOf: params.order.customer.typeOf }, (typeof params.order.customer.address === 'string') ? { address: params.order.customer.address } : undefined), (typeof params.order.customer.age === 'string') ? { age: params.order.customer.age } : undefined), (typeof params.order.customer.email === 'string') ? { email: params.order.customer.email } : undefined), (typeof params.order.customer.familyName === 'string') ? { familyName: params.order.customer.familyName } : undefined), (typeof params.order.customer.gender === 'string') ? { gender: params.order.customer.gender } : undefined), (typeof params.order.customer.givenName === 'string') ? { givenName: params.order.customer.givenName } : undefined), (typeof params.order.customer.id === 'string') ? { id: params.order.customer.id } : undefined), (typeof params.order.customer.telephone === 'string') ? { telephone: params.order.customer.telephone } : undefined), (typeof params.order.customer.url === 'string') ? { url: params.order.customer.url } : undefined);
544
557
  }
545
558
  /**
546
559
  * 注文者情報を予約者情報へ変換する
547
560
  */
548
561
  function ordre2reservationUnderName(params) {
549
562
  return {
550
- underName: createReservationUnderName({ order: params.order })
563
+ underName: createReservationUnderName({ order: params.order, useOptimizeReservation: params.useOptimizeReservation })
551
564
  };
552
565
  }
553
566
  function createMoneyTransferActions(params) {
@@ -141,7 +141,8 @@ function addReservations(params) {
141
141
  validateAppliesToMovieTicket: params.validateAppliesToMovieTicket
142
142
  })(repos);
143
143
  // 予約イベント最適化
144
- const reservationFor = (0, factory_1.createReservationFor)(event);
144
+ const useOptimizeReservation = !settings_1.USE_OPTIMIZE_RESERVATION_EXCEPTIONS.includes(transaction.project.id);
145
+ const reservationFor = (0, factory_1.createReservationFor)(event, useOptimizeReservation);
145
146
  const { issuedThrough } = (0, factory_1.createIssuedThrough)({ reservationFor: event });
146
147
  // 取引に予約追加
147
148
  let lockedOfferRateLimitKeys = [];
@@ -8,9 +8,7 @@ import type { MongoRepository as OrderRepo } from '../../repo/order';
8
8
  import type { MongoRepository as ProjectRepo } from '../../repo/project';
9
9
  import type { MongoRepository as TaskRepo } from '../../repo/task';
10
10
  import type { MongoRepository as TransactionRepo } from '../../repo/transaction';
11
- declare function confirmPayTransaction(data: factory.task.IData<factory.taskName.ConfirmPayTransaction>, options: {
12
- minimizePotentialActions: boolean;
13
- }): (repos: {
11
+ declare function confirmPayTransaction(data: factory.task.IData<factory.taskName.ConfirmPayTransaction>, options: {}): (repos: {
14
12
  acceptedOffer: AcceptedOfferRepo;
15
13
  action: ActionRepo;
16
14
  assetTransaction: AssetTransactionRepo;
@@ -3,16 +3,12 @@ var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.createNextSendOrderTasks = exports.createInformTasks = void 0;
5
5
  const factory = require("../../../../factory");
6
- // import { createMaskedCustomer } from '../../../../factory/order';
7
6
  const settings_1 = require("../../../../settings");
8
7
  const informOrder = (_a = settings_1.settings.onOrderStatusChanged) === null || _a === void 0 ? void 0 : _a.informOrder;
9
8
  function creteOrder4inform(order) {
10
9
  return Object.assign({ project: order.project, typeOf: order.typeOf, orderNumber: order.orderNumber, acceptedOffers: order.deliveredAcceptedOffers, orderStatus: factory.orderStatus.OrderInTransit }, (typeof order.id === 'string') ? { id: order.id } : undefined);
11
10
  }
12
11
  function createInformTasks(params) {
13
- if (!settings_1.USE_INFORM_ORDER_IN_TRANSIT) {
14
- return [];
15
- }
16
12
  const { order } = params;
17
13
  const taskRunsAt = new Date();
18
14
  let informTasks = [];
@@ -20,7 +20,6 @@ const order_1 = require("../../repo/order");
20
20
  const project_1 = require("../../repo/project");
21
21
  const task_1 = require("../../repo/task");
22
22
  const transaction_1 = require("../../repo/transaction");
23
- const settings_1 = require("../../settings");
24
23
  const confirmPayTransaction_1 = require("../order/confirmPayTransaction");
25
24
  /**
26
25
  * タスク実行関数
@@ -30,7 +29,7 @@ function call(data) {
30
29
  if (settings.redisClient === undefined) {
31
30
  throw new factory.errors.Argument('settings', 'redisClient required');
32
31
  }
33
- yield (0, confirmPayTransaction_1.confirmPayTransaction)(data, { minimizePotentialActions: settings_1.USE_MINIMIZED_PAY_TASK })({
32
+ yield (0, confirmPayTransaction_1.confirmPayTransaction)(data, {})({
34
33
  acceptedOffer: new acceptedOffer_1.MongoRepository(settings.connection),
35
34
  action: new action_1.MongoRepository(settings.connection),
36
35
  assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
@@ -38,12 +38,11 @@ export declare const USE_ASSET_TRANSACTION_SYNC_PROCESSING: boolean;
38
38
  export declare const USE_DELETE_EVENT_BY_ORDER: boolean;
39
39
  export declare const USE_OPTIMIZE_TICKET_OFFER: boolean;
40
40
  export declare const USE_FETCH_API: boolean;
41
- export declare const USE_INFORM_ORDER_IN_TRANSIT: boolean;
42
41
  export declare const USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING: boolean;
43
- export declare const USE_MINIMIZED_PAY_TASK: boolean;
44
42
  export declare const USE_VALIDATE_PROJECT_MAKES_OFFER: boolean;
45
43
  export declare const USE_OWNERSHIP_INFO_BY_WEB_APPLICATION: boolean;
46
44
  export declare const USE_CHECK_RESOURCE_TASK: boolean;
45
+ export declare const USE_OPTIMIZE_RESERVATION_EXCEPTIONS: string[];
47
46
  export declare const MONGO_MAX_TIME_MS: number;
48
47
  export declare const MONGO_READ_PREFERENCE: string;
49
48
  export declare const MONGO_AUTO_INDEX: boolean;
@@ -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_CHECK_RESOURCE_TASK = exports.USE_OWNERSHIP_INFO_BY_WEB_APPLICATION = exports.USE_VALIDATE_PROJECT_MAKES_OFFER = exports.USE_MINIMIZED_PAY_TASK = exports.USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING = exports.USE_INFORM_ORDER_IN_TRANSIT = exports.USE_FETCH_API = exports.USE_OPTIMIZE_TICKET_OFFER = exports.USE_DELETE_EVENT_BY_ORDER = 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.MAXIMUM_RESERVATION_GRACE_PERIOD_IN_DAYS = 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_OPTIMIZE_RESERVATION_EXCEPTIONS = exports.USE_CHECK_RESOURCE_TASK = exports.USE_OWNERSHIP_INFO_BY_WEB_APPLICATION = exports.USE_VALIDATE_PROJECT_MAKES_OFFER = exports.USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING = exports.USE_FETCH_API = exports.USE_OPTIMIZE_TICKET_OFFER = exports.USE_DELETE_EVENT_BY_ORDER = 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.MAXIMUM_RESERVATION_GRACE_PERIOD_IN_DAYS = 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(' ')
@@ -62,12 +62,13 @@ exports.USE_ASSET_TRANSACTION_SYNC_PROCESSING = process.env.USE_ASSET_TRANSACTIO
62
62
  exports.USE_DELETE_EVENT_BY_ORDER = process.env.USE_DELETE_EVENT_BY_ORDER === '1';
63
63
  exports.USE_OPTIMIZE_TICKET_OFFER = process.env.USE_OPTIMIZE_TICKET_OFFER === '1';
64
64
  exports.USE_FETCH_API = process.env.USE_FETCH_API === '1';
65
- exports.USE_INFORM_ORDER_IN_TRANSIT = process.env.USE_INFORM_ORDER_IN_TRANSIT === '1';
66
65
  exports.USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING = process.env.USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING === '1';
67
- exports.USE_MINIMIZED_PAY_TASK = process.env.USE_MINIMIZED_PAY_TASK === '1';
68
66
  exports.USE_VALIDATE_PROJECT_MAKES_OFFER = process.env.USE_VALIDATE_PROJECT_MAKES_OFFER === '1';
69
67
  exports.USE_OWNERSHIP_INFO_BY_WEB_APPLICATION = process.env.USE_OWNERSHIP_INFO_BY_WEB_APPLICATION === '1';
70
68
  exports.USE_CHECK_RESOURCE_TASK = process.env.USE_CHECK_RESOURCE_TASK === '1';
69
+ exports.USE_OPTIMIZE_RESERVATION_EXCEPTIONS = (typeof process.env.USE_OPTIMIZE_RESERVATION_EXCEPTIONS === 'string')
70
+ ? process.env.USE_OPTIMIZE_RESERVATION_EXCEPTIONS.split(' ')
71
+ : [];
71
72
  exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string')
72
73
  ? Number(process.env.MONGO_MAX_TIME_MS)
73
74
  // tslint:disable-next-line:no-magic-numbers
package/package.json CHANGED
@@ -110,5 +110,5 @@
110
110
  "postversion": "git push origin --tags",
111
111
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
112
112
  },
113
- "version": "21.27.0-alpha.0"
113
+ "version": "21.27.0-alpha.2"
114
114
  }