@chevre/domain 28.0.0-alpha.9 → 28.0.0
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.d.ts +9 -5
- package/lib/chevre/emailMessageBuilder.js +12 -11
- 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/action/unknown2actionError.d.ts +1 -0
- package/lib/chevre/repo/action/unknown2actionError.js +29 -1
- package/lib/chevre/repo/adminAcceptedOffer.d.ts +36 -12
- package/lib/chevre/repo/adminAcceptedOffer.js +40 -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 -1
- package/lib/chevre/repo/adminEventSeries.d.ts +0 -22
- package/lib/chevre/repo/adminEventSeries.js +35 -31
- 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 +15 -15
- package/lib/chevre/repo/categoryCode.js +0 -21
- package/lib/chevre/repo/emailMessage.d.ts +3 -1
- package/lib/chevre/repo/emailMessage.js +20 -13
- package/lib/chevre/repo/eventSeries.d.ts +2 -2
- package/lib/chevre/repo/eventSeries.js +19 -12
- 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 +22 -26
- 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/message.d.ts +5 -1
- 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/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 +2 -2
- package/lib/chevre/repo/priceSpecification.d.ts +8 -8
- package/lib/chevre/repo/project.d.ts +14 -20
- package/lib/chevre/repo/project.js +28 -44
- 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/repository.d.ts +25 -15
- package/lib/chevre/repository.js +52 -30
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +2 -1
- 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/fixPaymentService.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/preStart/fixPaymentService.js +1 -15
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.js +9 -3
- package/lib/chevre/service/assetTransaction/pay/start.js +3 -3
- 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.js +1 -2
- package/lib/chevre/service/event/saveScreeningEvents.js +4 -4
- 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.d.ts +1 -4
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +9 -13
- 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/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 -18
- 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/onResourceDeleted.js +8 -8
- package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.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 +2 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +6 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +2 -15
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +6 -4
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +3 -7
- 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.d.ts +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +6 -11
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.d.ts +6 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +8 -9
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.d.ts +6 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +2 -7
- package/lib/chevre/service/transaction/returnOrder/potentialActions.d.ts +6 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +4 -3
- package/lib/chevre/service/transaction/returnOrder/preStart/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder.d.ts +0 -2
- package/lib/chevre/service/transaction/returnOrder.js +6 -6
- 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
|
@@ -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) {
|
|
@@ -98,7 +98,8 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
98
98
|
excludeAppliesToMovieTicket: params.excludeAppliesToMovieTicket,
|
|
99
99
|
priceSpecification: priceSpecificationCondition,
|
|
100
100
|
onlyValid: params.onlyValid === true,
|
|
101
|
-
useIncludeInDataCatalog: params.useIncludeInDataCatalog,
|
|
101
|
+
// useIncludeInDataCatalog: params.useIncludeInDataCatalog,
|
|
102
|
+
useIncludeInDataCatalog: true, // always true(2026-10-23~)
|
|
102
103
|
limit: params.limit,
|
|
103
104
|
page: params.page
|
|
104
105
|
});
|
|
@@ -115,23 +116,17 @@ function searchTicketOffersByItemOffered(params) {
|
|
|
115
116
|
function searchEventTicketOffersByEvent(params) {
|
|
116
117
|
return async (repos) => {
|
|
117
118
|
const event = params.event;
|
|
118
|
-
let soundFormatTypes = [];
|
|
119
119
|
let videoFormatTypes = [];
|
|
120
120
|
if (event.typeOf === factory_1.factory.eventType.ScreeningEvent) {
|
|
121
|
-
const superEvents = await repos.eventSeries.
|
|
121
|
+
const superEvents = await repos.eventSeries.findEventSeries({
|
|
122
122
|
limit: 1,
|
|
123
123
|
page: 1,
|
|
124
124
|
id: { $eq: event.superEvent.id }
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
// ['soundFormat', 'videoFormat', 'subEvent']
|
|
128
|
-
['soundFormat', 'subEvent']);
|
|
125
|
+
}, ['subEvent']);
|
|
129
126
|
const superEvent = superEvents.shift();
|
|
130
127
|
if (superEvent === undefined) {
|
|
131
128
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEventSeries);
|
|
132
129
|
}
|
|
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
130
|
videoFormatTypes = (Array.isArray(superEvent.subEvent?.videoFormat)) ? superEvent.subEvent.videoFormat : [];
|
|
136
131
|
}
|
|
137
132
|
const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
|
|
@@ -151,11 +146,11 @@ function searchEventTicketOffersByEvent(params) {
|
|
|
151
146
|
excludeAppliesToMovieTicket,
|
|
152
147
|
priceSpecification: params.priceSpecification,
|
|
153
148
|
withSortIndex: true,
|
|
154
|
-
useIncludeInDataCatalog: params.useIncludeInDataCatalog
|
|
149
|
+
// useIncludeInDataCatalog: params.useIncludeInDataCatalog
|
|
155
150
|
})(repos);
|
|
156
151
|
const { soundFormatChargeSpecs, videoFormatChargeSpecs, movieTicketTypeChargeSpecs } = await (0, searchPriceSpecs4event_1.searchPriceSpecs4event)({
|
|
157
152
|
project: { id: event.project.id },
|
|
158
|
-
soundFormatTypes,
|
|
153
|
+
soundFormatTypes: [], // 現時点で音響方式区分は存在しない(2026-10-05~),
|
|
159
154
|
videoFormatTypes,
|
|
160
155
|
availableOffers
|
|
161
156
|
})(repos);
|
|
@@ -198,6 +193,7 @@ function getUnacceptedPaymentMethodByEvent(params) {
|
|
|
198
193
|
}
|
|
199
194
|
/**
|
|
200
195
|
* 興行オファー検索
|
|
196
|
+
* 常に、単価オファーのincludeInDataCatalog属性を使用し、カタログIDでフィルターして検索する
|
|
201
197
|
*/
|
|
202
198
|
function searchEventTicketOffers(params) {
|
|
203
199
|
return async (repos) => {
|
|
@@ -230,7 +226,7 @@ function searchEventTicketOffers(params) {
|
|
|
230
226
|
page: params.page,
|
|
231
227
|
validateOfferRateLimit: params.validateOfferRateLimit,
|
|
232
228
|
onlyValid: params.onlyValid === true,
|
|
233
|
-
useIncludeInDataCatalog: params.useIncludeInDataCatalog,
|
|
229
|
+
// useIncludeInDataCatalog: params.useIncludeInDataCatalog,
|
|
234
230
|
includePotentialPriceComponent: params.includePotentialPriceComponent
|
|
235
231
|
})(repos);
|
|
236
232
|
offers = searchOffersResult.ticketOffers;
|
|
@@ -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();
|
|
@@ -117,9 +116,6 @@ function createInformTasks(params, setting) {
|
|
|
117
116
|
validFrom: eventSellerMakesOffer.validFrom,
|
|
118
117
|
validThrough: eventSellerMakesOffer.validThrough,
|
|
119
118
|
availableAtOrFrom: [eventSellerMakesOffer.availableAtOrFrom],
|
|
120
|
-
...(typeof eventSellerMakesOffer.identifier === 'string')
|
|
121
|
-
? { identifier: eventSellerMakesOffer.identifier }
|
|
122
|
-
: undefined // support notify identifier(2025-11-01~)
|
|
123
119
|
};
|
|
124
120
|
})
|
|
125
121
|
: [];
|
|
@@ -155,32 +151,29 @@ function createInformTasks(params, setting) {
|
|
|
155
151
|
}
|
|
156
152
|
return {
|
|
157
153
|
project, organizer, typeOf, name, doorTime, endDate,
|
|
158
|
-
eventStatus, location, startDate,
|
|
154
|
+
eventStatus, location, startDate, id, additionalProperty,
|
|
159
155
|
offers: eventOfferAsNotification,
|
|
156
|
+
superEvent: { id: superEvent.id, typeOf: superEvent.typeOf }, // minimize superEvent(2026-10-22~)
|
|
160
157
|
...(typeof identifier === 'string') ? { identifier } : undefined // support notify identifier(2025-11-01~)
|
|
161
158
|
};
|
|
162
159
|
});
|
|
163
160
|
}
|
|
164
161
|
else {
|
|
165
|
-
const screeningEventSeries4inform = await repos.eventSeries.
|
|
162
|
+
const screeningEventSeries4inform = await repos.eventSeries.findEventSeries({
|
|
166
163
|
id: { $in: params.ids }
|
|
167
164
|
// typeOf: params.typeOf
|
|
168
165
|
}, [
|
|
169
|
-
'project', 'organizer', 'typeOf', 'name', 'location', '
|
|
166
|
+
'project', 'organizer', 'typeOf', 'name', 'location', 'workPerformed', 'kanaName', 'eventStatus',
|
|
170
167
|
'endDate', 'startDate', 'additionalProperty', 'subtitleLanguage', 'dubLanguage',
|
|
171
168
|
'alternativeHeadline', 'description', 'duration', 'headline', 'subEvent'
|
|
172
169
|
] // inclusion(2024-07-30~)
|
|
173
170
|
);
|
|
174
171
|
// 最適化(2024-03-25~)
|
|
175
|
-
events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id,
|
|
172
|
+
events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id, workPerformed, kanaName, eventStatus, endDate, startDate, additionalProperty, subtitleLanguage, dubLanguage, alternativeHeadline, description, duration, headline, subEvent }) => {
|
|
176
173
|
return {
|
|
177
|
-
project, organizer, typeOf, name, location, id,
|
|
174
|
+
project, organizer, typeOf, name, location, id, workPerformed, kanaName, eventStatus,
|
|
178
175
|
endDate, startDate,
|
|
179
|
-
videoFormat: (Array.isArray(subEvent?.videoFormat))
|
|
180
|
-
? subEvent.videoFormat.map((codeValue) => ({ typeOf: codeValue, name: codeValue }))
|
|
181
|
-
: [],
|
|
182
|
-
// ...(endDate !== undefined) ? { endDate } : undefined,
|
|
183
|
-
// ...(startDate !== undefined) ? { startDate } : undefined,
|
|
176
|
+
videoFormat: (Array.isArray(subEvent?.videoFormat)) ? subEvent.videoFormat : [], // videoFormat通知をstring[]に変更(2026-10-07~)
|
|
184
177
|
...(Array.isArray(additionalProperty)) ? { additionalProperty } : undefined,
|
|
185
178
|
...(subtitleLanguage !== undefined) ? {} : undefined,
|
|
186
179
|
...(dubLanguage !== undefined) ? { dubLanguage } : undefined,
|
|
@@ -197,8 +190,6 @@ function createInformTasks(params, setting) {
|
|
|
197
190
|
informEvents?.forEach((informEvent) => {
|
|
198
191
|
const informUrl = String(informEvent.recipient?.url);
|
|
199
192
|
events4inform.forEach((event4inform) => {
|
|
200
|
-
// _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
|
|
201
|
-
delete event4inform._id; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
202
193
|
const informActionAttributes = {
|
|
203
194
|
object: event4inform,
|
|
204
195
|
recipient: {
|
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 } });
|
|
@@ -13,7 +13,7 @@ const note_1 = require("../../repo/note");
|
|
|
13
13
|
const offerCatalog_1 = require("../../repo/offerCatalog");
|
|
14
14
|
const offerCatalogItem_1 = require("../../repo/offerCatalogItem");
|
|
15
15
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
16
|
-
const
|
|
16
|
+
const pos_1 = require("../../repo/place/pos");
|
|
17
17
|
const movieTheater_1 = require("../../repo/place/movieTheater");
|
|
18
18
|
const screeningRoom_1 = require("../../repo/place/screeningRoom");
|
|
19
19
|
const product_1 = require("../../repo/product");
|
|
@@ -26,7 +26,6 @@ const deleteResourcesByOfferCatalog_1 = require("./onResourceDeleted/deleteResou
|
|
|
26
26
|
const deleteResourcesByProduct_1 = require("./onResourceDeleted/deleteResourcesByProduct");
|
|
27
27
|
const deleteResourcesByRoom_1 = require("./onResourceDeleted/deleteResourcesByRoom");
|
|
28
28
|
const deleteResourcesBySeller_1 = require("./onResourceDeleted/deleteResourcesBySeller");
|
|
29
|
-
const onHasPOSUpdated_1 = require("./onResourceUpdated/onHasPOSUpdated");
|
|
30
29
|
const syncOfferCatalog_1 = require("./onResourceUpdated/syncOfferCatalog");
|
|
31
30
|
/**
|
|
32
31
|
* タスク実行関数
|
|
@@ -42,7 +41,7 @@ function call(params) {
|
|
|
42
41
|
adminEvent: new adminEvent_1.AdminEventRepo(connection),
|
|
43
42
|
eventOffer: new eventOffer_1.EventOfferRepo(connection),
|
|
44
43
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
45
|
-
|
|
44
|
+
pos: new pos_1.POSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
|
|
46
45
|
member: new member_1.MemberRepo(connection),
|
|
47
46
|
movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
|
|
48
47
|
note: new note_1.NoteRepo(connection),
|
|
@@ -68,11 +67,12 @@ function onResourceDeleted(params) {
|
|
|
68
67
|
if (useInform) {
|
|
69
68
|
switch (resourceType) {
|
|
70
69
|
case 'POS':
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
// POS削除時通知は廃止(2026-09-26~)
|
|
71
|
+
// await createInformHasPOSTasks({
|
|
72
|
+
// project: { id: params.project.id },
|
|
73
|
+
// ids: [params.operator.id],
|
|
74
|
+
// typeOf: factory.placeType.MovieTheater
|
|
75
|
+
// })(repos);
|
|
76
76
|
break;
|
|
77
77
|
default:
|
|
78
78
|
// no op
|
|
@@ -3,19 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createInformOfferTasks = createInformOfferTasks;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
5
|
function createInformOfferTasks(params, setting) {
|
|
6
|
-
return async (repos
|
|
7
|
-
// settings: Settings
|
|
8
|
-
) => {
|
|
6
|
+
return async (repos) => {
|
|
9
7
|
if (params.ids.length === 0) {
|
|
10
8
|
return;
|
|
11
9
|
}
|
|
12
|
-
// const informResources = settings.onResourceUpdated.informResource;
|
|
13
10
|
const informResources = setting?.onResourceUpdated?.informResource;
|
|
14
11
|
const offers = await repos.offer.findUnitPriceOffers({
|
|
15
12
|
id: { $in: params.ids }
|
|
16
|
-
}, {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
}, {
|
|
14
|
+
typeOf: 1, name: 1,
|
|
15
|
+
// priceSpecification: 1,
|
|
16
|
+
additionalProperty: 1, identifier: 1, project: 1, description: 1
|
|
17
|
+
});
|
|
18
|
+
const offers4inform = offers.map(({ id, typeOf, name, description, additionalProperty, identifier, project }) => {
|
|
19
|
+
return { id, typeOf, name, description, additionalProperty, identifier, project };
|
|
19
20
|
});
|
|
20
21
|
if (offers4inform.length > 0) {
|
|
21
22
|
const taskRunsAt = new Date();
|
|
@@ -28,7 +29,6 @@ function createInformOfferTasks(params, setting) {
|
|
|
28
29
|
recipient: {
|
|
29
30
|
name: String(informResource.recipient?.name),
|
|
30
31
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
31
|
-
// url: informUrl // discontinue(2025-02-13~)
|
|
32
32
|
},
|
|
33
33
|
target: {
|
|
34
34
|
httpMethod: 'POST',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import type {
|
|
2
|
+
import type { POSRepo } from '../../../repo/place/pos';
|
|
3
3
|
import type { MovieTheaterRepo } from '../../../repo/place/movieTheater';
|
|
4
4
|
import type { SettingRepo } from '../../../repo/setting';
|
|
5
5
|
import type { TaskRepo } from '../../../repo/task';
|
|
@@ -10,10 +10,14 @@ export declare function createInformHasPOSTasks(params: {
|
|
|
10
10
|
/**
|
|
11
11
|
* 施設ID
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
id: string;
|
|
14
14
|
typeOf: factory.placeType.MovieTheater;
|
|
15
|
+
/**
|
|
16
|
+
* POSコード
|
|
17
|
+
*/
|
|
18
|
+
branchCode: string;
|
|
15
19
|
}): (repos: {
|
|
16
|
-
|
|
20
|
+
pos: POSRepo;
|
|
17
21
|
movieTheater: MovieTheaterRepo;
|
|
18
22
|
setting: SettingRepo;
|
|
19
23
|
task: TaskRepo;
|