import type { Connection, UpdateWriteOpResult, mongo } from 'mongoose'; import { IDocType } from './mongoose/schemas/reservation'; import { factory } from '../factory'; export interface IUpdatePartiallyParams { additionalTicketText?: string; } export type ICancelResult = UpdateWriteOpResult; export type ICheckedInResult = UpdateWriteOpResult; type ISavingReservedTicket = Omit & { ticketType?: never; }; /** * ドキュメントとして保管する予約 */ export type ICreatingReservation = Omit & { _id: string; reservedTicket: ISavingReservedTicket; }; /** * 廃止予定の予約属性 */ export type IDeprecatedField = 'price' | 'underName' | 'priceCurrency' | 'issuedThrough' | 'numSeats'; export type IKeyOfProjection = Exclude | 'reservedTicket.dateUsed' | 'reservationFor.id' | 'reservationFor.typeOf'; export type IAttendedReservation = Pick & { reservationFor: Pick; reservedTicket: Pick; }; export type IReservationAsFindResult = Omit & { /** * 実データとしてはまだ存在しているが型から廃止(2026-03-26~) */ price?: never; /** * 実データとしてはまだ存在しているが型から廃止(2026-03-26~) */ underName?: never; /** * discontinue(2026-05-10~) */ priceCurrency?: never; /** * discontinue(2026-05-10~) */ issuedThrough?: never; /** * discontinue(2026-05-11~) */ numSeats?: never; }; /** * 予約リポジトリ */ export declare class ReservationRepo { private readonly reservationModel; constructor(connection: Connection); /** * 汎用予約カウント */ count(params: factory.reservation.eventReservation.ISearchConditions): Promise; /** * 予約検索 */ findReservations(params: factory.reservation.eventReservation.ISearchConditions, inclusion?: Partial>): Promise; findReservationById(params: { id: string; inclusion: IKeyOfProjection[]; }): Promise; confirmManyIfNotExist(params: { bookingTime: Date; project: { id: string; }; provider: factory.reservation.IProvider; subReservation: factory.assetTransaction.reserve.IObjectSubReservation[]; reservationFor: factory.assetTransaction.reserve.IReservationFor; reservationNumber: string; underName?: factory.reservation.IUnderName; broker?: factory.reservation.IBroker; }): Promise; /** * 予約取消 */ cancelById(params: { id: string; previousReservationStatus?: factory.reservationStatusType; modifiedTime: Date; }): Promise; /** * 予約取消 */ cancelByReservationNumber(params: { reservationNumber: string; previousReservationStatus?: factory.reservationStatusType; modifiedTime: Date; }): Promise; /** * 発券する */ checkInIfNot(params: { id?: string | { $in?: string[]; }; reservationNumber?: string | { $in?: string[]; }; /** * modifiedTime */ now: Date; }): Promise; /** * 入場する */ attendIfNotAttended(params: { id: string; /** * modifiedTime */ now: Date; }): Promise; /** * 予約部分更新 */ updatePartiallyById(params: { id: string; update: IUpdatePartiallyParams; }): Promise; deleteByIds(params: { project: { id: string; }; ids: string[]; }): Promise; deleteByReservationNumbers(params: { project: { id: string; }; reservationNumbers: string[]; }): Promise<{ n?: number; ok?: number; deletedCount?: number; } | null>; deleteByProject(params: { project: { id: string; }; }): Promise; searchIdsByReservationNumber(params: { reservationNumber: { $in: string[]; }; }): Promise; getCursor(conditions: any, projection: any): import("mongoose").Cursor, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit & { _id: string; previousReservationStatus?: factory.reservationStatusType; price?: never; priceCurrency?: never; issuedThrough?: never; } & Required<{ _id: string; }> & { __v: number; }, import("mongoose").QueryOptions, (import("mongoose").Document, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit & { _id: string; previousReservationStatus?: factory.reservationStatusType; price?: never; priceCurrency?: never; issuedThrough?: never; } & Required<{ _id: string; }> & { __v: number; }) | null>; unsetUnnecessaryFields(params: { filter: any; $unset: any; }): Promise; } export {};