UNPKG

817 BTypeScriptView Raw
1import { Secret } from "./internal/invoker/Payload";
2import { EventHandlerMetadata } from "./metadata/automationMetadata";
3import { OnEvent } from "./onEvent";
4export interface EventFired<T = any> {
5 data: T;
6 extensions: {
7 operationName: string;
8 };
9 secrets?: Secret[];
10}
11/**
12 * Handle the given event. Parameters will have been set on the object
13 * @param {HandlerContext} ctx context from which GraphQL client can be obtained if it's
14 * necessary to run further queries.
15 * @return {Promise<HandlerResult>} result containing status and any command-specific data
16 */
17export interface HandleEvent<T = any, P = any> {
18 handle: OnEvent<T, P>;
19}
20export declare type SelfDescribingHandleEvent<T = any, P = any> = HandleEvent<T, P> & EventHandlerMetadata;
21//# sourceMappingURL=HandleEvent.d.ts.map
\No newline at end of file