import { Connection, FilterQuery, mongo } from 'mongoose'; import { factory } from '../factory'; export interface IAttributes4patchUpdate { typeOf: factory.eventType.ScreeningEvent; eventStatus?: factory.eventStatusType; } export interface IUpdateAggregateReservationParams { $set: { aggregateReservation: factory.event.screeningEvent.IAggregateReservation; aggregateOffer?: Pick; maximumAttendeeCapacity?: number; remainingAttendeeCapacity?: number; checkInCount?: number; attendeeCount?: number; }; $unset: { noExistingAttributeName: 1; maximumAttendeeCapacity?: ''; remainingAttendeeCapacity?: ''; }; } type IUnset = { [key in keyof factory.event.screeningEvent.IEvent]?: 1; }; /** * イベント管理リポジトリ */ export declare class AdminEventRepo { private readonly eventModel; constructor(connection: Connection); /** * イベントIDを生成する */ static CREATE_ID(): string; /** * イベントコードをキーにして冪等置換 */ upsertManyScreeningEventByIdentifier(params: { $set: factory.event.screeningEvent.IAttributes & { id?: never; }; $unset: IUnset; }[], options: { /** * falseの場合setOnInsertのみ * trueの場合setのみ */ update: boolean; }): Promise<{ bulkWriteResult?: mongo.BulkWriteResult; modifiedEvents: { id: string; }[]; }>; /** * イベント部分更新 */ updatePartiallyById(params: { project: { id: string; }; id: string; attributes: IAttributes4patchUpdate; }): Promise; /** * 単一イベント編集 */ updateEventById(params: { id: string; attributes: factory.event.screeningEvent.IAttributes & { id?: never; }; /** * ドキュメント作成時には無視される */ $unset?: IUnset; }): Promise; /** * sskts専用 */ saveManyEvents(params: { id: string; attributes: factory.event.screeningEvent.IAttributes; $unset?: IUnset; upsert: boolean; }[]): Promise; /** * イベントをキャンセルする */ cancelEvent(params: { project: { id: string; }; id: string; }): Promise; /** * 興行イベントのsuperEventを最新の情報に同期する */ syncScreeningEventSeries2screeningEvents(params: { project: { id: string; }; superEventFromDB: Pick; startDate: { $gte: Date; }; }): Promise; deleteEventById(params: { project: { id: string; }; id: string; }): Promise; deleteManyEventByOrganizerId(params: { project: { id: string; }; organizer: { id: string; }; }): Promise; deleteManyEventsByScreeningRoom(params: { project: { id: string; }; location: { /** * ルームコード */ branchCode: string; containedInPlace: { /** * 施設ID */ id: string; }; }; }): Promise; deleteManyBySuperEventId(params: { project: { id: string; }; superEvent: { id: string; }; }): Promise; deleteManyBySuperEventLocationId(params: { project: { id: string; }; superEvent: { location: { id: string; }; }; }): Promise; /** * 興行(プロダクト)から削除する */ deleteManyEventsByItemOfferedId(params: { project: { id: string; }; offers: { itemOffered: { id: { $in: string[]; }; }; }; }): Promise; deleteManyEventsEndedByProject(params: { project: { id: string; }; endDate: { $lte: Date; }; }): Promise; deleteManyEventsEnded(params: { endDate: { $lte: Date; }; }): Promise; deleteByProject(params: { project: { id: string; }; }): Promise; /** * 集計属性を更新する */ updateAggregationById(params: { id: string; }, update: IUpdateAggregateReservationParams): Promise; bulkWrite(bulkWriteOps: any[]): Promise; getCursor(conditions: FilterQuery, projection: any): import("mongoose").Cursor, import("@chevre/factory/lib/chevre/event/screeningEvent").IAttributes & { _id: string; aggregateOffer?: factory.event.screeningEvent.IAggregateOffer; }, import("./mongoose/virtuals").IVirtuals, {}> & import("@chevre/factory/lib/chevre/event/screeningEvent").IAttributes & { _id: string; aggregateOffer?: factory.event.screeningEvent.IAggregateOffer; } & Required<{ _id: string; }> & { __v: number; }, import("mongoose").QueryOptions, (import("mongoose").Document, import("@chevre/factory/lib/chevre/event/screeningEvent").IAttributes & { _id: string; aggregateOffer?: factory.event.screeningEvent.IAggregateOffer; }, import("./mongoose/virtuals").IVirtuals, {}> & import("@chevre/factory/lib/chevre/event/screeningEvent").IAttributes & { _id: string; aggregateOffer?: factory.event.screeningEvent.IAggregateOffer; } & Required<{ _id: string; }> & { __v: number; }) | null>; unsetUnnecessaryFields(params: { filter: FilterQuery; $unset: IUnset; }): Promise; } export {};