import { CloudConfig } from "./cloudConfig.js";
import { BeforeRequestContext, BeforeRequestHook } from "./types.js";
/**
 * Attaches Cloudinary authentication to every outgoing request.
 *
 * Priority:
 *   1. OAuth2 Bearer token (if provided via security source)
 *   2. Basic auth (apiKey:apiSecret) — works for all endpoints including upload
 *
 * Also preprocesses JSON request bodies to convert local `file://` URIs
 * into base64 data URIs so uploads work with local file paths.
 */
export declare class CloudinaryAuthHook implements BeforeRequestHook {
    private readonly config;
    constructor(config: CloudConfig);
    beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise<Request>;
    private resolveSecurity;
    private isOAuth2Token;
    private resolveCredentials;
    /**
     * For JSON requests, converts local `file://` URIs to inline base64
     * data URIs so Cloudinary can accept the upload payload.
     */
    private preprocessBody;
    /**
     * Reads a local file and returns it as a base64 data URI.
     */
    private readLocalFileAsDataUri;
}
//# sourceMappingURL=cloudinaryAuthHook.d.ts.map