import type { TokenManager } from '../google/client.ts';
import type { GmailLabel } from './labels.ts';
import type { GmailMessageRaw, GmailMessageStub, ListMessagesOptions } from './messages.ts';
/**
 * Every Gmail request the gmail backend makes, as one object. A core op
 * reaches Gmail only through `accessor.gmail`. Mirrors Python's `GmailApi`.
 */
export interface GmailApi {
    listLabels(): Promise<GmailLabel[]>;
    listMessages(opts?: ListMessagesOptions): Promise<GmailMessageStub[]>;
    getMessageRaw(messageId: string): Promise<GmailMessageRaw>;
    getAttachment(messageId: string, attachmentId: string): Promise<Uint8Array>;
    currentHistoryId(): Promise<string>;
    listHistory(start: string): Promise<[Record<string, unknown>[], string]>;
}
/** The live `GmailApi`: one token manager, one wire call per method. */
export declare class GmailClient implements GmailApi {
    readonly tokenManager: TokenManager;
    constructor(tokenManager: TokenManager);
    listLabels(): Promise<GmailLabel[]>;
    listMessages(opts?: ListMessagesOptions): Promise<GmailMessageStub[]>;
    getMessageRaw(messageId: string): Promise<GmailMessageRaw>;
    getAttachment(messageId: string, attachmentId: string): Promise<Uint8Array>;
    currentHistoryId(): Promise<string>;
    listHistory(start: string): Promise<[Record<string, unknown>[], string]>;
}
//# sourceMappingURL=api.d.ts.map