/// import { AddFlagFn } from './cli'; import { Server, IncomingMessage } from 'http'; import { CreateRequestHandlerOptions, HttpRequestHandler, PostGraphileOptions } from '../interfaces'; import { WithPostGraphileContextFn } from './withPostGraphileContext'; import * as graphql from 'graphql'; import * as graphqlWs from 'graphql-ws'; import { Extra as GraphQLWSContextExtra } from 'graphql-ws/lib/use/ws'; import { ExecutionParams } from 'subscriptions-transport-ws'; import { PostGraphileResponse } from './http/frameworks'; declare type PromiseOrValue = T | Promise; export declare type HookFn = (arg: TArg, context: TContext) => TArg; export declare type PluginHookFn = >(hookName: string, argument: TArgument, context?: TContext) => TArgument; export interface PostGraphileHTTPResult { statusCode?: number; result?: Record; errors?: Array>; meta?: Record; } export interface PostGraphileHTTPEnd { statusCode?: number; result: Record | Array>; } export interface PostGraphilePlugin { init?: HookFn; pluginHook?: HookFn; 'cli:flags:add:standard'?: HookFn; 'cli:flags:add:schema'?: HookFn; 'cli:flags:add:errorHandling'?: HookFn; 'cli:flags:add:plugins'?: HookFn; 'cli:flags:add:noServer'?: HookFn; 'cli:flags:add:webserver'?: HookFn; 'cli:flags:add:jwt'?: HookFn; 'cli:flags:add'?: HookFn; 'cli:flags:add:deprecated'?: HookFn; 'cli:flags:add:workarounds'?: HookFn; 'cli:library:options'?: HookFn; 'cli:server:middleware'?: HookFn; 'cli:server:created'?: HookFn; 'cli:greeting'?: HookFn>; 'postgraphile:options'?: HookFn; 'postgraphile:validationRules:static'?: HookFn; 'postgraphile:graphiql:html'?: HookFn; 'postgraphile:middleware'?: HookFn; 'postgraphile:http:handler'?: HookFn; 'postgraphile:http:eventStreamRouteHandler'?: HookFn; 'postgraphile:http:faviconRouteHandler'?: HookFn; 'postgraphile:http:graphiqlRouteHandler'?: HookFn; 'postgraphile:http:graphqlRouteHandler'?: HookFn; 'postgraphile:http:result'?: HookFn; 'postgraphile:http:end'?: HookFn; 'postgraphile:httpParamsList'?: HookFn>>; 'postgraphile:validationRules'?: HookFn; 'postgraphile:ws:onOperation'?: HookFn; 'postgraphile:ws:onSubscribe'?: HookFn; message: graphqlWs.SubscribeMessage; options: CreateRequestHandlerOptions; }>; 'postgraphile:liveSubscribe:executionResult'?: HookFn>, { schema: graphql.GraphQLSchema; document: graphql.DocumentNode; rootValue: any; contextValue: any; variableValues: { [key: string]: any; } | undefined; operationName: string | undefined; fieldResolver: graphql.GraphQLFieldResolver | undefined; subscribeFieldResolver: graphql.GraphQLFieldResolver | undefined; }>; withPostGraphileContext?: HookFn; } export declare function makePluginHook(plugins: Array): PluginHookFn; export declare function pluginHookFromOptions(options: PostGraphileOptions): PluginHookFn; export {};