import { type MaybePromise, type Path, type SchemaTypes } from '@pothos/core';
import type { GraphQLResolveInfo } from 'graphql';
import { type AuthFailure, type AuthScopeMap, type ScopeLoaderMap, type TypeAuthScopesFunction } from './types';
export default class RequestCache<Types extends SchemaTypes> {
    builder: PothosSchemaTypes.SchemaBuilder<Types>;
    context: Types["Context"];
    mapCache: Map<{}, MaybePromise<AuthFailure | null>>;
    scopeCache: Map<keyof Types["AuthScopes"], Map<unknown, MaybePromise<AuthFailure | null>>>;
    typeCache: Map<string, Map<unknown, MaybePromise<AuthFailure | null>>>;
    typeGrants: Map<string, Map<unknown, MaybePromise<null>>>;
    grantCache: Map<string, Set<string>>;
    scopes?: MaybePromise<ScopeLoaderMap<Types>>;
    cacheKey?: (value: unknown) => unknown;
    treatErrorsAsUnauthorized: boolean;
    defaultStrategy: 'all' | 'any';
    constructor(builder: PothosSchemaTypes.SchemaBuilder<Types>, context: Types['Context']);
    static fromContext<T extends SchemaTypes>(context: T['Context'], builder: PothosSchemaTypes.SchemaBuilder<T>): RequestCache<T>;
    static clearForContext<T extends SchemaTypes>(context: T['Context']): void;
    getScopes(): MaybePromise<ScopeLoaderMap<Types>>;
    withScopes<T>(cb: (scopes: ScopeLoaderMap<Types>) => MaybePromise<T>): MaybePromise<T>;
    saveGrantedScopes(scopes: readonly string[], path: Path | undefined): null;
    testGrantedScopes(scope: string, path: Path): boolean;
    grantTypeScopes(type: string, parent: unknown, path: Path | undefined, cb: () => MaybePromise<readonly string[]>): Promise<null>;
    evaluateScopeLoader<T extends keyof Types['AuthScopes']>(scopes: ScopeLoaderMap<Types>, name: T, arg: Types['AuthScopes'][T]): import("./types").AllAuthScopesFailure | import("./types").AnyAuthScopesFailure | import("./types").AuthScopeFailure | import("./types").AuthScopeFunctionFailure | import("./types").GrantedScopeFailure | import("./types").UnknownAuthFailure | Promise<AuthFailure | null>;
    evaluateScopeMapWithScopes({ $all, $any, $granted, ...map }: AuthScopeMap<Types>, scopes: ScopeLoaderMap<Types>, info: GraphQLResolveInfo | undefined, forAll: boolean): MaybePromise<AuthFailure | null>;
    evaluateScopeMap(map: AuthScopeMap<Types> | boolean, info?: GraphQLResolveInfo, forAll?: boolean): MaybePromise<AuthFailure | null>;
    evaluateTypeScopeFunction(authScopes: TypeAuthScopesFunction<Types, unknown>, type: string, parent: unknown, info: GraphQLResolveInfo): import("./types").AllAuthScopesFailure | import("./types").AnyAuthScopesFailure | import("./types").AuthScopeFailure | import("./types").AuthScopeFunctionFailure | import("./types").GrantedScopeFailure | import("./types").UnknownAuthFailure | Promise<AuthFailure | null>;
}
//# sourceMappingURL=request-cache.d.ts.map