UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

150 lines (149 loc) 4.69 kB
import type { ActionRepo } from '../../repo/action'; import { AggregationRepo } from '../../repo/aggregation'; import type { AssetTransactionRepo } from '../../repo/assetTransaction'; import type { EventRepo } from '../../repo/event'; import { OrderRepo } from '../../repo/order'; import type { TaskRepo } from '../../repo/task'; import type { TransactionRepo } from '../../repo/transaction'; type AggregateDurationUnit = 'days' | 'hours'; interface IAggregateParams { aggregateDate: Date; aggregateDurationUnit: AggregateDurationUnit; aggregationCount: number; excludedProjectId?: string; } declare function aggregateEvent(params: IAggregateParams): (repos: { agregation: AggregationRepo; event: EventRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 注文集計 */ declare function aggregateOrder(params: IAggregateParams): (repos: { agregation: AggregationRepo; order: OrderRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 注文取引集計 */ declare function aggregatePlaceOrder(params: IAggregateParams & { clientIds?: string[]; }): (repos: { agregation: AggregationRepo; transaction: TransactionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 興行オファー承認アクション集計 */ declare function aggregateAuthorizeEventServiceOfferAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 決済承認アクション集計 */ declare function aggregateAuthorizePaymentAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; declare function aggregateAuthorizeOrderAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 使用アクション集計 */ declare function aggregateUseAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 予約アクション集計 */ declare function aggregateReserveAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 注文アクション集計 */ declare function aggregateOrderAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 予約取消アクション集計 */ declare function aggregateCancelReservationAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; declare function aggregateCheckMovieTicketAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; declare function aggregatePayMovieTicketAction(params: IAggregateParams): (repos: { agregation: AggregationRepo; action: ActionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; declare function aggregatePayTransaction(params: IAggregateParams): (repos: { agregation: AggregationRepo; assetTransaction: AssetTransactionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; /** * 予約集計 */ declare function aggregateReserveTransaction(params: IAggregateParams): (repos: { agregation: AggregationRepo; assetTransaction: AssetTransactionRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; declare function aggregateTask(params: IAggregateParams): (repos: { agregation: AggregationRepo; task: TaskRepo; }) => Promise<{ aggregationCount: number; aggregateDuration: string; }>; export { aggregateAuthorizeEventServiceOfferAction, aggregateAuthorizeOrderAction, aggregateAuthorizePaymentAction, aggregateCancelReservationAction, aggregateCheckMovieTicketAction, aggregateEvent, aggregateOrder, aggregateOrderAction, aggregatePayMovieTicketAction, aggregatePayTransaction, aggregatePlaceOrder, aggregateReserveAction, aggregateReserveTransaction, aggregateTask, aggregateUseAction };