@chevre/domain
Version:
Chevre Domain Library for Node.js
34 lines (33 loc) • 1.55 kB
TypeScript
import * as factory from '../../factory';
import type { AccountingReportRepo } from '../../repo/accountingReport';
import type { ActionRepo } from '../../repo/action';
import type { AssetTransactionRepo } from '../../repo/assetTransaction';
import type { ProductRepo } from '../../repo/product';
import type { TaskRepo } from '../../repo/task';
import type { TransactionNumberRepo } from '../../repo/transactionNumber';
type IPendingTransaction = Pick<factory.account.transaction.withdraw.ITransaction, 'id' | 'transactionNumber' | 'typeOf'>;
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string): (repos: {
product: ProductRepo;
}) => Promise<{
pendingTransaction: IPendingTransaction;
currency: string;
accountNumber: string;
}>;
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
product: ProductRepo;
}) => Promise<void>;
declare function payPaymentCard(params: factory.action.trade.pay.IAttributes): (repos: {
action: ActionRepo;
accountingReport: AccountingReportRepo;
product: ProductRepo;
task: TaskRepo;
}) => Promise<void>;
declare function refundPaymentCard(params: factory.task.refund.IData): (repos: {
action: ActionRepo;
accountingReport: AccountingReportRepo;
product: ProductRepo;
task: TaskRepo;
assetTransaction: AssetTransactionRepo;
transactionNumber: TransactionNumberRepo;
}) => Promise<void>;
export { authorize, payPaymentCard, refundPaymentCard, voidTransaction };