UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

78 lines (77 loc) 1.9 kB
import { Connection } from 'mongoose'; import * as factory from '../factory'; /** * プロダクトオファーリポジトリ */ export declare class ProductOfferRepo { private readonly productModel; constructor(connection: Connection); /** * プロダクトオファー検索 */ search(params: { limit?: number; page?: number; project?: { id?: { $eq?: string; }; }; itemOffered?: { id?: { $eq?: string; }; }; seller?: { id?: { $eq?: string; }; }; }): Promise<(Pick<factory.product.IOffer, 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'> & { itemOffered: Pick<factory.product.IProduct, 'id' | 'name' | 'typeOf'>; })[]>; create(params: factory.product.IOffer & { project: { id: string; }; itemOffered: { /** * プロダクトID */ id: string; }; }): Promise<{ id: string; }>; update(params: factory.product.IOffer & { project: { id: string; }; itemOffered: { /** * プロダクトID */ id: string; }; }): Promise<{ id: string; }>; deleteOne(params: Pick<factory.product.IOffer, 'seller'> & { project: { id: string; }; itemOffered: { /** * プロダクトID */ id: string; }; }): Promise<{ id: string; }>; deleteManyBySellerId(params: Pick<factory.product.IOffer, 'seller'> & { project: { id: string; }; }): Promise<import("mongoose").UpdateWriteOpResult>; }