import express from 'express';
import { ExecutionParams } from 'subscriptions-transport-ws';
import { AuthenticateReturn } from './types';
interface CommonRequest<UserObjectType extends {}> extends Pick<Context<UserObjectType>, 'isAuthenticated' | 'isUnauthenticated'> {
    user?: UserObjectType;
}
export interface Context<UserObjectType extends {}> {
    isAuthenticated: () => boolean;
    isUnauthenticated: () => boolean;
    getUser: () => UserObjectType;
    authenticate: (strategyName: string, options?: object) => Promise<AuthenticateReturn<UserObjectType>>;
    login: (user: UserObjectType, options?: object) => Promise<void>;
    logout: () => void;
    res?: express.Response;
    req: CommonRequest<UserObjectType>;
}
export interface ContextParams {
    req: express.Request;
    res: express.Response;
    connection?: ExecutionParams;
    payload?: unknown;
}
declare const buildContext: <UserObjectType extends {}, R extends ContextParams = ContextParams>(contextParams: R) => Context<UserObjectType>;
export default buildContext;
