import type { MaybePromise } from './types'; export type RpcPluginContext = { context: Context; path: string; input: any; }; export type BeforeContext = RpcPluginContext; export type AfterContext = RpcPluginContext & { result: any; }; export type ErrorContext = RpcPluginContext & { error: any; }; export type RpcPlugin = { before?: (options: BeforeContext) => MaybePromise; after?: (options: AfterContext) => MaybePromise; error?: (options: ErrorContext) => MaybePromise; }; export declare function runPlugins(plugins: RpcPlugin[], phase: 'before' | 'after' | 'error', options: any): Promise;