@chevre/domain
Version:
Chevre Domain Library for Node.js
29 lines (28 loc) • 1.37 kB
TypeScript
import * as factory from '../../../factory';
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
import type { ProjectRepo } from '../../../repo/project';
import type { ReservationRepo } from '../../../repo/reservation';
export type IStartOperation<T> = (repos: {
project: ProjectRepo;
reservation: ReservationRepo;
assetTransaction: AssetTransactionRepo;
}) => Promise<T>;
export type IStartParams = factory.assetTransaction.cancelReservation.IStartParamsWithoutDetail & {
seller: {
id?: string;
};
instrument: factory.assetTransaction.cancelReservation.IInstrument[];
};
export declare function validateStartParams(params: IStartParams): (repos: {
reservation: ReservationRepo;
assetTransaction: AssetTransactionRepo;
}) => Promise<{
reserveTransaction: import("@chevre/factory/lib/assetTransaction/reserve").ITransaction | undefined;
reservations: (Pick<import("@chevre/factory/lib/reservation/event").IReservation, "id" | "typeOf" | "reservationNumber" | "issuedThrough"> & {
reservationFor: Pick<factory.reservation.IReservationFor<factory.reservationType.EventReservation>, "id" | "typeOf">;
})[] | undefined;
}>;
/**
* 取引開始
*/
export declare function start(params: IStartParams): IStartOperation<Pick<factory.assetTransaction.cancelReservation.ITransaction, 'id'>>;