@chevre/domain 28.0.0-alpha.4 → 28.0.0-alpha.40
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/lib/chevre/emailMessageBuilder.js +1 -1
- package/lib/chevre/factory/event.d.ts +1 -1
- package/lib/chevre/factory/event.js +1 -5
- package/lib/chevre/repo/acceptedOffer.d.ts +6 -5
- package/lib/chevre/repo/acceptedOffer.js +14 -9
- package/lib/chevre/repo/acceptedOfferInReserve.d.ts +6 -8
- package/lib/chevre/repo/acceptedOfferInReserve.js +13 -7
- package/lib/chevre/repo/adminAcceptedOffer.d.ts +25 -12
- package/lib/chevre/repo/adminAcceptedOffer.js +20 -10
- package/lib/chevre/repo/adminAccountTitle.d.ts +49 -0
- package/lib/chevre/repo/adminAccountTitle.js +212 -0
- package/lib/chevre/repo/adminAccountTitleCategory.d.ts +37 -0
- package/lib/chevre/repo/adminAccountTitleCategory.js +127 -0
- package/lib/chevre/repo/adminAccountTitleSet.d.ts +42 -0
- package/lib/chevre/repo/adminAccountTitleSet.js +149 -0
- package/lib/chevre/repo/adminEvent.d.ts +1 -7
- package/lib/chevre/repo/adminEvent.js +3 -9
- package/lib/chevre/repo/adminEventSeries.d.ts +67 -0
- package/lib/chevre/repo/adminEventSeries.js +178 -0
- package/lib/chevre/repo/{paymentServiceChannel.d.ts → adminPaymentServiceChannel.d.ts} +13 -11
- package/lib/chevre/repo/{paymentServiceChannel.js → adminPaymentServiceChannel.js} +20 -19
- package/lib/chevre/repo/adminTask.d.ts +2 -2
- package/lib/chevre/repo/adminTransaction.d.ts +20 -30
- package/lib/chevre/repo/aggregateEvent.js +0 -1
- package/lib/chevre/repo/categoryCode.js +0 -21
- package/lib/chevre/repo/event.d.ts +2 -2
- package/lib/chevre/repo/event.js +71 -110
- package/lib/chevre/repo/eventSeries.d.ts +5 -84
- package/lib/chevre/repo/eventSeries.js +21 -212
- package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +1 -1
- package/lib/chevre/repo/issuer.d.ts +2 -6
- package/lib/chevre/repo/memberProgram.d.ts +1 -38
- package/lib/chevre/repo/memberProgram.js +1 -62
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/accountTitle.js +21 -25
- package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +1 -0
- package/lib/chevre/repo/mongoose/schemas/event.js +0 -13
- package/lib/chevre/repo/mongoose/schemas/eventSeries.js +1 -18
- package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +1 -3
- package/lib/chevre/repo/mongoose/schemas/issuer.js +0 -10
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +0 -1
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +3 -12
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +1 -2
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +6 -15
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +22 -1
- package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/place.js +0 -9
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +1 -2
- package/lib/chevre/repo/mongoose/schemas/project.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +3 -1
- package/lib/chevre/repo/mongoose/schemas/seller.js +0 -2
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/transaction.js +51 -52
- package/lib/chevre/repo/offerCatalog.d.ts +0 -2
- package/lib/chevre/repo/offerCatalogItem.d.ts +13 -20
- package/lib/chevre/repo/offerCatalogItem.js +8 -86
- package/lib/chevre/repo/order.d.ts +2 -2
- package/lib/chevre/repo/order.js +0 -31
- package/lib/chevre/repo/orderInTransaction.d.ts +5 -25
- package/lib/chevre/repo/place/movieTheater.d.ts +3 -1
- package/lib/chevre/repo/place/movieTheater.js +3 -1
- package/lib/chevre/repo/place/{hasPOS.d.ts → pos.d.ts} +13 -20
- package/lib/chevre/repo/place/{hasPOS.js → pos.js} +66 -29
- package/lib/chevre/repo/place/screeningRoom.d.ts +24 -3
- package/lib/chevre/repo/place/screeningRoom.js +28 -17
- package/lib/chevre/repo/priceSpecification.d.ts +8 -8
- package/lib/chevre/repo/project.d.ts +2 -8
- package/lib/chevre/repo/project.js +0 -12
- package/lib/chevre/repo/projectMakesOffer.js +2 -2
- package/lib/chevre/repo/role.d.ts +1 -1
- package/lib/chevre/repo/role.js +1 -30
- package/lib/chevre/repo/seller.d.ts +11 -4
- package/lib/chevre/repo/seller.js +31 -58
- package/lib/chevre/repo/sellerPaymentAccepted.d.ts +14 -21
- package/lib/chevre/repo/sellerPaymentAccepted.js +65 -38
- package/lib/chevre/repo/task.d.ts +3 -3
- package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -3
- package/lib/chevre/repo/transaction/placeOrder.js +15 -36
- package/lib/chevre/repository.d.ts +30 -15
- package/lib/chevre/repository.js +63 -30
- package/lib/chevre/service/aggregation/event/aggregateOffers.js +1 -2
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +2 -2
- package/lib/chevre/service/aggregation.d.ts +0 -2
- package/lib/chevre/service/aggregation.js +1 -3
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +1 -2
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.js +2 -2
- package/lib/chevre/service/assetTransaction/reserve/start.js +2 -1
- package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -1
- package/lib/chevre/service/event/saveScreeningEventSeries.d.ts +2 -2
- package/lib/chevre/service/event/saveScreeningEventSeries.js +2 -3
- package/lib/chevre/service/event/saveScreeningEvents.d.ts +2 -0
- package/lib/chevre/service/event/saveScreeningEvents.js +4 -4
- package/lib/chevre/service/event.d.ts +2 -0
- package/lib/chevre/service/event.js +0 -1
- package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -0
- package/lib/chevre/service/notification/sendEmailMessage.js +23 -6
- package/lib/chevre/service/offer/any.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
- package/lib/chevre/service/offer/event/authorize/factory.js +1 -8
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/event/issueEventOfferTicket.js +0 -11
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +4 -10
- package/lib/chevre/service/offer/event/searchOfferAppliesToMovieTicket.js +2 -8
- package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +2 -2
- package/lib/chevre/service/offer/event/searchOffersByIds.js +3 -9
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +0 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -7
- package/lib/chevre/service/offer/onEventChanged.js +9 -21
- package/lib/chevre/service/offer.js +1 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +4 -6
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +23 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
- package/lib/chevre/service/order/sendOrder.js +2 -14
- package/lib/chevre/service/payment/creditCard/getGMOInfoFromSeller.js +1 -1
- package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +3 -3
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +1 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
- package/lib/chevre/service/project.d.ts +3 -3
- package/lib/chevre/service/project.js +1 -1
- package/lib/chevre/service/task/importEventsFromCOA.js +2 -0
- package/lib/chevre/service/task/onResourceDeleted.js +8 -8
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.d.ts +7 -3
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +51 -50
- package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated.js +10 -47
- package/lib/chevre/service/task/sendEmailMessage.js +3 -1
- package/lib/chevre/service/task/syncResourcesFromCOA.js +5 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +1 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -5
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -5
- package/lib/chevre/service/transaction/returnOrder/preStart/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -2
- package/package.json +2 -2
- package/lib/chevre/repo/accountTitle.d.ts +0 -28
- package/lib/chevre/repo/accountTitle.js +0 -30
- package/lib/chevre/service/aggregation/project.d.ts +0 -17
- package/lib/chevre/service/aggregation/project.js +0 -98
- package/lib/chevre/service/delivery/factory.d.ts +0 -16
- package/lib/chevre/service/delivery/factory.js +0 -124
|
@@ -14,6 +14,28 @@ function createSendEmailMessageActionAttributes(params) {
|
|
|
14
14
|
...(typeof params.sameAs?.id === 'string') ? { sameAs: { id: params.sameAs.id, typeOf: 'Task' } } : undefined
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* 送信元アドレスを決定する
|
|
19
|
+
*/
|
|
20
|
+
function fixSenderEmail(project, emailMessage) {
|
|
21
|
+
return async (repos) => {
|
|
22
|
+
let serderEmail = emailMessage.sender.email;
|
|
23
|
+
if (typeof serderEmail !== 'string' || serderEmail === '') {
|
|
24
|
+
// 指定がなければ、強制的にグローバル設定を適用(2026-10-19~)
|
|
25
|
+
const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['defaultSenderEmail']);
|
|
26
|
+
if (typeof setting?.defaultSenderEmail !== 'string') {
|
|
27
|
+
throw new factory_1.factory.errors.NotFound('setting.defaultSenderEmail');
|
|
28
|
+
}
|
|
29
|
+
serderEmail = setting.defaultSenderEmail;
|
|
30
|
+
}
|
|
31
|
+
// プロジェクト設定対応(2023-08-21~)
|
|
32
|
+
const senderEmailByProjectSettings = project.settings?.sendEmailMessage?.sender?.email;
|
|
33
|
+
if (typeof senderEmailByProjectSettings === 'string' && senderEmailByProjectSettings !== '') {
|
|
34
|
+
serderEmail = senderEmailByProjectSettings;
|
|
35
|
+
}
|
|
36
|
+
return serderEmail;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
17
39
|
function createMailData(params) {
|
|
18
40
|
return async (repos) => {
|
|
19
41
|
const project = await repos.project.findById({
|
|
@@ -43,13 +65,8 @@ function createMailData(params) {
|
|
|
43
65
|
}
|
|
44
66
|
const emailMessageFrom = {
|
|
45
67
|
name: emailMessage.sender.name,
|
|
46
|
-
email: emailMessage
|
|
68
|
+
email: await fixSenderEmail(project, emailMessage)(repos)
|
|
47
69
|
};
|
|
48
|
-
// プロジェクト設定対応(2023-08-21~)
|
|
49
|
-
const senderEmailByProjectSettings = project.settings?.sendEmailMessage?.sender?.email;
|
|
50
|
-
if (typeof senderEmailByProjectSettings === 'string' && senderEmailByProjectSettings.length > 0) {
|
|
51
|
-
emailMessageFrom.email = senderEmailByProjectSettings;
|
|
52
|
-
}
|
|
53
70
|
const subject = emailMessage.about.name;
|
|
54
71
|
const emailDatas = (Array.isArray(emailMessage.toRecipient))
|
|
55
72
|
? emailMessage.toRecipient.map((toRecipient) => {
|
|
@@ -10,7 +10,7 @@ export declare function acceptOffer(params: {
|
|
|
10
10
|
id: string;
|
|
11
11
|
};
|
|
12
12
|
placeOrderId: string;
|
|
13
|
-
acceptedOffers: IMinimizedAcceptedOffer[] | factory.
|
|
13
|
+
acceptedOffers: IMinimizedAcceptedOffer[] | factory.acceptedOffer.ICOAAcceptedOffer[];
|
|
14
14
|
}): IAcceptOfferOperation<void>;
|
|
15
15
|
export declare function voidAcceptedOffer(params: {
|
|
16
16
|
/**
|
|
@@ -31,11 +31,11 @@ declare function acceptedOffers2authorizeResult(params: {
|
|
|
31
31
|
onlyPrice?: boolean;
|
|
32
32
|
};
|
|
33
33
|
type IObjectSubReservation = factory.assetTransaction.reserve.IObjectSubReservation;
|
|
34
|
-
export type IResultAcceptedOffer = Omit<factory.
|
|
35
|
-
itemOffered: factory.
|
|
34
|
+
export type IResultAcceptedOffer = Omit<factory.acceptedOffer.IOptimizedAcceptedOffer, 'priceSpecification'> & {
|
|
35
|
+
itemOffered: factory.acceptedOffer.IEventReservation;
|
|
36
36
|
offeredThrough: factory.offer.IOfferedThrough;
|
|
37
37
|
serialNumber: string;
|
|
38
|
-
priceSpecification?: factory.
|
|
38
|
+
priceSpecification?: factory.acceptedOffer.ITicketPriceSpecification;
|
|
39
39
|
};
|
|
40
40
|
declare function responseBody2acceptedOffers4result(params: {
|
|
41
41
|
issuedThrough: factory.assetTransaction.reserve.IIssuedThrough;
|
|
@@ -346,17 +346,10 @@ function createReservation(params) {
|
|
|
346
346
|
id: event.superEvent.id,
|
|
347
347
|
location: event.superEvent.location,
|
|
348
348
|
name: event.superEvent.name,
|
|
349
|
-
soundFormat: event.superEvent.soundFormat,
|
|
349
|
+
// soundFormat: event.superEvent.soundFormat, // discontinue(2026-10-05~)
|
|
350
350
|
workPerformed,
|
|
351
351
|
...(typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined,
|
|
352
352
|
...(event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined
|
|
353
|
-
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
354
|
-
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
355
|
-
// ? {
|
|
356
|
-
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
357
|
-
// videoFormat: (<any>event.superEvent).videoFormat
|
|
358
|
-
// }
|
|
359
|
-
// : undefined
|
|
360
353
|
};
|
|
361
354
|
const reservationFor = {
|
|
362
355
|
typeOf: event.typeOf,
|
|
@@ -25,7 +25,7 @@ declare function processStartReserve4chevre(params: {
|
|
|
25
25
|
acceptedOffers: factory.assetTransaction.reserve.IAcceptedTicketOfferWithoutDetail[];
|
|
26
26
|
event: Pick<IMinimizedIndividualEvent, 'id'> & {
|
|
27
27
|
offers?: {
|
|
28
|
-
validForMemberTier?:
|
|
28
|
+
validForMemberTier?: never;
|
|
29
29
|
identifier?: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -73,8 +73,6 @@ function issueEventOfferTicket(params) {
|
|
|
73
73
|
typeOf: seller.typeOf,
|
|
74
74
|
...(typeof seller.name.ja === 'string') ? { name: seller.name.ja } : undefined
|
|
75
75
|
};
|
|
76
|
-
// const validForMemberTierToken = ticketedOffer?.validForMemberTier?.token;
|
|
77
|
-
// const validForMemberProgramIdentifier = ticketedOffer?.validForMemberTier?.isTierOf.identifier;
|
|
78
76
|
const authorizationObject = {
|
|
79
77
|
typeOf: factory_1.factory.offerType.Offer,
|
|
80
78
|
itemOffered: {
|
|
@@ -88,15 +86,6 @@ function issueEventOfferTicket(params) {
|
|
|
88
86
|
...(typeof ticketedOffer?.token === 'string' && ticketedOffer.token !== '')
|
|
89
87
|
? { token: ticketedOffer.token }
|
|
90
88
|
: undefined,
|
|
91
|
-
// ...(typeof validForMemberTierToken === 'string' && validForMemberTierToken !== ''
|
|
92
|
-
// && typeof validForMemberProgramIdentifier === 'string' && validForMemberProgramIdentifier !== '')
|
|
93
|
-
// ? {
|
|
94
|
-
// validForMemberTier: {
|
|
95
|
-
// token: validForMemberTierToken,
|
|
96
|
-
// isTierOf: { identifier: validForMemberProgramIdentifier }
|
|
97
|
-
// }
|
|
98
|
-
// }
|
|
99
|
-
// : undefined
|
|
100
89
|
};
|
|
101
90
|
// validations(eventId,eventOfferIdentifier,offerToken...)
|
|
102
91
|
await (0, validateStartRequest_1.validEventOfferByApplicationExists)({
|
|
@@ -65,7 +65,7 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
65
65
|
// サブカタログの適用決済カード条件を考慮
|
|
66
66
|
if (isOfferCatalogItem) {
|
|
67
67
|
// サブカタログ参照
|
|
68
|
-
const offerCatalogItem = (await repos.offerCatalogItem.
|
|
68
|
+
const offerCatalogItem = (await repos.offerCatalogItem.findOfferCatalogItems({ id: { $in: [subOfferCatalogId] } }, ['relatedOffer']
|
|
69
69
|
// { relatedOffer: 1 }
|
|
70
70
|
)).shift();
|
|
71
71
|
if (offerCatalogItem === undefined) {
|
|
@@ -115,23 +115,17 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
115
115
|
function searchEventTicketOffersByEvent(params) {
|
|
116
116
|
return async (repos) => {
|
|
117
117
|
const event = params.event;
|
|
118
|
-
let soundFormatTypes = [];
|
|
119
118
|
let videoFormatTypes = [];
|
|
120
119
|
if (event.typeOf === factory_1.factory.eventType.ScreeningEvent) {
|
|
121
|
-
const superEvents = await repos.eventSeries.
|
|
120
|
+
const superEvents = await repos.eventSeries.findEventSeries({
|
|
122
121
|
limit: 1,
|
|
123
122
|
page: 1,
|
|
124
123
|
id: { $eq: event.superEvent.id }
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
// ['soundFormat', 'videoFormat', 'subEvent']
|
|
128
|
-
['soundFormat', 'subEvent']);
|
|
124
|
+
}, ['subEvent']);
|
|
129
125
|
const superEvent = superEvents.shift();
|
|
130
126
|
if (superEvent === undefined) {
|
|
131
127
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEventSeries);
|
|
132
128
|
}
|
|
133
|
-
soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
|
|
134
|
-
// videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
|
|
135
129
|
videoFormatTypes = (Array.isArray(superEvent.subEvent?.videoFormat)) ? superEvent.subEvent.videoFormat : [];
|
|
136
130
|
}
|
|
137
131
|
const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
|
|
@@ -155,7 +149,7 @@ function searchEventTicketOffersByEvent(params) {
|
|
|
155
149
|
})(repos);
|
|
156
150
|
const { soundFormatChargeSpecs, videoFormatChargeSpecs, movieTicketTypeChargeSpecs } = await (0, searchPriceSpecs4event_1.searchPriceSpecs4event)({
|
|
157
151
|
project: { id: event.project.id },
|
|
158
|
-
soundFormatTypes,
|
|
152
|
+
soundFormatTypes: [], // 現時点で音響方式区分は存在しない(2026-10-05~),
|
|
159
153
|
videoFormatTypes,
|
|
160
154
|
availableOffers
|
|
161
155
|
})(repos);
|
|
@@ -20,23 +20,17 @@ function searchOfferAppliesToMovieTicket(params) {
|
|
|
20
20
|
return async (repos) => {
|
|
21
21
|
// optimize(2024-07-18~)
|
|
22
22
|
const event = await repos.event.projectEventFieldsById({ id: params.event.id }, ['project', 'startDate', 'typeOf', 'superEvent.id', 'offers.itemOffered.id', 'offers.unacceptedPaymentMethod']);
|
|
23
|
-
// let soundFormatTypes: string[] = [];
|
|
24
23
|
let videoFormatTypes = [];
|
|
25
24
|
if (event.typeOf === factory_1.factory.eventType.ScreeningEvent) {
|
|
26
|
-
const superEvents = await repos.eventSeries.
|
|
25
|
+
const superEvents = await repos.eventSeries.findEventSeries({
|
|
27
26
|
limit: 1,
|
|
28
27
|
page: 1,
|
|
29
28
|
id: { $eq: event.superEvent.id }
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
// ['soundFormat', 'videoFormat', 'subEvent']
|
|
33
|
-
['soundFormat', 'subEvent']);
|
|
29
|
+
}, ['subEvent']);
|
|
34
30
|
const superEvent = superEvents.shift();
|
|
35
31
|
if (superEvent === undefined) {
|
|
36
32
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEventSeries);
|
|
37
33
|
}
|
|
38
|
-
// soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
|
|
39
|
-
// videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
|
|
40
34
|
videoFormatTypes = (Array.isArray(superEvent.subEvent?.videoFormat)) ? superEvent.subEvent.videoFormat : [];
|
|
41
35
|
}
|
|
42
36
|
const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
|
|
@@ -63,9 +63,9 @@ function searchOfferCatalogItems(params) {
|
|
|
63
63
|
});
|
|
64
64
|
if (catalogItemListElements.length > 0) {
|
|
65
65
|
// サブカタログ検索
|
|
66
|
-
const searchOfferCatalogItemsResult = await repos.offerCatalogItem.
|
|
66
|
+
const searchOfferCatalogItemsResult = await repos.offerCatalogItem.findOfferCatalogItems({
|
|
67
67
|
id: { $in: catalogItemListElements.map((element) => element.id) }
|
|
68
|
-
}, ['description', 'name', '
|
|
68
|
+
}, ['description', 'name', 'relatedOffer']);
|
|
69
69
|
offerCatalogItems = catalogItemListElements.map((element) => {
|
|
70
70
|
const offerCatalogItem = searchOfferCatalogItemsResult.find((item) => item.id === element.id);
|
|
71
71
|
if (offerCatalogItem === undefined) {
|
|
@@ -101,23 +101,17 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
101
101
|
function searchEventTicketOffersByEvent(params) {
|
|
102
102
|
return async (repos) => {
|
|
103
103
|
const event = params.event;
|
|
104
|
-
let soundFormatTypes = [];
|
|
105
104
|
let videoFormatTypes = [];
|
|
106
105
|
if (event.typeOf === factory_1.factory.eventType.ScreeningEvent) {
|
|
107
|
-
const superEvents = await repos.eventSeries.
|
|
106
|
+
const superEvents = await repos.eventSeries.findEventSeries({
|
|
108
107
|
limit: 1,
|
|
109
108
|
page: 1,
|
|
110
109
|
id: { $eq: event.superEvent.id }
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
// ['soundFormat', 'videoFormat', 'subEvent']
|
|
114
|
-
['soundFormat', 'subEvent']);
|
|
110
|
+
}, ['subEvent']);
|
|
115
111
|
const superEvent = superEvents.shift();
|
|
116
112
|
if (superEvent === undefined) {
|
|
117
113
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEventSeries);
|
|
118
114
|
}
|
|
119
|
-
soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
|
|
120
|
-
// videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
|
|
121
115
|
videoFormatTypes = (Array.isArray(superEvent.subEvent?.videoFormat)) ? superEvent.subEvent.videoFormat : [];
|
|
122
116
|
}
|
|
123
117
|
const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
|
|
@@ -142,7 +136,7 @@ function searchEventTicketOffersByEvent(params) {
|
|
|
142
136
|
})(repos);
|
|
143
137
|
const { soundFormatChargeSpecs, videoFormatChargeSpecs, movieTicketTypeChargeSpecs } = await (0, searchPriceSpecs4event_1.searchPriceSpecs4event)({
|
|
144
138
|
project: { id: event.project.id },
|
|
145
|
-
soundFormatTypes,
|
|
139
|
+
soundFormatTypes: [], // 現時点で音響方式区分は存在しない(2026-10-05~)
|
|
146
140
|
videoFormatTypes,
|
|
147
141
|
availableOffers
|
|
148
142
|
})(repos);
|
|
@@ -22,7 +22,7 @@ export declare function createAuthorizeSeatReservationActionAttributes(params: {
|
|
|
22
22
|
export declare function offers2resultPrice(offers: IAcceptedOffer4COA[]): {
|
|
23
23
|
price: number;
|
|
24
24
|
};
|
|
25
|
-
type IResultAcceptedOffer = factory.
|
|
25
|
+
type IResultAcceptedOffer = factory.acceptedOffer.ICOAAcceptedOffer;
|
|
26
26
|
/**
|
|
27
27
|
* COA仮予約結果から注文アイテムを生成する
|
|
28
28
|
*/
|
|
@@ -104,13 +104,6 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
104
104
|
workPerformed: workPerformed,
|
|
105
105
|
duration: event.superEvent.duration,
|
|
106
106
|
coaInfo: event.superEvent.coaInfo
|
|
107
|
-
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
108
|
-
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
109
|
-
// ? {
|
|
110
|
-
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
111
|
-
// videoFormat: (<any>event.superEvent).videoFormat
|
|
112
|
-
// }
|
|
113
|
-
// : undefined
|
|
114
107
|
};
|
|
115
108
|
const reservationFor = {
|
|
116
109
|
typeOf: event.typeOf,
|
|
@@ -66,7 +66,7 @@ function syncEventSeries2screeningEvents(params) {
|
|
|
66
66
|
return async (repos) => {
|
|
67
67
|
const now = new Date();
|
|
68
68
|
for (const eventSeriesId of params.ids) {
|
|
69
|
-
const superEvents = await repos.eventSeries.
|
|
69
|
+
const superEvents = await repos.eventSeries.findEventSeries({
|
|
70
70
|
limit: 1,
|
|
71
71
|
page: 1,
|
|
72
72
|
// typeOf: factory.eventType.ScreeningEventSeries,
|
|
@@ -75,8 +75,7 @@ function syncEventSeries2screeningEvents(params) {
|
|
|
75
75
|
}, [
|
|
76
76
|
'additionalProperty', 'alternativeHeadline', 'description', 'dubLanguage',
|
|
77
77
|
'endDate', 'headline', 'kanaName', 'location', 'name',
|
|
78
|
-
'
|
|
79
|
-
// 'videoFormat', // 参照廃止(2026-02-10~)
|
|
78
|
+
'startDate', 'subtitleLanguage', 'typeOf',
|
|
80
79
|
'workPerformed'
|
|
81
80
|
]);
|
|
82
81
|
const superEventFromDB = superEvents.shift();
|
|
@@ -101,8 +100,7 @@ function createInformTasks(params, setting) {
|
|
|
101
100
|
const informEvents = setting?.onResourceUpdated?.informResource;
|
|
102
101
|
if (params.typeOf === factory_1.factory.eventType.ScreeningEvent) {
|
|
103
102
|
const screeningEvents4inform = await repos.event.projectEventFields({
|
|
104
|
-
id: { $in: params.ids }
|
|
105
|
-
typeOf: params.typeOf
|
|
103
|
+
id: { $in: params.ids }
|
|
106
104
|
}, [
|
|
107
105
|
'project', 'organizer', 'typeOf', 'name', 'doorTime', 'endDate',
|
|
108
106
|
'eventStatus', 'location', 'startDate', 'superEvent', 'offers', 'additionalProperty', 'identifier'
|
|
@@ -118,9 +116,6 @@ function createInformTasks(params, setting) {
|
|
|
118
116
|
validFrom: eventSellerMakesOffer.validFrom,
|
|
119
117
|
validThrough: eventSellerMakesOffer.validThrough,
|
|
120
118
|
availableAtOrFrom: [eventSellerMakesOffer.availableAtOrFrom],
|
|
121
|
-
...(typeof eventSellerMakesOffer.identifier === 'string')
|
|
122
|
-
? { identifier: eventSellerMakesOffer.identifier }
|
|
123
|
-
: undefined // support notify identifier(2025-11-01~)
|
|
124
119
|
};
|
|
125
120
|
})
|
|
126
121
|
: [];
|
|
@@ -163,25 +158,21 @@ function createInformTasks(params, setting) {
|
|
|
163
158
|
});
|
|
164
159
|
}
|
|
165
160
|
else {
|
|
166
|
-
const screeningEventSeries4inform = await repos.eventSeries.
|
|
161
|
+
const screeningEventSeries4inform = await repos.eventSeries.findEventSeries({
|
|
167
162
|
id: { $in: params.ids }
|
|
168
163
|
// typeOf: params.typeOf
|
|
169
164
|
}, [
|
|
170
|
-
'project', 'organizer', 'typeOf', 'name', 'location', '
|
|
165
|
+
'project', 'organizer', 'typeOf', 'name', 'location', 'workPerformed', 'kanaName', 'eventStatus',
|
|
171
166
|
'endDate', 'startDate', 'additionalProperty', 'subtitleLanguage', 'dubLanguage',
|
|
172
167
|
'alternativeHeadline', 'description', 'duration', 'headline', 'subEvent'
|
|
173
168
|
] // inclusion(2024-07-30~)
|
|
174
169
|
);
|
|
175
170
|
// 最適化(2024-03-25~)
|
|
176
|
-
events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id,
|
|
171
|
+
events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id, workPerformed, kanaName, eventStatus, endDate, startDate, additionalProperty, subtitleLanguage, dubLanguage, alternativeHeadline, description, duration, headline, subEvent }) => {
|
|
177
172
|
return {
|
|
178
|
-
project, organizer, typeOf, name, location, id,
|
|
173
|
+
project, organizer, typeOf, name, location, id, workPerformed, kanaName, eventStatus,
|
|
179
174
|
endDate, startDate,
|
|
180
|
-
videoFormat: (Array.isArray(subEvent?.videoFormat))
|
|
181
|
-
? subEvent.videoFormat.map((codeValue) => ({ typeOf: codeValue, name: codeValue }))
|
|
182
|
-
: [],
|
|
183
|
-
// ...(endDate !== undefined) ? { endDate } : undefined,
|
|
184
|
-
// ...(startDate !== undefined) ? { startDate } : undefined,
|
|
175
|
+
videoFormat: (Array.isArray(subEvent?.videoFormat)) ? subEvent.videoFormat : [], // videoFormat通知をstring[]に変更(2026-10-07~)
|
|
185
176
|
...(Array.isArray(additionalProperty)) ? { additionalProperty } : undefined,
|
|
186
177
|
...(subtitleLanguage !== undefined) ? {} : undefined,
|
|
187
178
|
...(dubLanguage !== undefined) ? { dubLanguage } : undefined,
|
|
@@ -198,8 +189,6 @@ function createInformTasks(params, setting) {
|
|
|
198
189
|
informEvents?.forEach((informEvent) => {
|
|
199
190
|
const informUrl = String(informEvent.recipient?.url);
|
|
200
191
|
events4inform.forEach((event4inform) => {
|
|
201
|
-
// _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
|
|
202
|
-
delete event4inform._id; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
203
192
|
const informActionAttributes = {
|
|
204
193
|
object: event4inform,
|
|
205
194
|
recipient: {
|
|
@@ -296,8 +285,7 @@ function syncEventEndDate2pendingReservations(params) {
|
|
|
296
285
|
const events = await repos.event.projectEventFields({
|
|
297
286
|
limit: 1,
|
|
298
287
|
page: 1,
|
|
299
|
-
id: { $eq: eventId }
|
|
300
|
-
typeOf: params.typeOf
|
|
288
|
+
id: { $eq: eventId }
|
|
301
289
|
}, ['endDate']);
|
|
302
290
|
const endDate = events.shift()?.endDate;
|
|
303
291
|
if (endDate instanceof Date) {
|
|
@@ -169,8 +169,7 @@ function findEventSeatOffersBySection(params) {
|
|
|
169
169
|
page: 1,
|
|
170
170
|
project: { id: { $eq: projectId } },
|
|
171
171
|
organizer: { id: { $eq: sellerId } },
|
|
172
|
-
id: { $eq: eventId }
|
|
173
|
-
typeOf: factory_1.factory.eventType.ScreeningEvent
|
|
172
|
+
id: { $eq: eventId }
|
|
174
173
|
}, ['startDate', 'offers.itemOffered', 'location', 'superEvent'])).shift();
|
|
175
174
|
if (event === undefined) {
|
|
176
175
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEvent);
|
package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
2
|
import type { ISetting } from '../../../../repo/setting';
|
|
3
3
|
type IInTransitOrder = Pick<factory.order.IOrder, 'confirmationNumber' | 'project' | 'typeOf' | 'seller' | 'orderNumber' | 'price' | 'priceCurrency' | 'orderDate' | 'customer' | 'id'> & {
|
|
4
|
+
/**
|
|
5
|
+
* 何ページ目の配送か
|
|
6
|
+
*/
|
|
4
7
|
acceptedOffers: {
|
|
5
8
|
limit: number;
|
|
6
9
|
page: number;
|
|
7
10
|
};
|
|
8
|
-
deliveredAcceptedOffers:
|
|
9
|
-
/**
|
|
10
|
-
* COA以外では注文ドキュメントにpriceSpecificationが存在しないのでIFを補完
|
|
11
|
-
*/
|
|
12
|
-
priceSpecification?: factory.order.ITicketPriceSpecification;
|
|
13
|
-
})[];
|
|
11
|
+
deliveredAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'priceSpecification' | 'id' | 'itemOffered' | 'offeredThrough' | 'serialNumber' | 'typeOf'>[];
|
|
14
12
|
orderStatus: factory.orderStatus.OrderInTransit;
|
|
15
13
|
};
|
|
16
14
|
declare function createInformTasks(params: {
|
|
@@ -4,11 +4,30 @@ exports.createInformTasks = createInformTasks;
|
|
|
4
4
|
exports.createNextSendOrderTasks = createNextSendOrderTasks;
|
|
5
5
|
const factory_1 = require("../../../../factory");
|
|
6
6
|
function creteOrder4inform(order) {
|
|
7
|
+
const { deliveredAcceptedOffers, project, typeOf, orderNumber } = order;
|
|
8
|
+
const acceptedOffers = deliveredAcceptedOffers.map((acceptedOffer) => {
|
|
9
|
+
if (acceptedOffer.offeredThrough?.identifier === factory_1.factory.service.webAPI.Identifier.COA) {
|
|
10
|
+
// COAでは最小化しない
|
|
11
|
+
return acceptedOffer;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const { itemOffered, ...acceptedOfferWithtoutItemOffered } = acceptedOffer;
|
|
15
|
+
const { reservationFor, issuedThrough: _issuedThrough, programMembershipUsed: _programMembershipUsed, ...itemOfferedWithoutReservationFor } = itemOffered;
|
|
16
|
+
const itemOffered4inform = {
|
|
17
|
+
...itemOfferedWithoutReservationFor,
|
|
18
|
+
reservationFor: { id: reservationFor.id, typeOf: reservationFor.typeOf } // minimize reservationFor(2026-09-28~)
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
...acceptedOfferWithtoutItemOffered,
|
|
22
|
+
itemOffered: itemOffered4inform
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
7
26
|
return {
|
|
8
|
-
project
|
|
9
|
-
typeOf
|
|
10
|
-
orderNumber
|
|
11
|
-
acceptedOffers
|
|
27
|
+
project,
|
|
28
|
+
typeOf,
|
|
29
|
+
orderNumber,
|
|
30
|
+
acceptedOffers,
|
|
12
31
|
orderStatus: factory_1.factory.orderStatus.OrderInTransit,
|
|
13
32
|
// ↓hub側で使用している可能性もあるので念のため
|
|
14
33
|
...(typeof order.id === 'string') ? { id: order.id } : undefined
|
|
@@ -3,7 +3,7 @@ import type { TaskRepo } from '../../../../repo/task';
|
|
|
3
3
|
import { factory } from '../../../../factory';
|
|
4
4
|
declare function createSendEmailMessageTaskIfNotExist(params: {
|
|
5
5
|
sendEmailMessage?: {
|
|
6
|
-
object: factory.action.transfer.send.message.email.
|
|
6
|
+
object: factory.action.transfer.send.message.email.IObjectByIdentifier;
|
|
7
7
|
}[];
|
|
8
8
|
order: Pick<factory.order.IOrder, 'customer' | 'orderDate' | 'orderNumber' | 'price' | 'priceCurrency' | 'project' | 'typeOf'>;
|
|
9
9
|
}): (repos: {
|
|
@@ -3,7 +3,7 @@ import { factory } from '../../../../factory';
|
|
|
3
3
|
import { IProcessingOrder } from './factory';
|
|
4
4
|
declare function processOrder(params: {
|
|
5
5
|
order: Pick<IProcessingOrder, 'confirmationNumber' | 'orderDate' | 'orderNumber' | 'project' | 'typeOf'> & {
|
|
6
|
-
itemOfferedTypeOf: factory.
|
|
6
|
+
itemOfferedTypeOf: factory.reservationType.EventReservation;
|
|
7
7
|
serialNumbers: string[];
|
|
8
8
|
offeredThroughIdentifier?: factory.service.webAPI.Identifier;
|
|
9
9
|
};
|
|
@@ -7,7 +7,7 @@ import { IExternalOrder, IProcessingOrder } from './onOrderProcessing/factory';
|
|
|
7
7
|
import { processOrder } from './onOrderProcessing/processOrder';
|
|
8
8
|
declare function onOrderProcessing(params: {
|
|
9
9
|
order: IProcessingOrder & {
|
|
10
|
-
itemOfferedTypeOf: factory.
|
|
10
|
+
itemOfferedTypeOf: factory.reservationType.EventReservation;
|
|
11
11
|
serialNumbers: string[];
|
|
12
12
|
offeredThroughIdentifier?: factory.service.webAPI.Identifier;
|
|
13
13
|
};
|
|
@@ -3,6 +3,6 @@ import { factory } from '../../../../factory';
|
|
|
3
3
|
* 受入オファーを注文アイテムに変換する
|
|
4
4
|
*/
|
|
5
5
|
declare function acceptedOffers2orderedItem(params: {
|
|
6
|
-
eventReservationAcceptedOffers: Pick<factory.
|
|
6
|
+
eventReservationAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered'>[];
|
|
7
7
|
}): factory.order.IOrderedItem[];
|
|
8
8
|
export { acceptedOffers2orderedItem };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IPlacingOrder } from '../../../repo/orderInTransaction';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
3
|
type IPlaceOrderTransaction = Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'project' | 'typeOf' | 'result' | 'object' | 'seller'>;
|
|
4
|
-
type IOrderAcceptedOffer = Pick<factory.
|
|
4
|
+
type IOrderAcceptedOffer = Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'serialNumber'>;
|
|
5
5
|
declare function createPaymentMethods(params: {
|
|
6
6
|
authorizePaymentActions: Pick<factory.action.authorize.paymentMethod.any.IAction, 'result'>[];
|
|
7
7
|
}): {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sendOrder = sendOrder;
|
|
4
|
-
// import { createOwnershipInfosFromOrder } from '../delivery/factory';
|
|
5
4
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
6
5
|
const factory_1 = require("../../factory");
|
|
7
6
|
/**
|
|
@@ -61,26 +60,15 @@ function sendOrder(params) {
|
|
|
61
60
|
const action = await repos.actions.sendOrder.start(sendOrderActionAttributes);
|
|
62
61
|
let allOffersDelivered = false;
|
|
63
62
|
let acceptedOffers;
|
|
64
|
-
// 所有権管理はひとまず廃止(2026-08-10~)
|
|
65
|
-
// // 所有権生成を最小化(2024-03-01~)
|
|
66
|
-
// let createOwnerships = false;
|
|
67
|
-
// switch (order.customer.typeOf) {
|
|
68
|
-
// case factory.personType.Person:
|
|
69
|
-
// createOwnerships = true; // Personのみに限定(2026-03-15~)
|
|
70
|
-
// break;
|
|
71
|
-
// default:
|
|
72
|
-
// }
|
|
73
63
|
try {
|
|
74
64
|
const offerIndexBase = (limit * (page - 1));
|
|
75
|
-
const
|
|
65
|
+
const { partialAcceptedOffers } = await repos.acceptedOffer.findPartialAcceptedOffersByOrderNumber({
|
|
76
66
|
$slice: [offerIndexBase, limit],
|
|
77
67
|
orderNumber: { $eq: order.orderNumber },
|
|
78
68
|
project: { id: { $eq: order.project.id } }
|
|
79
69
|
});
|
|
80
|
-
acceptedOffers =
|
|
70
|
+
acceptedOffers = partialAcceptedOffers;
|
|
81
71
|
// 所有権管理はひとまず廃止(2026-08-10~)
|
|
82
|
-
// if (createOwnerships) {
|
|
83
|
-
// }
|
|
84
72
|
if (acceptedOffers.length === 0) {
|
|
85
73
|
order = await repos.order.changeStatus({
|
|
86
74
|
project: { id: order.project.id },
|
|
@@ -6,7 +6,7 @@ function getGMOInfoFromSeller(params) {
|
|
|
6
6
|
return async (repos) => {
|
|
7
7
|
if (params.requirePaymentAccepted) {
|
|
8
8
|
const paymentAccepted = await repos.paymentAccepted.isAcceptedBySeller({
|
|
9
|
-
|
|
9
|
+
sellerId: params.seller.id,
|
|
10
10
|
codeValue: params.paymentMethodType
|
|
11
11
|
});
|
|
12
12
|
if (paymentAccepted !== true) {
|
|
@@ -15,9 +15,9 @@ declare function createPayObjectServiceOutput(params: {
|
|
|
15
15
|
/**
|
|
16
16
|
* 決済カードの適用された注文オファー
|
|
17
17
|
*/
|
|
18
|
-
type IAcceptedOfferMovieTicketUsed = Pick<factory.
|
|
19
|
-
itemOffered: Pick<factory.
|
|
20
|
-
reservedTicket: Pick<factory.
|
|
18
|
+
type IAcceptedOfferMovieTicketUsed = Pick<factory.acceptedOffer.IAcceptedOffer, 'priceSpecification'> & {
|
|
19
|
+
itemOffered: Pick<factory.acceptedOffer.IEventReservation | factory.acceptedOffer.ICOAEventReservation, 'reservationFor' | 'reservationNumber'> & {
|
|
20
|
+
reservedTicket: Pick<factory.acceptedOffer.IReservedTicket, 'identifier' | 'ticketedSeat' | 'ticketToken'> | Pick<factory.acceptedOffer.ICOAReservedTicket, 'identifier' | 'ticketedSeat' | 'ticketToken'>;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export { createPayObjectServiceOutput, IAcceptedOfferMovieTicketUsed };
|
|
@@ -56,7 +56,7 @@ function checkMovieTicket(params) {
|
|
|
56
56
|
const screeningEvent = await repos.event.projectEventFieldsById({ id: eventIds[0] }, ['typeOf', 'project', 'coaInfo', 'startDate', 'offers.offeredThrough', 'superEvent.workPerformed.identifier']);
|
|
57
57
|
const sellerId = optimizedCheckObject[0]?.seller.id;
|
|
58
58
|
const paymentAccepted = await repos.paymentAccepted.isAcceptedBySeller({
|
|
59
|
-
|
|
59
|
+
sellerId,
|
|
60
60
|
codeValue: paymentMethodType
|
|
61
61
|
});
|
|
62
62
|
if (paymentAccepted !== true) {
|
package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js
CHANGED
|
@@ -31,7 +31,7 @@ function payActionParams2seatInfoSyncIn(params) {
|
|
|
31
31
|
paymentServiceId
|
|
32
32
|
})(repos);
|
|
33
33
|
const paymentAccepted = await repos.paymentAccepted.isAcceptedBySeller({
|
|
34
|
-
|
|
34
|
+
sellerId,
|
|
35
35
|
codeValue: paymentMethodType
|
|
36
36
|
});
|
|
37
37
|
if (paymentAccepted !== true) {
|
|
@@ -61,7 +61,7 @@ checkedAction, purpose) {
|
|
|
61
61
|
// }
|
|
62
62
|
// const paymentAccepted = seller.paymentAccepted?.some((a) => a.paymentMethodType === paymentMethodType);
|
|
63
63
|
const paymentAccepted = await repos.paymentAccepted.isAcceptedBySeller({
|
|
64
|
-
|
|
64
|
+
sellerId,
|
|
65
65
|
codeValue: paymentMethodType
|
|
66
66
|
});
|
|
67
67
|
if (paymentAccepted !== true) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* プロジェクトサービス
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { AdminAccountTitleCategoryRepo } from '../repo/adminAccountTitleCategory';
|
|
5
5
|
import type { AssetTransactionRepo } from '../repo/assetTransaction';
|
|
6
6
|
import type { CategoryCodeRepo } from '../repo/categoryCode';
|
|
7
7
|
import type { CreativeWorkRepo } from '../repo/creativeWork';
|
|
@@ -20,7 +20,7 @@ import type { SellerRepo } from '../repo/seller';
|
|
|
20
20
|
export declare function deleteProject(params: {
|
|
21
21
|
id: string;
|
|
22
22
|
}): (repos: {
|
|
23
|
-
|
|
23
|
+
adminAccountTitleCategory: AdminAccountTitleCategoryRepo;
|
|
24
24
|
categoryCode: CategoryCodeRepo;
|
|
25
25
|
creativeWork: CreativeWorkRepo;
|
|
26
26
|
adminEvent: AdminEventRepo;
|
|
@@ -40,7 +40,7 @@ export declare function deleteProject(params: {
|
|
|
40
40
|
export declare function cleanUpDatabaseByProject(params: {
|
|
41
41
|
id: string;
|
|
42
42
|
}): (repos: {
|
|
43
|
-
|
|
43
|
+
adminAccountTitleCategory: AdminAccountTitleCategoryRepo;
|
|
44
44
|
assetTransaction: AssetTransactionRepo;
|
|
45
45
|
categoryCode: CategoryCodeRepo;
|
|
46
46
|
creativeWork: CreativeWorkRepo;
|
|
@@ -12,7 +12,7 @@ function deleteProject(params) {
|
|
|
12
12
|
function cleanUpDatabaseByProject(params) {
|
|
13
13
|
return async (repos) => {
|
|
14
14
|
// プロジェクトに所属する全データをリポジトリから削除する
|
|
15
|
-
await repos.
|
|
15
|
+
await repos.adminAccountTitleCategory.deleteAccountTitleCategoriesByProject({ project: { id: params.id } });
|
|
16
16
|
await repos.assetTransaction.deleteByProject({ project: { id: params.id } });
|
|
17
17
|
await repos.categoryCode.deleteCategoryCodesByProject({ project: { id: params.id } });
|
|
18
18
|
await repos.movieTicketType.deleteMovieTicketTypesByProject({ project: { id: params.id } });
|