@chevre/domain 20.0.0-alpha.3 → 20.0.0-alpha.4
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.
- package/example/src/chevre/migrateMovieTicketChargePriceSpecs.ts +5 -5
- package/lib/chevre/service/assetTransaction/registerService/factory.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/reserve/factory/price.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +3 -3
- package/lib/chevre/service/offer/event/authorize.js +1 -1
- package/lib/chevre/service/offer/event/factory.d.ts +4 -2
- package/lib/chevre/service/offer/event/factory.js +3 -4
- package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +3 -1
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +2 -10
- package/lib/chevre/service/offer/factory.d.ts +3 -3
- package/lib/chevre/service/offer/factory.js +34 -15
- package/lib/chevre/service/offer/product/factory.js +2 -2
- package/lib/chevre/service/offer/product/searchProductOffers.d.ts +1 -1
- package/lib/chevre/service/offer/product/searchProductOffers.js +6 -6
- package/lib/chevre/service/offer/product.d.ts +1 -1
- package/package.json +3 -3
|
@@ -35,13 +35,13 @@ async function main() {
|
|
|
35
35
|
console.log(
|
|
36
36
|
'appliesToVideoFormat is...',
|
|
37
37
|
CREATING_VIDEO_FORMAT,
|
|
38
|
-
priceSpec.project
|
|
38
|
+
priceSpec.project?.id, priceSpec.appliesToMovieTicket.serviceType, priceSpec.appliesToVideoFormat, priceSpec.price, i);
|
|
39
39
|
} else {
|
|
40
40
|
// 券種区分について、もうひとつの上映方式に対応する価格仕様が存在しなければ、作成する
|
|
41
41
|
const priceSpecs = await priceSpecRepo.search({
|
|
42
42
|
limit: 1,
|
|
43
43
|
page: 1,
|
|
44
|
-
project: { id: { $eq:
|
|
44
|
+
project: { id: { $eq: project.id } },
|
|
45
45
|
typeOf: chevre.factory.priceSpecificationType.MovieTicketTypeChargeSpecification,
|
|
46
46
|
appliesToVideoFormats: [CREATING_VIDEO_FORMAT],
|
|
47
47
|
appliesToMovieTicket: {
|
|
@@ -52,7 +52,7 @@ async function main() {
|
|
|
52
52
|
if (priceSpec4all !== undefined) {
|
|
53
53
|
console.log(
|
|
54
54
|
'already exist.',
|
|
55
|
-
priceSpec.project
|
|
55
|
+
priceSpec.project?.id, priceSpec.appliesToMovieTicket.serviceType, priceSpec.appliesToVideoFormat, priceSpec.price, i);
|
|
56
56
|
} else {
|
|
57
57
|
const newPriceSpec: IMovieTicketPriceSpec = {
|
|
58
58
|
typeOf: chevre.factory.priceSpecificationType.MovieTicketTypeChargeSpecification,
|
|
@@ -67,7 +67,7 @@ async function main() {
|
|
|
67
67
|
|
|
68
68
|
console.log(
|
|
69
69
|
'creating priceSpec...',
|
|
70
|
-
priceSpec.project
|
|
70
|
+
priceSpec.project?.id,
|
|
71
71
|
newPriceSpec.appliesToMovieTicket.serviceType, newPriceSpec.appliesToVideoFormat, newPriceSpec.price, i);
|
|
72
72
|
await priceSpecRepo.save({
|
|
73
73
|
attributes: newPriceSpec
|
|
@@ -76,7 +76,7 @@ async function main() {
|
|
|
76
76
|
updateCount += 1;
|
|
77
77
|
console.log(
|
|
78
78
|
'created',
|
|
79
|
-
priceSpec.project
|
|
79
|
+
priceSpec.project?.id,
|
|
80
80
|
newPriceSpec.appliesToMovieTicket.serviceType, newPriceSpec.appliesToVideoFormat, newPriceSpec.price, i);
|
|
81
81
|
|
|
82
82
|
}
|
|
@@ -5,7 +5,7 @@ export declare type IUnitPriceSpecification = factory.priceSpecification.IPriceS
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function createPointAward(params: {
|
|
7
7
|
acceptedOffer: factory.assetTransaction.registerService.IAcceptedOfferWithoutDetail;
|
|
8
|
-
offer: factory.
|
|
8
|
+
offer: factory.product.ITicketOffer;
|
|
9
9
|
}): factory.product.IPointAward | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* サービスアウトプットを作成する
|
|
@@ -14,6 +14,6 @@ export declare function createServiceOutput(params: {
|
|
|
14
14
|
dateIssued: Date;
|
|
15
15
|
product: factory.product.IProduct;
|
|
16
16
|
acceptedOffer: factory.assetTransaction.registerService.IAcceptedOfferWithoutDetail;
|
|
17
|
-
offer: factory.
|
|
17
|
+
offer: factory.product.ITicketOffer;
|
|
18
18
|
transactionNumber: string;
|
|
19
19
|
}): factory.assetTransaction.registerService.IServiceOutput;
|
|
@@ -7,7 +7,7 @@ export declare function createPrice(params: {
|
|
|
7
7
|
id: string;
|
|
8
8
|
typeOf: factory.organizationType.Project;
|
|
9
9
|
};
|
|
10
|
-
ticketOffer: factory.
|
|
10
|
+
ticketOffer: factory.product.ITicketOffer;
|
|
11
11
|
seatPriceComponent: factory.place.seat.IPriceComponent[];
|
|
12
12
|
acceptedAddOns: factory.offer.IAddOn[];
|
|
13
13
|
appliesToMovieTicket?: factory.assetTransaction.reserve.IAcceptedAppliesToMovieTicket;
|
|
@@ -8,7 +8,7 @@ export declare function createStartParams(params: factory.assetTransaction.reser
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function createPointAward(params: {
|
|
10
10
|
acceptedOffer: factory.assetTransaction.reserve.IAcceptedTicketOfferWithoutDetail;
|
|
11
|
-
offer: factory.
|
|
11
|
+
offer: factory.product.ITicketOffer;
|
|
12
12
|
reservation: {
|
|
13
13
|
id: string;
|
|
14
14
|
};
|
|
@@ -22,7 +22,7 @@ export declare function createReservedTicket(params: {
|
|
|
22
22
|
reservedSeatsOnly: boolean;
|
|
23
23
|
screeningRoomSections?: factory.place.screeningRoomSection.IPlace[];
|
|
24
24
|
availableSeatOffers: factory.place.seat.IPlaceWithOffer[];
|
|
25
|
-
ticketOffer: factory.
|
|
25
|
+
ticketOffer: factory.product.ITicketOffer;
|
|
26
26
|
transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Reserve>;
|
|
27
27
|
}): factory.reservation.ITicket;
|
|
28
28
|
export declare function validateAppliesToMovieTicket(params: {
|
|
@@ -58,7 +58,7 @@ export declare function createReservation(params: {
|
|
|
58
58
|
reservedTicket: factory.reservation.ITicket;
|
|
59
59
|
additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
|
|
60
60
|
additionalTicketText?: string;
|
|
61
|
-
ticketOffer: factory.
|
|
61
|
+
ticketOffer: factory.product.ITicketOffer;
|
|
62
62
|
seatPriceComponent: factory.place.seat.IPriceComponent[];
|
|
63
63
|
acceptedAddOns: factory.offer.IAddOn[];
|
|
64
64
|
subReservation?: factory.reservation.ISubReservation<factory.reservationType.EventReservation>[];
|
|
@@ -329,7 +329,7 @@ function acceptedOfferWithoutDetail2acceptedOffer(params) {
|
|
|
329
329
|
addOn: (Array.isArray(offerWithoutDetail.addOn))
|
|
330
330
|
? offerWithoutDetail.addOn.map((a) => {
|
|
331
331
|
return {
|
|
332
|
-
project: offer.project,
|
|
332
|
+
// project: offer.project,
|
|
333
333
|
typeOf: factory.offerType.Offer,
|
|
334
334
|
id: a.id,
|
|
335
335
|
priceCurrency: offer.priceCurrency
|
|
@@ -20,8 +20,9 @@ export declare function createAuthorizeSeatReservationActionAttributes(params: {
|
|
|
20
20
|
broker?: factory.reservation.IBroker<factory.reservationType.EventReservation>;
|
|
21
21
|
}): factory.action.authorize.offer.seatReservation.IAttributes<factory.service.webAPI.Identifier.Chevre>;
|
|
22
22
|
export declare function acceptedOffers2amount(params: {
|
|
23
|
-
acceptedOffers:
|
|
23
|
+
acceptedOffers: IResultAcceptedOffer[];
|
|
24
24
|
}): number;
|
|
25
|
+
declare type IResultAcceptedOffer = factory.action.authorize.offer.seatReservation.IResultAcceptedOffer;
|
|
25
26
|
export declare function responseBody2acceptedOffers4result(params: {
|
|
26
27
|
responseBody: factory.action.authorize.offer.seatReservation.IResponseBody<factory.service.webAPI.Identifier.Chevre>;
|
|
27
28
|
event: factory.event.IEvent<factory.eventType.ScreeningEvent>;
|
|
@@ -30,7 +31,7 @@ export declare function responseBody2acceptedOffers4result(params: {
|
|
|
30
31
|
typeOf: factory.organizationType.Project;
|
|
31
32
|
};
|
|
32
33
|
seller: factory.transaction.placeOrder.ISeller;
|
|
33
|
-
}):
|
|
34
|
+
}): IResultAcceptedOffer[];
|
|
34
35
|
export declare function coaTicket2offer(params: {
|
|
35
36
|
project: {
|
|
36
37
|
id: string;
|
|
@@ -40,3 +41,4 @@ export declare function coaTicket2offer(params: {
|
|
|
40
41
|
defaultCurrencyType?: factory.categoryCode.ICategoryCode;
|
|
41
42
|
defaultMembershipType?: factory.categoryCode.ICategoryCode;
|
|
42
43
|
}): factory.unitPriceOffer.IUnitPriceOffer;
|
|
44
|
+
export {};
|
|
@@ -155,8 +155,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
155
155
|
let acceptedOffers4result = [];
|
|
156
156
|
// 予約取引からacceptedOffers4resultを生成する
|
|
157
157
|
if (Array.isArray(params.responseBody.object.subReservation)) {
|
|
158
|
-
acceptedOffers4result = params.responseBody.object.subReservation
|
|
159
|
-
.map((itemOffered) => {
|
|
158
|
+
acceptedOffers4result = params.responseBody.object.subReservation.map((itemOffered) => {
|
|
160
159
|
var _a;
|
|
161
160
|
const reservation = createReservation({ project: params.project, itemOffered, event: params.event });
|
|
162
161
|
// appliesToMovieTicketがArrayでないケースは廃止(2022-09-12~)
|
|
@@ -182,7 +181,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
182
181
|
: undefined);
|
|
183
182
|
});
|
|
184
183
|
return {
|
|
185
|
-
project: { typeOf: params.project.typeOf, id: params.project.id },
|
|
184
|
+
// project: { typeOf: params.project.typeOf, id: params.project.id },
|
|
186
185
|
typeOf: factory.offerType.Offer,
|
|
187
186
|
id: itemOffered.reservedTicket.ticketType.id,
|
|
188
187
|
name: itemOffered.reservedTicket.ticketType.name,
|
|
@@ -200,7 +199,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
200
199
|
? itemOffered.priceCurrency
|
|
201
200
|
: factory.priceCurrency.JPY,
|
|
202
201
|
seller: {
|
|
203
|
-
project: { typeOf: params.project.typeOf, id: params.project.id },
|
|
202
|
+
// project: { typeOf: params.project.typeOf, id: params.project.id },
|
|
204
203
|
typeOf: params.seller.typeOf,
|
|
205
204
|
name: (typeof params.seller.name === 'string')
|
|
206
205
|
? params.seller.name
|
|
@@ -72,5 +72,5 @@ export declare function searchEventTicketOffers(params: {
|
|
|
72
72
|
*/
|
|
73
73
|
kbnEisyahousiki: string;
|
|
74
74
|
};
|
|
75
|
-
}): ISearchEventTicketOffersOperation<factory.
|
|
75
|
+
}): ISearchEventTicketOffersOperation<factory.product.ITicketOffer[]>;
|
|
76
76
|
export {};
|
|
@@ -12,6 +12,7 @@ export declare function offers2resultPrice(offers: factory.action.authorize.offe
|
|
|
12
12
|
price: number;
|
|
13
13
|
requiredPoint: number;
|
|
14
14
|
};
|
|
15
|
+
declare type IResultAcceptedOffer = factory.action.authorize.offer.seatReservation.IResultAcceptedOffer;
|
|
15
16
|
/**
|
|
16
17
|
* COA仮予約結果から注文アイテムを生成する
|
|
17
18
|
*/
|
|
@@ -22,4 +23,5 @@ export declare function responseBody2acceptedOffers4result(params: {
|
|
|
22
23
|
seller: factory.transaction.placeOrder.ISeller;
|
|
23
24
|
bookingTime: Date;
|
|
24
25
|
totalPrice: number;
|
|
25
|
-
}):
|
|
26
|
+
}): IResultAcceptedOffer[];
|
|
27
|
+
export {};
|
|
@@ -100,14 +100,6 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
100
100
|
].join('');
|
|
101
101
|
const reservationNumber = String(updTmpReserveSeatResult.tmpReserveNum);
|
|
102
102
|
const reservationId = `${reservationNumber}-${index.toString()}`;
|
|
103
|
-
// tslint:disable-next-line:max-line-length
|
|
104
|
-
// const unitPriceSpec = <factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.UnitPriceSpecification>>
|
|
105
|
-
// requestedOffer.priceSpecification.priceComponent.find(
|
|
106
|
-
// (spec) => spec.typeOf === factory.priceSpecificationType.UnitPriceSpecification
|
|
107
|
-
// );
|
|
108
|
-
// if (unitPriceSpec === undefined) {
|
|
109
|
-
// throw new factory.errors.Argument('Accepted Offer', 'Unit price specification not found');
|
|
110
|
-
// }
|
|
111
103
|
const workPerformed = {
|
|
112
104
|
project: event.superEvent.workPerformed.project,
|
|
113
105
|
id: event.superEvent.workPerformed.id,
|
|
@@ -183,7 +175,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
183
175
|
priceComponent: requestedOffer.priceSpecification.priceComponent
|
|
184
176
|
};
|
|
185
177
|
return {
|
|
186
|
-
project: { typeOf: event.project.typeOf, id: event.project.id },
|
|
178
|
+
// project: { typeOf: event.project.typeOf, id: event.project.id },
|
|
187
179
|
typeOf: factory.offerType.Offer,
|
|
188
180
|
id: requestedOffer.id,
|
|
189
181
|
name: requestedOffer.name,
|
|
@@ -192,7 +184,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
192
184
|
priceSpecification,
|
|
193
185
|
priceCurrency: factory.priceCurrency.JPY,
|
|
194
186
|
seller: {
|
|
195
|
-
project: { typeOf: event.project.typeOf, id: event.project.id },
|
|
187
|
+
// project: { typeOf: event.project.typeOf, id: event.project.id },
|
|
196
188
|
typeOf: params.seller.typeOf,
|
|
197
189
|
name: params.seller.name
|
|
198
190
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
declare type IMovieTicketTypeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.MovieTicketTypeChargeSpecification>;
|
|
3
3
|
declare type ICategoryCodeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.CategoryCodeChargeSpecification>;
|
|
4
|
-
|
|
4
|
+
declare function createCompoundPriceSpec4event(params: {
|
|
5
5
|
eligibleQuantity: factory.quantitativeValue.IQuantitativeValue<factory.unitCode.C62>;
|
|
6
6
|
offer: factory.unitPriceOffer.IUnitPriceOffer;
|
|
7
7
|
movieTicketTypeChargeSpecs: IMovieTicketTypeChargeSpecification[];
|
|
8
8
|
videoFormatChargeSpecifications: ICategoryCodeChargeSpecification[];
|
|
9
9
|
soundFormatChargeSpecifications: ICategoryCodeChargeSpecification[];
|
|
10
10
|
videoFormatTypes: string[];
|
|
11
|
-
}): factory.
|
|
12
|
-
export {};
|
|
11
|
+
}): factory.product.ITicketOffer;
|
|
12
|
+
export { createCompoundPriceSpec4event };
|
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
14
|
exports.createCompoundPriceSpec4event = void 0;
|
|
4
15
|
const factory = require("../../factory");
|
|
5
16
|
const USE_MULTIPLE_MOVIE_TICKET_CHARGE = process.env.USE_MULTIPLE_MOVIE_TICKET_CHARGE === '1';
|
|
17
|
+
function categoryCodeChargePriceSpec2component(params) {
|
|
18
|
+
var _a;
|
|
19
|
+
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);
|
|
20
|
+
}
|
|
21
|
+
function mvtkChargePriceSpec2component(params) {
|
|
22
|
+
var _a;
|
|
23
|
+
return Object.assign({ id: params.id, typeOf: params.typeOf, name: params.name, price: params.price, priceCurrency: params.priceCurrency, valueAddedTaxIncluded: params.valueAddedTaxIncluded, appliesToVideoFormat: params.appliesToVideoFormat, appliesToMovieTicket: params.appliesToMovieTicket }, (typeof ((_a = params.accounting) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? { accounting: params.accounting } : undefined);
|
|
24
|
+
}
|
|
6
25
|
function createCompoundPriceSpec4event(params) {
|
|
7
26
|
// priceSpecificationはマスタ管理の仕様上必ず存在するはず
|
|
8
27
|
if (params.offer.priceSpecification === undefined) {
|
|
9
28
|
throw new factory.errors.NotFound(`priceSpecification of the offer: ${params.offer.id}`);
|
|
10
29
|
}
|
|
11
30
|
const unitPriceSpec = Object.assign(Object.assign({}, params.offer.priceSpecification), { name: params.offer.name });
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
// tslint:disable-next-line:no-suspicious-comment
|
|
16
|
-
// TODO strictコーディングで最適化
|
|
17
|
-
...params.videoFormatChargeSpecifications,
|
|
18
|
-
...params.soundFormatChargeSpecifications
|
|
19
|
-
];
|
|
31
|
+
const videoFormatChargeSpecComponents = params.videoFormatChargeSpecifications.map(categoryCodeChargePriceSpec2component);
|
|
32
|
+
const soundFormatChargeSpecComponents = params.soundFormatChargeSpecifications.map(categoryCodeChargePriceSpec2component);
|
|
33
|
+
let mvtkPriceComponents = [];
|
|
20
34
|
// 複数決済カード対応(2022-07-11~)
|
|
21
35
|
if (Array.isArray(unitPriceSpec.appliesToMovieTicket)) {
|
|
22
|
-
const mvtkSpecs = [];
|
|
23
36
|
unitPriceSpec.appliesToMovieTicket.forEach((appliesToMovieTicket) => {
|
|
24
37
|
// すべての上映方式に該当する加算料金を追加(2022-10-29~)
|
|
25
38
|
if (USE_MULTIPLE_MOVIE_TICKET_CHARGE) {
|
|
@@ -29,7 +42,7 @@ function createCompoundPriceSpec4event(params) {
|
|
|
29
42
|
&& s.appliesToMovieTicket.serviceType === appliesToMovieTicket.serviceType
|
|
30
43
|
&& params.videoFormatTypes.includes(s.appliesToVideoFormat);
|
|
31
44
|
});
|
|
32
|
-
|
|
45
|
+
mvtkPriceComponents = mvtkSpecs4appliesToMovieTicket.map(mvtkChargePriceSpec2component);
|
|
33
46
|
}
|
|
34
47
|
else {
|
|
35
48
|
const mvtkSpec4appliesToMovieTicket = params.movieTicketTypeChargeSpecs.find((s) => {
|
|
@@ -38,17 +51,21 @@ function createCompoundPriceSpec4event(params) {
|
|
|
38
51
|
&& s.appliesToMovieTicket.serviceType === appliesToMovieTicket.serviceType;
|
|
39
52
|
});
|
|
40
53
|
if (mvtkSpec4appliesToMovieTicket !== undefined) {
|
|
41
|
-
|
|
54
|
+
mvtkPriceComponents = [mvtkChargePriceSpec2component(mvtkSpec4appliesToMovieTicket)];
|
|
42
55
|
}
|
|
43
56
|
}
|
|
44
57
|
});
|
|
45
|
-
// tslint:disable-next-line:no-suspicious-comment
|
|
46
|
-
// TODO strictコーディングで最適化
|
|
47
|
-
priceComponent.push(...mvtkSpecs);
|
|
48
58
|
}
|
|
49
59
|
else {
|
|
50
60
|
// Arrayでないケースは廃止(2022-09-12~)
|
|
51
61
|
}
|
|
62
|
+
// 区分加算料金は決済カード適用でも価格要素に含まれるはず(2022-11-02~)
|
|
63
|
+
const priceComponent = [
|
|
64
|
+
unitPriceSpec,
|
|
65
|
+
...videoFormatChargeSpecComponents,
|
|
66
|
+
...soundFormatChargeSpecComponents,
|
|
67
|
+
...mvtkPriceComponents
|
|
68
|
+
];
|
|
52
69
|
const compoundPriceSpecification = {
|
|
53
70
|
// 不要な属性を除外(2022-11-02~)
|
|
54
71
|
// project: params.offer.project,
|
|
@@ -57,6 +74,8 @@ function createCompoundPriceSpec4event(params) {
|
|
|
57
74
|
valueAddedTaxIncluded: true,
|
|
58
75
|
priceComponent
|
|
59
76
|
};
|
|
60
|
-
|
|
77
|
+
// 不要な属性を除外(2022-11-07~)
|
|
78
|
+
const _a = params.offer, { project } = _a, unitOfferFields4ticketOffer = __rest(_a, ["project"]);
|
|
79
|
+
return Object.assign(Object.assign({}, unitOfferFields4ticketOffer), { eligibleQuantity: params.eligibleQuantity, priceSpecification: compoundPriceSpecification });
|
|
61
80
|
}
|
|
62
81
|
exports.createCompoundPriceSpec4event = createCompoundPriceSpec4event;
|
|
@@ -133,14 +133,14 @@ function responseBody2resultAcceptedOffer(params) {
|
|
|
133
133
|
})
|
|
134
134
|
};
|
|
135
135
|
return {
|
|
136
|
-
project: { typeOf: params.project.typeOf, id: params.project.id },
|
|
136
|
+
// project: { typeOf: params.project.typeOf, id: params.project.id },
|
|
137
137
|
typeOf: responseBodyObject.typeOf,
|
|
138
138
|
id: offer.id,
|
|
139
139
|
name: offer.name,
|
|
140
140
|
itemOffered,
|
|
141
141
|
priceSpecification,
|
|
142
142
|
priceCurrency: offer.priceCurrency,
|
|
143
|
-
seller: offer.seller
|
|
143
|
+
seller: { name: offer.seller.name, typeOf: offer.seller.typeOf }
|
|
144
144
|
};
|
|
145
145
|
});
|
|
146
146
|
}
|
|
@@ -23,11 +23,8 @@ function searchProductOffers(params) {
|
|
|
23
23
|
if (typeof offerCatalogId !== 'string') {
|
|
24
24
|
return [];
|
|
25
25
|
}
|
|
26
|
-
const offers = yield repos.offer.findOffersByOfferCatalogId({
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
return offers
|
|
30
|
-
.map((o) => {
|
|
26
|
+
const offers = yield repos.offer.findOffersByOfferCatalogId({ offerCatalog: { id: offerCatalogId } });
|
|
27
|
+
return offers.map((o) => {
|
|
31
28
|
const unitSpec = o.priceSpecification;
|
|
32
29
|
const compoundPriceSpecification = {
|
|
33
30
|
// 不要な属性を除外(2022-11-02~)
|
|
@@ -39,7 +36,10 @@ function searchProductOffers(params) {
|
|
|
39
36
|
...(unitSpec !== undefined) ? [unitSpec] : []
|
|
40
37
|
]
|
|
41
38
|
};
|
|
42
|
-
return 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,
|
|
39
|
+
return 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,
|
|
40
|
+
// 不要な属性を除外(2022-11-07~)
|
|
41
|
+
// project: o.project,
|
|
42
|
+
typeOf: o.typeOf, priceSpecification: compoundPriceSpecification }, (o.validFrom instanceof Date) ? { validFrom: o.validFrom } : undefined), (o.validThrough instanceof Date) ? { validThrough: o.validThrough } : undefined);
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -53,7 +53,7 @@ export declare function search(params: {
|
|
|
53
53
|
}): (repos: {
|
|
54
54
|
offer: OfferRepo;
|
|
55
55
|
product: ProductRepo;
|
|
56
|
-
}) => Promise<factory.
|
|
56
|
+
}) => Promise<factory.product.ITicketOffer[]>;
|
|
57
57
|
export declare type IAuthorizeOfferAction = factory.action.authorize.offer.product.IAction;
|
|
58
58
|
/**
|
|
59
59
|
* サービス(Chevreプロダクト)オファー承認
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.274.0
|
|
13
|
-
"@cinerino/sdk": "3.130.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.274.0",
|
|
13
|
+
"@cinerino/sdk": "3.130.0-alpha.6",
|
|
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.4"
|
|
124
124
|
}
|