@chevre/domain
Version:
Chevre Domain Library for Node.js
28 lines (27 loc) • 1.12 kB
TypeScript
import type { IssuerRepo } from '../../../repo/issuer';
import type { MemberRepo } from '../../../repo/member';
import type { MemberProgramRepo } from '../../../repo/memberProgram';
import type { PassportRepo } from '../../../repo/passport';
import type { ProjectMakesOfferRepo } from '../../../repo/projectMakesOffer';
import type { SellerRepo } from '../../../repo/seller';
import type { IStartedTransaction, TransactionRepo } from '../../../repo/transaction';
import { placeOrder as PlaceOrderFactory } from '../../../factory/transaction';
interface IStartOperationRepos {
issuer: IssuerRepo;
member: MemberRepo;
memberProgram: MemberProgramRepo;
passport: PassportRepo;
projectMakesOffer: ProjectMakesOfferRepo;
seller: SellerRepo;
transaction: TransactionRepo;
}
type IStartOperation<T> = (repos: IStartOperationRepos) => Promise<T>;
type IStartParams = PlaceOrderFactory.IStartParams;
interface IStartOptions {
lockPassport: boolean;
}
/**
* 取引開始
*/
declare function start(params: IStartParams, options: IStartOptions): IStartOperation<IStartedTransaction>;
export { start };