import { type CreateFetchFromRegistryOptions, type FetchFromRegistry } from '@pnpm/network.fetch'; import type { RegistriesByScope, RegistryConfig } from '@pnpm/types'; export declare const DEFAULT_REGISTRY_URL = "https://registry.npmjs.org/"; export interface AccessOptions extends CreateFetchFromRegistryOptions { cliOptions?: { json?: boolean; otp?: string; }; configByUri?: Record; registriesByScope?: RegistriesByScope; } export interface PackageRequestContext { registryUrl: string; authHeader: string | undefined; fetchFromRegistry: FetchFromRegistry; } export declare function getRegistries(opts: AccessOptions): RegistriesByScope; export declare function createPackageRequestContext(opts: AccessOptions, packageName: string): PackageRequestContext; export declare function createJsonWriteHeaders(otp: string | undefined): Record; export declare function getAuthHeaderForRegistry(configByUri: Record | undefined, registryUrl: string, packageName?: string): string | undefined; export declare function escapePackageName(packageName: string): string; export declare function throwRegistryError(response: Response, action: string): Promise;