1 | import { Configuration } from "./configuration";
|
2 | import { Contextual } from "./internal/invoker/Payload";
|
3 | import { CommandIncoming, EventIncoming } from "./internal/transport/RequestProcessor";
|
4 | import { AutomationContext } from "./internal/util/cls";
|
5 | import { GraphClient } from "./spi/graph/GraphClient";
|
6 | import { MessageClient, SlackMessageClient } from "./spi/message/MessageClient";
|
7 |
|
8 |
|
9 |
|
10 | export interface HandlerContext extends Contextual {
|
11 | |
12 |
|
13 |
|
14 | graphClient?: GraphClient;
|
15 | |
16 |
|
17 |
|
18 | messageClient: MessageClient & SlackMessageClient;
|
19 | |
20 |
|
21 |
|
22 | lifecycle?: HandlerLifecycle;
|
23 | }
|
24 |
|
25 |
|
26 |
|
27 | export interface AutomationContextAware {
|
28 | context: AutomationContext;
|
29 | trigger: CommandIncoming | EventIncoming;
|
30 | }
|
31 |
|
32 |
|
33 |
|
34 | export interface ConfigurationAware {
|
35 | configuration: Configuration;
|
36 | }
|
37 |
|
38 |
|
39 |
|
40 | export interface HandlerLifecycle {
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | registerDisposable(callback: () => Promise<void>, description?: string): void;
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 | dispose(): Promise<void>;
|
53 | }
|
54 |
|
\ | No newline at end of file |