/**
 * Environment detection utilities for SDK
 *
 * Provides helpers for detecting preview mode and auto-selecting the correct API key.
 *
 * @example
 * ```ts
 * import { getRiverbankEnv } from '@riverbankcms/sdk/env';
 * import { createRiverbankClient } from '@riverbankcms/sdk';
 *
 * const env = getRiverbankEnv();
 * const client = createRiverbankClient({
 *   apiKey: env.apiKey,
 *   baseUrl: env.baseUrl,
 * });
 * ```
 */
/**
 * Environment target: 'local' for development, 'remote' for production
 */
export type RiverbankEnvTarget = 'local' | 'remote';
/**
 * Runtime environment configuration
 */
export interface RiverbankEnvConfig {
    /** The detected environment target */
    target: RiverbankEnvTarget;
    /** Whether preview mode is enabled */
    previewMode: boolean;
    /** Site ID */
    siteId: string;
    /** Dashboard/API base URL */
    baseUrl: string;
    /** The auto-selected API key (preview or content key based on mode) */
    apiKey: string;
    /** The type of key being used */
    keyType: 'preview' | 'content';
}
/**
 * Error thrown when required environment variables are missing
 */
export declare class RiverbankEnvError extends Error {
    readonly missingVars: string[];
    constructor(message: string, missingVars: string[]);
}
/**
 * Detects if the current environment is in preview mode.
 *
 * Precedence:
 * 1. RIVERBANK_PREVIEW_MODE env var (explicit override) - 'true' or 'false'
 * 2. RIVERBANK_PREVIEW env var (legacy) - 'true' or 'false'
 * 3. VERCEL_ENV === 'preview' (Vercel preview deployments)
 * 4. Default: false (production behavior)
 *
 * In preview mode:
 * - Draft content is visible
 * - ISR revalidation is more aggressive
 * - Cache bypass may be enabled
 *
 * @returns true if in preview mode, false otherwise
 */
export declare function isPreviewMode(): boolean;
/**
 * Get the current environment target.
 *
 * This is a convenience function for checking `RIVERBANK_ENV`.
 *
 * @returns 'local' or 'remote'
 */
export declare function getRiverbankTarget(): RiverbankEnvTarget;
/**
 * Get runtime environment configuration with automatic API key selection.
 *
 * This helper reads environment variables and automatically selects the correct
 * API key based on the current environment and preview mode:
 *
 * - When `RIVERBANK_PREVIEW_MODE=true`: Uses preview API key (bld_preview_sk_...)
 * - When `RIVERBANK_PREVIEW_MODE=false` (default): Uses content API key (bld_live_sk_...)
 *
 * Environment variable patterns:
 * - `RIVERBANK_ENV`: 'local' (default) or 'remote'
 * - `RIVERBANK_PREVIEW_MODE`: 'true' or 'false' (default)
 * - `RIVERBANK_{LOCAL|REMOTE}_SITE_ID`: Site ID
 * - `RIVERBANK_{LOCAL|REMOTE}_DASHBOARD_URL`: Dashboard URL
 * - `RIVERBANK_{LOCAL|REMOTE}_API_KEY`: Content/live API key
 * - `RIVERBANK_{LOCAL|REMOTE}_PREVIEW_API_KEY`: Preview API key
 *
 * @returns Environment configuration with auto-selected API key
 * @throws {RiverbankEnvError} If required environment variables are missing
 *
 * @example
 * ```ts
 * // lib/builder-client.ts
 * import { getRiverbankEnv } from '@riverbankcms/sdk/env';
 * import { createRiverbankClient } from '@riverbankcms/sdk';
 *
 * const env = getRiverbankEnv();
 *
 * export const client = createRiverbankClient({
 *   apiKey: env.apiKey,
 *   baseUrl: env.baseUrl,
 * });
 *
 * export const siteId = env.siteId;
 * ```
 */
export declare function getRiverbankEnv(): RiverbankEnvConfig;
