UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

58 lines (57 loc) 2.14 kB
import type { EventRepo } from '../../../repo/event'; import type { EventSeriesRepo } from '../../../repo/eventSeries'; import type { 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 ISearchOffersByIdsRepos { event: EventRepo; eventSeries: EventSeriesRepo; priceSpecification: PriceSpecificationRepo; offer: OfferRepo; offerCatalog: OfferCatalogRepo; offerCatalogItem: OfferCatalogItemRepo; offerRateLimit: OfferRateLimitRepo; product: ProductRepo; } type ISearchOffersByIdsOperation<T> = (repos: ISearchOffersByIdsRepos) => Promise<T>; type ITicketOfferWithSortIndex = factory.product.ITicketOffer; /** * 興行オファー承認時にオファーID指定で利用可能オファーを検索する * パラメータ最適化(2024-09-30~) */ declare function searchOffersByIds(params: { /** * 指定したIDのオファーだけ取得する場合 */ ids: string[]; /** * どのイベントに対して */ event: { id: string; typeOf: factory.eventType.Event | factory.eventType.ScreeningEvent; }; /** * どのアプリケーションに対して */ store?: { id?: string; }; options: { /** * オファーの含まれるサブカタログリストを明示的に指定する * 指定しない場合、プロダクトの1つ目のカタログに含まれるサブカタログでフィルターされる */ includedInDataCatalog?: { id: string[]; }; }; }): ISearchOffersByIdsOperation<{ ticketOffers: ITicketOfferWithSortIndex[]; unitPriceOffers: factory.unitPriceOffer.IUnitPriceOffer[]; }>; export { searchOffersByIds };