@chevre/domain 21.4.0-alpha.10 → 21.4.0-alpha.11
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/migrateEventOrganizer.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -6
- package/lib/chevre/repo/mongoose/schemas/place.js +9 -2
- package/lib/chevre/repo/place.d.ts +4 -4
- package/lib/chevre/repo/place.js +47 -27
- package/lib/chevre/service/event.js +5 -3
- package/package.json +2 -2
|
@@ -20,10 +20,11 @@ async function main() {
|
|
|
20
20
|
// 'project.id': { $ne: EXCLUDED_PROJECT_ID },
|
|
21
21
|
typeOf: {
|
|
22
22
|
$in: [
|
|
23
|
-
chevre.factory.eventType.ScreeningEvent,
|
|
23
|
+
// chevre.factory.eventType.ScreeningEvent,
|
|
24
24
|
chevre.factory.eventType.ScreeningEventSeries
|
|
25
25
|
]
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
organizer: { $exists: false }
|
|
27
28
|
// startDate: {
|
|
28
29
|
// $gte: moment()
|
|
29
30
|
// // tslint:disable-next-line:no-magic-numbers
|
|
@@ -53,13 +53,14 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
|
+
project: any;
|
|
56
57
|
additionalProperty: any[];
|
|
58
|
+
parentOrganization: any;
|
|
57
59
|
containsPlace: any[];
|
|
58
60
|
hasEntranceGate: any[];
|
|
59
61
|
hasPOS: any[];
|
|
60
62
|
name?: any;
|
|
61
63
|
url?: string | undefined;
|
|
62
|
-
project?: any;
|
|
63
64
|
alternateName?: any;
|
|
64
65
|
description?: any;
|
|
65
66
|
offers?: any;
|
|
@@ -72,18 +73,18 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
72
73
|
openingHoursSpecification?: any;
|
|
73
74
|
smokingAllowed?: boolean | undefined;
|
|
74
75
|
sameAs?: string | undefined;
|
|
75
|
-
parentOrganization?: any;
|
|
76
76
|
openSeatingAllowed?: any;
|
|
77
77
|
amenityFeature?: any;
|
|
78
78
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
79
79
|
typeOf: string;
|
|
80
|
+
project: any;
|
|
80
81
|
additionalProperty: any[];
|
|
82
|
+
parentOrganization: any;
|
|
81
83
|
containsPlace: any[];
|
|
82
84
|
hasEntranceGate: any[];
|
|
83
85
|
hasPOS: any[];
|
|
84
86
|
name?: any;
|
|
85
87
|
url?: string | undefined;
|
|
86
|
-
project?: any;
|
|
87
88
|
alternateName?: any;
|
|
88
89
|
description?: any;
|
|
89
90
|
offers?: any;
|
|
@@ -96,18 +97,18 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
96
97
|
openingHoursSpecification?: any;
|
|
97
98
|
smokingAllowed?: boolean | undefined;
|
|
98
99
|
sameAs?: string | undefined;
|
|
99
|
-
parentOrganization?: any;
|
|
100
100
|
openSeatingAllowed?: any;
|
|
101
101
|
amenityFeature?: any;
|
|
102
102
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
103
103
|
typeOf: string;
|
|
104
|
+
project: any;
|
|
104
105
|
additionalProperty: any[];
|
|
106
|
+
parentOrganization: any;
|
|
105
107
|
containsPlace: any[];
|
|
106
108
|
hasEntranceGate: any[];
|
|
107
109
|
hasPOS: any[];
|
|
108
110
|
name?: any;
|
|
109
111
|
url?: string | undefined;
|
|
110
|
-
project?: any;
|
|
111
112
|
alternateName?: any;
|
|
112
113
|
description?: any;
|
|
113
114
|
offers?: any;
|
|
@@ -120,7 +121,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
120
121
|
openingHoursSpecification?: any;
|
|
121
122
|
smokingAllowed?: boolean | undefined;
|
|
122
123
|
sameAs?: string | undefined;
|
|
123
|
-
parentOrganization?: any;
|
|
124
124
|
openSeatingAllowed?: any;
|
|
125
125
|
amenityFeature?: any;
|
|
126
126
|
}> & {
|
|
@@ -9,7 +9,15 @@ exports.modelName = modelName;
|
|
|
9
9
|
* 場所スキーマ
|
|
10
10
|
*/
|
|
11
11
|
const schema = new mongoose_1.Schema({
|
|
12
|
-
project:
|
|
12
|
+
project: {
|
|
13
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
// 必須化(2023-07-14~)
|
|
17
|
+
parentOrganization: {
|
|
18
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
13
21
|
typeOf: {
|
|
14
22
|
type: String,
|
|
15
23
|
required: true
|
|
@@ -32,7 +40,6 @@ const schema = new mongoose_1.Schema({
|
|
|
32
40
|
kanaName: String,
|
|
33
41
|
offers: mongoose_1.SchemaTypes.Mixed,
|
|
34
42
|
additionalProperty: [mongoose_1.SchemaTypes.Mixed],
|
|
35
|
-
parentOrganization: mongoose_1.SchemaTypes.Mixed,
|
|
36
43
|
// ↓ルームの施設からの分離に伴い属性追加(2023-06-22~)
|
|
37
44
|
openSeatingAllowed: mongoose_1.SchemaTypes.Mixed,
|
|
38
45
|
amenityFeature: mongoose_1.SchemaTypes.Mixed
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { Connection } from 'mongoose';
|
|
26
26
|
import * as factory from '../factory';
|
|
27
27
|
type IScreeningRoomSectionWithoutContainsPlace = Omit<factory.place.screeningRoomSection.IPlace, 'containsPlace'>;
|
|
28
|
-
export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount'>;
|
|
28
|
+
export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount' | 'parentOrganization'>;
|
|
29
29
|
/**
|
|
30
30
|
* 施設リポジトリ
|
|
31
31
|
*/
|
|
@@ -46,7 +46,7 @@ export declare class MongoRepository {
|
|
|
46
46
|
deleteMovieTheaterById(params: {
|
|
47
47
|
id: string;
|
|
48
48
|
}): Promise<void>;
|
|
49
|
-
createScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace'> & {
|
|
49
|
+
createScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace' | 'parentOrganization'> & {
|
|
50
50
|
containedInPlace: {
|
|
51
51
|
branchCode: string;
|
|
52
52
|
};
|
|
@@ -59,7 +59,7 @@ export declare class MongoRepository {
|
|
|
59
59
|
};
|
|
60
60
|
typeOf: factory.placeType.ScreeningRoom;
|
|
61
61
|
}>;
|
|
62
|
-
updateScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace'> & {
|
|
62
|
+
updateScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace' | 'parentOrganization'> & {
|
|
63
63
|
containedInPlace: {
|
|
64
64
|
branchCode: string;
|
|
65
65
|
};
|
|
@@ -171,7 +171,7 @@ export declare class MongoRepository {
|
|
|
171
171
|
};
|
|
172
172
|
typeOf: factory.placeType.ScreeningRoom;
|
|
173
173
|
}>;
|
|
174
|
-
searchScreeningRooms(searchConditions: factory.place.screeningRoom.ISearchConditions): Promise<Omit<factory.place.screeningRoom.IPlace, 'containsPlace'>[]>;
|
|
174
|
+
searchScreeningRooms(searchConditions: factory.place.screeningRoom.ISearchConditions): Promise<Omit<factory.place.screeningRoom.IPlace, 'containsPlace' | 'parentOrganization'>[]>;
|
|
175
175
|
findScreeningRoomsByBranchCode(params: {
|
|
176
176
|
branchCode: {
|
|
177
177
|
$eq: string;
|
package/lib/chevre/repo/place.js
CHANGED
|
@@ -359,7 +359,7 @@ class MongoRepository {
|
|
|
359
359
|
typeOf: { $eq: factory.placeType.MovieTheater },
|
|
360
360
|
'project.id': { $eq: screeningRoom.project.id },
|
|
361
361
|
branchCode: { $eq: screeningRoom.containedInPlace.branchCode }
|
|
362
|
-
}, { _id: 1, typeOf: 1, branchCode: 1, name: 1 })
|
|
362
|
+
}, { _id: 1, typeOf: 1, branchCode: 1, name: 1, parentOrganization: 1 })
|
|
363
363
|
.exec();
|
|
364
364
|
if (movieTheaterDoc === null) {
|
|
365
365
|
throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
@@ -370,7 +370,9 @@ class MongoRepository {
|
|
|
370
370
|
typeOf: movieTheater.typeOf,
|
|
371
371
|
branchCode: movieTheater.branchCode,
|
|
372
372
|
name: movieTheater.name
|
|
373
|
-
}, containsPlace: [], project: screeningRoom.project
|
|
373
|
+
}, containsPlace: [], project: screeningRoom.project,
|
|
374
|
+
// 必須化(2023-07-14~)
|
|
375
|
+
parentOrganization: movieTheater.parentOrganization }, (typeof screeningRoom.openSeatingAllowed === 'boolean')
|
|
374
376
|
? { openSeatingAllowed: screeningRoom.openSeatingAllowed }
|
|
375
377
|
: undefined);
|
|
376
378
|
const upsertScreeningRoomResult = yield this.placeModel.updateOne({
|
|
@@ -558,7 +560,7 @@ class MongoRepository {
|
|
|
558
560
|
}
|
|
559
561
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
560
562
|
searchScreeningRoomSections(searchConditions) {
|
|
561
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
563
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
562
564
|
return __awaiter(this, void 0, void 0, function* () {
|
|
563
565
|
const matchStages = [{ $match: { typeOf: { $eq: factory.placeType.ScreeningRoom } } }];
|
|
564
566
|
const projectIdEq = (_b = (_a = searchConditions.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
@@ -567,8 +569,14 @@ class MongoRepository {
|
|
|
567
569
|
$match: { 'project.id': { $eq: projectIdEq } }
|
|
568
570
|
});
|
|
569
571
|
}
|
|
572
|
+
const parentOrganizationIdEq = (_d = (_c = searchConditions.parentOrganization) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$eq;
|
|
573
|
+
if (typeof parentOrganizationIdEq === 'string') {
|
|
574
|
+
matchStages.push({
|
|
575
|
+
$match: { 'parentOrganization.id': { $exists: true, $eq: parentOrganizationIdEq } }
|
|
576
|
+
});
|
|
577
|
+
}
|
|
570
578
|
// 施設コード
|
|
571
|
-
const movieTheaterBranchCodeEq = (
|
|
579
|
+
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;
|
|
572
580
|
if (typeof movieTheaterBranchCodeEq === 'string') {
|
|
573
581
|
matchStages.push({
|
|
574
582
|
$match: {
|
|
@@ -580,7 +588,7 @@ class MongoRepository {
|
|
|
580
588
|
});
|
|
581
589
|
}
|
|
582
590
|
// ルームコード
|
|
583
|
-
const containedInPlaceBranchCodeEq = (
|
|
591
|
+
const containedInPlaceBranchCodeEq = (_j = (_h = searchConditions.containedInPlace) === null || _h === void 0 ? void 0 : _h.branchCode) === null || _j === void 0 ? void 0 : _j.$eq;
|
|
584
592
|
if (typeof containedInPlaceBranchCodeEq === 'string') {
|
|
585
593
|
matchStages.push({
|
|
586
594
|
$match: {
|
|
@@ -591,7 +599,7 @@ class MongoRepository {
|
|
|
591
599
|
});
|
|
592
600
|
}
|
|
593
601
|
// セクションコード
|
|
594
|
-
const sectionBranchCodeEq = (
|
|
602
|
+
const sectionBranchCodeEq = (_k = searchConditions === null || searchConditions === void 0 ? void 0 : searchConditions.branchCode) === null || _k === void 0 ? void 0 : _k.$eq;
|
|
595
603
|
if (typeof sectionBranchCodeEq === 'string') {
|
|
596
604
|
matchStages.push({
|
|
597
605
|
$match: {
|
|
@@ -602,7 +610,7 @@ class MongoRepository {
|
|
|
602
610
|
}
|
|
603
611
|
});
|
|
604
612
|
}
|
|
605
|
-
const nameCodeRegex = (
|
|
613
|
+
const nameCodeRegex = (_l = searchConditions.name) === null || _l === void 0 ? void 0 : _l.$regex;
|
|
606
614
|
if (typeof nameCodeRegex === 'string') {
|
|
607
615
|
matchStages.push({
|
|
608
616
|
$match: {
|
|
@@ -623,7 +631,7 @@ class MongoRepository {
|
|
|
623
631
|
}
|
|
624
632
|
});
|
|
625
633
|
}
|
|
626
|
-
const branchCodeRegex = (
|
|
634
|
+
const branchCodeRegex = (_m = searchConditions.branchCode) === null || _m === void 0 ? void 0 : _m.$regex;
|
|
627
635
|
if (typeof branchCodeRegex === 'string') {
|
|
628
636
|
matchStages.push({
|
|
629
637
|
$match: {
|
|
@@ -634,7 +642,7 @@ class MongoRepository {
|
|
|
634
642
|
}
|
|
635
643
|
});
|
|
636
644
|
}
|
|
637
|
-
const additionalPropertyElemMatch = (
|
|
645
|
+
const additionalPropertyElemMatch = (_o = searchConditions.additionalProperty) === null || _o === void 0 ? void 0 : _o.$elemMatch;
|
|
638
646
|
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
639
647
|
matchStages.push({
|
|
640
648
|
$match: {
|
|
@@ -659,7 +667,7 @@ class MongoRepository {
|
|
|
659
667
|
branchCode: '$containedInPlace.branchCode',
|
|
660
668
|
name: '$containedInPlace.name'
|
|
661
669
|
}
|
|
662
|
-
}, additionalProperty: '$containsPlace.additionalProperty' }, (((
|
|
670
|
+
}, additionalProperty: '$containsPlace.additionalProperty' }, (((_p = searchConditions.$projection) === null || _p === void 0 ? void 0 : _p.seatCount) === 1)
|
|
663
671
|
? {
|
|
664
672
|
seatCount: {
|
|
665
673
|
$cond: {
|
|
@@ -712,7 +720,7 @@ class MongoRepository {
|
|
|
712
720
|
}
|
|
713
721
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
714
722
|
searchScreeningRooms(searchConditions) {
|
|
715
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
723
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
716
724
|
return __awaiter(this, void 0, void 0, function* () {
|
|
717
725
|
const matchStages = [{ $match: { typeOf: { $eq: factory.placeType.ScreeningRoom } } }];
|
|
718
726
|
const projectIdEq = (_b = (_a = searchConditions.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
@@ -721,8 +729,14 @@ class MongoRepository {
|
|
|
721
729
|
$match: { 'project.id': { $eq: projectIdEq } }
|
|
722
730
|
});
|
|
723
731
|
}
|
|
732
|
+
const parentOrganizationIdEq = (_d = (_c = searchConditions.parentOrganization) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$eq;
|
|
733
|
+
if (typeof parentOrganizationIdEq === 'string') {
|
|
734
|
+
matchStages.push({
|
|
735
|
+
$match: { 'parentOrganization.id': { $exists: true, $eq: parentOrganizationIdEq } }
|
|
736
|
+
});
|
|
737
|
+
}
|
|
724
738
|
// 施設ID
|
|
725
|
-
const containedInPlaceIdEq = (
|
|
739
|
+
const containedInPlaceIdEq = (_f = (_e = searchConditions.containedInPlace) === null || _e === void 0 ? void 0 : _e.id) === null || _f === void 0 ? void 0 : _f.$eq;
|
|
726
740
|
if (typeof containedInPlaceIdEq === 'string') {
|
|
727
741
|
matchStages.push({
|
|
728
742
|
$match: {
|
|
@@ -748,7 +762,7 @@ class MongoRepository {
|
|
|
748
762
|
}
|
|
749
763
|
}
|
|
750
764
|
}
|
|
751
|
-
const branchCodeEq = (
|
|
765
|
+
const branchCodeEq = (_g = searchConditions.branchCode) === null || _g === void 0 ? void 0 : _g.$eq;
|
|
752
766
|
if (typeof branchCodeEq === 'string') {
|
|
753
767
|
matchStages.push({
|
|
754
768
|
$match: {
|
|
@@ -756,7 +770,7 @@ class MongoRepository {
|
|
|
756
770
|
}
|
|
757
771
|
});
|
|
758
772
|
}
|
|
759
|
-
const branchCodeIn = (
|
|
773
|
+
const branchCodeIn = (_h = searchConditions.branchCode) === null || _h === void 0 ? void 0 : _h.$in;
|
|
760
774
|
if (Array.isArray(branchCodeIn)) {
|
|
761
775
|
matchStages.push({
|
|
762
776
|
$match: {
|
|
@@ -764,7 +778,7 @@ class MongoRepository {
|
|
|
764
778
|
}
|
|
765
779
|
});
|
|
766
780
|
}
|
|
767
|
-
const branchCodeRegex = (
|
|
781
|
+
const branchCodeRegex = (_j = searchConditions.branchCode) === null || _j === void 0 ? void 0 : _j.$regex;
|
|
768
782
|
if (typeof branchCodeRegex === 'string') {
|
|
769
783
|
matchStages.push({
|
|
770
784
|
$match: {
|
|
@@ -774,7 +788,7 @@ class MongoRepository {
|
|
|
774
788
|
}
|
|
775
789
|
});
|
|
776
790
|
}
|
|
777
|
-
const nameCodeRegex = (
|
|
791
|
+
const nameCodeRegex = (_k = searchConditions.name) === null || _k === void 0 ? void 0 : _k.$regex;
|
|
778
792
|
if (typeof nameCodeRegex === 'string') {
|
|
779
793
|
matchStages.push({
|
|
780
794
|
$match: {
|
|
@@ -806,7 +820,7 @@ class MongoRepository {
|
|
|
806
820
|
}
|
|
807
821
|
});
|
|
808
822
|
}
|
|
809
|
-
const additionalPropertyElemMatch = (
|
|
823
|
+
const additionalPropertyElemMatch = (_l = searchConditions.additionalProperty) === null || _l === void 0 ? void 0 : _l.$elemMatch;
|
|
810
824
|
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
811
825
|
matchStages.push({
|
|
812
826
|
$match: {
|
|
@@ -827,7 +841,7 @@ class MongoRepository {
|
|
|
827
841
|
typeOf: '$containedInPlace.typeOf',
|
|
828
842
|
branchCode: '$containedInPlace.branchCode',
|
|
829
843
|
name: '$containedInPlace.name'
|
|
830
|
-
}, openSeatingAllowed: '$openSeatingAllowed', additionalProperty: '$additionalProperty', maximumAttendeeCapacity: '$maximumAttendeeCapacity' }, (((
|
|
844
|
+
}, openSeatingAllowed: '$openSeatingAllowed', additionalProperty: '$additionalProperty', maximumAttendeeCapacity: '$maximumAttendeeCapacity' }, (((_m = searchConditions.$projection) === null || _m === void 0 ? void 0 : _m.sectionCount) === 1)
|
|
831
845
|
? {
|
|
832
846
|
sectionCount: {
|
|
833
847
|
$cond: {
|
|
@@ -837,7 +851,7 @@ class MongoRepository {
|
|
|
837
851
|
}
|
|
838
852
|
}
|
|
839
853
|
}
|
|
840
|
-
: undefined), (((
|
|
854
|
+
: undefined), (((_o = searchConditions.$projection) === null || _o === void 0 ? void 0 : _o.seatCount) === 1)
|
|
841
855
|
? {
|
|
842
856
|
seatCount: {
|
|
843
857
|
$sum: {
|
|
@@ -1031,7 +1045,7 @@ class MongoRepository {
|
|
|
1031
1045
|
}
|
|
1032
1046
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
1033
1047
|
searchSeats(params) {
|
|
1034
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1048
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
1035
1049
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1036
1050
|
const matchStages = [{ $match: { typeOf: { $eq: factory.placeType.ScreeningRoom } } }];
|
|
1037
1051
|
const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
@@ -1040,7 +1054,13 @@ class MongoRepository {
|
|
|
1040
1054
|
$match: { 'project.id': { $eq: projectIdEq } }
|
|
1041
1055
|
});
|
|
1042
1056
|
}
|
|
1043
|
-
const
|
|
1057
|
+
const parentOrganizationIdEq = (_d = (_c = params.parentOrganization) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$eq;
|
|
1058
|
+
if (typeof parentOrganizationIdEq === 'string') {
|
|
1059
|
+
matchStages.push({
|
|
1060
|
+
$match: { 'parentOrganization.id': { $exists: true, $eq: parentOrganizationIdEq } }
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
const containedInPlaceBranchCodeEq = (_f = (_e = params.containedInPlace) === null || _e === void 0 ? void 0 : _e.branchCode) === null || _f === void 0 ? void 0 : _f.$eq;
|
|
1044
1064
|
if (typeof containedInPlaceBranchCodeEq === 'string') {
|
|
1045
1065
|
matchStages.push({
|
|
1046
1066
|
$match: {
|
|
@@ -1051,7 +1071,7 @@ class MongoRepository {
|
|
|
1051
1071
|
}
|
|
1052
1072
|
});
|
|
1053
1073
|
}
|
|
1054
|
-
const containedInPlaceBranchCodeIn = (
|
|
1074
|
+
const containedInPlaceBranchCodeIn = (_h = (_g = params.containedInPlace) === null || _g === void 0 ? void 0 : _g.branchCode) === null || _h === void 0 ? void 0 : _h.$in;
|
|
1055
1075
|
if (Array.isArray(containedInPlaceBranchCodeIn)) {
|
|
1056
1076
|
matchStages.push({
|
|
1057
1077
|
$match: {
|
|
@@ -1104,7 +1124,7 @@ class MongoRepository {
|
|
|
1104
1124
|
});
|
|
1105
1125
|
}
|
|
1106
1126
|
}
|
|
1107
|
-
const branchCodeIn = (
|
|
1127
|
+
const branchCodeIn = (_j = params.branchCode) === null || _j === void 0 ? void 0 : _j.$in;
|
|
1108
1128
|
if (Array.isArray(branchCodeIn)) {
|
|
1109
1129
|
matchStages.push({
|
|
1110
1130
|
$match: {
|
|
@@ -1115,7 +1135,7 @@ class MongoRepository {
|
|
|
1115
1135
|
}
|
|
1116
1136
|
});
|
|
1117
1137
|
}
|
|
1118
|
-
const branchCodeRegex = (
|
|
1138
|
+
const branchCodeRegex = (_k = params.branchCode) === null || _k === void 0 ? void 0 : _k.$regex;
|
|
1119
1139
|
if (typeof branchCodeRegex === 'string' && branchCodeRegex.length > 0) {
|
|
1120
1140
|
matchStages.push({
|
|
1121
1141
|
$match: {
|
|
@@ -1126,7 +1146,7 @@ class MongoRepository {
|
|
|
1126
1146
|
}
|
|
1127
1147
|
});
|
|
1128
1148
|
}
|
|
1129
|
-
const nameRegex = (
|
|
1149
|
+
const nameRegex = (_l = params.name) === null || _l === void 0 ? void 0 : _l.$regex;
|
|
1130
1150
|
if (typeof nameRegex === 'string' && nameRegex.length > 0) {
|
|
1131
1151
|
matchStages.push({
|
|
1132
1152
|
$match: {
|
|
@@ -1147,7 +1167,7 @@ class MongoRepository {
|
|
|
1147
1167
|
}
|
|
1148
1168
|
});
|
|
1149
1169
|
}
|
|
1150
|
-
const seatingTypeEq = (
|
|
1170
|
+
const seatingTypeEq = (_m = params.seatingType) === null || _m === void 0 ? void 0 : _m.$eq;
|
|
1151
1171
|
if (typeof seatingTypeEq === 'string') {
|
|
1152
1172
|
matchStages.push({
|
|
1153
1173
|
$match: {
|
|
@@ -1163,7 +1183,7 @@ class MongoRepository {
|
|
|
1163
1183
|
&& params.$projection['containedInPlace.containedInPlace'] === 0) {
|
|
1164
1184
|
includeScreeningRooms = false;
|
|
1165
1185
|
}
|
|
1166
|
-
const additionalPropertyElemMatch = (
|
|
1186
|
+
const additionalPropertyElemMatch = (_o = params.additionalProperty) === null || _o === void 0 ? void 0 : _o.$elemMatch;
|
|
1167
1187
|
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
1168
1188
|
matchStages.push({
|
|
1169
1189
|
$match: {
|
|
@@ -670,7 +670,7 @@ function createMovieTheaterFromCOA(project, seller, theaterFromCOA, screensFromC
|
|
|
670
670
|
},
|
|
671
671
|
kanaName: theaterFromCOA.theaterNameKana,
|
|
672
672
|
containsPlace: screensFromCOA.map((screenFromCOA) => {
|
|
673
|
-
return createScreeningRoomFromCOA(project, screenFromCOA);
|
|
673
|
+
return createScreeningRoomFromCOA(project, seller, screenFromCOA);
|
|
674
674
|
}),
|
|
675
675
|
typeOf: factory.placeType.MovieTheater,
|
|
676
676
|
telephone: theaterFromCOA.theaterTelNum,
|
|
@@ -712,7 +712,7 @@ function createMovieTheaterFromCOA(project, seller, theaterFromCOA, screensFromC
|
|
|
712
712
|
*/
|
|
713
713
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
714
714
|
/* istanbul ignore next */
|
|
715
|
-
function createScreeningRoomFromCOA(project, screenFromCOA) {
|
|
715
|
+
function createScreeningRoomFromCOA(project, seller, screenFromCOA) {
|
|
716
716
|
const sections = [];
|
|
717
717
|
const sectionCodes = [];
|
|
718
718
|
screenFromCOA.listSeat.forEach((seat) => {
|
|
@@ -751,7 +751,9 @@ function createScreeningRoomFromCOA(project, screenFromCOA) {
|
|
|
751
751
|
en: screenFromCOA.screenNameEng
|
|
752
752
|
},
|
|
753
753
|
typeOf: factory.placeType.ScreeningRoom,
|
|
754
|
-
maximumAttendeeCapacity: sections[0].containsPlace.length
|
|
754
|
+
maximumAttendeeCapacity: sections[0].containsPlace.length,
|
|
755
|
+
// 必須化(2023-07-14~)
|
|
756
|
+
parentOrganization: { id: seller.id, typeOf: factory.organizationType.Corporation }
|
|
755
757
|
};
|
|
756
758
|
}
|
|
757
759
|
function updateEvent4ttts(params) {
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.315.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.315.0-alpha.3",
|
|
13
13
|
"@cinerino/sdk": "3.160.0-alpha.3",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"postversion": "git push origin --tags",
|
|
118
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
119
119
|
},
|
|
120
|
-
"version": "21.4.0-alpha.
|
|
120
|
+
"version": "21.4.0-alpha.11"
|
|
121
121
|
}
|