UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

58 lines (57 loc) 1.93 kB
import type { ActionRepo } from '../../../repo/action'; import type { CategoryCodeRepo } from '../../../repo/categoryCode'; import type { EventRepo } from '../../../repo/event'; import type { OfferRepo } from '../../../repo/offer/unitPriceInCatalog'; import type { OrderInTransactionRepo } from '../../../repo/orderInTransaction'; import type { TransactionRepo } from '../../../repo/transaction'; import { IRequestBody, IResponseBody } from './authorize/factory'; import { IAcceptedOfferBeforeAuthorize4COA } from './authorize/validateAcceptedOffers'; import * as factory from '../../../factory'; export { IRequestBody, IResponseBody }; export type IAuthorizeActionResult = factory.action.authorize.offer.eventService.IResult; export interface IAuthorizeRepos { action: ActionRepo; categoryCode: CategoryCodeRepo; event: EventRepo; offer: OfferRepo; orderInTransaction: OrderInTransactionRepo; transaction: TransactionRepo; } export type IAuthorizeOperation<T> = (repos: IAuthorizeRepos) => Promise<T>; export type IAuthorizeOfferAction = factory.action.authorize.offer.eventService.IAction; /** * COA興行オファー承認 */ export declare function authorize(params: { object: { acceptAction: { /** * COA興行オファー採用アクションID(2024-06-11~) */ id: string; }; acceptedOffer: IAcceptedOfferBeforeAuthorize4COA[]; event: { id: string; }; }; agent: { id: string; }; transaction: { id: string; }; store: { /** * 販売アプリケーションID */ id: string; }; result: { requestBody: IRequestBody; responseBody: IResponseBody; }; options: {}; }): IAuthorizeOperation<Pick<IAuthorizeOfferAction, 'id' | 'instrument'> & { result: IAuthorizeOfferAction['result']; }>;