import { type MaybePromise, type Path, type SchemaTypes } from '@pothos/core'; import type { GraphQLResolveInfo } from 'graphql'; import { type AuthFailure, type AuthScopeMap, type ScopeLoaderMap, type TypeAuthScopesFunction, type TypeScopeInfo } from './types.js'; export default class RequestCache { builder: PothosSchemaTypes.SchemaBuilder; context: Types["Context"]; mapCache: Map<{}, Map>>; scopeCache: Map>>; typeCache: Map MaybePromise>>; 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 | null; evaluateScopeLoader(scopes: ScopeLoaderMap, name: T, arg: Types['AuthScopes'][T]): import("./types.js").AllAuthScopesFailure | import("./types.js").AnyAuthScopesFailure | import("./types.js").AuthScopeFailure | import("./types.js").AuthScopeFunctionFailure | import("./types.js").GrantedScopeFailure | Promise | import("./types.js").UnknownAuthFailure; 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, typeInfo: () => TypeScopeInfo): MaybePromise; } //# sourceMappingURL=request-cache.d.ts.map