UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

60 lines (59 loc) 2.12 kB
import type { EventRepo } from '../../../repo/event'; import type { EventSeriesRepo } from '../../../repo/eventSeries'; import type { IPriceSpecificationConditionsOnSearchWithSortIndex, OfferRepo } from '../../../repo/offer/unitPriceInCatalog'; import type { OfferCatalogRepo } from '../../../repo/offerCatalog'; import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem'; import type { PriceSpecificationRepo } from '../../../repo/priceSpecification'; import type { ProductRepo } from '../../../repo/product'; import type { OfferRateLimitRepo } from '../../../repo/rateLimit/offer'; import * as factory from '../../../factory'; interface ISearchEventTicketOffersRepos { event: EventRepo; eventSeries: EventSeriesRepo; priceSpecification: PriceSpecificationRepo; offer: OfferRepo; offerCatalog: OfferCatalogRepo; offerCatalogItem: OfferCatalogItemRepo; offerRateLimit: OfferRateLimitRepo; product: ProductRepo; } type ISearchEventTicketOffersOperation<T> = (repos: ISearchEventTicketOffersRepos) => Promise<T>; type ITicketOfferWithSortIndex = factory.product.ITicketOffer; /** * 興行オファー検索 */ declare function searchEventTicketOffers(params: { /** * 指定したIDのオファーだけ取得する場合 */ /** * どのイベントに対して */ event: { id: string; typeOf: factory.eventType.Event | factory.eventType.ScreeningEvent; }; /** * どのアプリケーションに対して */ store?: { id?: string; }; /** * 有効期間内のみかどうか */ onlyValid: boolean; priceSpecification: IPriceSpecificationConditionsOnSearchWithSortIndex; includedInDataCatalog: { id: string; }; limit: number; page: number; validateOfferRateLimit: boolean; useIncludeInDataCatalog: boolean; includePotentialPriceComponent: boolean; }): ISearchEventTicketOffersOperation<{ ticketOffers: ITicketOfferWithSortIndex[]; unitPriceOffers: factory.unitPriceOffer.IUnitPriceOffer[]; }>; export { searchEventTicketOffers };