/**
 * Configuration Utility Functions
 */
/**
 * Check if a string is a valid URL
 *
 * @param str - String to check
 * @returns True if string is a valid HTTP/HTTPS URL
 */
export declare function isUrl(str: string): boolean;
/**
 * Download a file from a URL to a temporary location
 *
 * @param url - HTTP/HTTPS URL to download
 * @returns Path to downloaded temporary file
 * @throws Error if download fails or response is not OK
 *
 * @example
 * ```typescript
 * const tempPath = await downloadFromUrl('https://example.com/config.json')
 * // Returns: "/tmp/walkeros-download-1647261462000-abc123.json"
 * ```
 */
export declare function downloadFromUrl(url: string): Promise<string>;
/**
 * Substitute environment variables in a string.
 *
 * @param value - String with ${VAR} placeholders
 * @returns String with environment variables substituted
 * @throws Error if environment variable is not found
 *
 * @example
 * ```typescript
 * substituteEnvVariables('${HOME}/config') // "/Users/name/config"
 * ```
 */
export declare function substituteEnvVariables(value: string): string;
/**
 * Load and parse JSON configuration file from local path or URL.
 *
 * @param configPath - Path to JSON file or HTTP/HTTPS URL
 * @returns Parsed configuration object and cleanup function
 * @throws Error if file not found, download fails, or invalid JSON
 *
 * @example
 * ```typescript
 * // Local file
 * const config = await loadJsonConfig('./config.json')
 *
 * // Remote URL
 * const config = await loadJsonConfig('https://example.com/config.json')
 * ```
 */
export declare function loadJsonConfig<T>(configPath: string): Promise<T>;
/**
 * Generate a unique temporary directory path.
 *
 * @param tempDir - Base temporary directory (default: ".tmp")
 * @returns Absolute path to unique temp directory
 *
 * @example
 * ```typescript
 * getTempDir() // "/workspaces/project/.tmp/cli-1647261462000-abc123"
 * getTempDir('/tmp') // "/tmp/cli-1647261462000-abc123"
 * ```
 */
export declare function getTempDir(tempDir?: string): string;
/**
 * Load JSON from inline string, file path, or URL.
 *
 * Supports three input formats:
 * 1. Inline JSON string - parsed directly
 * 2. Local file path - read and parsed
 * 3. HTTP/HTTPS URL - downloaded and parsed
 *
 * Detection priority:
 * 1. URL (http://, https://) → download and parse
 * 2. Existing file path → read and parse
 * 3. Valid JSON string → parse directly
 * 4. Simple string → treat as {name: string} for backward compatibility
 *
 * @param source - JSON string, file path, or URL
 * @param options - Optional configuration
 * @param options.name - Parameter name for error messages (e.g., "event", "config")
 * @param options.required - Throw error if source is empty (default: false)
 * @param options.fallback - Default value if source is empty
 * @returns Parsed JSON object
 * @throws Error if source is required but empty, or if loading/parsing fails
 *
 * @example
 * ```typescript
 * // Inline JSON
 * await loadJsonFromSource('{"name":"order complete","data":{}}')
 *
 * // File path
 * await loadJsonFromSource('./examples/event.json')
 *
 * // URL
 * await loadJsonFromSource('https://example.com/event.json')
 *
 * // With options
 * await loadJsonFromSource(input, {
 *   name: 'event',
 *   required: true,
 *   fallback: { name: 'default' }
 * })
 * ```
 */
export declare function loadJsonFromSource<T = unknown>(source: string | undefined, options?: {
    name?: string;
    required?: boolean;
    fallback?: T;
}): Promise<T>;
//# sourceMappingURL=utils.d.ts.map