@chevre/domain 21.8.0-alpha.52 → 21.8.0-alpha.53

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.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createCompoundPriceSpec4event = void 0;
4
4
  const factory = require("../../factory");
5
+ const settings_1 = require("../../settings");
5
6
  function categoryCodeChargePriceSpec2component(params) {
6
7
  var _a;
7
8
  return Object.assign({ id: params.id, typeOf: params.typeOf, name: params.name, price: params.price, priceCurrency: params.priceCurrency, valueAddedTaxIncluded: params.valueAddedTaxIncluded, appliesToCategoryCode: params.appliesToCategoryCode }, (typeof ((_a = params.accounting) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? { accounting: params.accounting } : undefined);
@@ -76,11 +77,15 @@ function createCompoundPriceSpec4event(params) {
76
77
  };
77
78
  // 必要な属性のみに限定(2023-02-24~)
78
79
  const { name, description, alternateName, color, typeOf, id, availability, availableAtOrFrom, category, eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation, priceCurrency, validFrom, validThrough, validRateLimit, additionalProperty, identifier, itemOffered, offerIndex, parentOffer } = params.offer;
79
- return Object.assign(Object.assign(Object.assign(Object.assign({ name, description, alternateName, color, typeOf, id,
80
- availableAtOrFrom, category,
80
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name, description, alternateName, color, typeOf, id,
81
+ category,
81
82
  eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation,
82
83
  priceCurrency,
83
84
  validFrom, validThrough, validRateLimit, additionalProperty,
84
- identifier, itemOffered, addOn: params.addOn, eligibleQuantity: params.eligibleQuantity, priceSpecification: compoundPriceSpecification }, (typeof params.availability === 'string') ? { availability: params.availability } : { availability }), (typeof params.sortIndex === 'number') ? { sortIndex: params.sortIndex } : undefined), (typeof offerIndex === 'number') ? { offerIndex } : undefined), (typeof (parentOffer === null || parentOffer === void 0 ? void 0 : parentOffer.id) === 'string') ? { parentOffer: { id: parentOffer.id } } : undefined);
85
+ identifier, itemOffered, addOn: params.addOn, eligibleQuantity: params.eligibleQuantity, priceSpecification: compoundPriceSpecification }, (!settings_1.USE_OPTIMIZE_TICKET_OFFER)
86
+ ? {
87
+ availableAtOrFrom // 最適化(2023-09-10~)
88
+ }
89
+ : undefined), (typeof params.availability === 'string') ? { availability: params.availability } : { availability }), (typeof params.sortIndex === 'number') ? { sortIndex: params.sortIndex } : undefined), (typeof offerIndex === 'number') ? { offerIndex } : undefined), (typeof (parentOffer === null || parentOffer === void 0 ? void 0 : parentOffer.id) === 'string') ? { parentOffer: { id: parentOffer.id } } : undefined);
85
90
  }
86
91
  exports.createCompoundPriceSpec4event = createCompoundPriceSpec4event;
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.searchProductOffers = void 0;
13
13
  const factory = require("../../../factory");
14
+ const settings_1 = require("../../../settings");
14
15
  /**
15
16
  * プロダクトオファーを検索する
16
17
  */
@@ -49,7 +50,11 @@ function searchProductOffers(params) {
49
50
  ...(unitSpec !== undefined) ? [unitSpec] : []
50
51
  ]
51
52
  };
52
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ additionalProperty: (Array.isArray(o.additionalProperty)) ? o.additionalProperty : [], alternateName: o.alternateName, availability: o.availability, availableAtOrFrom: o.availableAtOrFrom, color: o.color, description: o.description, id: o.id, identifier: o.identifier, itemOffered: o.itemOffered, name: o.name, priceCurrency: o.priceCurrency, typeOf: o.typeOf, priceSpecification: compoundPriceSpecification }, (o.validFrom instanceof Date) ? { validFrom: o.validFrom } : undefined), (o.validThrough instanceof Date) ? { validThrough: o.validThrough } : undefined), (typeof sortIndex === 'number') ? { sortIndex } : undefined), (typeof o.offerIndex === 'number') ? { offerIndex: o.offerIndex } : undefined), (typeof ((_a = o.parentOffer) === null || _a === void 0 ? void 0 : _a.id) === 'string') ? { parentOffer: { id: o.parentOffer.id } } : undefined);
53
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ additionalProperty: (Array.isArray(o.additionalProperty)) ? o.additionalProperty : [], alternateName: o.alternateName, availability: o.availability, color: o.color, description: o.description, id: o.id, identifier: o.identifier, itemOffered: o.itemOffered, name: o.name, priceCurrency: o.priceCurrency, typeOf: o.typeOf, priceSpecification: compoundPriceSpecification }, (!settings_1.USE_OPTIMIZE_TICKET_OFFER)
54
+ ? {
55
+ availableAtOrFrom: o.availableAtOrFrom // 最適化(2023-09-10~)
56
+ }
57
+ : undefined), (o.validFrom instanceof Date) ? { validFrom: o.validFrom } : undefined), (o.validThrough instanceof Date) ? { validThrough: o.validThrough } : undefined), (typeof sortIndex === 'number') ? { sortIndex } : undefined), (typeof o.offerIndex === 'number') ? { offerIndex: o.offerIndex } : undefined), (typeof ((_a = o.parentOffer) === null || _a === void 0 ? void 0 : _a.id) === 'string') ? { parentOffer: { id: o.parentOffer.id } } : undefined);
53
58
  });
54
59
  });
55
60
  }
@@ -44,6 +44,7 @@ export declare const USE_ORDER_PAYMENT_DUE_ON_PLACED: boolean;
44
44
  export declare const USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY: boolean;
45
45
  export declare const USE_AGGREGATE_OFFERS_AS_PRIMARY: boolean;
46
46
  export declare const USE_PROHIBIT_OFFERS_AS_PRIMARY: boolean;
47
+ export declare const USE_OPTIMIZE_TICKET_OFFER: boolean;
47
48
  export declare const MONGO_MAX_TIME_MS: number;
48
49
  /**
49
50
  * グローバル設定
@@ -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_PROHIBIT_OFFERS_AS_PRIMARY = exports.USE_AGGREGATE_OFFERS_AS_PRIMARY = exports.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY = exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = 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_OPTIMIZE_TICKET_OFFER = exports.USE_PROHIBIT_OFFERS_AS_PRIMARY = exports.USE_AGGREGATE_OFFERS_AS_PRIMARY = exports.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY = exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = 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_ORDER_PAYMENT_DUE_ON_PLACED = process.env.USE_ORDER_PAYMENT_DUE_ON_P
76
76
  exports.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY = process.env.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY === '1';
77
77
  exports.USE_AGGREGATE_OFFERS_AS_PRIMARY = process.env.USE_AGGREGATE_OFFERS_AS_PRIMARY === '1';
78
78
  exports.USE_PROHIBIT_OFFERS_AS_PRIMARY = process.env.USE_PROHIBIT_OFFERS_AS_PRIMARY === '1';
79
+ exports.USE_OPTIMIZE_TICKET_OFFER = process.env.USE_OPTIMIZE_TICKET_OFFER === '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
@@ -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.52"
120
+ "version": "21.8.0-alpha.53"
121
121
  }