@chevre/domain 23.2.0-alpha.16 → 23.2.0-alpha.18
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/example/src/chevre/event/importEventsFromCOAByTitle.ts +1 -1
- package/example/src/chevre/eventSeries/migrateEventSeriesVideoFormat.ts +1 -1
- package/example/src/chevre/place/{findEntranceGates.ts → findRooms.ts} +4 -7
- package/example/src/chevre/place/findSections.ts +28 -0
- package/example/src/chevre/roles/addAdminMovieTheaterReadPermissionIfNotExists.ts +1 -0
- package/example/src/chevre/roles/addAdminMovieTheaterWritePermissionIfNotExists.ts +1 -0
- package/example/src/chevre/roles/addAdminRoomReadPermissionIfNotExists.ts +33 -0
- package/example/src/chevre/roles/addAdminRoomWritePermissionIfNotExists.ts +33 -0
- package/lib/chevre/repo/aggregateOrder.js +0 -93
- package/lib/chevre/repo/aggregateReservation.d.ts +0 -1
- package/lib/chevre/repo/aggregateReservation.js +0 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.js +0 -1
- package/lib/chevre/repo/place/screeningRoom.d.ts +4 -1
- package/lib/chevre/repo/place/screeningRoom.js +146 -115
- package/lib/chevre/repo/place/section.d.ts +8 -1
- package/lib/chevre/repo/place/section.js +132 -95
- package/lib/chevre/service/event/processUpdateMovieTheater.d.ts +1 -1
- package/lib/chevre/service/event/processUpdateMovieTheater.js +1 -1
- package/lib/chevre/service/event/saveScreeningEvents.d.ts +1 -1
- package/lib/chevre/service/event/saveScreeningEvents.js +1 -1
- package/lib/chevre/service/task/createEvent/createEventBySchedule/factory.d.ts +1 -1
- package/lib/chevre/service/task/createEvent/createEventBySchedule/factory.js +2 -2
- package/lib/chevre/service/task/createEvent/createEventBySchedule/schedule2events.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated.js +2 -2
- package/lib/chevre/service/task/syncResourcesFromCOA.js +1 -1
- package/package.json +2 -2
- package/lib/chevre/service/eventOld.d.ts +0 -60
- package/lib/chevre/service/eventOld.js +0 -864
|
@@ -23,6 +23,106 @@ class SectionRepo {
|
|
|
23
23
|
this.placeModel = connection.model(place_1.modelName, (0, place_1.createSchema)());
|
|
24
24
|
}
|
|
25
25
|
// tslint:disable-next-line:max-func-body-length
|
|
26
|
+
static CREATE_SECTION_MONGO_CONDITIONS(searchConditions) {
|
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
28
|
+
const matchStages = [{ $match: { typeOf: { $eq: factory.placeType.ScreeningRoom } } }];
|
|
29
|
+
const projectIdEq = (_b = (_a = searchConditions.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
30
|
+
if (typeof projectIdEq === 'string') {
|
|
31
|
+
matchStages.push({
|
|
32
|
+
$match: { 'project.id': { $eq: projectIdEq } }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const parentOrganizationIdEq = (_d = (_c = searchConditions.parentOrganization) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$eq;
|
|
36
|
+
if (typeof parentOrganizationIdEq === 'string') {
|
|
37
|
+
matchStages.push({
|
|
38
|
+
$match: { 'parentOrganization.id': { $exists: true, $eq: parentOrganizationIdEq } }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// 施設ID
|
|
42
|
+
const movieTheaterIdEq = (_g = (_f = (_e = searchConditions.containedInPlace) === null || _e === void 0 ? void 0 : _e.containedInPlace) === null || _f === void 0 ? void 0 : _f.id) === null || _g === void 0 ? void 0 : _g.$eq;
|
|
43
|
+
if (typeof movieTheaterIdEq === 'string') {
|
|
44
|
+
matchStages.push({
|
|
45
|
+
$match: {
|
|
46
|
+
'containedInPlace.id': { $exists: true, $eq: movieTheaterIdEq }
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
// 施設コード
|
|
51
|
+
const movieTheaterBranchCodeEq = (_k = (_j = (_h = searchConditions.containedInPlace) === null || _h === void 0 ? void 0 : _h.containedInPlace) === null || _j === void 0 ? void 0 : _j.branchCode) === null || _k === void 0 ? void 0 : _k.$eq;
|
|
52
|
+
if (typeof movieTheaterBranchCodeEq === 'string') {
|
|
53
|
+
matchStages.push({
|
|
54
|
+
$match: {
|
|
55
|
+
'containedInPlace.branchCode': { $exists: true, $eq: movieTheaterBranchCodeEq }
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// ルームコード
|
|
60
|
+
const containedInPlaceBranchCodeEq = (_m = (_l = searchConditions.containedInPlace) === null || _l === void 0 ? void 0 : _l.branchCode) === null || _m === void 0 ? void 0 : _m.$eq;
|
|
61
|
+
if (typeof containedInPlaceBranchCodeEq === 'string') {
|
|
62
|
+
matchStages.push({
|
|
63
|
+
$match: {
|
|
64
|
+
branchCode: { $eq: containedInPlaceBranchCodeEq }
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// セクションコード
|
|
69
|
+
const sectionBranchCodeEq = (_o = searchConditions === null || searchConditions === void 0 ? void 0 : searchConditions.branchCode) === null || _o === void 0 ? void 0 : _o.$eq;
|
|
70
|
+
if (typeof sectionBranchCodeEq === 'string') {
|
|
71
|
+
matchStages.push({
|
|
72
|
+
$match: {
|
|
73
|
+
'containsPlace.branchCode': {
|
|
74
|
+
$exists: true,
|
|
75
|
+
$eq: sectionBranchCodeEq
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const nameCodeRegex = (_p = searchConditions.name) === null || _p === void 0 ? void 0 : _p.$regex;
|
|
81
|
+
if (typeof nameCodeRegex === 'string') {
|
|
82
|
+
matchStages.push({
|
|
83
|
+
$match: {
|
|
84
|
+
$or: [
|
|
85
|
+
{
|
|
86
|
+
'containsPlace.name.ja': {
|
|
87
|
+
$exists: true,
|
|
88
|
+
$regex: new RegExp(nameCodeRegex)
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
'containsPlace.name.en': {
|
|
93
|
+
$exists: true,
|
|
94
|
+
$regex: new RegExp(nameCodeRegex)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
const branchCodeRegex = (_q = searchConditions.branchCode) === null || _q === void 0 ? void 0 : _q.$regex;
|
|
102
|
+
if (typeof branchCodeRegex === 'string') {
|
|
103
|
+
matchStages.push({
|
|
104
|
+
$match: {
|
|
105
|
+
'containsPlace.branchCode': {
|
|
106
|
+
$exists: true,
|
|
107
|
+
$regex: new RegExp(branchCodeRegex)
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const additionalPropertyElemMatch = (_r = searchConditions.additionalProperty) === null || _r === void 0 ? void 0 : _r.$elemMatch;
|
|
113
|
+
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
114
|
+
matchStages.push({
|
|
115
|
+
$match: {
|
|
116
|
+
'containsPlace.additionalProperty': {
|
|
117
|
+
$exists: true,
|
|
118
|
+
$elemMatch: additionalPropertyElemMatch
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return matchStages;
|
|
124
|
+
}
|
|
125
|
+
// tslint:disable-next-line:max-func-body-length
|
|
26
126
|
createSection(screeningRoomSection, options) {
|
|
27
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
128
|
const { project, parentOrganization, movieTheaterCode, roomCode } = options;
|
|
@@ -157,106 +257,43 @@ class SectionRepo {
|
|
|
157
257
|
return doc.toObject();
|
|
158
258
|
});
|
|
159
259
|
}
|
|
160
|
-
|
|
161
|
-
|
|
260
|
+
/**
|
|
261
|
+
* 最小限のprojectionでセクション検索を再定義
|
|
262
|
+
* 2026-01-08~
|
|
263
|
+
*/
|
|
264
|
+
findSections(params) {
|
|
162
265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (typeof parentOrganizationIdEq === 'string') {
|
|
173
|
-
matchStages.push({
|
|
174
|
-
$match: { 'parentOrganization.id': { $exists: true, $eq: parentOrganizationIdEq } }
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
// 施設コード
|
|
178
|
-
const movieTheaterBranchCodeEq = (_g = (_f = (_e = searchConditions.containedInPlace) === null || _e === void 0 ? void 0 : _e.containedInPlace) === null || _f === void 0 ? void 0 : _f.branchCode) === null || _g === void 0 ? void 0 : _g.$eq;
|
|
179
|
-
if (typeof movieTheaterBranchCodeEq === 'string') {
|
|
180
|
-
matchStages.push({
|
|
181
|
-
$match: {
|
|
182
|
-
'containedInPlace.branchCode': {
|
|
183
|
-
$exists: true,
|
|
184
|
-
$eq: movieTheaterBranchCodeEq
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
// ルームコード
|
|
190
|
-
const containedInPlaceBranchCodeEq = (_j = (_h = searchConditions.containedInPlace) === null || _h === void 0 ? void 0 : _h.branchCode) === null || _j === void 0 ? void 0 : _j.$eq;
|
|
191
|
-
if (typeof containedInPlaceBranchCodeEq === 'string') {
|
|
192
|
-
matchStages.push({
|
|
193
|
-
$match: {
|
|
194
|
-
branchCode: {
|
|
195
|
-
$eq: containedInPlaceBranchCodeEq
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
// セクションコード
|
|
201
|
-
const sectionBranchCodeEq = (_k = searchConditions === null || searchConditions === void 0 ? void 0 : searchConditions.branchCode) === null || _k === void 0 ? void 0 : _k.$eq;
|
|
202
|
-
if (typeof sectionBranchCodeEq === 'string') {
|
|
203
|
-
matchStages.push({
|
|
204
|
-
$match: {
|
|
205
|
-
'containsPlace.branchCode': {
|
|
206
|
-
$exists: true,
|
|
207
|
-
$eq: sectionBranchCodeEq
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
const nameCodeRegex = (_l = searchConditions.name) === null || _l === void 0 ? void 0 : _l.$regex;
|
|
213
|
-
if (typeof nameCodeRegex === 'string') {
|
|
214
|
-
matchStages.push({
|
|
215
|
-
$match: {
|
|
216
|
-
$or: [
|
|
217
|
-
{
|
|
218
|
-
'containsPlace.name.ja': {
|
|
219
|
-
$exists: true,
|
|
220
|
-
$regex: new RegExp(nameCodeRegex)
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
'containsPlace.name.en': {
|
|
225
|
-
$exists: true,
|
|
226
|
-
$regex: new RegExp(nameCodeRegex)
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
]
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
const branchCodeRegex = (_m = searchConditions.branchCode) === null || _m === void 0 ? void 0 : _m.$regex;
|
|
234
|
-
if (typeof branchCodeRegex === 'string') {
|
|
235
|
-
matchStages.push({
|
|
236
|
-
$match: {
|
|
237
|
-
'containsPlace.branchCode': {
|
|
238
|
-
$exists: true,
|
|
239
|
-
$regex: new RegExp(branchCodeRegex)
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
const additionalPropertyElemMatch = (_o = searchConditions.additionalProperty) === null || _o === void 0 ? void 0 : _o.$elemMatch;
|
|
245
|
-
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
246
|
-
matchStages.push({
|
|
247
|
-
$match: {
|
|
248
|
-
'containsPlace.additionalProperty': {
|
|
249
|
-
$exists: true,
|
|
250
|
-
$elemMatch: additionalPropertyElemMatch
|
|
251
|
-
}
|
|
266
|
+
const aggregate = this.placeModel.aggregate([
|
|
267
|
+
{ $unwind: '$containsPlace' },
|
|
268
|
+
...SectionRepo.CREATE_SECTION_MONGO_CONDITIONS(params),
|
|
269
|
+
{
|
|
270
|
+
$project: {
|
|
271
|
+
_id: 0,
|
|
272
|
+
branchCode: '$containsPlace.branchCode',
|
|
273
|
+
name: '$containsPlace.name',
|
|
274
|
+
additionalProperty: '$containsPlace.additionalProperty'
|
|
252
275
|
}
|
|
253
|
-
}
|
|
276
|
+
}
|
|
277
|
+
]);
|
|
278
|
+
const { limit, page } = params;
|
|
279
|
+
if (typeof limit === 'number' && limit > 0) {
|
|
280
|
+
const pageMustBePositive = (typeof page === 'number' && page > 0) ? page : 1;
|
|
281
|
+
aggregate.skip(limit * (pageMustBePositive - 1))
|
|
282
|
+
.limit(limit);
|
|
254
283
|
}
|
|
284
|
+
return aggregate
|
|
285
|
+
.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
286
|
+
.exec();
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
searchScreeningRoomSections(searchConditions) {
|
|
290
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
+
var _a, _b;
|
|
255
292
|
const aggregate = this.placeModel.aggregate([
|
|
256
293
|
{ $unwind: '$containsPlace' },
|
|
257
|
-
...
|
|
294
|
+
...SectionRepo.CREATE_SECTION_MONGO_CONDITIONS(searchConditions),
|
|
258
295
|
{
|
|
259
|
-
$project: Object.assign(Object.assign({ _id: 0, typeOf: '$containsPlace.typeOf', branchCode: '$containsPlace.branchCode', identifier: '$containsPlace.identifier', name: '$containsPlace.name', additionalProperty: '$containsPlace.additionalProperty' }, (((
|
|
296
|
+
$project: Object.assign(Object.assign({ _id: 0, typeOf: '$containsPlace.typeOf', branchCode: '$containsPlace.branchCode', identifier: '$containsPlace.identifier', name: '$containsPlace.name', additionalProperty: '$containsPlace.additionalProperty' }, (((_a = searchConditions.$projection) === null || _a === void 0 ? void 0 : _a.containedInPlace) === 1)
|
|
260
297
|
? {
|
|
261
298
|
containedInPlace: {
|
|
262
299
|
typeOf: '$typeOf',
|
|
@@ -270,7 +307,7 @@ class SectionRepo {
|
|
|
270
307
|
}
|
|
271
308
|
}
|
|
272
309
|
}
|
|
273
|
-
: undefined), (((
|
|
310
|
+
: undefined), (((_b = searchConditions.$projection) === null || _b === void 0 ? void 0 : _b.seatCount) === 1)
|
|
274
311
|
? {
|
|
275
312
|
seatCount: {
|
|
276
313
|
$cond: {
|
|
@@ -19,6 +19,6 @@ declare function processUpdateMovieTheater(params: IImportFromCOAParams): (repos
|
|
|
19
19
|
id: string;
|
|
20
20
|
};
|
|
21
21
|
movieTheater: IMovieTheater;
|
|
22
|
-
screeningRooms:
|
|
22
|
+
screeningRooms: Pick<factory.place.screeningRoom.IPlace, "additionalProperty" | "address" | "branchCode" | "name" | "openSeatingAllowed">[];
|
|
23
23
|
}>;
|
|
24
24
|
export { processUpdateMovieTheater };
|
|
@@ -65,7 +65,7 @@ function processUpdateMovieTheater(params) {
|
|
|
65
65
|
if (movieTheater === undefined) {
|
|
66
66
|
throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
67
67
|
}
|
|
68
|
-
screeningRooms = yield repos.screeningRoom.
|
|
68
|
+
screeningRooms = yield repos.screeningRoom.findRooms({
|
|
69
69
|
project: { id: { $eq: params.project.id } },
|
|
70
70
|
containedInPlace: { branchCode: { $eq: movieTheater.branchCode } }
|
|
71
71
|
});
|
|
@@ -7,7 +7,7 @@ import * as factory from '../../factory';
|
|
|
7
7
|
type IMovieTheater = Pick<factory.place.movieTheater.IPlace, 'id' | 'typeOf' | 'branchCode' | 'name' | 'kanaName'>;
|
|
8
8
|
declare function saveScreeningEvents(params: {
|
|
9
9
|
movieTheater: IMovieTheater;
|
|
10
|
-
screeningRooms: Pick<factory.place.screeningRoom.IPlace, '
|
|
10
|
+
screeningRooms: Pick<factory.place.screeningRoom.IPlace, 'branchCode' | 'name' | 'maximumAttendeeCapacity'>[];
|
|
11
11
|
screeningEventSerieses?: factory.eventSeries.IEvent[];
|
|
12
12
|
project: {
|
|
13
13
|
id: string;
|
|
@@ -266,7 +266,7 @@ function createScreeningEventFromCOA(params) {
|
|
|
266
266
|
name: params.superEvent.name,
|
|
267
267
|
eventStatus: factory.eventStatusType.EventScheduled,
|
|
268
268
|
location: {
|
|
269
|
-
typeOf:
|
|
269
|
+
typeOf: factory.placeType.ScreeningRoom,
|
|
270
270
|
branchCode: params.screenRoom.branchCode,
|
|
271
271
|
name: params.screenRoom.name
|
|
272
272
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ICreatingEvent4ttts } from '../../../../repo/event';
|
|
2
2
|
import type { ICustomerMember } from '../../../../repo/member';
|
|
3
3
|
import * as factory from '../../../../factory';
|
|
4
|
-
declare function tour2creatingEvent(tour: ITourBySchedule, movieTheater: Pick<factory.place.movieTheater.IPlace, 'id' | 'branchCode' | 'parentOrganization'>, screeningRoom:
|
|
4
|
+
declare function tour2creatingEvent(tour: ITourBySchedule, movieTheater: Pick<factory.place.movieTheater.IPlace, 'id' | 'branchCode' | 'parentOrganization'>, screeningRoom: Pick<factory.place.screeningRoom.IPlace, 'additionalProperty' | 'address' | 'branchCode' | 'name' | 'maximumAttendeeCapacity'>, existingApplicationMembers: {
|
|
5
5
|
member: ICustomerMember;
|
|
6
6
|
}[], maxValue: number, eventService: Pick<factory.product.IProduct, 'id' | 'name'> & {
|
|
7
7
|
id: string;
|
|
@@ -83,7 +83,7 @@ function tour2creatingEvent(tour, movieTheater, screeningRoom, existingApplicati
|
|
|
83
83
|
}, typeOf: factory.product.ProductType.EventService, availableChannel: {
|
|
84
84
|
typeOf: 'ServiceChannel',
|
|
85
85
|
serviceLocation: {
|
|
86
|
-
typeOf:
|
|
86
|
+
typeOf: factory.placeType.ScreeningRoom,
|
|
87
87
|
branchCode: screeningRoom.branchCode,
|
|
88
88
|
name: screeningRoom.name,
|
|
89
89
|
containedInPlace: Object.assign({ typeOf: screeningEventSeries.location.typeOf, id: screeningEventSeries.location.id, branchCode: screeningEventSeries.location.branchCode }, (screeningEventSeries.location.name !== undefined)
|
|
@@ -104,7 +104,7 @@ function tour2creatingEvent(tour, movieTheater, screeningRoom, existingApplicati
|
|
|
104
104
|
: undefined), (screeningEventSeries.headline !== undefined)
|
|
105
105
|
? { headline: screeningEventSeries.headline }
|
|
106
106
|
: undefined);
|
|
107
|
-
const location = Object.assign({ typeOf:
|
|
107
|
+
const location = Object.assign({ typeOf: factory.placeType.ScreeningRoom, branchCode: screeningRoom.branchCode, name: screeningRoom.name }, (screeningRoom.address !== undefined) ? { address: screeningRoom.address } : undefined);
|
|
108
108
|
return {
|
|
109
109
|
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
110
110
|
typeOf: factory.eventType.ScreeningEvent,
|
|
@@ -61,7 +61,7 @@ function schedule2relatedResources(schedule) {
|
|
|
61
61
|
if (movieTheater === undefined) {
|
|
62
62
|
throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
63
63
|
}
|
|
64
|
-
const screeningRoom = (yield repos.screeningRoom.
|
|
64
|
+
const screeningRoom = (yield repos.screeningRoom.findRooms({
|
|
65
65
|
limit: 1,
|
|
66
66
|
page: 1,
|
|
67
67
|
project: { id: { $eq: project.id } },
|
|
@@ -433,14 +433,14 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
433
433
|
throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
434
434
|
}
|
|
435
435
|
// ルームを検索
|
|
436
|
-
const screeningRooms = yield repos.screeningRoom.
|
|
436
|
+
const screeningRooms = yield repos.screeningRoom.findRooms({
|
|
437
437
|
containedInPlace: { id: { $eq: movieTheater.id } }
|
|
438
438
|
});
|
|
439
439
|
const movieTheaters4inform = [Object.assign(Object.assign({}, movieTheater), { containsPlace: screeningRooms.map((room) => {
|
|
440
440
|
return {
|
|
441
441
|
branchCode: room.branchCode,
|
|
442
442
|
name: room.name,
|
|
443
|
-
typeOf:
|
|
443
|
+
typeOf: factory.placeType.ScreeningRoom,
|
|
444
444
|
additionalProperty: room.additionalProperty,
|
|
445
445
|
address: room.address
|
|
446
446
|
};
|
|
@@ -216,7 +216,7 @@ function syncEvents(params) {
|
|
|
216
216
|
throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
217
217
|
}
|
|
218
218
|
// console.log('movieTheater:', movieTheater);
|
|
219
|
-
const screeningRoom = (yield repos.screeningRoom.
|
|
219
|
+
const screeningRoom = (yield repos.screeningRoom.findRooms({
|
|
220
220
|
project: { id: { $eq: params.project.id } },
|
|
221
221
|
containedInPlace: { branchCode: { $eq: movieTheater.branchCode } },
|
|
222
222
|
branchCode: { $eq: roomCode }
|
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.12",
|
|
15
15
|
"@cinerino/sdk": "12.12.1",
|
|
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.18"
|
|
120
120
|
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* マスターデータ同期サービス
|
|
3
|
-
*/
|
|
4
|
-
import type * as COA from '@motionpicture/coa-service';
|
|
5
|
-
import type { ActionRepo } from '../repo/action';
|
|
6
|
-
import type { CategoryCodeRepo } from '../repo/categoryCode';
|
|
7
|
-
import type { CreativeWorkRepo } from '../repo/creativeWork';
|
|
8
|
-
import type { EventRepo } from '../repo/event';
|
|
9
|
-
import type { EventSeriesRepo } from '../repo/eventSeries';
|
|
10
|
-
import type { MovieTheaterRepo } from '../repo/place/movieTheater';
|
|
11
|
-
import type { ScreeningRoomRepo } from '../repo/place/screeningRoom';
|
|
12
|
-
import type { SellerRepo } from '../repo/seller';
|
|
13
|
-
import * as factory from '../factory';
|
|
14
|
-
interface IImportFromCOAParams {
|
|
15
|
-
project: {
|
|
16
|
-
id: string;
|
|
17
|
-
typeOf: factory.organizationType.Project;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* 施設コード
|
|
21
|
-
*/
|
|
22
|
-
locationBranchCode: string;
|
|
23
|
-
importFrom: Date;
|
|
24
|
-
importThrough: Date;
|
|
25
|
-
/**
|
|
26
|
-
* 施設を保管するかどうか
|
|
27
|
-
*/
|
|
28
|
-
saveMovieTheater: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* 施設コンテンツを保管するかどうか
|
|
31
|
-
*/
|
|
32
|
-
saveScreeningEventSeries: boolean;
|
|
33
|
-
saveScreeningEventSeriesPeriodInMonth: number;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* イベントをインポートする
|
|
37
|
-
*/
|
|
38
|
-
declare function importFromCOA(params: IImportFromCOAParams): (repos: {
|
|
39
|
-
action: ActionRepo;
|
|
40
|
-
categoryCode: CategoryCodeRepo;
|
|
41
|
-
creativeWork: CreativeWorkRepo;
|
|
42
|
-
event: EventRepo;
|
|
43
|
-
eventSeries: EventSeriesRepo;
|
|
44
|
-
movieTheater: MovieTheaterRepo;
|
|
45
|
-
screeningRoom: ScreeningRoomRepo;
|
|
46
|
-
seller: SellerRepo;
|
|
47
|
-
masterService: COA.service.Master;
|
|
48
|
-
}) => Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* COA情報からイベントIDを作成する
|
|
51
|
-
*/
|
|
52
|
-
declare function createScreeningEventIdFromCOA(params: {
|
|
53
|
-
theaterCode: string;
|
|
54
|
-
titleCode: string;
|
|
55
|
-
titleBranchNum: string;
|
|
56
|
-
dateJouei: string;
|
|
57
|
-
screenCode: string;
|
|
58
|
-
timeBegin: string;
|
|
59
|
-
}): string;
|
|
60
|
-
export { importFromCOA, createScreeningEventIdFromCOA };
|