@chevre/domain 22.3.0-alpha.7 → 22.3.0-alpha.9

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.
Files changed (48) hide show
  1. package/example/src/chevre/aggregateScreeningEventMaxVersion.ts +2 -2
  2. package/example/src/chevre/aggregation/createAggregateEventTasks.ts +1 -1
  3. package/example/src/chevre/importEventsFromCOA.ts +2 -0
  4. package/example/src/chevre/unsetUnnecessaryFields.ts +11 -68
  5. package/example/src/chevre/upsertScreeningEventSeriesByVersion.ts +2 -2
  6. package/lib/chevre/repo/event.d.ts +30 -125
  7. package/lib/chevre/repo/event.js +199 -392
  8. package/lib/chevre/repo/eventSeries.d.ts +130 -0
  9. package/lib/chevre/repo/eventSeries.js +609 -0
  10. package/lib/chevre/repo/mongoose/schemas/event.js +5 -12
  11. package/lib/chevre/repository.d.ts +5 -0
  12. package/lib/chevre/repository.js +15 -2
  13. package/lib/chevre/service/aggregation/event/aggregateOffers.js +2 -2
  14. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +3 -3
  15. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +1 -1
  16. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +2 -0
  17. package/lib/chevre/service/assetTransaction/reserve/start.js +1 -1
  18. package/lib/chevre/service/event/createEvent.d.ts +2 -0
  19. package/lib/chevre/service/event/createEvent.js +1 -1
  20. package/lib/chevre/service/event.d.ts +3 -0
  21. package/lib/chevre/service/event.js +5 -4
  22. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +2 -0
  23. package/lib/chevre/service/offer/event/authorize.d.ts +2 -0
  24. package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +3 -0
  25. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +6 -6
  26. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +1 -1
  27. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +1 -1
  28. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -1
  29. package/lib/chevre/service/offer/onEventChanged.d.ts +2 -0
  30. package/lib/chevre/service/offer/onEventChanged.js +20 -4
  31. package/lib/chevre/service/offer.js +1 -1
  32. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +1 -1
  33. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
  34. package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
  35. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +1 -1
  36. package/lib/chevre/service/task/createEvent.js +2 -0
  37. package/lib/chevre/service/task/importEventsFromCOA.js +2 -0
  38. package/lib/chevre/service/task/onEventChanged.js +2 -0
  39. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +2 -0
  40. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +11 -6
  41. package/lib/chevre/service/task/onResourceUpdated.js +2 -0
  42. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
  43. package/package.json +1 -1
  44. package/example/src/chevre/createManyEvents.ts +0 -75
  45. package/example/src/chevre/projectEventFields.ts +0 -39
  46. package/example/src/chevre/searchAvaialbleAppliesToMovieTicketByOfferCatalogId.ts +0 -45
  47. package/example/src/chevre/searchEventIds.ts +0 -24
  48. package/example/src/chevre/searchScreeningEventSeries.ts +0 -34
@@ -8,8 +8,8 @@ const project = { id: String(process.env.PROJECT_ID) };
8
8
  async function main() {
9
9
  await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
10
10
 
11
- const eventRepo = await chevre.repository.Event.createInstance(mongoose.connection);
12
- const result = await eventRepo.aggregateScreeningEventMaxVersion(
11
+ const eventSeriesRepo = await chevre.repository.EventSeries.createInstance(mongoose.connection);
12
+ const result = await eventSeriesRepo.aggregateMaxVersion(
13
13
  {
14
14
  project: {
15
15
  id: { $eq: project.id }
@@ -15,7 +15,7 @@ async function main() {
15
15
  const events = <Pick<
16
16
  chevre.factory.event.IEvent<chevre.factory.eventType.ScreeningEvent>,
17
17
  'id' | 'typeOf' | 'startDate' | 'project'
18
- >[]>await eventRepo.projectFields<chevre.factory.eventType.ScreeningEvent>(
18
+ >[]>await eventRepo.projectEventFields<chevre.factory.eventType.ScreeningEvent>(
19
19
  {
20
20
  typeOf: chevre.factory.eventType.ScreeningEvent,
21
21
  project: { id: { $eq: PROJECT.id } },
@@ -14,6 +14,7 @@ async function main() {
14
14
  const categoryCodeRepo = await chevre.repository.CategoryCode.createInstance(mongoose.connection);
15
15
  const creativeWorkRepo = await chevre.repository.CreativeWork.createInstance(mongoose.connection);
16
16
  const eventRepo = await chevre.repository.Event.createInstance(mongoose.connection);
17
+ const eventSeriesRepo = await chevre.repository.EventSeries.createInstance(mongoose.connection);
17
18
  const screeningRoomRepo = await chevre.repository.place.ScreeningRoom.createInstance(mongoose.connection);
18
19
  const movieTheaterRepo = await chevre.repository.place.MovieTheater.createInstance(mongoose.connection);
19
20
  const sellerRepo = await chevre.repository.Seller.createInstance(mongoose.connection);
@@ -50,6 +51,7 @@ async function main() {
50
51
  categoryCode: categoryCodeRepo,
51
52
  creativeWork: creativeWorkRepo,
52
53
  event: eventRepo,
54
+ eventSeries: eventSeriesRepo,
53
55
  movieTheater: movieTheaterRepo,
54
56
  screeningRoom: screeningRoomRepo,
55
57
  seller: sellerRepo,
@@ -6,79 +6,22 @@ import { chevre } from '../../../lib/index';
6
6
  async function main() {
7
7
  await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
8
8
 
9
- const accountTitleRepo = await chevre.repository.AccountTitle.createInstance(mongoose.connection);
10
- const customerRepo = await chevre.repository.Customer.createInstance(mongoose.connection);
11
- const additionalPropertyRepo = await chevre.repository.AdditionalProperty.createInstance(mongoose.connection);
12
- const movieTheaterRepo = await chevre.repository.place.MovieTheater.createInstance(mongoose.connection);
13
- const productModelRepo = await chevre.repository.ProductModel.createInstance(mongoose.connection);
14
- const tripRepo = await chevre.repository.Trip.createInstance(mongoose.connection);
9
+ const eventRepo = await chevre.repository.Event.createInstance(mongoose.connection);
15
10
 
16
11
  let updateResult: any;
17
- updateResult = await customerRepo.unsetUnnecessaryFields({
12
+ updateResult = await eventRepo.unsetUnnecessaryFields({
18
13
  filter: {
19
14
  _id: { $exists: true }
15
+ // startDate: {
16
+ // // $gte: moment()
17
+ // // .add(-48, 'months')
18
+ // // .toDate()
19
+ // // $lte: moment()
20
+ // // .add(-1, 'months')
21
+ // // .toDate()
22
+ // }
20
23
  },
21
- $unset: {
22
- createdAt: 1,
23
- updatedAt: 1,
24
- __v: 1
25
- }
26
- });
27
- console.log(updateResult);
28
-
29
- updateResult = await accountTitleRepo.unsetUnnecessaryFields({
30
- filter: {
31
- _id: { $exists: true }
32
- },
33
- $unset: {
34
- createdAt: 1,
35
- updatedAt: 1,
36
- __v: 1
37
- }
38
- });
39
- console.log(updateResult);
40
-
41
- updateResult = await additionalPropertyRepo.unsetUnnecessaryFields({
42
- filter: {
43
- _id: { $exists: true }
44
- },
45
- $unset: {
46
- createdAt: 1,
47
- updatedAt: 1,
48
- __v: 1
49
- }
50
- });
51
- console.log(updateResult);
52
-
53
- updateResult = await movieTheaterRepo.unsetUnnecessaryFields({
54
- filter: {
55
- _id: { $exists: true }
56
- },
57
- $unset: {
58
- createdAt: 1,
59
- updatedAt: 1,
60
- __v: 1
61
- }
62
- });
63
- console.log(updateResult);
64
-
65
- updateResult = await productModelRepo.unsetUnnecessaryFields({
66
- filter: {
67
- _id: { $exists: true }
68
- },
69
- $unset: {
70
- createdAt: 1,
71
- updatedAt: 1,
72
- __v: 1
73
- }
74
- });
75
- console.log(updateResult);
76
-
77
- updateResult = await tripRepo.unsetUnnecessaryFields({
78
- filter: {
79
- _id: { $exists: true }
80
- },
81
- $unset: {
24
+ $unset: <any>{
82
25
  createdAt: 1,
83
26
  updatedAt: 1,
84
27
  __v: 1
@@ -10,9 +10,9 @@ const PROJECT_ID = String(process.env.PROJECT_ID);
10
10
  async function main() {
11
11
  await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
12
12
 
13
- const eventRepo = await chevre.repository.Event.createInstance(mongoose.connection);
13
+ const eventSeriesRepo = await chevre.repository.EventSeries.createInstance(mongoose.connection);
14
14
 
15
- const result = await eventRepo.upsertScreeningEventSeriesByVersion(
15
+ const result = await eventSeriesRepo.upsertByVersion(
16
16
  [
17
17
  {
18
18
  $set: {
@@ -26,8 +26,8 @@ import type { BulkWriteResult } from 'mongodb';
26
26
  import type { Connection, Document, FilterQuery } from 'mongoose';
27
27
  import * as factory from '../factory';
28
28
  import * as EventFactory from '../factory/event';
29
- import { IDocType } from './mongoose/schemas/event';
30
- export interface IAttributes4patchUpdate<T extends factory.eventType> {
29
+ type AvailableEventType = factory.eventType.Event | factory.eventType.ScreeningEvent;
30
+ export interface IAttributes4patchUpdate<T extends AvailableEventType> {
31
31
  typeOf: T;
32
32
  eventStatus?: factory.eventStatusType;
33
33
  }
@@ -46,7 +46,7 @@ export interface IUpdateAggregateReservationParams {
46
46
  remainingAttendeeCapacity?: '';
47
47
  };
48
48
  }
49
- export type ISearchConditions<T extends factory.eventType> = factory.event.ISearchConditions<T>;
49
+ export type ISearchConditions<T extends AvailableEventType> = factory.event.ISearchConditions<T>;
50
50
  interface IAggregationByStatus {
51
51
  eventCount: number;
52
52
  reservationCount: number;
@@ -69,13 +69,13 @@ interface IAggregateEvent {
69
69
  statuses: IStatus[];
70
70
  }
71
71
  export import IMinimizedIndividualEvent = EventFactory.IMinimizedIndividualEvent;
72
- type IKeyOfProjection<T extends factory.eventType> = Exclude<keyof factory.event.IEvent<T>, 'id'> | 'aggregateEntranceGate' | 'aggregateOffer' | 'superEvent.location.id' | 'offers.itemOffered';
72
+ type IKeyOfProjection<T extends AvailableEventType> = Exclude<keyof factory.event.IEvent<T>, 'id'> | 'aggregateEntranceGate' | 'aggregateOffer' | 'superEvent.location.id' | 'offers.itemOffered';
73
73
  /**
74
74
  * minimizedEvent検索時のprojection候補
75
75
  * add(2024-07-18~)
76
76
  */
77
- type IKeyOfProjection4minimizedEvent<T extends factory.eventType> = T extends factory.eventType.ScreeningEvent ? Exclude<keyof IMinimizedIndividualEvent<T>, 'additionalProperty' | 'id'> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : T extends factory.eventType.Event ? Exclude<keyof IMinimizedIndividualEvent<T>, 'additionalProperty' | 'id'> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : never;
78
- type IUnset<T extends factory.eventType> = {
77
+ type IKeyOfProjection4minimizedEvent<T extends AvailableEventType> = T extends factory.eventType.ScreeningEvent ? Exclude<keyof IMinimizedIndividualEvent<T>, 'additionalProperty' | 'id'> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : T extends factory.eventType.Event ? Exclude<keyof IMinimizedIndividualEvent<T>, 'additionalProperty' | 'id'> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : never;
78
+ type IUnset<T extends AvailableEventType> = {
79
79
  [key in keyof factory.event.IEvent<T>]?: 1;
80
80
  };
81
81
  /**
@@ -84,11 +84,11 @@ type IUnset<T extends factory.eventType> = {
84
84
  export declare class EventRepo {
85
85
  private readonly eventModel;
86
86
  constructor(connection: Connection);
87
- static CREATE_MONGO_CONDITIONS<T extends factory.eventType>(conditions: ISearchConditions<T>): FilterQuery<factory.event.IEvent<T>>[];
87
+ static CREATE_MONGO_CONDITIONS<T extends AvailableEventType>(conditions: ISearchConditions<T>): FilterQuery<factory.event.IEvent<T>>[];
88
88
  /**
89
89
  * 複数イベントを作成する
90
90
  */
91
- createMany<T extends factory.eventType>(params: {
91
+ createManyEvents<T extends AvailableEventType>(params: {
92
92
  attributes: factory.event.IAttributes<T>[];
93
93
  expectsNoContent: boolean;
94
94
  }): Promise<string[] | void>;
@@ -96,7 +96,7 @@ export declare class EventRepo {
96
96
  * 特定の追加特性をキーにして、存在しなければ作成する(複数対応)
97
97
  * 存在すれば、eventStatusのみ更新する
98
98
  */
99
- createManyIfNotExist<T extends factory.eventType>(params: {
99
+ createManyIfNotExist<T extends AvailableEventType>(params: {
100
100
  attributes: factory.event.IAttributes<T>;
101
101
  filter: {
102
102
  name: string;
@@ -107,28 +107,10 @@ export declare class EventRepo {
107
107
  id: string;
108
108
  }[];
109
109
  } | void>;
110
- /**
111
- * コンテンツ+バージョンをキーにして、なければ作成する(複数対応)
112
- */
113
- createScreeningEventSeriesIfNotExistByWorkPerformed(params: {
114
- attributes: factory.event.IAttributes<factory.eventType.ScreeningEventSeries>;
115
- }[]): Promise<BulkWriteResult | void>;
116
- /**
117
- * コンテンツ+バージョンをキーにして冪等置換
118
- */
119
- upsertScreeningEventSeriesByVersion(params: {
120
- $set: factory.event.IAttributes<factory.eventType.ScreeningEventSeries>;
121
- $unset?: IUnset<factory.eventType.ScreeningEventSeries>;
122
- }[]): Promise<{
123
- bulkWriteResult4insert: BulkWriteResult;
124
- modifiedEvents: {
125
- id: string;
126
- }[];
127
- } | void>;
128
110
  /**
129
111
  * イベント部分更新
130
112
  */
131
- updatePartiallyById<T extends factory.eventType>(params: {
113
+ updatePartiallyById<T extends AvailableEventType>(params: {
132
114
  project: {
133
115
  id: string;
134
116
  };
@@ -138,7 +120,7 @@ export declare class EventRepo {
138
120
  /**
139
121
  * イベントを保管する
140
122
  */
141
- save<T extends factory.eventType>(params: {
123
+ saveEvent<T extends AvailableEventType>(params: {
142
124
  id?: string;
143
125
  attributes: factory.event.IAttributes<T>;
144
126
  /**
@@ -149,7 +131,7 @@ export declare class EventRepo {
149
131
  }): Promise<{
150
132
  id: string;
151
133
  }>;
152
- saveMany<T extends factory.eventType>(params: {
134
+ saveManyEvents<T extends AvailableEventType>(params: {
153
135
  id: string;
154
136
  attributes: factory.event.IAttributes<T>;
155
137
  $unset?: IUnset<T>;
@@ -164,12 +146,12 @@ export declare class EventRepo {
164
146
  /**
165
147
  * イベントを検索する(inclusion projection)
166
148
  */
167
- projectFields<T extends factory.eventType>(params: ISearchConditions<T>, inclusion: IKeyOfProjection<T>[]): Promise<Omit<factory.event.IEvent<T>, 'aggregateEntranceGate' | 'aggregateOffer'>[]>;
149
+ projectEventFields<T extends AvailableEventType>(params: ISearchConditions<T>, inclusion: IKeyOfProjection<T>[]): Promise<Omit<factory.event.IEvent<T>, 'aggregateEntranceGate' | 'aggregateOffer'>[]>;
168
150
  /**
169
151
  * IDのみで検索する
170
152
  * projectionなし
171
153
  */
172
- findAnyEventById<T extends factory.eventType>(params: {
154
+ findAnyEventById<T extends AvailableEventType>(params: {
173
155
  id: {
174
156
  $eq: string;
175
157
  };
@@ -184,18 +166,18 @@ export declare class EventRepo {
184
166
  };
185
167
  };
186
168
  }): Promise<Omit<factory.event.IEvent<T>, 'aggregateEntranceGate' | 'aggregateOffer'>>;
187
- searchIds<T extends factory.eventType>(params: ISearchConditions<T>): Promise<string[]>;
169
+ searchEventIds<T extends AvailableEventType>(params: ISearchConditions<T>): Promise<string[]>;
188
170
  /**
189
171
  * 特定イベントから指定フィールドのみ取得する
190
172
  * イベント IDは必ず返ります
191
173
  */
192
- projectFieldsById<T extends factory.eventType.ScreeningEvent | factory.eventType.Event>(params: {
174
+ projectEventFieldsById<T extends AvailableEventType>(params: {
193
175
  id: string;
194
176
  }, inclusion: IKeyOfProjection4minimizedEvent<T>[]): Promise<IMinimizedIndividualEvent<T>>;
195
177
  /**
196
178
  * イベントをキャンセルする
197
179
  */
198
- cancel(params: {
180
+ cancelEvent(params: {
199
181
  project: {
200
182
  id: string;
201
183
  };
@@ -208,23 +190,18 @@ export declare class EventRepo {
208
190
  project: {
209
191
  id: string;
210
192
  };
211
- superEvent: {
212
- /**
213
- * 施設コンテンツID
214
- */
215
- id: string;
216
- };
193
+ superEventFromDB: Pick<factory.event.screeningEventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'endDate' | 'headline' | 'id' | 'kanaName' | 'location' | 'name' | 'soundFormat' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'videoFormat' | 'workPerformed'>;
217
194
  startDate: {
218
195
  $gte: Date;
219
196
  };
220
197
  }): Promise<void>;
221
- deleteById(params: {
198
+ deleteEventById(params: {
222
199
  project: {
223
200
  id: string;
224
201
  };
225
202
  id: string;
226
203
  }): Promise<void>;
227
- deleteManyByOrganizerId(params: {
204
+ deleteManyEventByOrganizerId(params: {
228
205
  project: {
229
206
  id: string;
230
207
  };
@@ -232,15 +209,7 @@ export declare class EventRepo {
232
209
  id: string;
233
210
  };
234
211
  }): Promise<import("mongodb").DeleteResult>;
235
- deleteManyByLocationId(params: {
236
- project: {
237
- id: string;
238
- };
239
- location: {
240
- id: string;
241
- };
242
- }): Promise<import("mongodb").DeleteResult>;
243
- deleteManyByScreeningRoom(params: {
212
+ deleteManyEventsByScreeningRoom(params: {
244
213
  project: {
245
214
  id: string;
246
215
  };
@@ -278,7 +247,7 @@ export declare class EventRepo {
278
247
  /**
279
248
  * 興行(プロダクト)から削除する
280
249
  */
281
- deleteManyByItemOfferedId(params: {
250
+ deleteManyEventsByItemOfferedId(params: {
282
251
  project: {
283
252
  id: string;
284
253
  };
@@ -290,21 +259,9 @@ export declare class EventRepo {
290
259
  };
291
260
  };
292
261
  }): Promise<import("mongodb").DeleteResult>;
293
- deleteManyEndedByIds(params: {
294
- typeOf: {
295
- $in: factory.eventType[];
296
- };
297
- project: {
298
- id: string;
299
- };
300
- ids: string[];
301
- endDate: {
302
- $lte: Date;
303
- };
304
- }): Promise<import("mongodb").DeleteResult>;
305
- deleteManyEndedByProject(params: {
262
+ deleteManyEventsEndedByProject(params: {
306
263
  typeOf: {
307
- $in: factory.eventType[];
264
+ $in: AvailableEventType[];
308
265
  };
309
266
  project: {
310
267
  id: string;
@@ -313,9 +270,9 @@ export declare class EventRepo {
313
270
  $lte: Date;
314
271
  };
315
272
  }): Promise<import("mongodb").DeleteResult>;
316
- deleteManyEnded(params: {
273
+ deleteManyEventsEnded(params: {
317
274
  typeOf: {
318
- $eq: factory.eventType;
275
+ $eq: AvailableEventType;
319
276
  };
320
277
  endDate: {
321
278
  $lte: Date;
@@ -337,51 +294,33 @@ export declare class EventRepo {
337
294
  validationErrors: import("mongoose").Error[];
338
295
  } | undefined;
339
296
  }>;
340
- getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<Document<unknown, {}, IDocType> & Omit<(import("@chevre/factory/lib/event/anyEvent").IAttributes & {
297
+ getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<Document<unknown, {}, import("./mongoose/schemas/event").IDocType> & Omit<(import("@chevre/factory/lib/event/anyEvent").IAttributes & {
341
298
  _id: string;
342
299
  } & Required<{
343
- /**
344
- * イベントリポジトリ
345
- */
346
300
  _id: string;
347
301
  }>) | (import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
348
302
  _id: string;
349
303
  alternateName?: any;
350
304
  aggregateOffer?: import("@chevre/factory/lib/event/anyEvent").IAggregateOffer | undefined;
351
305
  } & Required<{
352
- /**
353
- * イベントリポジトリ
354
- */
355
306
  _id: string;
356
307
  }>) | (import("@chevre/factory/lib/event/screeningEventSeries").IAttributes & {
357
308
  _id: string;
358
309
  } & Required<{
359
- /**
360
- * イベントリポジトリ
361
- */
362
310
  _id: string;
363
- }>), never>, import("mongoose").QueryOptions<Document<unknown, {}, IDocType> & Omit<(import("@chevre/factory/lib/event/anyEvent").IAttributes & {
311
+ }>), never>, import("mongoose").QueryOptions<Document<unknown, {}, import("./mongoose/schemas/event").IDocType> & Omit<(import("@chevre/factory/lib/event/anyEvent").IAttributes & {
364
312
  _id: string;
365
313
  } & Required<{
366
- /**
367
- * イベントリポジトリ
368
- */
369
314
  _id: string;
370
315
  }>) | (import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
371
316
  _id: string;
372
317
  alternateName?: any;
373
318
  aggregateOffer?: import("@chevre/factory/lib/event/anyEvent").IAggregateOffer | undefined;
374
319
  } & Required<{
375
- /**
376
- * イベントリポジトリ
377
- */
378
320
  _id: string;
379
321
  }>) | (import("@chevre/factory/lib/event/screeningEventSeries").IAttributes & {
380
322
  _id: string;
381
323
  } & Required<{
382
- /**
383
- * イベントリポジトリ
384
- */
385
324
  _id: string;
386
325
  }>), never>>>;
387
326
  addAvailableAtOrFrom(params: {
@@ -392,44 +331,10 @@ export declare class EventRepo {
392
331
  };
393
332
  };
394
333
  }): Promise<void>;
395
- deleteAvailableAtOrFrom(params: {
396
- id: string;
397
- offers: {
398
- seller: {
399
- makesOffer: {
400
- availableAtOrFrom: {
401
- id: string;
402
- };
403
- };
404
- };
405
- };
406
- }): Promise<void>;
407
- unsetUnnecessaryFields<T extends factory.eventType>(params: {
334
+ unsetUnnecessaryFields<T extends AvailableEventType>(params: {
408
335
  filter: FilterQuery<factory.event.IEvent<T>>;
409
336
  $unset: IUnset<T>;
410
337
  }): Promise<import("mongodb").UpdateResult>;
411
- /**
412
- * 既存施設コンテンツの最大バージョンを集計する
413
- */
414
- aggregateScreeningEventMaxVersion(params: {
415
- project: {
416
- id: {
417
- $eq: string;
418
- };
419
- };
420
- workPerformed: {
421
- identifier: {
422
- $eq: string;
423
- };
424
- };
425
- location: {
426
- branchCode: {
427
- $in: string[];
428
- };
429
- };
430
- }): Promise<{
431
- maxVersion: string;
432
- }>;
433
338
  aggregateEvent(params: {
434
339
  project?: {
435
340
  id?: {
@@ -438,7 +343,7 @@ export declare class EventRepo {
438
343
  };
439
344
  startFrom: Date;
440
345
  startThrough: Date;
441
- typeOf: factory.eventType;
346
+ typeOf: AvailableEventType;
442
347
  }): Promise<IAggregateEvent>;
443
348
  private agggregateByStatus;
444
349
  }