/**
 * Build Credentials Management
 *
 * This module provides utilities for managing build credentials locally on your machine.
 *
 * IMPORTANT SECURITY NOTICE:
 * - Credentials are stored LOCALLY in ~/.capgo-credentials/credentials.json on YOUR machine only
 * - When you request a build, credentials are sent to Capgo's build servers
 * - Credentials are NEVER stored permanently on Capgo servers
 * - Credentials are used only during the build process and are automatically deleted
 *   from Capgo servers after the build completes (maximum 24 hours)
 * - Builds are sent DIRECTLY to app stores (Apple App Store / Google Play Store)
 * - Build outputs may optionally be uploaded for time-limited download links
 *
 * Security best practices:
 * - Ensure ~/.capgo-credentials/ directory has restricted file permissions
 * - Never commit credentials.json to version control
 * - Use separate credentials for CI/CD vs local development
 * - Rotate credentials regularly
 */
import type { CredentialFile, SavedCredentials } from '../schemas/build';
import type { BuildCredentials } from './request';
export declare const MIN_OUTPUT_RETENTION_SECONDS: number;
export declare const MAX_OUTPUT_RETENTION_SECONDS: number;
export type { AllCredentials, CredentialFile, SavedCredentials } from '../schemas/build';
export declare function parseOutputRetentionSeconds(raw: string): number;
export declare function parseOptionalBoolean(value: boolean | string | undefined): boolean;
export declare function parseInAppUpdatePriority(value: number | string): number;
/**
 * Load saved credentials for a specific app
 * Checks local file first, then global file
 */
export declare function loadSavedCredentials(appId?: string, local?: boolean): Promise<SavedCredentials | null>;
/**
 * Load credentials from environment variables
 * Only returns credentials that are actually set in env
 */
export declare function loadCredentialsFromEnv(): Partial<BuildCredentials>;
/**
 * Merge credentials from all three sources with proper precedence:
 * 1. CLI arguments (highest priority)
 * 2. Environment variables (middle priority)
 * 3. Saved credentials file (lowest priority)
 */
export declare function mergeCredentials(appId: string, platform: 'ios' | 'android', cliArgs?: Partial<BuildCredentials>): Promise<BuildCredentials | undefined>;
/**
 * Convert file paths to base64 credentials
 */
export declare function convertFilesToCredentials(platform: 'ios' | 'android', files: CredentialFile, passwords?: Partial<BuildCredentials>): Promise<BuildCredentials>;
/**
 * Update saved credentials for a specific app and platform
 */
export declare function updateSavedCredentials(appId: string, platform: 'ios' | 'android', credentials: Partial<BuildCredentials>, local?: boolean): Promise<void>;
/**
 * Remove specific credential keys for an app/platform.
 * Used during migration to clean up legacy keys.
 */
export declare function removeSavedCredentialKeys(appId: string, platform: 'ios' | 'android', keys: string[], local?: boolean): Promise<void>;
/**
 * Clear saved credentials for a specific app and/or platform
 */
export declare function clearSavedCredentials(appId?: string, platform?: 'ios' | 'android', local?: boolean): Promise<void>;
/**
 * Get saved credentials for a specific app and platform
 */
export declare function getSavedCredentials(appId: string, platform: 'ios' | 'android', local?: boolean): Promise<Partial<BuildCredentials> | null>;
/**
 * List all apps that have saved credentials
 */
export declare function listAllApps(local?: boolean): Promise<string[]>;
/**
 * Get the local credentials file path (for display purposes)
 */
export declare function getLocalCredentialsPath(): string;
/**
 * Get the global credentials file path (for display purposes)
 */
export declare function getGlobalCredentialsPath(): string;
