@chevre/domain 20.0.0-alpha.2 → 20.0.0-alpha.3
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.
|
@@ -281,7 +281,7 @@ function coaTicket2offer(params) {
|
|
|
281
281
|
}]
|
|
282
282
|
: undefined;
|
|
283
283
|
const unitPriceSpec = {
|
|
284
|
-
project: { typeOf: factory.organizationType.Project, id: params.project.id },
|
|
284
|
+
// project: { typeOf: factory.organizationType.Project, id: params.project.id },
|
|
285
285
|
typeOf: factory.priceSpecificationType.UnitPriceSpecification,
|
|
286
286
|
price: 0,
|
|
287
287
|
priceCurrency: factory.priceCurrency.JPY,
|
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.responseBody2acceptedOffers4result = exports.offers2resultPrice = exports.createAuthorizeSeatReservationActionAttributes = exports.WebAPIIdentifier = void 0;
|
|
4
4
|
const moment = require("moment");
|
|
5
|
-
// import * as COA from '../../../coa';
|
|
6
5
|
const factory = require("../../../factory");
|
|
7
6
|
exports.WebAPIIdentifier = factory.service.webAPI.Identifier;
|
|
8
|
-
// export type IAcceptedOfferWithoutDetail =
|
|
9
|
-
// factory.action.authorize.offer.seatReservation.IAcceptedOfferWithoutDetail<WebAPIIdentifier.COA> & {
|
|
10
|
-
// additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
|
|
11
|
-
// ticketInfo: factory.offer.seatReservation.ICOATicketInfo & {
|
|
12
|
-
// spseatAdd1: number;
|
|
13
|
-
// spseatAdd2: number;
|
|
14
|
-
// spseatKbn: string;
|
|
15
|
-
// };
|
|
16
|
-
// };
|
|
17
7
|
function createAuthorizeSeatReservationActionAttributes(params) {
|
|
18
8
|
var _a;
|
|
19
9
|
const transaction = params.transaction;
|
|
@@ -68,25 +58,6 @@ function offers2resultPrice(offers) {
|
|
|
68
58
|
return { price, requiredPoint };
|
|
69
59
|
}
|
|
70
60
|
exports.offers2resultPrice = offers2resultPrice;
|
|
71
|
-
// export function createUpdTmpReserveSeatArgs(params: {
|
|
72
|
-
// object: factory.action.authorize.offer.seatReservation.IObjectWithoutDetail<WebAPIIdentifier.COA>;
|
|
73
|
-
// coaInfo: factory.event.screeningEvent.ICOAInfo;
|
|
74
|
-
// }): COA.factory.reserve.IUpdTmpReserveSeatArgs {
|
|
75
|
-
// return {
|
|
76
|
-
// theaterCode: params.coaInfo.theaterCode,
|
|
77
|
-
// dateJouei: params.coaInfo.dateJouei,
|
|
78
|
-
// titleCode: params.coaInfo.titleCode,
|
|
79
|
-
// titleBranchNum: params.coaInfo.titleBranchNum,
|
|
80
|
-
// timeBegin: params.coaInfo.timeBegin,
|
|
81
|
-
// screenCode: params.coaInfo.screenCode,
|
|
82
|
-
// listSeat: params.object.acceptedOffer.map((offer) => {
|
|
83
|
-
// return {
|
|
84
|
-
// seatSection: offer.seatSection,
|
|
85
|
-
// seatNum: offer.seatNumber
|
|
86
|
-
// };
|
|
87
|
-
// })
|
|
88
|
-
// };
|
|
89
|
-
// }
|
|
90
61
|
/**
|
|
91
62
|
* COA仮予約結果から注文アイテムを生成する
|
|
92
63
|
*/
|
|
@@ -202,6 +173,15 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
202
173
|
const reservation = Object.assign(Object.assign(Object.assign({ project: { typeOf: event.project.typeOf, id: event.project.id }, typeOf: factory.reservationType.EventReservation, id: reservationId, issuedThrough: { typeOf: factory.product.ProductType.EventService }, bookingTime: params.bookingTime }, (Array.isArray(additionalProperty)) ? { additionalProperty } : undefined), (typeof additionalTicketText === 'string') ? { additionalTicketText } : undefined), {
|
|
203
174
|
// numSeats: 1, // 廃止(2022-08-18~)
|
|
204
175
|
reservationFor: reservationFor, reservationNumber: reservationNumber, reservedTicket: reservedTicket });
|
|
176
|
+
if (requestedOffer.priceSpecification === undefined) {
|
|
177
|
+
throw new factory.errors.NotFound('acceptedOffer.priceSpecification');
|
|
178
|
+
}
|
|
179
|
+
const priceSpecification = {
|
|
180
|
+
typeOf: requestedOffer.priceSpecification.typeOf,
|
|
181
|
+
priceCurrency: requestedOffer.priceSpecification.priceCurrency,
|
|
182
|
+
valueAddedTaxIncluded: requestedOffer.priceSpecification.valueAddedTaxIncluded,
|
|
183
|
+
priceComponent: requestedOffer.priceSpecification.priceComponent
|
|
184
|
+
};
|
|
205
185
|
return {
|
|
206
186
|
project: { typeOf: event.project.typeOf, id: event.project.id },
|
|
207
187
|
typeOf: factory.offerType.Offer,
|
|
@@ -209,7 +189,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
209
189
|
name: requestedOffer.name,
|
|
210
190
|
itemOffered: reservation,
|
|
211
191
|
offeredThrough: { typeOf: 'WebAPI', identifier: factory.service.webAPI.Identifier.COA },
|
|
212
|
-
priceSpecification
|
|
192
|
+
priceSpecification,
|
|
213
193
|
priceCurrency: factory.priceCurrency.JPY,
|
|
214
194
|
seller: {
|
|
215
195
|
project: { typeOf: event.project.typeOf, id: event.project.id },
|
|
@@ -12,6 +12,8 @@ function createCompoundPriceSpec4event(params) {
|
|
|
12
12
|
// 区分加算料金は決済カード適用でも価格要素に含まれるはず(2022-11-02~)
|
|
13
13
|
const priceComponent = [
|
|
14
14
|
unitPriceSpec,
|
|
15
|
+
// tslint:disable-next-line:no-suspicious-comment
|
|
16
|
+
// TODO strictコーディングで最適化
|
|
15
17
|
...params.videoFormatChargeSpecifications,
|
|
16
18
|
...params.soundFormatChargeSpecifications
|
|
17
19
|
];
|
|
@@ -40,6 +42,8 @@ function createCompoundPriceSpec4event(params) {
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
});
|
|
45
|
+
// tslint:disable-next-line:no-suspicious-comment
|
|
46
|
+
// TODO strictコーディングで最適化
|
|
43
47
|
priceComponent.push(...mvtkSpecs);
|
|
44
48
|
}
|
|
45
49
|
else {
|
|
@@ -133,14 +133,16 @@ function createMoneyTransferAcceptedOffers(params) {
|
|
|
133
133
|
name: `${amountValue} ${currency}`
|
|
134
134
|
};
|
|
135
135
|
acceptedOffers.push({
|
|
136
|
-
|
|
136
|
+
// 不要なので廃止(2022-11-05~)
|
|
137
|
+
// project: { typeOf: params.transaction.project.typeOf, id: params.transaction.project.id },
|
|
137
138
|
typeOf: factory.offerType.Offer,
|
|
138
139
|
itemOffered,
|
|
139
140
|
// ↓いったん廃止(2022-05-17~)
|
|
140
141
|
// price: authorizeMoneyTansferAction.result.price,
|
|
141
142
|
priceCurrency: authorizeMoneyTansferAction.result.priceCurrency,
|
|
142
143
|
seller: {
|
|
143
|
-
|
|
144
|
+
// 不要なので廃止(2022-11-05~)
|
|
145
|
+
// project: { typeOf: params.transaction.project.typeOf, id: params.transaction.project.id },
|
|
144
146
|
typeOf: params.seller.typeOf,
|
|
145
147
|
name: params.seller.name
|
|
146
148
|
}
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.274.0-alpha.
|
|
13
|
-
"@cinerino/sdk": "3.130.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.274.0-alpha.3",
|
|
13
|
+
"@cinerino/sdk": "3.130.0-alpha.5",
|
|
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.0.0-alpha.
|
|
123
|
+
"version": "20.0.0-alpha.3"
|
|
124
124
|
}
|