import * as Component from './Component'; import { Handlers as EventHandlers, handler as eventHandler } from './EventHandlers'; import { Handlers as CommandHandlers } from './CommandHandlers'; import * as CommandAble from './CommandAble'; import * as RpcAble from './RpcAble'; import * as StateAble from './StateAble'; import { EventBus } from './EventBus'; import { EventHandling } from './EventBus'; import { Event as E } from './Event'; import { State as S } from './State'; import { Typer } from 'cqes-type'; export declare namespace Event { class Handlers extends EventHandlers { protected runtime: any; } } export declare namespace Command { class Handlers extends CommandHandlers { protected runtime: any; } } export interface EventBuses { [name: string]: EventBus; } export interface Subscription { abort: () => Promise; } export interface Constructor { new (...a: Array): T; } export interface props extends Component.props, RpcAble.props, CommandAble.props, StateAble.props { eventHandlers: Event.Handlers; eventBuses: EventBuses; psubscriptions: Array; subscriptions: Array; } export declare class Service extends Component.Component { protected commandBuses: CommandAble.Buses; protected commandTypes: CommandAble.Types; command: (target: Typer, streamId: string, data: any, meta?: any) => CommandAble.EventEmitter; protected getCommandTyper: (context: string, category: string, order: string) => Typer; protected channels: Array; protected rpcBuses: RpcAble.Buses; protected queryTypes: RpcAble.Types; protected requestTypes: RpcAble.Types; query: (target: Typer, data: any, meta?: any) => RpcAble.EventEmitter; request: (target: Typer, data: any, meta?: any) => RpcAble.EventEmitter; protected eventBuses: EventBuses; protected eventHandlers: Event.Handlers; protected repositories: StateAble.Repositories; get: (type: Constructor, streamId: string, minRevision?: number) => Promise>; protected psubscriptions: Array; protected subscriptions: Array; constructor(props: props); start(): Promise; protected getEventHandler(event: E): eventHandler; protected handleServiceEvent(event: E): Promise; stop(): Promise; }