import { Event } from './event'; import { Config } from './config'; import { Result } from './result'; import { CoreClient } from './client/core-client'; type PluginTypeBefore = 'before'; type PluginTypeEnrichment = 'enrichment'; type PluginTypeDestination = 'destination'; export type PluginType = PluginTypeBefore | PluginTypeEnrichment | PluginTypeDestination; interface PluginBase { name?: string; type?: PluginType; setup?(config: U, client: T): Promise; teardown?(): Promise; } export interface BeforePlugin extends PluginBase { type: PluginTypeBefore; execute?(context: Event): Promise; } export interface EnrichmentPlugin extends PluginBase { type?: PluginTypeEnrichment; execute?(context: Event): Promise; } export interface DestinationPlugin extends PluginBase { type: PluginTypeDestination; execute(context: Event): Promise; flush?(): Promise; } export type Plugin = BeforePlugin | EnrichmentPlugin | DestinationPlugin; export {}; //# sourceMappingURL=plugin.d.ts.map