@chevre/domain 23.2.0-alpha.30 → 23.2.0-alpha.31
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/repo/eventOffer.d.ts +8 -0
- package/lib/chevre/repo/eventOffer.js +11 -0
- package/lib/chevre/service/task/onResourceDeleted.js +2 -0
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +2 -0
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +6 -0
- package/lib/chevre/service/task/onResourceUpdated.js +20 -14
- package/package.json +2 -2
|
@@ -48,5 +48,13 @@ export declare class EventOfferRepo {
|
|
|
48
48
|
id: string;
|
|
49
49
|
};
|
|
50
50
|
}): Promise<DeleteResult>;
|
|
51
|
+
/**
|
|
52
|
+
* 有効期間を過ぎたイベントオファーを削除する
|
|
53
|
+
*/
|
|
54
|
+
deleteEventOffersExpired(params: {
|
|
55
|
+
validThrough: {
|
|
56
|
+
$lte: Date;
|
|
57
|
+
};
|
|
58
|
+
}): Promise<DeleteResult>;
|
|
51
59
|
}
|
|
52
60
|
export {};
|
|
@@ -187,5 +187,16 @@ class EventOfferRepo {
|
|
|
187
187
|
.exec();
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* 有効期間を過ぎたイベントオファーを削除する
|
|
192
|
+
*/
|
|
193
|
+
deleteEventOffersExpired(params) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
return this.eventOfferModel.deleteMany({
|
|
196
|
+
validThrough: { $lte: params.validThrough.$lte }
|
|
197
|
+
})
|
|
198
|
+
.exec();
|
|
199
|
+
});
|
|
200
|
+
}
|
|
190
201
|
}
|
|
191
202
|
exports.EventOfferRepo = EventOfferRepo;
|
|
@@ -14,6 +14,7 @@ const action_1 = require("../../repo/action");
|
|
|
14
14
|
const aggregateOffer_1 = require("../../repo/aggregateOffer");
|
|
15
15
|
const categoryCode_1 = require("../../repo/categoryCode");
|
|
16
16
|
const event_1 = require("../../repo/event");
|
|
17
|
+
const eventOffer_1 = require("../../repo/eventOffer");
|
|
17
18
|
const eventSeries_1 = require("../../repo/eventSeries");
|
|
18
19
|
const member_1 = require("../../repo/member");
|
|
19
20
|
const note_1 = require("../../repo/note");
|
|
@@ -39,6 +40,7 @@ function call(params) {
|
|
|
39
40
|
aggregateOffer: new aggregateOffer_1.AggregateOfferRepo(connection),
|
|
40
41
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
41
42
|
event: new event_1.EventRepo(connection),
|
|
43
|
+
eventOffer: new eventOffer_1.EventOfferRepo(connection),
|
|
42
44
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
43
45
|
hasPOS: new hasPOS_1.HasPOSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
|
|
44
46
|
member: new member_1.MemberRepo(connection),
|
|
@@ -3,6 +3,7 @@ import type { ActionRepo } from '../../../repo/action';
|
|
|
3
3
|
import type { AggregateOfferRepo } from '../../../repo/aggregateOffer';
|
|
4
4
|
import type { CategoryCodeRepo } from '../../../repo/categoryCode';
|
|
5
5
|
import type { EventRepo } from '../../../repo/event';
|
|
6
|
+
import type { EventOfferRepo } from '../../../repo/eventOffer';
|
|
6
7
|
import type { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
7
8
|
import type { MemberRepo } from '../../../repo/member';
|
|
8
9
|
import type { NoteRepo } from '../../../repo/note';
|
|
@@ -22,6 +23,7 @@ export declare function onResourceDeleted(params: factory.task.onResourceDeleted
|
|
|
22
23
|
aggregateOffer: AggregateOfferRepo;
|
|
23
24
|
categoryCode: CategoryCodeRepo;
|
|
24
25
|
event: EventRepo;
|
|
26
|
+
eventOffer: EventOfferRepo;
|
|
25
27
|
eventSeries: EventSeriesRepo;
|
|
26
28
|
hasPOS: HasPOSRepo;
|
|
27
29
|
member: MemberRepo;
|
|
@@ -283,8 +283,14 @@ function deleteResourcesBySeller(params) {
|
|
|
283
283
|
project: { id: params.project.id },
|
|
284
284
|
offeredBy: { id: sellerId }
|
|
285
285
|
});
|
|
286
|
+
// イベントオファー削除(2026-01-16~)
|
|
287
|
+
const deleteEventOfferResult = yield repos.eventOffer.deleteEventOffersBySeller({
|
|
288
|
+
project: { id: params.project.id },
|
|
289
|
+
seller: { id: sellerId }
|
|
290
|
+
});
|
|
286
291
|
deleteResult = {
|
|
287
292
|
deleteMemberResult, deletePaymentServiceProviderResult,
|
|
293
|
+
deleteEventOfferResult,
|
|
288
294
|
deleteProductOfferResult,
|
|
289
295
|
deleteEventResult, deleteEventSeriesResult, deleteScreeningRoomResult, deleteMovieTheaterResult
|
|
290
296
|
};
|
|
@@ -438,19 +438,24 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
438
438
|
if (movieTheater === undefined) {
|
|
439
439
|
throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
440
440
|
}
|
|
441
|
-
// ルームを検索
|
|
442
|
-
const screeningRooms =
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
441
|
+
// // ルームを検索
|
|
442
|
+
// const screeningRooms = await repos.screeningRoom.findRooms(
|
|
443
|
+
// {
|
|
444
|
+
// containedInPlace: { id: { $eq: movieTheater.id } }
|
|
445
|
+
// }
|
|
446
|
+
// );
|
|
447
|
+
const movieTheaters4inform = [Object.assign({}, movieTheater
|
|
448
|
+
// migrate to IRoomAsNotification(2026-01-16~)
|
|
449
|
+
// containsPlace: screeningRooms.map((room) => {
|
|
450
|
+
// return {
|
|
451
|
+
// branchCode: room.branchCode,
|
|
452
|
+
// name: room.name,
|
|
453
|
+
// typeOf: factory.placeType.ScreeningRoom,
|
|
454
|
+
// additionalProperty: room.additionalProperty,
|
|
455
|
+
// address: room.address
|
|
456
|
+
// };
|
|
457
|
+
// })
|
|
458
|
+
)];
|
|
454
459
|
if (movieTheaters4inform.length > 0) {
|
|
455
460
|
const taskRunsAt = new Date();
|
|
456
461
|
const informTasks = [];
|
|
@@ -516,7 +521,8 @@ function createInformRoomTasks(params, setting) {
|
|
|
516
521
|
typeOf: factory.placeType.ScreeningRoom,
|
|
517
522
|
additionalProperty: room.additionalProperty,
|
|
518
523
|
address: room.address,
|
|
519
|
-
containedInPlace: { id: params.containedInPlace.id }
|
|
524
|
+
containedInPlace: { id: params.containedInPlace.id },
|
|
525
|
+
project: { id: params.project.id }
|
|
520
526
|
};
|
|
521
527
|
});
|
|
522
528
|
if (rooms4inform.length > 0) {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.600.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.600.0",
|
|
14
|
-
"@chevre/factory": "5.4.0-alpha.
|
|
14
|
+
"@chevre/factory": "5.4.0-alpha.20",
|
|
15
15
|
"@cinerino/sdk": "12.13.0",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"postversion": "git push origin --tags",
|
|
117
117
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
118
118
|
},
|
|
119
|
-
"version": "23.2.0-alpha.
|
|
119
|
+
"version": "23.2.0-alpha.31"
|
|
120
120
|
}
|