export type AuthenticatedPrincipalKind = 'user' | 'bot' | 'service' | 'token';
export interface AuthenticatedPrincipal {
    readonly principalId: string;
    readonly principalKind: AuthenticatedPrincipalKind;
    readonly admin: boolean;
    readonly scopes: readonly string[];
}
interface AuthenticatedPrincipalResolver {
    readonly extractAuthToken: (req: Request) => string;
    readonly describeAuthenticatedPrincipal: (token: string) => AuthenticatedPrincipal | null;
}
interface PrivateHostFetchConfig {
    readonly configManager: {
        get(key: string): unknown;
    };
}
interface ElevatedPrivateHostFetchConfig extends PrivateHostFetchConfig {
    readonly req: Request;
    readonly requireElevatedAccess: (req: Request) => Response | null;
}
export declare function resolveAuthenticatedPrincipal(req: Request, resolver: AuthenticatedPrincipalResolver): AuthenticatedPrincipal | null;
export declare function buildMissingScopeBody(target: string, requiredScopes: readonly string[], grantedScopes: readonly string[] | undefined): {
    readonly error: string;
    readonly requiredScopes: readonly string[];
    readonly grantedScopes: readonly string[];
    readonly missingScopes: readonly string[];
} | null;
export declare function resolvePrivateHostFetchOptions(requested: unknown, context: PrivateHostFetchConfig | ElevatedPrivateHostFetchConfig): {
    allowPrivateHosts: true;
    fetchMode: 'allow-private-hosts';
} | Record<string, never> | Response;
export {};
//# sourceMappingURL=http-policy.d.ts.map