import { factory } from '../../../factory'; import type { AuthorizeOfferActionRepo } from '../../../repo/action/authorizeOffer'; import type { AssetTransactionRepo } from '../../../repo/assetTransaction'; import type { AuthorizationRepo } from '../../../repo/authorization'; import type { EventRepo } from '../../../repo/event'; import type { EventOfferRepo } from '../../../repo/eventOffer'; import type { EventSeriesRepo } from '../../../repo/eventSeries'; import type { IssuerRepo } from '../../../repo/issuer'; import type { MemberRepo } from '../../../repo/member'; import type { MemberProgramRepo } from '../../../repo/memberProgram'; import type { OfferRepo } from '../../../repo/offer/unitPriceInCatalog'; import type { OfferCatalogRepo } from '../../../repo/offerCatalog'; import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem'; import type { OrderInTransactionRepo } from '../../../repo/orderInTransaction'; import type { PaymentServiceRepo } from '../../../repo/paymentService'; import type { SeatRepo } from '../../../repo/place/seat'; import type { PriceSpecificationRepo } from '../../../repo/priceSpecification'; import type { ProductRepo } from '../../../repo/product'; import type { OfferRateLimitRepo } from '../../../repo/rateLimit/offer'; import type { SettingRepo } from '../../../repo/setting'; import type { IntegrationSettingRepo } from '../../../repo/setting/integration'; import type { StockHolderRepo } from '../../../repo/stockHolder'; import type { TaskRepo } from '../../../repo/task'; import type { TicketRepo } from '../../../repo/ticket'; import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder'; import type { TransactionNumberRepo } from '../../../repo/transactionNumber'; interface IAuthorizeRepos { authorizeOfferAction: AuthorizeOfferActionRepo; assetTransaction: AssetTransactionRepo; authorization: AuthorizationRepo; event: EventRepo; eventOffer: EventOfferRepo; eventSeries: EventSeriesRepo; issuer: IssuerRepo; member: MemberRepo; memberProgram: MemberProgramRepo; stockHolder: StockHolderRepo; offer: OfferRepo; offerCatalog: OfferCatalogRepo; offerCatalogItem: OfferCatalogItemRepo; offerRateLimit: OfferRateLimitRepo; orderInTransaction: OrderInTransactionRepo; paymentService: PaymentServiceRepo; priceSpecification: PriceSpecificationRepo; product: ProductRepo; seat: SeatRepo; setting: SettingRepo; integrationSetting: IntegrationSettingRepo; task: TaskRepo; ticket: TicketRepo; placeOrder: PlaceOrderRepo; transactionNumber: TransactionNumberRepo; } type IAuthorizeOperation = (repos: IAuthorizeRepos) => Promise; type IAuthorizeOfferAction = factory.action.authorize.offer.eventService.IAction; type IObjectWithoutDetail = factory.action.authorize.offer.eventService.IObjectWithoutDetail; interface IAuthorizeOptions { /** * オファーID指定なしに座席をおさえる場合true */ noOfferSpecified: boolean; /** * 最大n日前から予約可能 */ maxReservationGracePeriodInDays: number; } /** * 興行オファー承認 */ declare function authorize(params: { project: { id: string; typeOf: factory.organizationType.Project; }; object: IObjectWithoutDetail; instrument: factory.action.reserve.ITicketAsInstrument[]; agent: { id: string; }; transaction: { id: string; }; validateEventOfferPeriod: boolean; validateEvent: boolean; store: { /** * 販売アプリケーションID */ id: string; }; }, options: IAuthorizeOptions): IAuthorizeOperation & { result: IAuthorizeOfferAction['result']; }>; export { IAuthorizeRepos, authorize };