1 | import { Secret } from "./internal/invoker/Payload";
|
2 | import { EventHandlerMetadata } from "./metadata/automationMetadata";
|
3 | import { OnEvent } from "./onEvent";
|
4 | export 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 | */
|
17 | export interface HandleEvent<T = any, P = any> {
|
18 | handle: OnEvent<T, P>;
|
19 | }
|
20 | export declare type SelfDescribingHandleEvent<T = any, P = any> = HandleEvent<T, P> & EventHandlerMetadata;
|