@chevre/domain
Version:
Chevre Domain Library for Node.js
68 lines (67 loc) • 2.26 kB
TypeScript
import * as factory from '../factory';
import type { OrderInTransactionRepo } from '../repo/orderInTransaction';
import type { OrderNumberRepo } from '../repo/orderNumber';
import type { ProjectRepo } from '../repo/project';
import type { SettingRepo } from '../repo/setting';
import type { TaskRepo } from '../repo/task';
import type { TransactionRepo } from '../repo/transaction';
import { deleteTransaction } from './transaction/deleteTransaction';
import * as MoneyTransferTransactionService from './transaction/moneyTransfer';
import * as PlaceOrderTransactionService from './transaction/placeOrder';
import * as ReturnOrderTransactionService from './transaction/returnOrder';
export type ITransactionOperation<T> = (repos: {
transaction: TransactionRepo;
}) => Promise<T>;
export import moneyTransfer = MoneyTransferTransactionService;
export import placeOrder = PlaceOrderTransactionService;
export import returnOrder = ReturnOrderTransactionService;
export { deleteTransaction };
/**
* 取引人プロフィール更新
*/
export declare function updateAgent(params: {
typeOf: factory.transactionType;
/**
* 取引ID
*/
id: string;
agent: factory.order.ICustomer & {
telephoneRegion?: string;
};
}): (repos: {
orderInTransaction: OrderInTransactionRepo;
orderNumber: OrderNumberRepo;
project: ProjectRepo;
transaction: TransactionRepo;
}) => Promise<void>;
export type IExportTasksOperation<T> = (repos: {
setting: SettingRepo;
task: TaskRepo;
transaction: TransactionRepo;
}) => Promise<T>;
export declare function exportOneTransactionTasksIfExists(params: {
/**
* タスク実行日時バッファ
*/
runsTasksAfterInSeconds?: number;
/**
* support optimizeRedundantTasks(2025-03-11~)
*/
optimizeRedundantTasks: boolean;
status?: {
$eq?: factory.transactionStatusType;
};
id?: string;
tasksExportAction: {
agent: {
name: string;
};
};
endDate: {
$lt: Date;
};
sort?: {
endDate?: factory.sortType;
startDate?: factory.sortType;
};
}): IExportTasksOperation<Pick<factory.transaction.ITransaction<factory.transactionType>, 'id' | 'typeOf'> | void>;