@chevre/domain 28.0.0-alpha.4 → 28.0.0-alpha.41
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/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/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/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 +13 -19
- package/lib/chevre/repo/project.js +27 -43
- 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/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/preStart.js +1 -2
- 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
|
@@ -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 } });
|
|
@@ -39,6 +39,7 @@ const update_1 = require("../../repo/action/update");
|
|
|
39
39
|
const categoryCode_1 = require("../../repo/categoryCode");
|
|
40
40
|
const creativeWork_1 = require("../../repo/creativeWork");
|
|
41
41
|
const adminEvent_1 = require("../../repo/adminEvent");
|
|
42
|
+
const adminEventSeries_1 = require("../../repo/adminEventSeries");
|
|
42
43
|
const event_1 = require("../../repo/event");
|
|
43
44
|
const eventSeries_1 = require("../../repo/eventSeries");
|
|
44
45
|
const movieTheater_1 = require("../../repo/place/movieTheater");
|
|
@@ -78,6 +79,7 @@ function call(params) {
|
|
|
78
79
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
79
80
|
creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
|
|
80
81
|
adminEvent: new adminEvent_1.AdminEventRepo(connection),
|
|
82
|
+
adminEventSeries: new adminEventSeries_1.AdminEventSeriesRepo(connection),
|
|
81
83
|
event: new event_1.EventRepo(connection),
|
|
82
84
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
83
85
|
movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
|
|
@@ -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
|
|
@@ -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;
|
|
@@ -3,20 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createInformHasPOSTasks = createInformHasPOSTasks;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
5
|
function createInformHasPOSTasks(params) {
|
|
6
|
-
return async (repos
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
throw new factory_1.factory.errors.Argument('id', 'id.length must be 1');
|
|
11
|
-
}
|
|
6
|
+
return async (repos) => {
|
|
7
|
+
// if (params.ids.length !== 1) {
|
|
8
|
+
// throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
9
|
+
// }
|
|
12
10
|
const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['onResourceUpdated']);
|
|
13
|
-
// const informResources = settings.onResourceUpdated.informResource;
|
|
14
11
|
const informResources = setting?.onResourceUpdated?.informResource;
|
|
15
12
|
const movieTheaters = await repos.movieTheater.projectFields({
|
|
16
13
|
limit: 1,
|
|
17
14
|
page: 1,
|
|
18
15
|
project: { id: { $eq: params.project.id } },
|
|
19
|
-
id: { $eq: params.
|
|
16
|
+
id: { $eq: params.id }
|
|
20
17
|
}, ['id']
|
|
21
18
|
// []
|
|
22
19
|
);
|
|
@@ -25,50 +22,54 @@ function createInformHasPOSTasks(params) {
|
|
|
25
22
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.placeType.MovieTheater);
|
|
26
23
|
}
|
|
27
24
|
// 施設のhasPOSを全て連携する
|
|
28
|
-
repos.
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
25
|
+
repos.pos.operator.id = movieTheater.id;
|
|
26
|
+
const informingPOS = (await repos.pos.findPOS({
|
|
27
|
+
limit: 1,
|
|
28
|
+
page: 1,
|
|
29
|
+
projectId: params.project.id,
|
|
30
|
+
branchCode: { $eq: params.branchCode }
|
|
31
|
+
})).at(0); // pos.idを除外(2026-09-18~)
|
|
32
|
+
if (informingPOS !== undefined) {
|
|
33
|
+
const movieTheaters4inform = [{
|
|
34
|
+
hasPOS: [informingPOS],
|
|
35
|
+
id: movieTheater.id,
|
|
36
|
+
typeOf: factory_1.factory.placeType.MovieTheater
|
|
37
|
+
}];
|
|
38
|
+
if (movieTheaters4inform.length > 0) {
|
|
39
|
+
const taskRunsAt = new Date();
|
|
40
|
+
const informTasks = [];
|
|
41
|
+
informResources?.forEach((informResource) => {
|
|
42
|
+
const informUrl = String(informResource.recipient?.url);
|
|
43
|
+
movieTheaters4inform.forEach((movieTheater4inform) => {
|
|
44
|
+
const informActionAttributes = {
|
|
45
|
+
object: movieTheater4inform,
|
|
46
|
+
recipient: {
|
|
47
|
+
name: String(informResource.recipient?.name),
|
|
48
|
+
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
49
|
+
// url: informUrl // discontinue(2025-02-13~)
|
|
50
|
+
},
|
|
51
|
+
target: {
|
|
52
|
+
httpMethod: 'POST',
|
|
53
|
+
encodingType: factory_1.factory.encodingFormat.Application.json,
|
|
54
|
+
typeOf: 'EntryPoint',
|
|
55
|
+
urlTemplate: informUrl
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
informTasks.push({
|
|
59
|
+
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
60
|
+
name: factory_1.factory.taskName.TriggerWebhook,
|
|
61
|
+
status: factory_1.factory.taskStatus.Ready,
|
|
62
|
+
runsAt: taskRunsAt,
|
|
63
|
+
remainingNumberOfTries: 10,
|
|
64
|
+
numberOfTried: 0,
|
|
65
|
+
executionResults: [],
|
|
66
|
+
data: informActionAttributes
|
|
67
|
+
});
|
|
67
68
|
});
|
|
68
69
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
if (informTasks.length > 0) {
|
|
71
|
+
await repos.task.saveMany(informTasks);
|
|
72
|
+
}
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
};
|
|
@@ -13,7 +13,7 @@ function createInformOfferCatalogTasks(params, setting) {
|
|
|
13
13
|
}
|
|
14
14
|
let offerCatalogs;
|
|
15
15
|
if (params.isOfferCatalogItem) {
|
|
16
|
-
offerCatalogs = await repos.offerCatalogItem.
|
|
16
|
+
offerCatalogs = await repos.offerCatalogItem.findOfferCatalogItems({ id: { $in: params.ids } }, ['identifier', 'name', 'numberOfItems', 'project', 'typeOf']);
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
19
|
offerCatalogs = await repos.offerCatalog.projectFields({ id: { $in: params.ids } }, ['identifier', 'name', 'numberOfItems', 'project', 'typeOf']);
|
|
@@ -25,7 +25,7 @@ function syncOfferCatalog(params) {
|
|
|
25
25
|
for (const offerCatalogId of params.ids) {
|
|
26
26
|
let offerCatalogs;
|
|
27
27
|
if (params.isOfferCatalogItem) {
|
|
28
|
-
offerCatalogs = await repos.offerCatalogItem.
|
|
28
|
+
offerCatalogs = await repos.offerCatalogItem.findOfferCatalogItems({ id: { $in: [offerCatalogId] } }, ['id', 'itemListElementTypeOf']);
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
offerCatalogs = await repos.offerCatalog.projectFields({ id: { $in: [offerCatalogId] } }, ['id', 'itemListElementTypeOf']);
|