UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

40 lines 1.29 kB
import { OnEvent } from "@atomist/automation-client/lib/onEvent"; import { NoParameters } from "@atomist/automation-client/lib/SmartParameters"; import { Maker } from "@atomist/automation-client/lib/util/constructionUtils"; import { ParametersDefinition } from "./ParametersDefinition"; /** * Type for registering event handlers. */ export interface EventHandlerRegistration<EVENT = any, PARAMS = NoParameters> { /** * Name of the event handler. */ name: string; /** * Optional description of the event handler. */ description?: string; /** * Optional tags of the event handler. */ tags?: string | string[]; /** * GraphQL subscription to subscribe this listener to. * Note: Use GraphQL.subscription() methods of automation-client to create the subscription string */ subscription: string; /** * Create the parameters required by this event. * Empty parameters will be returned by default. */ paramsMaker?: Maker<PARAMS>; /** * Define parameters used by this event. */ parameters?: ParametersDefinition<PARAMS>; /** * Listener to receive subscription matches. */ listener: OnEvent<EVENT, PARAMS>; } //# sourceMappingURL=EventHandlerRegistration.d.ts.map