@chevre/domain 21.8.0-alpha.37 → 21.8.0-alpha.38
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.
|
@@ -301,44 +301,40 @@ function acceptedOfferWithoutDetail2acceptedOffer(params) {
|
|
|
301
301
|
transaction: params.transaction
|
|
302
302
|
});
|
|
303
303
|
const acceptedAppliesToMovieTicket = (_a = offerWithoutDetail.priceSpecification) === null || _a === void 0 ? void 0 : _a.appliesToMovieTicket;
|
|
304
|
-
// let movieTicketIdentifire: string | undefined;
|
|
305
|
-
// if (Array.isArray(acceptedAppliesToMovieTicket)) {
|
|
306
|
-
// // throw new factory.errors.NotImplemented('multiple appliesToMovieTicket not implemented');
|
|
307
|
-
// // no op
|
|
308
|
-
// } else if (typeof acceptedAppliesToMovieTicket?.identifier === 'string') {
|
|
309
|
-
// movieTicketIdentifire = acceptedAppliesToMovieTicket.identifier;
|
|
310
|
-
// }
|
|
311
304
|
// 承認アクションオブジェクトのacceptedOfferにappliesToMovieTicketを連携する(2022-08-02~)
|
|
312
305
|
const priceSpecification = Object.assign(Object.assign({}, offer.priceSpecification), (Array.isArray(acceptedAppliesToMovieTicket) || typeof (acceptedAppliesToMovieTicket === null || acceptedAppliesToMovieTicket === void 0 ? void 0 : acceptedAppliesToMovieTicket.identifier) === 'string')
|
|
313
306
|
? { appliesToMovieTicket: acceptedAppliesToMovieTicket }
|
|
314
307
|
: undefined);
|
|
308
|
+
const acceptedAddOns = (Array.isArray(offerWithoutDetail.addOn))
|
|
309
|
+
? offerWithoutDetail.addOn.map((acceptedAddOnOffer) => {
|
|
310
|
+
var _a, _b;
|
|
311
|
+
if (typeof acceptedAddOnOffer.id !== 'string' || acceptedAddOnOffer.id.length === 0) {
|
|
312
|
+
throw new factory.errors.ArgumentNull('object.acceptedOffer.addOn.id');
|
|
313
|
+
}
|
|
314
|
+
const addOnOfferReferenceQuantityValue = (_b = (_a = acceptedAddOnOffer.priceSpecification) === null || _a === void 0 ? void 0 : _a.referenceQuantity) === null || _b === void 0 ? void 0 : _b.value;
|
|
315
|
+
return Object.assign({
|
|
316
|
+
// typeOf: <factory.offerType.Offer>factory.offerType.Offer,
|
|
317
|
+
id: acceptedAddOnOffer.id }, (typeof addOnOfferReferenceQuantityValue === 'number')
|
|
318
|
+
? { priceSpecification: { referenceQuantity: { value: addOnOfferReferenceQuantityValue } } }
|
|
319
|
+
: undefined);
|
|
320
|
+
})
|
|
321
|
+
: [];
|
|
315
322
|
const acceptedOffer = {
|
|
316
323
|
// オファーの中身を最適化する(必要最低限の情報のみに)
|
|
317
324
|
id: String(offer.id),
|
|
318
325
|
identifier: offer.identifier,
|
|
319
326
|
priceSpecification,
|
|
320
|
-
// project: offer.project,
|
|
321
327
|
typeOf: offer.typeOf,
|
|
322
328
|
priceCurrency: offer.priceCurrency,
|
|
323
329
|
itemOffered: Object.assign({ typeOf: factory.product.ProductType.EventService, serviceOutput: (offerWithoutDetail.itemOffered !== undefined && offerWithoutDetail.itemOffered !== null)
|
|
324
330
|
? offerWithoutDetail.itemOffered.serviceOutput
|
|
325
331
|
: undefined }, (pointAward !== undefined) ? { pointAward } : undefined),
|
|
326
|
-
addOn:
|
|
327
|
-
? offerWithoutDetail.addOn.map((a) => {
|
|
328
|
-
return {
|
|
329
|
-
typeOf: factory.offerType.Offer,
|
|
330
|
-
id: String(a.id),
|
|
331
|
-
priceCurrency: offer.priceCurrency
|
|
332
|
-
};
|
|
333
|
-
})
|
|
334
|
-
: [],
|
|
332
|
+
addOn: acceptedAddOns,
|
|
335
333
|
// 追加属性をマージ
|
|
336
334
|
additionalProperty: [
|
|
337
335
|
...(Array.isArray(offerWithoutDetail.additionalProperty)) ? offerWithoutDetail.additionalProperty : [],
|
|
338
336
|
...(Array.isArray(offer.additionalProperty)) ? offer.additionalProperty : []
|
|
339
337
|
]
|
|
340
|
-
// movieTicketIdentifireの不要を確認後に廃止(2022-09-09以降)(2022-11-02+)
|
|
341
|
-
// ...(typeof movieTicketIdentifire === 'string') ? { movieTicketIdentifire } : undefined
|
|
342
338
|
};
|
|
343
339
|
let offeredThrough = (_b = params.event.offers) === null || _b === void 0 ? void 0 : _b.offeredThrough;
|
|
344
340
|
if (typeof (offeredThrough === null || offeredThrough === void 0 ? void 0 : offeredThrough.typeOf) !== 'string') {
|
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
|
|
12
|
+
"@chevre/factory": "4.329.0-alpha.8",
|
|
13
|
+
"@cinerino/sdk": "3.166.0",
|
|
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.38"
|
|
121
121
|
}
|