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.js'; 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.js").AllAuthScopesFailure | import("./types.js").AnyAuthScopesFailure | import("./types.js").AuthScopeFailure | import("./types.js").AuthScopeFunctionFailure | import("./types.js").GrantedScopeFailure | import("./types.js").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.js").AllAuthScopesFailure | import("./types.js").AnyAuthScopesFailure | import("./types.js").AuthScopeFailure | import("./types.js").AuthScopeFunctionFailure | import("./types.js").GrantedScopeFailure | import("./types.js").UnknownAuthFailure | Promise; } //# sourceMappingURL=request-cache.d.ts.map