@chevre/domain 28.0.0-alpha.3 → 28.0.0-alpha.30
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/eventEmitter/transaction.d.ts +2 -2
- package/lib/chevre/eventEmitter/transaction.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/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/adminTransaction.js +0 -98
- package/lib/chevre/repo/aggregateEvent.js +0 -1
- package/lib/chevre/repo/aggregateTransaction.d.ts +0 -1
- package/lib/chevre/repo/aggregateTransaction.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/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/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/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 +81 -70
- 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/orderInTransaction.js +0 -6
- 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/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 -8
- package/lib/chevre/repo/transaction/placeOrder.js +31 -112
- package/lib/chevre/repo/transaction.js +0 -1
- package/lib/chevre/repository.d.ts +15 -10
- package/lib/chevre/repository.js +30 -19
- 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/system.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/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/authorize.js +1 -4
- package/lib/chevre/service/offer/event/issueEventOfferTicket.js +1 -12
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +3 -9
- package/lib/chevre/service/offer/event/searchOfferAppliesToMovieTicket.js +2 -8
- package/lib/chevre/service/offer/event/searchOffersByIds.js +3 -9
- package/lib/chevre/service/offer/event/voidTransaction.js +2 -5
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +1 -4
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +2 -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/eventServiceByCOA/authorize.js +1 -4
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -4
- 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/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/any/authorize.js +1 -1
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +1 -4
- package/lib/chevre/service/payment/any/processVoidPayTransaction.js +2 -2
- package/lib/chevre/service/payment/any/publishPaymentUrl.js +1 -1
- 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/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.js +5 -25
- package/lib/chevre/service/task/syncResourcesFromCOA.js +5 -3
- 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 +1 -7
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +1 -4
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +1 -4
- 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/service/delivery/factory.d.ts +0 -16
- package/lib/chevre/service/delivery/factory.js +0 -124
|
@@ -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) {
|
|
@@ -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
|
};
|
|
@@ -15,7 +15,7 @@ const offerCatalog_1 = require("../../repo/offerCatalog");
|
|
|
15
15
|
const offerCatalogItem_1 = require("../../repo/offerCatalogItem");
|
|
16
16
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
17
17
|
const entranceGate_1 = require("../../repo/place/entranceGate");
|
|
18
|
-
const
|
|
18
|
+
const pos_1 = require("../../repo/place/pos");
|
|
19
19
|
const movieTheater_1 = require("../../repo/place/movieTheater");
|
|
20
20
|
const screeningRoom_1 = require("../../repo/place/screeningRoom");
|
|
21
21
|
const product_1 = require("../../repo/product");
|
|
@@ -39,7 +39,7 @@ function call(params) {
|
|
|
39
39
|
entranceGate: new entranceGate_1.EntranceGateRepo(connection, { id: '' }), // 先の処理で明示的に指定される
|
|
40
40
|
event: new event_1.EventRepo(connection),
|
|
41
41
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
42
|
-
|
|
42
|
+
pos: new pos_1.POSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
|
|
43
43
|
member: new member_1.MemberRepo(connection),
|
|
44
44
|
movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
|
|
45
45
|
note: new note_1.NoteRepo(connection),
|
|
@@ -123,8 +123,9 @@ function onResourceUpdated(params) {
|
|
|
123
123
|
case 'POS':
|
|
124
124
|
await (0, onHasPOSUpdated_1.createInformHasPOSTasks)({
|
|
125
125
|
project: { id: params.project.id },
|
|
126
|
-
|
|
127
|
-
typeOf: factory_1.factory.placeType.MovieTheater
|
|
126
|
+
id: params.operator.id,
|
|
127
|
+
typeOf: factory_1.factory.placeType.MovieTheater,
|
|
128
|
+
branchCode: params.branchCode
|
|
128
129
|
})(repos);
|
|
129
130
|
break;
|
|
130
131
|
case factory_1.factory.offerType.AggregateOffer:
|
|
@@ -401,32 +402,11 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
401
402
|
]
|
|
402
403
|
// []
|
|
403
404
|
);
|
|
404
|
-
// const movieTheater = movieTheaters.shift();
|
|
405
|
-
// if (movieTheater === undefined) {
|
|
406
|
-
// throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
407
|
-
// }
|
|
408
|
-
// // ルームを検索
|
|
409
|
-
// const screeningRooms = await repos.screeningRoom.findRooms(
|
|
410
|
-
// {
|
|
411
|
-
// containedInPlace: { id: { $eq: movieTheater.id } }
|
|
412
|
-
// }
|
|
413
|
-
// );
|
|
414
405
|
// 入場ゲートを廃止(2026-01-17~)
|
|
415
406
|
const movieTheaters4inform = movieTheaters.map((movieTheater) => {
|
|
416
407
|
const { hasEntranceGate, ...movieTheaterWithoutEntranceGates } = movieTheater; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
417
408
|
return {
|
|
418
409
|
...movieTheaterWithoutEntranceGates
|
|
419
|
-
// ...movieTheater
|
|
420
|
-
// migrate to IRoomAsNotification(2026-01-16~)
|
|
421
|
-
// containsPlace: screeningRooms.map((room) => {
|
|
422
|
-
// return {
|
|
423
|
-
// branchCode: room.branchCode,
|
|
424
|
-
// name: room.name,
|
|
425
|
-
// typeOf: factory.placeType.ScreeningRoom,
|
|
426
|
-
// additionalProperty: room.additionalProperty,
|
|
427
|
-
// address: room.address
|
|
428
|
-
// };
|
|
429
|
-
// })
|
|
430
410
|
};
|
|
431
411
|
});
|
|
432
412
|
if (movieTheaters4inform.length > 0) {
|
|
@@ -12,6 +12,7 @@ const categoryCode_1 = require("../../repo/categoryCode");
|
|
|
12
12
|
const creativeWork_1 = require("../../repo/creativeWork");
|
|
13
13
|
const credentials_1 = require("../../repo/credentials");
|
|
14
14
|
const adminEvent_1 = require("../../repo/adminEvent");
|
|
15
|
+
const adminEventSeries_1 = require("../../repo/adminEventSeries");
|
|
15
16
|
const eventSeries_1 = require("../../repo/eventSeries");
|
|
16
17
|
const movieTheater_1 = require("../../repo/place/movieTheater");
|
|
17
18
|
const screeningRoom_1 = require("../../repo/place/screeningRoom");
|
|
@@ -71,7 +72,7 @@ function call(params) {
|
|
|
71
72
|
},
|
|
72
73
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
73
74
|
creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
|
|
74
|
-
|
|
75
|
+
adminEventSeries: new adminEventSeries_1.AdminEventSeriesRepo(connection),
|
|
75
76
|
movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
|
|
76
77
|
masterService
|
|
77
78
|
});
|
|
@@ -88,6 +89,7 @@ function call(params) {
|
|
|
88
89
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
89
90
|
creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
|
|
90
91
|
adminEvent: new adminEvent_1.AdminEventRepo(connection),
|
|
92
|
+
adminEventSeries: new adminEventSeries_1.AdminEventSeriesRepo(connection),
|
|
91
93
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
92
94
|
movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
|
|
93
95
|
screeningRoom: new screeningRoom_1.ScreeningRoomRepo(connection),
|
|
@@ -239,7 +241,7 @@ function syncEvents(params) {
|
|
|
239
241
|
titleCode,
|
|
240
242
|
titleBranchNum
|
|
241
243
|
});
|
|
242
|
-
const eventSeries = (await repos.eventSeries.
|
|
244
|
+
const eventSeries = (await repos.eventSeries.findEventSeries({
|
|
243
245
|
id: { $eq: eventSeriesId },
|
|
244
246
|
project: { id: { $eq: params.project.id } }
|
|
245
247
|
}, [
|
|
@@ -247,7 +249,7 @@ function syncEvents(params) {
|
|
|
247
249
|
'name', 'kanaName', 'alternativeHeadline', 'location',
|
|
248
250
|
'organizer',
|
|
249
251
|
// 'videoFormat', // 参照廃止(2026-02-10~)
|
|
250
|
-
'
|
|
252
|
+
'workPerformed',
|
|
251
253
|
'duration', 'endDate', 'startDate', 'coaInfo',
|
|
252
254
|
'offers', 'additionalProperty'
|
|
253
255
|
])).shift();
|
package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OfferRepo } from '../../../../repo/offer/unitPriceInCatalog';
|
|
2
2
|
import { factory } from '../../../../factory';
|
|
3
3
|
export type IAuthorizeEventServiceOffer = factory.action.authorize.offer.eventService.IAction;
|
|
4
|
-
type IOrderAcceptedOffer = Pick<factory.
|
|
4
|
+
type IOrderAcceptedOffer = Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'offeredThrough' | 'serialNumber' | 'priceSpecification' | 'id'>;
|
|
5
5
|
interface IAcceptedOfferInResult extends Pick<factory.product.ITicketOffer, 'acceptedPaymentMethod' | 'id' | 'typeOf'> {
|
|
6
6
|
typeOf: factory.offerType.Offer;
|
|
7
7
|
id: string;
|
|
@@ -4,5 +4,5 @@ declare function validateInvoiceReferencesOrder(authorizePaymentActions: IAuthor
|
|
|
4
4
|
/**
|
|
5
5
|
* 受け入れられた興行オファー
|
|
6
6
|
*/
|
|
7
|
-
eventReservationAcceptedOffers: Pick<factory.
|
|
7
|
+
eventReservationAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered'>[]): void;
|
|
8
8
|
export { validateInvoiceReferencesOrder };
|
package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts
CHANGED
|
@@ -18,4 +18,4 @@ authorizedMovieTickets: IMovieTicket4validate[],
|
|
|
18
18
|
/**
|
|
19
19
|
* 受け入れられた興行オファー
|
|
20
20
|
*/
|
|
21
|
-
eventReservationAcceptedOffers: Pick<factory.
|
|
21
|
+
eventReservationAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[]): void;
|
|
@@ -8,7 +8,7 @@ export { IAcceptPayAction, IAuthorizeEventServiceOffer, IAuthorizePaymentAction,
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function validateTransaction(transaction: {
|
|
10
10
|
id: string;
|
|
11
|
-
}, acceptPayActions: IAcceptPayAction[], authorizePaymentActions: IAuthorizePaymentAction[], authorizeEventServiceOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[], eventReservationAcceptedOffers: Pick<factory.
|
|
11
|
+
}, acceptPayActions: IAcceptPayAction[], authorizePaymentActions: IAuthorizePaymentAction[], authorizeEventServiceOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[], eventReservationAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[], payTransactions: IPayTransaction[], customer: factory.order.ICustomer, options: {
|
|
12
12
|
paymentMethodIdByTransaction?: string;
|
|
13
13
|
}): void;
|
|
14
14
|
/**
|
|
@@ -18,7 +18,7 @@ export declare function validateAcceptedOffers(params: {
|
|
|
18
18
|
result: {
|
|
19
19
|
order: PlaceOrderFactory.IResultOrderParams;
|
|
20
20
|
};
|
|
21
|
-
acceptedOffers: (Pick<factory.
|
|
21
|
+
acceptedOffers: (Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'offeredThrough' | 'serialNumber'>)[];
|
|
22
22
|
}): void;
|
|
23
23
|
export declare function validateOrderedItem(params: {
|
|
24
24
|
order: Pick<factory.order.IOrder, 'orderedItem'>;
|
|
@@ -63,7 +63,7 @@ function confirm(params, options) {
|
|
|
63
63
|
// status: { $in: [factory.transactionStatusType.Confirmed, factory.transactionStatusType.InProgress] },
|
|
64
64
|
object: { orderDate: params.result.order.orderDate }
|
|
65
65
|
})(repos);
|
|
66
|
-
const transaction = await repos.placeOrder.findPlaceOrderById({
|
|
66
|
+
const transaction = await repos.placeOrder.findPlaceOrderById({ id: params.id }, ['typeOf', 'project', 'status', 'agent', 'seller', 'object', 'result']);
|
|
67
67
|
// 注文ドキュメントから注文番号を参照(取引開始時に発行済の前提)(2026-06-26~)
|
|
68
68
|
const orderNumber = await repos.orderInTransaction.findOrderNumberByIdentifier({
|
|
69
69
|
identifier: params.id,
|
|
@@ -169,7 +169,6 @@ function confirm(params, options) {
|
|
|
169
169
|
// ステータス変更
|
|
170
170
|
try {
|
|
171
171
|
await repos.placeOrder.confirmPlaceOrder({
|
|
172
|
-
typeOf: transaction.typeOf,
|
|
173
172
|
id: transaction.id,
|
|
174
173
|
object: {
|
|
175
174
|
orderDate: params.result.order.orderDate,
|
|
@@ -298,17 +297,12 @@ function createReservationIdsResult(order, acceptedOffers) {
|
|
|
298
297
|
function createResult(params, options) {
|
|
299
298
|
const transaction = params.transaction;
|
|
300
299
|
const eventReservationAcceptedOffers = [];
|
|
301
|
-
// const productAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IPermit>[] = [];
|
|
302
|
-
// const moneyTransferAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IMoneyTransfer>[] = [];
|
|
303
300
|
params.acceptedOffers.forEach((acceptedOffer) => {
|
|
304
301
|
const itemOfferedTypeOf = acceptedOffer.itemOffered.typeOf;
|
|
305
302
|
switch (itemOfferedTypeOf) {
|
|
306
303
|
case factory_1.factory.reservationType.EventReservation:
|
|
307
304
|
eventReservationAcceptedOffers.push((acceptedOffer));
|
|
308
305
|
break;
|
|
309
|
-
// case factory.permit.PermitType.Permit:
|
|
310
|
-
// productAcceptedOffers.push((acceptedOffer as factory.order.IAcceptedOffer<factory.order.IPermit>));
|
|
311
|
-
// break;
|
|
312
306
|
default:
|
|
313
307
|
throw new factory_1.factory.errors.NotImplemented(`${itemOfferedTypeOf} not implemented`);
|
|
314
308
|
}
|
|
@@ -12,10 +12,7 @@ const factory_2 = require("./exportTasks/factory");
|
|
|
12
12
|
*/
|
|
13
13
|
function exportTasksById(params) {
|
|
14
14
|
return async (repos) => {
|
|
15
|
-
const transaction = await repos.placeOrder.findPlaceOrderById({
|
|
16
|
-
typeOf: factory_1.factory.transactionType.PlaceOrder,
|
|
17
|
-
id: params.id
|
|
18
|
-
}, ['endDate', 'object', 'project', 'seller', 'startDate', 'status', 'typeOf']);
|
|
15
|
+
const transaction = await repos.placeOrder.findPlaceOrderById({ id: params.id }, ['endDate', 'object', 'project', 'seller', 'startDate', 'status', 'typeOf']);
|
|
19
16
|
// タスク実行日時バッファの指定があれば調整
|
|
20
17
|
let taskRunsAt = new Date();
|
|
21
18
|
if (typeof params.runsTasksAfterInSeconds === 'number') {
|
|
@@ -8,10 +8,7 @@ const fixCustomer_1 = require("./updateAgent/fixCustomer");
|
|
|
8
8
|
*/
|
|
9
9
|
function updateAgent(params) {
|
|
10
10
|
return async (repos) => {
|
|
11
|
-
const transaction = await repos.placeOrder.findPlaceOrderInProgressById({
|
|
12
|
-
typeOf: factory_1.factory.transactionType.PlaceOrder,
|
|
13
|
-
id: params.id
|
|
14
|
-
}, ['agent', 'object', 'typeOf', 'project']);
|
|
11
|
+
const transaction = await repos.placeOrder.findPlaceOrderInProgressById({ id: params.id }, ['agent', 'object', 'typeOf', 'project']);
|
|
15
12
|
if (transaction.agent.id !== params.agent.id) {
|
|
16
13
|
throw new factory_1.factory.errors.Forbidden('Transaction not yours');
|
|
17
14
|
}
|
|
@@ -15,6 +15,6 @@ type ICustomSellerReturnPolicy = Pick<factory.sellerReturnPolicy.ISellerReturnPo
|
|
|
15
15
|
applicablePaymentMethod?: never;
|
|
16
16
|
merchantReturnDays?: never;
|
|
17
17
|
};
|
|
18
|
-
type IFixedAcceptedOffer = Pick<factory.
|
|
18
|
+
type IFixedAcceptedOffer = Pick<factory.acceptedOffer.IAcceptedOffer, 'id' | 'priceSpecification' | 'itemOffered'>;
|
|
19
19
|
type IFixedOrder = Pick<factory.order.IOrder, 'confirmationNumber' | 'dateReturned' | 'orderDate' | 'orderNumber' | 'orderStatus' | 'paymentMethods' | 'price' | 'project' | 'seller' | 'typeOf'>;
|
|
20
20
|
export { IAvailableSellerReturnPolicy, ICustomSellerReturnPolicy, IFixedAcceptedOffer, IFixedOrder };
|
|
@@ -36,8 +36,7 @@ function preStart(params) {
|
|
|
36
36
|
let events = [];
|
|
37
37
|
if (eventIds.length > 0) {
|
|
38
38
|
events = await repos.event.projectEventFields({
|
|
39
|
-
id: { $in: eventIds }
|
|
40
|
-
typeOf: factory_1.factory.eventType.ScreeningEvent
|
|
39
|
+
id: { $in: eventIds }
|
|
41
40
|
}, ['startDate']);
|
|
42
41
|
}
|
|
43
42
|
let returnPolicies = [];
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.1090.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.1090.0",
|
|
14
|
-
"@chevre/factory": "11.
|
|
14
|
+
"@chevre/factory": "11.1.0-alpha.6",
|
|
15
15
|
"@motionpicture/coa-service": "10.0.0",
|
|
16
16
|
"@motionpicture/gmo-service": "6.1.0-alpha.0",
|
|
17
17
|
"@sendgrid/client": "8.1.4",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"postversion": "git push origin --tags",
|
|
89
89
|
"prepublishOnly": "npm run clean && npm run build"
|
|
90
90
|
},
|
|
91
|
-
"version": "28.0.0-alpha.
|
|
91
|
+
"version": "28.0.0-alpha.30"
|
|
92
92
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { factory } from '../../factory';
|
|
2
|
-
export type IOwnershipInfo = factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>;
|
|
3
|
-
/**
|
|
4
|
-
* 注文から所有権を作成する
|
|
5
|
-
*/
|
|
6
|
-
export declare function createOwnershipInfosFromOrder(params: {
|
|
7
|
-
order: Pick<factory.order.IOrder, 'orderDate' | 'project' | 'customer' | 'orderNumber' | 'seller'> & {
|
|
8
|
-
acceptedOffers: (Omit<factory.order.IAcceptedOffer, 'priceSpecification' | 'name'> & {
|
|
9
|
-
/**
|
|
10
|
-
* COA以外では注文ドキュメントにpriceSpecificationが存在しないのでIFを補完
|
|
11
|
-
*/
|
|
12
|
-
priceSpecification?: factory.order.ITicketPriceSpecification;
|
|
13
|
-
})[];
|
|
14
|
-
};
|
|
15
|
-
offerIndexBase: number;
|
|
16
|
-
}): IOwnershipInfo[];
|