/**
 * Cloud storage for mailx settings — Google Drive API (drive.file scope).
 *
 * Uses a single app-owned "mailx" folder on Drive, accessed by folder ID.
 * The drive.file scope only sees files/folders created by this OAuth client,
 * which prevents conflicts with existing folders of the same name.
 * All machines using the same OAuth client ID share the same folder.
 *
 * ── Restoring removed providers ──
 * OneDrive (removed 2026-04-06): Required microsoft-credentials.json in ~/.mailx/,
 *   MS_SCOPES = "https://graph.microsoft.com/Files.ReadWrite offline_access",
 *   authenticateOAuth with tokenDir ~/.mailx/tokens/microsoft/.
 *   Read/write via Graph API: GET/PUT https://graph.microsoft.com/v1.0/me/drive/root:/{path}:/content
 *   Azure AD app registration needed: https://portal.azure.com → App registrations → Desktop app
 *
 * Dropbox (removed 2026-04-06): Never implemented — placeholder only.
 *   Would need Dropbox OAuth app, token management, and Dropbox API v2 calls.
 */
/** Find the settings folder on GDrive, or create a flat "mailx" folder.
 *  Supports nested paths from config (e.g. "home/.mailx") by walking each
 *  segment. Falls back to the folderId in config if set, so a stale ID that
 *  points to the wrong folder gets corrected on next lookup. */
export declare function gDriveFindOrCreateFolder(): Promise<string | null>;
export type CloudProvider = "gdrive" | "google" | "local";
export interface CloudFile {
    /** Read a file. For gdrive, path is just the filename (folder ID is implicit). */
    read(filePath: string): Promise<string | null>;
    /** Write a file. For gdrive, path is just the filename. Throws on failure with a descriptive error. */
    write(filePath: string, content: string): Promise<void>;
    /** Check if a file exists. */
    exists(filePath: string): Promise<boolean>;
}
/**
 * Get a cloud file provider. For gdrive, pass the folder ID.
 * Files are stored flat in the folder (no subdirectory navigation).
 */
export declare function getCloudProvider(provider: string, folderId?: string): CloudFile | null;
/** Fetch the authenticated Google user's profile (name + email) via the People API.
 *  Caller must supply an OAuth access token whose scopes include `contacts.readonly`
 *  or `userinfo.profile`. The Drive token (drive.file) does NOT have the right scope
 *  on its own — use the Gmail/IMAP OAuth token instead (mailx-imap's
 *  ImapManager.getOAuthToken). Returns null on failure. */
export declare function getGoogleProfile(token: string): Promise<{
    name?: string;
    email?: string;
} | null>;
//# sourceMappingURL=cloud.d.ts.map