UNPKG

2.06 kBTypeScriptView Raw
1import { Configuration } from "./configuration";
2import { HandleCommand } from "./HandleCommand";
3import { HandleEvent } from "./HandleEvent";
4import { HandlerResult } from "./HandlerResult";
5import { ExpressServer } from "./internal/transport/express/ExpressServer";
6import { CommandIncoming, EventIncoming, RequestProcessor } from "./internal/transport/RequestProcessor";
7import { WebSocketClient } from "./internal/transport/websocket/WebSocketClient";
8import { AutomationServer } from "./server/AutomationServer";
9import { BuildableAutomationServer } from "./server/BuildableAutomationServer";
10import { Maker } from "./util/constructionUtils";
11export declare class AutomationClient implements RequestProcessor {
12 configuration: Configuration;
13 automations: BuildableAutomationServer;
14 webSocketClient: WebSocketClient;
15 httpServer: ExpressServer;
16 webSocketHandler: RequestProcessor;
17 httpHandler: RequestProcessor;
18 requestProcessor: RequestProcessor;
19 private readonly defaultListeners;
20 constructor(configuration: Configuration);
21 get automationServer(): AutomationServer;
22 withCommandHandler(chm: Maker<HandleCommand>): AutomationClient;
23 withEventHandler(event: Maker<HandleEvent<any>>): AutomationClient;
24 withIngester(ingester: string): AutomationClient;
25 processCommand(command: CommandIncoming, callback?: (result: Promise<HandlerResult>) => void): void;
26 processEvent(event: EventIncoming, callback?: (results: Promise<HandlerResult[]>) => void): void;
27 run(): Promise<void>;
28 private configureRedactions;
29 private raiseStartupEvent;
30 private configureShutdown;
31 private configureStatsd;
32 private setupWebSocketClusterRequestHandler;
33 private setupWebSocketClusterWorkerRequestHandler;
34 private setupWebSocketRequestHandler;
35 private setupApplicationEvents;
36 private setupExpressRequestHandler;
37 private runWs;
38 private runHttp;
39}
40export declare function automationClient(configuration: Configuration): AutomationClient;
41//# sourceMappingURL=automationClient.d.ts.map
\No newline at end of file