@chevre/domain 20.4.0-alpha.22 → 20.4.0-alpha.24
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.
|
@@ -314,9 +314,8 @@ function acceptedOfferWithoutDetail2acceptedOffer(params) {
|
|
|
314
314
|
addOn: (Array.isArray(offerWithoutDetail.addOn))
|
|
315
315
|
? offerWithoutDetail.addOn.map((a) => {
|
|
316
316
|
return {
|
|
317
|
-
// project: offer.project,
|
|
318
317
|
typeOf: factory.offerType.Offer,
|
|
319
|
-
id: a.id,
|
|
318
|
+
id: String(a.id),
|
|
320
319
|
priceCurrency: offer.priceCurrency
|
|
321
320
|
};
|
|
322
321
|
})
|
|
@@ -38,18 +38,25 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* イベントから興行(旅客)オファーを検索する
|
|
42
42
|
*/
|
|
43
|
-
function
|
|
43
|
+
function searchEventTicketOffersByEvent(params) {
|
|
44
44
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
var _a, _b;
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const event = params.event;
|
|
47
|
+
let soundFormatTypes = [];
|
|
48
|
+
let videoFormatTypes = [];
|
|
49
|
+
if (event.typeOf === factory.eventType.ScreeningEvent) {
|
|
50
|
+
// 取得属性最適化(2023-01-25~)
|
|
51
|
+
const superEvent = yield repos.event.findById({ id: event.superEvent.id }, { soundFormat: 1, videoFormat: 1 });
|
|
52
|
+
soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
|
|
53
|
+
videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
|
|
54
|
+
}
|
|
55
|
+
const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
|
|
50
56
|
// 上映方式がなければMovieTicket除外(2023-02-21~)
|
|
51
57
|
const excludeAppliesToMovieTicket = videoFormatTypes.length === 0;
|
|
52
|
-
|
|
58
|
+
// 興行設定があれば興行のカタログを参照する(2022-08-31~)
|
|
59
|
+
const eventOffers = event.offers;
|
|
53
60
|
const { availableOffers, sortedOfferIds } = yield searchTicketOffersByItemOffered({
|
|
54
61
|
itemOffered: { id: (_a = eventOffers === null || eventOffers === void 0 ? void 0 : eventOffers.itemOffered) === null || _a === void 0 ? void 0 : _a.id },
|
|
55
62
|
ids: params.ids,
|
|
@@ -61,120 +68,49 @@ function searchTransportationEventTicketOffers(params) {
|
|
|
61
68
|
unacceptedPaymentMethod,
|
|
62
69
|
excludeAppliesToMovieTicket
|
|
63
70
|
})(repos);
|
|
64
|
-
const { soundFormatChargeSpecifications, videoFormatChargeSpecifications, movieTicketTypeChargeSpecs } = yield searchPriceSpecs4event({ project: { id:
|
|
71
|
+
const { soundFormatChargeSpecifications, videoFormatChargeSpecifications, movieTicketTypeChargeSpecs } = yield searchPriceSpecs4event({ project: { id: event.project.id }, soundFormatTypes, videoFormatTypes })(repos);
|
|
65
72
|
// 決済カード加算料金が存在しない場合自動補完する(2023-02-21~)
|
|
66
73
|
// if (!settings.useOffersAppliedToMovieTicketWithoutChargeSpecification) {
|
|
67
74
|
// }
|
|
68
|
-
|
|
75
|
+
const offers4event = [];
|
|
76
|
+
// 単価オファーから興行オファーを生成(順に処理)
|
|
77
|
+
for (const availableOffer of availableOffers) {
|
|
69
78
|
let sortIndex;
|
|
70
79
|
if (params.addSortIndex) {
|
|
71
80
|
sortIndex = sortedOfferIds.indexOf(String(availableOffer.id));
|
|
72
81
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
videoFormatTypes,
|
|
80
|
-
sortIndex
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
if (params.validateOfferRateLimit) {
|
|
84
|
-
// レート制限を確認
|
|
85
|
-
offers4event = yield Promise.all(offers4event.map((offer) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
return checkAvailability({ event: screeningEvent, offer })(repos);
|
|
87
|
-
})));
|
|
88
|
-
}
|
|
89
|
-
// アドオン設定があれば、プロダクトオファーを検索
|
|
90
|
-
for (const offer of offers4event) {
|
|
82
|
+
let availability;
|
|
83
|
+
if (params.validateOfferRateLimit) {
|
|
84
|
+
// レート制限を確認
|
|
85
|
+
availability = yield checkAvailability({ event, unitPriceOffer: availableOffer })(repos);
|
|
86
|
+
}
|
|
87
|
+
// アドオン設定があれば、プロダクトオファーを検索
|
|
91
88
|
const offerAddOn = [];
|
|
92
|
-
if (Array.isArray(
|
|
93
|
-
for (const addOn of
|
|
89
|
+
if (Array.isArray(availableOffer.addOn)) {
|
|
90
|
+
for (const addOn of availableOffer.addOn) {
|
|
94
91
|
const productId = (_b = addOn.itemOffered) === null || _b === void 0 ? void 0 : _b.id;
|
|
95
92
|
if (typeof productId === 'string') {
|
|
96
93
|
const productOffers = yield searchAddOns({
|
|
97
94
|
product: { id: productId },
|
|
98
|
-
store: params.store
|
|
95
|
+
store: params.store,
|
|
96
|
+
addSortIndex: params.addSortIndex,
|
|
97
|
+
onlyValid: params.onlyValid
|
|
99
98
|
})(repos);
|
|
100
99
|
offerAddOn.push(...productOffers);
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
return {
|
|
107
|
-
ticketOffers: offers4event,
|
|
108
|
-
unitPriceOffers: availableOffers
|
|
109
|
-
};
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* 興行オファー全検索
|
|
114
|
-
*/
|
|
115
|
-
function searchScreeningEventTicketOffers(params) {
|
|
116
|
-
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
117
|
-
var _a, _b;
|
|
118
|
-
// イベント取得属性最適化(2023-01-23~)
|
|
119
|
-
const screeningEvent = params.event;
|
|
120
|
-
// 取得属性最適化(2023-01-25~)
|
|
121
|
-
const superEvent = yield repos.event.findById({ id: screeningEvent.superEvent.id }, { soundFormat: 1, videoFormat: 1 });
|
|
122
|
-
const soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
|
|
123
|
-
const videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
|
|
124
|
-
const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event: screeningEvent });
|
|
125
|
-
// 上映方式がなければMovieTicket除外(2023-02-21~)
|
|
126
|
-
const excludeAppliesToMovieTicket = videoFormatTypes.length === 0;
|
|
127
|
-
// 興行設定があれば興行のカタログを参照する(2022-08-31~)
|
|
128
|
-
const eventOffers = screeningEvent.offers;
|
|
129
|
-
const { availableOffers, sortedOfferIds } = yield searchTicketOffersByItemOffered({
|
|
130
|
-
itemOffered: { id: (_a = eventOffers === null || eventOffers === void 0 ? void 0 : eventOffers.itemOffered) === null || _a === void 0 ? void 0 : _a.id },
|
|
131
|
-
ids: params.ids,
|
|
132
|
-
store: params.store,
|
|
133
|
-
limit: params.limit,
|
|
134
|
-
page: params.page,
|
|
135
|
-
sort: params.sort,
|
|
136
|
-
onlyValid: params.onlyValid,
|
|
137
|
-
unacceptedPaymentMethod,
|
|
138
|
-
excludeAppliesToMovieTicket
|
|
139
|
-
})(repos);
|
|
140
|
-
const { soundFormatChargeSpecifications, videoFormatChargeSpecifications, movieTicketTypeChargeSpecs } = yield searchPriceSpecs4event({ project: { id: screeningEvent.project.id }, soundFormatTypes, videoFormatTypes })(repos);
|
|
141
|
-
// 決済カード加算料金が存在しない場合自動補完する(2023-02-21~)
|
|
142
|
-
// if (!settings.useOffersAppliedToMovieTicketWithoutChargeSpecification) {
|
|
143
|
-
// }
|
|
144
|
-
let offers4event = availableOffers.map((availableOffer) => {
|
|
145
|
-
let sortIndex;
|
|
146
|
-
if (params.addSortIndex) {
|
|
147
|
-
sortIndex = sortedOfferIds.indexOf(String(availableOffer.id));
|
|
148
|
-
}
|
|
149
|
-
return (0, factory_1.createCompoundPriceSpec4event)({
|
|
103
|
+
offers4event.push((0, factory_1.createCompoundPriceSpec4event)({
|
|
150
104
|
eligibleQuantity: eventOffers.eligibleQuantity,
|
|
151
105
|
offer: availableOffer,
|
|
152
106
|
videoFormatChargeSpecifications,
|
|
153
107
|
soundFormatChargeSpecifications,
|
|
154
108
|
movieTicketTypeChargeSpecs,
|
|
155
109
|
videoFormatTypes,
|
|
110
|
+
availability,
|
|
111
|
+
addOn: offerAddOn,
|
|
156
112
|
sortIndex
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
if (params.validateOfferRateLimit) {
|
|
160
|
-
// レート制限を確認
|
|
161
|
-
offers4event = yield Promise.all(offers4event.map((offer) => __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
return checkAvailability({ event: screeningEvent, offer })(repos);
|
|
163
|
-
})));
|
|
164
|
-
}
|
|
165
|
-
// アドオン設定があれば、プロダクトオファーを検索
|
|
166
|
-
for (const offer of offers4event) {
|
|
167
|
-
const offerAddOn = [];
|
|
168
|
-
if (Array.isArray(offer.addOn)) {
|
|
169
|
-
for (const addOn of offer.addOn) {
|
|
170
|
-
const productId = (_b = addOn.itemOffered) === null || _b === void 0 ? void 0 : _b.id;
|
|
171
|
-
if (typeof productId === 'string') {
|
|
172
|
-
const productOffers = yield searchAddOns({ product: { id: productId } })(repos);
|
|
173
|
-
offerAddOn.push(...productOffers);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
offer.addOn = offerAddOn;
|
|
113
|
+
}));
|
|
178
114
|
}
|
|
179
115
|
return {
|
|
180
116
|
ticketOffers: offers4event,
|
|
@@ -232,10 +168,11 @@ function searchPriceSpecs4event(params) {
|
|
|
232
168
|
function checkAvailability(params) {
|
|
233
169
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
234
170
|
var _a, _b;
|
|
235
|
-
const
|
|
171
|
+
const unitPriceOffer = params.unitPriceOffer;
|
|
172
|
+
let availability;
|
|
236
173
|
// レート制限を確認
|
|
237
|
-
const scope = (_a =
|
|
238
|
-
const unitInSeconds = (_b =
|
|
174
|
+
const scope = (_a = unitPriceOffer.validRateLimit) === null || _a === void 0 ? void 0 : _a.scope;
|
|
175
|
+
const unitInSeconds = (_b = unitPriceOffer.validRateLimit) === null || _b === void 0 ? void 0 : _b.unitInSeconds;
|
|
239
176
|
if (typeof scope === 'string' && typeof unitInSeconds === 'number') {
|
|
240
177
|
const rateLimitKey = {
|
|
241
178
|
reservedTicket: {
|
|
@@ -255,10 +192,10 @@ function checkAvailability(params) {
|
|
|
255
192
|
const holder = yield repos.offerRateLimit.getHolder(rateLimitKey);
|
|
256
193
|
// ロックされていればOutOfStock
|
|
257
194
|
if (typeof holder === 'string' && holder.length > 0) {
|
|
258
|
-
|
|
195
|
+
availability = factory.itemAvailability.OutOfStock;
|
|
259
196
|
}
|
|
260
197
|
}
|
|
261
|
-
return
|
|
198
|
+
return availability;
|
|
262
199
|
});
|
|
263
200
|
}
|
|
264
201
|
/**
|
|
@@ -267,47 +204,54 @@ function checkAvailability(params) {
|
|
|
267
204
|
function searchAddOns(params) {
|
|
268
205
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
269
206
|
var _a, _b, _c;
|
|
270
|
-
let
|
|
207
|
+
let addOns = [];
|
|
271
208
|
const productId = (_a = params.product) === null || _a === void 0 ? void 0 : _a.id;
|
|
272
209
|
if (typeof productId === 'string') {
|
|
273
210
|
const productWithAddOns = yield repos.product.findById({ id: productId });
|
|
274
211
|
const offerCatalogId = (_b = productWithAddOns.hasOfferCatalog) === null || _b === void 0 ? void 0 : _b.id;
|
|
275
212
|
if (typeof offerCatalogId === 'string') {
|
|
276
|
-
const
|
|
213
|
+
const { offers, sortedOfferIds } = yield repos.offer.findOffersByOfferCatalogId({
|
|
277
214
|
offerCatalog: { id: offerCatalogId },
|
|
278
215
|
availableAtOrFrom: { id: (_c = params.store) === null || _c === void 0 ? void 0 : _c.id },
|
|
279
216
|
excludeAppliesToMovieTicket: false,
|
|
217
|
+
onlyValid: params.onlyValid === true,
|
|
280
218
|
sort: true
|
|
281
219
|
});
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
220
|
+
const unitPriceOffers = offers;
|
|
221
|
+
addOns = unitPriceOffers.map((o) => {
|
|
222
|
+
let sortIndex;
|
|
223
|
+
if (params.addSortIndex) {
|
|
224
|
+
sortIndex = sortedOfferIds.indexOf(String(o.id));
|
|
225
|
+
}
|
|
226
|
+
const itemOffered4addOn = {
|
|
227
|
+
description: productWithAddOns.description,
|
|
228
|
+
id: productWithAddOns.id,
|
|
229
|
+
name: productWithAddOns.name,
|
|
230
|
+
productID: productWithAddOns.productID,
|
|
231
|
+
// project: productWithAddOns.project,
|
|
232
|
+
typeOf: productWithAddOns.typeOf
|
|
233
|
+
};
|
|
234
|
+
return Object.assign(Object.assign(Object.assign({
|
|
235
|
+
// additionalProperty: Array.isArray(o.additionalProperty) ? o.additionalProperty : [],
|
|
236
|
+
alternateName: o.alternateName, availability: o.availability,
|
|
237
|
+
// availableAtOrFrom: o.availableAtOrFrom,
|
|
238
|
+
// color: o.color,
|
|
239
|
+
description: o.description, id: String(o.id), identifier: o.identifier, itemOffered: itemOffered4addOn, name: o.name, priceCurrency: o.priceCurrency, priceSpecification: o.priceSpecification,
|
|
240
|
+
// project: o.project,
|
|
241
|
+
typeOf: o.typeOf }, (o.validFrom instanceof Date) ? { validFrom: o.validFrom } : undefined), (o.validThrough instanceof Date) ? { validThrough: o.validThrough } : undefined), (typeof sortIndex === 'number') ? { sortIndex } : undefined);
|
|
292
242
|
});
|
|
293
243
|
}
|
|
294
244
|
}
|
|
295
|
-
return
|
|
245
|
+
return addOns;
|
|
296
246
|
});
|
|
297
247
|
}
|
|
298
248
|
/**
|
|
299
249
|
* 興行オファー検索
|
|
300
250
|
*/
|
|
301
251
|
function searchEventTicketOffers(params) {
|
|
302
|
-
// tslint:disable-next-line:max-func-body-length
|
|
303
252
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
304
|
-
const now = moment();
|
|
305
|
-
|
|
306
|
-
// イベント取得属性最適化(2023-01-23~)
|
|
307
|
-
// event = await repos.event.findById<factory.eventType.ScreeningEvent | factory.eventType.Event>({ id: params.event.id });
|
|
308
|
-
event = yield repos.event.findMinimizedIndividualEventById({
|
|
309
|
-
id: params.event.id
|
|
310
|
-
});
|
|
253
|
+
// const now = moment();
|
|
254
|
+
const event = yield repos.event.findMinimizedIndividualEventById({ id: params.event.id });
|
|
311
255
|
let offers;
|
|
312
256
|
let unitPriceOffers;
|
|
313
257
|
const eventOffers = event.offers;
|
|
@@ -321,95 +265,55 @@ function searchEventTicketOffers(params) {
|
|
|
321
265
|
case factory.service.webAPI.Identifier.COA:
|
|
322
266
|
throw new factory.errors.NotImplemented(`booking service '${eventOffers.offeredThrough.identifier}' not implemented`);
|
|
323
267
|
default:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
// .isAfter(now)) {
|
|
374
|
-
// isvalid = false;
|
|
375
|
-
// }
|
|
376
|
-
// if (o.validThrough !== undefined && moment(o.validThrough)
|
|
377
|
-
// .isBefore(now)) {
|
|
378
|
-
// isvalid = false;
|
|
379
|
-
// }
|
|
380
|
-
// return isvalid;
|
|
381
|
-
// });
|
|
382
|
-
// }
|
|
383
|
-
for (const offer of offers) {
|
|
384
|
-
if (Array.isArray(offer.addOn)) {
|
|
385
|
-
// store.idでのフィルターをmongoに移行(2023-01-27~)
|
|
386
|
-
// addOnsに対しても利用可能アプリケーション設定を適用
|
|
387
|
-
// if (typeof specifiedStoreId === 'string') {
|
|
388
|
-
// // アプリケーションが利用可能なオファーに絞る
|
|
389
|
-
// offer.addOn = offer.addOn.filter((offer4addOn) => {
|
|
390
|
-
// return Array.isArray(offer4addOn.availableAtOrFrom)
|
|
391
|
-
// && offer4addOn.availableAtOrFrom.some(
|
|
392
|
-
// (availableApplication) => availableApplication.id === specifiedStoreId
|
|
393
|
-
// );
|
|
394
|
-
// });
|
|
395
|
-
// }
|
|
396
|
-
// addOnsに対しても有効期間を適用
|
|
397
|
-
if (params.onlyValid === true) {
|
|
398
|
-
offer.addOn = offer.addOn.filter((offer4addOn) => {
|
|
399
|
-
let isvalid = true;
|
|
400
|
-
if (offer4addOn.validFrom !== undefined && moment(offer4addOn.validFrom)
|
|
401
|
-
.isAfter(now)) {
|
|
402
|
-
isvalid = false;
|
|
403
|
-
}
|
|
404
|
-
if (offer4addOn.validThrough !== undefined && moment(offer4addOn.validThrough)
|
|
405
|
-
.isBefore(now)) {
|
|
406
|
-
isvalid = false;
|
|
407
|
-
}
|
|
408
|
-
return isvalid;
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
268
|
+
const searchOffersResult = yield searchEventTicketOffersByEvent({
|
|
269
|
+
ids: params.ids,
|
|
270
|
+
event,
|
|
271
|
+
store: params.store,
|
|
272
|
+
limit: params.limit,
|
|
273
|
+
page: params.page,
|
|
274
|
+
sort: params.sort,
|
|
275
|
+
addSortIndex: params.addSortIndex,
|
|
276
|
+
validateOfferRateLimit: params.validateOfferRateLimit,
|
|
277
|
+
onlyValid: params.onlyValid === true
|
|
278
|
+
})(repos);
|
|
279
|
+
offers = searchOffersResult.ticketOffers;
|
|
280
|
+
unitPriceOffers = searchOffersResult.unitPriceOffers;
|
|
281
|
+
// mongo条件へ移行(2023-02-24~)
|
|
282
|
+
// 有効期間を適用
|
|
283
|
+
// if (params.onlyValid === true) {
|
|
284
|
+
// offers = offers.filter((o) => {
|
|
285
|
+
// let isvalid = true;
|
|
286
|
+
// if (o.validFrom !== undefined && moment(o.validFrom)
|
|
287
|
+
// .isAfter(now)) {
|
|
288
|
+
// isvalid = false;
|
|
289
|
+
// }
|
|
290
|
+
// if (o.validThrough !== undefined && moment(o.validThrough)
|
|
291
|
+
// .isBefore(now)) {
|
|
292
|
+
// isvalid = false;
|
|
293
|
+
// }
|
|
294
|
+
// return isvalid;
|
|
295
|
+
// });
|
|
296
|
+
// }
|
|
297
|
+
// mongo条件へ移行(2023-02-27~)
|
|
298
|
+
// for (const offer of offers) {
|
|
299
|
+
// if (Array.isArray(offer.addOn)) {
|
|
300
|
+
// // addOnsに対しても有効期間を適用
|
|
301
|
+
// if (params.onlyValid === true) {
|
|
302
|
+
// offer.addOn = offer.addOn.filter((offer4addOn) => {
|
|
303
|
+
// let isvalid = true;
|
|
304
|
+
// if (offer4addOn.validFrom !== undefined && moment(offer4addOn.validFrom)
|
|
305
|
+
// .isAfter(now)) {
|
|
306
|
+
// isvalid = false;
|
|
307
|
+
// }
|
|
308
|
+
// if (offer4addOn.validThrough !== undefined && moment(offer4addOn.validThrough)
|
|
309
|
+
// .isBefore(now)) {
|
|
310
|
+
// isvalid = false;
|
|
311
|
+
// }
|
|
312
|
+
// return isvalid;
|
|
313
|
+
// });
|
|
314
|
+
// }
|
|
315
|
+
// }
|
|
316
|
+
// }
|
|
413
317
|
}
|
|
414
318
|
return { ticketOffers: offers, unitPriceOffers };
|
|
415
319
|
});
|
|
@@ -8,6 +8,8 @@ declare function createCompoundPriceSpec4event(params: {
|
|
|
8
8
|
videoFormatChargeSpecifications: ICategoryCodeChargeSpecification[];
|
|
9
9
|
soundFormatChargeSpecifications: ICategoryCodeChargeSpecification[];
|
|
10
10
|
videoFormatTypes: string[];
|
|
11
|
+
availability?: factory.itemAvailability;
|
|
12
|
+
addOn: factory.product.ITicketAddOn[];
|
|
11
13
|
sortIndex?: number;
|
|
12
14
|
}): factory.product.ITicketOffer & {
|
|
13
15
|
sortIndex?: number;
|
|
@@ -78,14 +78,16 @@ function createCompoundPriceSpec4event(params) {
|
|
|
78
78
|
};
|
|
79
79
|
// 必要な属性のみに限定(2023-02-24~)
|
|
80
80
|
// const { project, ...unitOfferFields4ticketOffer } = params.offer;
|
|
81
|
-
const { name, description, alternateName, color, typeOf, id,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
addOn,
|
|
81
|
+
const { name, description, alternateName, color, typeOf, id,
|
|
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,
|
|
87
|
+
availableAtOrFrom, category,
|
|
86
88
|
eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation,
|
|
87
89
|
priceCurrency,
|
|
88
90
|
validFrom, validThrough, validRateLimit, additionalProperty,
|
|
89
|
-
identifier, itemOffered, eligibleQuantity: params.eligibleQuantity, priceSpecification: compoundPriceSpecification }, (typeof params.sortIndex === 'number') ? { sortIndex: params.sortIndex } : undefined);
|
|
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);
|
|
90
92
|
}
|
|
91
93
|
exports.createCompoundPriceSpec4event = createCompoundPriceSpec4event;
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.
|
|
13
|
-
"@cinerino/sdk": "3.140.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.290.0",
|
|
13
|
+
"@cinerino/sdk": "3.140.0-alpha.18",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"postversion": "git push origin --tags",
|
|
121
121
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
122
122
|
},
|
|
123
|
-
"version": "20.4.0-alpha.
|
|
123
|
+
"version": "20.4.0-alpha.24"
|
|
124
124
|
}
|