@chevre/domain 28.0.0-alpha.23 → 28.0.0-alpha.25

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.
@@ -4,5 +4,5 @@ export type IMinimizedIndividualEvent = Pick<factory.event.screeningEvent.IEvent
4
4
  * 興行イベントのsuperEventを作成する
5
5
  */
6
6
  export declare function minimizeSuperEvent(params: {
7
- superEventFromDB: Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'endDate' | 'headline' | 'id' | 'kanaName' | 'location' | 'name' | 'soundFormat' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed'>;
7
+ superEventFromDB: Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'endDate' | 'headline' | 'id' | 'kanaName' | 'location' | 'name' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed'>;
8
8
  }): factory.event.screeningEvent.ISuperEvent;
@@ -29,15 +29,11 @@ function minimizeSuperEvent(params) {
29
29
  ...(params.superEventFromDB.location.name !== undefined)
30
30
  ? { name: params.superEventFromDB.location.name }
31
31
  : undefined
32
- // 廃止(2024-03-05~)
33
- // ...(typeof params.superEventFromDB.location.kanaName === 'string')
34
- // ? { kanaName: params.superEventFromDB.location.kanaName }
35
- // : undefined
36
32
  };
37
33
  return {
38
34
  typeOf: factory_1.factory.eventType.ScreeningEventSeries,
39
35
  id: params.superEventFromDB.id,
40
- soundFormat: params.superEventFromDB.soundFormat,
36
+ // soundFormat: params.superEventFromDB.soundFormat, // discontinue(2026-10-05~)
41
37
  workPerformed,
42
38
  location,
43
39
  kanaName: params.superEventFromDB.kanaName,
@@ -100,7 +100,7 @@ export declare class AdminEventRepo {
100
100
  project: {
101
101
  id: string;
102
102
  };
103
- superEventFromDB: Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'endDate' | 'headline' | 'id' | 'kanaName' | 'location' | 'name' | 'soundFormat' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed'>;
103
+ superEventFromDB: Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'endDate' | 'headline' | 'id' | 'kanaName' | 'location' | 'name' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed'>;
104
104
  startDate: {
105
105
  $gte: Date;
106
106
  };
@@ -40,28 +40,6 @@ export declare class AdminEventSeriesRepo {
40
40
  };
41
41
  id: string;
42
42
  }): Promise<void>;
43
- /**
44
- * 既存施設コンテンツの最大バージョンを集計する
45
- */
46
- aggregateMaxVersion(params: {
47
- project: {
48
- id: {
49
- $eq: string;
50
- };
51
- };
52
- workPerformed: {
53
- identifier: {
54
- $eq: string;
55
- };
56
- };
57
- location: {
58
- branchCode: {
59
- $in: string[];
60
- };
61
- };
62
- }): Promise<{
63
- maxVersion: string;
64
- }>;
65
43
  getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, factory.eventSeries.IAttributes & {
66
44
  _id: string;
67
45
  }, import("./mongoose/virtuals").IVirtuals, {}> & factory.eventSeries.IAttributes & {
@@ -130,37 +130,41 @@ class AdminEventSeriesRepo {
130
130
  }, { projection: { _id: 1 } })
131
131
  .exec();
132
132
  }
133
- /**
134
- * 既存施設コンテンツの最大バージョンを集計する
135
- */
136
- async aggregateMaxVersion(params) {
137
- const aggregations = await this.eventSeriesModel.aggregate([
138
- {
139
- $match: {
140
- 'project.id': { $eq: params.project.id.$eq },
141
- 'workPerformed.identifier': { $exists: true, $eq: params.workPerformed.identifier.$eq },
142
- 'workPerformed.version': { $exists: true },
143
- 'location.branchCode': { $exists: true, $in: params.location.branchCode.$in }
144
- }
145
- },
146
- {
147
- $project: {
148
- // workPerformed: '$workPerformed',
149
- version: { $toLong: '$workPerformed.version' } // support YYYYMMDDHHmmss
150
- }
151
- },
152
- {
153
- $group: {
154
- _id: null,
155
- maxVersion: { $max: '$version' }
156
- }
157
- }
158
- ])
159
- .exec();
160
- const firstMaxVersion = aggregations.at(0)?.maxVersion;
161
- const maxVersion = (typeof firstMaxVersion === 'number') ? String(firstMaxVersion) : '0';
162
- return { maxVersion };
163
- }
133
+ // /**
134
+ // * 既存施設コンテンツの最大バージョンを集計する
135
+ // */
136
+ // public async aggregateMaxVersion(params: {
137
+ // project: { id: { $eq: string } };
138
+ // workPerformed: { identifier: { $eq: string } };
139
+ // location: { branchCode: { $in: string[] } };
140
+ // }): Promise<{ maxVersion: string }> {
141
+ // const aggregations = await this.eventSeriesModel.aggregate<{ maxVersion: number }>([
142
+ // {
143
+ // $match: {
144
+ // 'project.id': { $eq: params.project.id.$eq },
145
+ // 'workPerformed.identifier': { $exists: true, $eq: params.workPerformed.identifier.$eq },
146
+ // 'workPerformed.version': { $exists: true },
147
+ // 'location.branchCode': { $exists: true, $in: params.location.branchCode.$in }
148
+ // }
149
+ // },
150
+ // {
151
+ // $project: {
152
+ // // workPerformed: '$workPerformed',
153
+ // version: { $toLong: '$workPerformed.version' } // support YYYYMMDDHHmmss
154
+ // }
155
+ // },
156
+ // {
157
+ // $group: {
158
+ // _id: null,
159
+ // maxVersion: { $max: '$version' }
160
+ // }
161
+ // }
162
+ // ])
163
+ // .exec();
164
+ // const firstMaxVersion = aggregations.at(0)?.maxVersion;
165
+ // const maxVersion: string = (typeof firstMaxVersion === 'number') ? String(firstMaxVersion) : '0';
166
+ // return { maxVersion };
167
+ // }
164
168
  getCursor(conditions, projection) {
165
169
  return this.eventSeriesModel.find(conditions, projection)
166
170
  .sort({ startDate: factory_1.factory.sortType.Descending })
@@ -17,28 +17,7 @@ class CategoryCodeRepo {
17
17
  this.categoryCodeModel = connection.model(categoryCode_1.modelName, (0, categoryCode_1.createSchema)());
18
18
  }
19
19
  static CREATE_MONGO_CONDITIONS(params) {
20
- // const excludeMovieTicketType = true;
21
20
  const andConditions = [];
22
- // 決済カード区分をmovieTicketTypesへ移行済なので、excludeMovieTicketTypeオプションは不要(2025-11-07~)
23
- // if (excludeMovieTicketType) {
24
- // andConditions.push({
25
- // 'inCodeSet.identifier': {
26
- // $in: [
27
- // factory.categoryCode.CategorySetIdentifier.ContentRatingType,
28
- // factory.categoryCode.CategorySetIdentifier.CurrencyType,
29
- // factory.categoryCode.CategorySetIdentifier.CustomerType,
30
- // factory.categoryCode.CategorySetIdentifier.DistributorType,
31
- // factory.categoryCode.CategorySetIdentifier.MembershipType,
32
- // factory.categoryCode.CategorySetIdentifier.OfferCategoryType,
33
- // factory.categoryCode.CategorySetIdentifier.PaymentMethodType,
34
- // factory.categoryCode.CategorySetIdentifier.SeatingType,
35
- // factory.categoryCode.CategorySetIdentifier.ServiceType,
36
- // factory.categoryCode.CategorySetIdentifier.SoundFormatType,
37
- // factory.categoryCode.CategorySetIdentifier.VideoFormatType
38
- // ]
39
- // }
40
- // });
41
- // }
42
21
  /* istanbul ignore else */
43
22
  if (params.project !== undefined && params.project !== null) {
44
23
  if (params.project.id !== undefined && params.project.id !== null) {
@@ -1,16 +1,6 @@
1
1
  import type { Connection, FilterQuery } from 'mongoose';
2
2
  import { factory } from '../factory';
3
- type ISearchConditions = Pick<factory.eventSeries.ISearchConditions, 'limit' | 'page' | 'sort' | 'additionalProperty' | 'endFrom' | 'endThrough' | 'id' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'name' | 'organizer' | 'project' | 'startFrom' | 'startThrough' | 'videoFormat'> & {
4
- workPerformed?: never;
5
- /**
6
- * コンテンツコード
7
- */
8
- movieIdentifier?: string;
9
- /**
10
- * コンテンツバージョン
11
- */
12
- movieVersion?: string;
13
- };
3
+ type ISearchConditions = Pick<factory.eventSeries.ISearchConditions, 'limit' | 'page' | 'sort' | 'additionalProperty' | 'endFrom' | 'endThrough' | 'id' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'name' | 'organizer' | 'project' | 'startFrom' | 'startThrough' | 'videoFormat' | 'workPerformed' | 'movieIdentifier' | 'movieVersion'>;
14
4
  type IKeyOfProjection = Exclude<keyof factory.eventSeries.IEvent, 'id' | 'videoFormat'>;
15
5
  /**
16
6
  * 施設コンテンツリポジトリ
@@ -88,10 +88,6 @@ const indexes = [
88
88
  }
89
89
  }
90
90
  ],
91
- [
92
- { typeOf: 1, startDate: 1 },
93
- { name: 'searchByTypeOf' }
94
- ],
95
91
  [
96
92
  { eventStatus: 1, startDate: 1 },
97
93
  { name: 'searchByEventStatus' }
@@ -182,15 +178,6 @@ const indexes = [
182
178
  name: 'searchByOffersItemOfferedId'
183
179
  }
184
180
  ],
185
- [
186
- { 'offers.seller.makesOffer': 1, startDate: 1 },
187
- {
188
- name: 'searchBySellerMakesOffer',
189
- partialFilterExpression: {
190
- 'offers.seller.makesOffer': { $exists: true }
191
- }
192
- }
193
- ],
194
181
  [
195
182
  { 'offers.seller.makesOffer.availableAtOrFrom.id': 1, startDate: 1 },
196
183
  {
@@ -74,14 +74,6 @@ const indexes = [
74
74
  { 'organizer.id': 1, startDate: 1 },
75
75
  { name: 'organizerId' }
76
76
  ],
77
- [
78
- { typeOf: 1, startDate: 1 },
79
- { name: 'typeOf' }
80
- ],
81
- [
82
- { eventStatus: 1, startDate: 1 },
83
- { name: 'eventStatus' }
84
- ],
85
77
  [
86
78
  { 'location.id': 1, startDate: 1 },
87
79
  {
@@ -146,15 +138,6 @@ const indexes = [
146
138
  }
147
139
  }
148
140
  ],
149
- [
150
- { 'soundFormat.typeOf': 1, startDate: 1 },
151
- {
152
- name: 'soundFormatTypeOf',
153
- partialFilterExpression: {
154
- 'soundFormat.typeOf': { $exists: true }
155
- }
156
- }
157
- ],
158
141
  [
159
142
  { 'name.ja': 1, startDate: 1 },
160
143
  {
@@ -97,7 +97,7 @@ function createScreeningEvents(params, options) {
97
97
  'name', 'kanaName', 'alternativeHeadline', 'location',
98
98
  'organizer',
99
99
  // 'videoFormat', // 参照廃止(2026-02-10~)
100
- 'soundFormat', 'workPerformed',
100
+ 'workPerformed',
101
101
  'duration', 'endDate', 'startDate', 'coaInfo',
102
102
  'offers', 'additionalProperty'
103
103
  ]);
@@ -166,9 +166,9 @@ function createScreeningEvents(params, options) {
166
166
  function minimizeSuperEvent(params) {
167
167
  const { workPerformed,
168
168
  // videoFormat,
169
- startDate, soundFormat, name, location, kanaName, identifier, endDate, duration, coaInfo, alternativeHeadline, typeOf, id } = params.superEvent;
169
+ startDate, name, location, kanaName, identifier, endDate, duration, coaInfo, alternativeHeadline, typeOf, id } = params.superEvent;
170
170
  return {
171
- workPerformed, startDate, soundFormat,
171
+ workPerformed, startDate,
172
172
  name, location, kanaName, identifier,
173
173
  endDate, duration, coaInfo, alternativeHeadline,
174
174
  typeOf, id
@@ -346,7 +346,7 @@ function createReservation(params) {
346
346
  id: event.superEvent.id,
347
347
  location: event.superEvent.location,
348
348
  name: event.superEvent.name,
349
- soundFormat: event.superEvent.soundFormat,
349
+ // soundFormat: event.superEvent.soundFormat, // discontinue(2026-10-05~)
350
350
  workPerformed,
351
351
  ...(typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined,
352
352
  ...(event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined
@@ -122,16 +122,12 @@ function searchEventTicketOffersByEvent(params) {
122
122
  limit: 1,
123
123
  page: 1,
124
124
  id: { $eq: event.superEvent.id }
125
- // typeOf: factory.eventType.ScreeningEventSeries
126
- },
127
- // ['soundFormat', 'videoFormat', 'subEvent']
128
- ['soundFormat', 'subEvent']);
125
+ }, ['subEvent']);
129
126
  const superEvent = superEvents.shift();
130
127
  if (superEvent === undefined) {
131
128
  throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEventSeries);
132
129
  }
133
- soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
134
- // videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
130
+ soundFormatTypes = []; // 現時点で音響方式区分は存在しない(2026-10-05~)
135
131
  videoFormatTypes = (Array.isArray(superEvent.subEvent?.videoFormat)) ? superEvent.subEvent.videoFormat : [];
136
132
  }
137
133
  const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
@@ -20,23 +20,17 @@ function searchOfferAppliesToMovieTicket(params) {
20
20
  return async (repos) => {
21
21
  // optimize(2024-07-18~)
22
22
  const event = await repos.event.projectEventFieldsById({ id: params.event.id }, ['project', 'startDate', 'typeOf', 'superEvent.id', 'offers.itemOffered.id', 'offers.unacceptedPaymentMethod']);
23
- // let soundFormatTypes: string[] = [];
24
23
  let videoFormatTypes = [];
25
24
  if (event.typeOf === factory_1.factory.eventType.ScreeningEvent) {
26
25
  const superEvents = await repos.eventSeries.findEventSeries({
27
26
  limit: 1,
28
27
  page: 1,
29
28
  id: { $eq: event.superEvent.id }
30
- // typeOf: factory.eventType.ScreeningEventSeries
31
- },
32
- // ['soundFormat', 'videoFormat', 'subEvent']
33
- ['soundFormat', 'subEvent']);
29
+ }, ['subEvent']);
34
30
  const superEvent = superEvents.shift();
35
31
  if (superEvent === undefined) {
36
32
  throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEventSeries);
37
33
  }
38
- // soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
39
- // videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
40
34
  videoFormatTypes = (Array.isArray(superEvent.subEvent?.videoFormat)) ? superEvent.subEvent.videoFormat : [];
41
35
  }
42
36
  const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
@@ -108,16 +108,12 @@ function searchEventTicketOffersByEvent(params) {
108
108
  limit: 1,
109
109
  page: 1,
110
110
  id: { $eq: event.superEvent.id }
111
- // typeOf: factory.eventType.ScreeningEventSeries
112
- },
113
- // ['soundFormat', 'videoFormat', 'subEvent']
114
- ['soundFormat', 'subEvent']);
111
+ }, ['subEvent']);
115
112
  const superEvent = superEvents.shift();
116
113
  if (superEvent === undefined) {
117
114
  throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEventSeries);
118
115
  }
119
- soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
120
- // videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
116
+ soundFormatTypes = []; // 現時点で音響方式区分は存在しない(2026-10-05~)
121
117
  videoFormatTypes = (Array.isArray(superEvent.subEvent?.videoFormat)) ? superEvent.subEvent.videoFormat : [];
122
118
  }
123
119
  const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
@@ -75,8 +75,7 @@ function syncEventSeries2screeningEvents(params) {
75
75
  }, [
76
76
  'additionalProperty', 'alternativeHeadline', 'description', 'dubLanguage',
77
77
  'endDate', 'headline', 'kanaName', 'location', 'name',
78
- 'soundFormat', 'startDate', 'subtitleLanguage', 'typeOf',
79
- // 'videoFormat', // 参照廃止(2026-02-10~)
78
+ 'startDate', 'subtitleLanguage', 'typeOf',
80
79
  'workPerformed'
81
80
  ]);
82
81
  const superEventFromDB = superEvents.shift();
@@ -166,15 +165,15 @@ function createInformTasks(params, setting) {
166
165
  id: { $in: params.ids }
167
166
  // typeOf: params.typeOf
168
167
  }, [
169
- 'project', 'organizer', 'typeOf', 'name', 'location', 'soundFormat', 'workPerformed', 'kanaName', 'eventStatus',
168
+ 'project', 'organizer', 'typeOf', 'name', 'location', 'workPerformed', 'kanaName', 'eventStatus',
170
169
  'endDate', 'startDate', 'additionalProperty', 'subtitleLanguage', 'dubLanguage',
171
170
  'alternativeHeadline', 'description', 'duration', 'headline', 'subEvent'
172
171
  ] // inclusion(2024-07-30~)
173
172
  );
174
173
  // 最適化(2024-03-25~)
175
- events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id, soundFormat, workPerformed, kanaName, eventStatus, endDate, startDate, additionalProperty, subtitleLanguage, dubLanguage, alternativeHeadline, description, duration, headline, subEvent }) => {
174
+ events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id, workPerformed, kanaName, eventStatus, endDate, startDate, additionalProperty, subtitleLanguage, dubLanguage, alternativeHeadline, description, duration, headline, subEvent }) => {
176
175
  return {
177
- project, organizer, typeOf, name, location, id, soundFormat, workPerformed, kanaName, eventStatus,
176
+ project, organizer, typeOf, name, location, id, workPerformed, kanaName, eventStatus,
178
177
  endDate, startDate,
179
178
  videoFormat: (Array.isArray(subEvent?.videoFormat))
180
179
  ? subEvent.videoFormat.map((codeValue) => ({ typeOf: codeValue, name: codeValue }))
@@ -249,7 +249,7 @@ function syncEvents(params) {
249
249
  'name', 'kanaName', 'alternativeHeadline', 'location',
250
250
  'organizer',
251
251
  // 'videoFormat', // 参照廃止(2026-02-10~)
252
- 'soundFormat', 'workPerformed',
252
+ 'workPerformed',
253
253
  'duration', 'endDate', 'startDate', 'coaInfo',
254
254
  'offers', 'additionalProperty'
255
255
  ])).shift();
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.1.0-alpha.2",
14
+ "@chevre/factory": "11.1.0-alpha.3",
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.23"
91
+ "version": "28.0.0-alpha.25"
92
92
  }