import { type gmail_v1 } from "googleapis";
import type { VisionClawConfig } from "../config/types.js";
import type { MessageAttachment } from "../channels/interface.js";
/**
 * Create a pre-configured Gmail API client with auto-refreshing OAuth2 tokens.
 */
export declare function createGmailClient(config: VisionClawConfig): gmail_v1.Gmail;
/**
 * Find a header value from a Gmail message's header list (case-insensitive).
 */
export declare function getHeader(headers: gmail_v1.Schema$MessagePartHeader[] | undefined, name: string): string | undefined;
/** RFC 2047 encode a header value if it contains non-ASCII characters. */
export declare function mimeEncodeHeader(value: string): string;
export interface CreateRawEmailOptions {
    from: string;
    to: string;
    cc?: string;
    bcc?: string;
    subject: string;
    body: string;
    htmlBody?: string;
    inReplyTo?: string;
    references?: string;
    attachments?: MessageAttachment[];
}
/**
 * Create a base64url-encoded raw email for the Gmail API.
 * Supports cc/bcc, RFC 2047 subject encoding, HTML body (multipart/alternative),
 * and optional file/base64 attachments via MIME multipart.
 */
export declare function createRawEmail(options: CreateRawEmailOptions): string;
/**
 * Fetch reply threading headers (Message-Id, References) from an existing Gmail message.
 * Returns { inReplyTo, references } ready for use in createRawEmail.
 */
export declare function fetchReplyHeaders(gmail: gmail_v1.Gmail, messageId: string): Promise<{
    inReplyTo?: string;
    references?: string;
}>;
/**
 * Build a reply subject from an original subject.
 * Prepends "Re: " if not already present.
 */
export declare function buildReplySubject(originalSubject: string): string;
//# sourceMappingURL=gmail-utils.d.ts.map