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 { builder: PothosSchemaTypes.SchemaBuilder; context: Types["Context"]; mapCache: Map<{}, MaybePromise>; scopeCache: Map>>; typeCache: Map>>; typeGrants: Map>>; grantCache: Map>; scopes?: MaybePromise>; cacheKey?: (value: unknown) => unknown; treatErrorsAsUnauthorized: boolean; defaultStrategy: 'all' | 'any'; constructor(builder: PothosSchemaTypes.SchemaBuilder, context: Types['Context']); static fromContext(context: T['Context'], builder: PothosSchemaTypes.SchemaBuilder): RequestCache; static clearForContext(context: T['Context']): void; getScopes(): MaybePromise>; withScopes(cb: (scopes: ScopeLoaderMap) => MaybePromise): MaybePromise; saveGrantedScopes(scopes: readonly string[], path: Path | undefined): null; testGrantedScopes(scope: string, path: Path): boolean; grantTypeScopes(type: string, parent: unknown, path: Path | undefined, cb: () => MaybePromise): Promise; evaluateScopeLoader(scopes: ScopeLoaderMap, 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; evaluateScopeMapWithScopes({ $all, $any, $granted, ...map }: AuthScopeMap, scopes: ScopeLoaderMap, info: GraphQLResolveInfo | undefined, forAll: boolean): MaybePromise; evaluateScopeMap(map: AuthScopeMap | boolean, info?: GraphQLResolveInfo, forAll?: boolean): MaybePromise; evaluateTypeScopeFunction(authScopes: TypeAuthScopesFunction, 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; } //# sourceMappingURL=request-cache.d.ts.map