import type { Connection, FilterQuery, mongo } from 'mongoose'; import { factory } from '../factory'; import { IDocType } from './mongoose/schemas/eventOffer'; type IUnset = { [key in keyof IDocType]?: 1; }; type IDocWithId = IDocType & { id: string; }; type IKeyOfProjection = keyof IDocType; /** * イベントオファーリポジトリ */ export declare class EventOfferRepo { private readonly eventOfferModel; constructor(connection: Connection); static CREATE_MONGO_CONDITIONS(params: factory.eventOffer.ISearchConditions): FilterQuery[]; findEventOffers(params: factory.eventOffer.ISearchConditions, inclusion: IKeyOfProjection[]): Promise; /** * オファーコードとイベントIDをキーにして冪等置換 */ upsertEventOffersByIdentifier(params: { $set: Pick & { id?: never; }; $unset: IUnset; }[], options: { /** * falseの場合setOnInsertのみ * trueの場合setのみ */ update: boolean; }): Promise<{ bulkWriteResult?: mongo.BulkWriteResult; modifiedProductOffers?: { id: string; }[]; }>; /** * 販売者の提供するイベントオファーを削除する */ deleteEventOffersBySeller(params: { project: { id: string; }; seller: { id: string; }; }): Promise; /** * 有効期間を過ぎたイベントオファーを削除する */ deleteEventOffersExpired(params: { validThrough: { $lte: Date; }; }): Promise; } export {};