@chevre/domain 21.8.0-alpha.41 → 21.8.0-alpha.43
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.
|
@@ -107,7 +107,7 @@ function createEmailMessageAbout(params) {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
function createEmailMessageSender(params) {
|
|
110
|
-
var _a, _b
|
|
110
|
+
var _a, _b;
|
|
111
111
|
return {
|
|
112
112
|
typeOf: params.order.seller.typeOf,
|
|
113
113
|
name: (typeof ((_b = (_a = params.email) === null || _a === void 0 ? void 0 : _a.sender) === null || _b === void 0 ? void 0 : _b.name) === 'string')
|
|
@@ -115,10 +115,11 @@ function createEmailMessageSender(params) {
|
|
|
115
115
|
: (typeof params.order.seller.name === 'string')
|
|
116
116
|
? params.order.seller.name
|
|
117
117
|
: String(params.order.seller.id),
|
|
118
|
-
// sender.email
|
|
119
|
-
email: (
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
// sender.email指定を廃止(2023-09-07~)
|
|
119
|
+
// email: (USE_CUSTOM_SENDER_EMAIL && typeof params.email?.sender?.email === 'string')
|
|
120
|
+
// ? params.email.sender.email
|
|
121
|
+
// : DEFAULT_SENDER_EMAIL
|
|
122
|
+
email: settings_1.DEFAULT_SENDER_EMAIL
|
|
122
123
|
};
|
|
123
124
|
}
|
|
124
125
|
/**
|
|
@@ -30,6 +30,9 @@ type KeyOfUnitPriceOffer = keyof factory.unitPriceOffer.IUnitPriceOffer;
|
|
|
30
30
|
type IProjection = {
|
|
31
31
|
[key in KeyOfUnitPriceOffer]?: 0 | 1;
|
|
32
32
|
};
|
|
33
|
+
export type IUnitPriceOfferFromAggregateOffer = factory.unitPriceOffer.IUnitPriceOffer & {
|
|
34
|
+
offerIndex?: number;
|
|
35
|
+
};
|
|
33
36
|
/**
|
|
34
37
|
* オファーリポジトリ
|
|
35
38
|
*/
|
|
@@ -70,7 +73,7 @@ export declare class MongoRepository {
|
|
|
70
73
|
*/
|
|
71
74
|
useOffersAsPrimary?: boolean;
|
|
72
75
|
}): Promise<{
|
|
73
|
-
offers:
|
|
76
|
+
offers: IUnitPriceOfferFromAggregateOffer[];
|
|
74
77
|
sortedOfferIds: string[];
|
|
75
78
|
}>;
|
|
76
79
|
findById(params: {
|
|
@@ -3,7 +3,9 @@ type IMovieTicketTypeChargeSpecification = factory.priceSpecification.IPriceSpec
|
|
|
3
3
|
type ICategoryCodeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.CategoryCodeChargeSpecification>;
|
|
4
4
|
declare function createCompoundPriceSpec4event(params: {
|
|
5
5
|
eligibleQuantity: factory.quantitativeValue.IQuantitativeValue<factory.unitCode.C62>;
|
|
6
|
-
offer: factory.unitPriceOffer.IUnitPriceOffer
|
|
6
|
+
offer: factory.unitPriceOffer.IUnitPriceOffer & {
|
|
7
|
+
offerIndex?: number;
|
|
8
|
+
};
|
|
7
9
|
movieTicketTypeChargeSpecs: IMovieTicketTypeChargeSpecification[];
|
|
8
10
|
videoFormatChargeSpecs: ICategoryCodeChargeSpecification[];
|
|
9
11
|
soundFormatChargeSpecs: ICategoryCodeChargeSpecification[];
|
|
@@ -13,5 +15,6 @@ declare function createCompoundPriceSpec4event(params: {
|
|
|
13
15
|
sortIndex?: number;
|
|
14
16
|
}): factory.product.ITicketOffer & {
|
|
15
17
|
sortIndex?: number;
|
|
18
|
+
offerIndex?: number;
|
|
16
19
|
};
|
|
17
20
|
export { createCompoundPriceSpec4event };
|
|
@@ -69,25 +69,18 @@ function createCompoundPriceSpec4event(params) {
|
|
|
69
69
|
...mvtkPriceComponents
|
|
70
70
|
];
|
|
71
71
|
const compoundPriceSpecification = {
|
|
72
|
-
// 不要な属性を除外(2022-11-02~)
|
|
73
|
-
// project: params.offer.project,
|
|
74
72
|
typeOf: factory.priceSpecificationType.CompoundPriceSpecification,
|
|
75
73
|
priceCurrency: factory.priceCurrency.JPY,
|
|
76
74
|
valueAddedTaxIncluded: true,
|
|
77
75
|
priceComponent
|
|
78
76
|
};
|
|
79
77
|
// 必要な属性のみに限定(2023-02-24~)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// addOn,
|
|
83
|
-
availability, availableAtOrFrom, category, eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation, priceCurrency, validFrom, validThrough, validRateLimit, additionalProperty, identifier, itemOffered } = params.offer;
|
|
84
|
-
return Object.assign(Object.assign({ name, description, alternateName, color, typeOf, id,
|
|
85
|
-
// addOn,
|
|
86
|
-
// availability,
|
|
78
|
+
const { name, description, alternateName, color, typeOf, id, availability, availableAtOrFrom, category, eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation, priceCurrency, validFrom, validThrough, validRateLimit, additionalProperty, identifier, itemOffered, offerIndex } = params.offer;
|
|
79
|
+
return Object.assign(Object.assign(Object.assign({ name, description, alternateName, color, typeOf, id,
|
|
87
80
|
availableAtOrFrom, category,
|
|
88
81
|
eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation,
|
|
89
82
|
priceCurrency,
|
|
90
83
|
validFrom, validThrough, validRateLimit, additionalProperty,
|
|
91
|
-
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);
|
|
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);
|
|
92
85
|
}
|
|
93
86
|
exports.createCompoundPriceSpec4event = createCompoundPriceSpec4event;
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -40,7 +40,6 @@ export declare const USE_NEW_EVENT_AVAILABILITY_KEY_FROM: moment.Moment;
|
|
|
40
40
|
export declare const USE_ADVANCE_BOOKING_REQUIREMENT: boolean;
|
|
41
41
|
export declare const USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT: boolean;
|
|
42
42
|
export declare const USE_DELETE_EVENT_BY_ORDER: boolean;
|
|
43
|
-
export declare const USE_CUSTOM_SENDER_EMAIL: boolean;
|
|
44
43
|
export declare const USE_ORDER_PAYMENT_DUE_ON_PLACED: boolean;
|
|
45
44
|
export declare const USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY: boolean;
|
|
46
45
|
export declare const USE_AGGREGATE_OFFERS_AS_PRIMARY: 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.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.
|
|
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_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')
|
|
@@ -72,7 +72,6 @@ exports.USE_NEW_EVENT_AVAILABILITY_KEY_FROM = (typeof process.env.USE_NEW_EVENT_
|
|
|
72
72
|
exports.USE_ADVANCE_BOOKING_REQUIREMENT = process.env.USE_ADVANCE_BOOKING_REQUIREMENT === '1';
|
|
73
73
|
exports.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT = process.env.USE_OBJECT_AS_PAY_TRANSACTION_AMOUNT === '1';
|
|
74
74
|
exports.USE_DELETE_EVENT_BY_ORDER = process.env.USE_DELETE_EVENT_BY_ORDER === '1';
|
|
75
|
-
exports.USE_CUSTOM_SENDER_EMAIL = process.env.USE_CUSTOM_SENDER_EMAIL === '1';
|
|
76
75
|
exports.USE_ORDER_PAYMENT_DUE_ON_PLACED = process.env.USE_ORDER_PAYMENT_DUE_ON_PLACED === '1';
|
|
77
76
|
exports.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY = process.env.USE_AUTHORIZE_PAYMENT_RESULT_AS_ARRAY === '1';
|
|
78
77
|
exports.USE_AGGREGATE_OFFERS_AS_PRIMARY = process.env.USE_AGGREGATE_OFFERS_AS_PRIMARY === '1';
|
package/package.json
CHANGED