import type { gmail_v1 } from "googleapis"; /** * Fetch the full label inventory for an account. Shared by search and the * write commands so name→id resolution behaves identically everywhere. */ export declare function fetchLabels(api: gmail_v1.Gmail, account: string): Promise; /** * Resolve a user-supplied label reference to a Gmail label ID. Accepts an * exact name (case-sensitive — Gmail labels are), a case-insensitive name, * or a raw label ID (system labels like INBOX/UNREAD, or Label_ ids). * Throws LABEL_NOT_FOUND with discovery suggestions when nothing matches. */ export declare function resolveLabelId(name: string, labels: gmail_v1.Schema$Label[]): string; /** Resolve a list of label references to IDs (see resolveLabelId). */ export declare function resolveLabelIds(names: string[], labels: gmail_v1.Schema$Label[]): string[]; /** Map label IDs back to their user-facing names, falling back to the id. */ export declare function labelNamesFor(ids: string[], labels: gmail_v1.Schema$Label[]): string[]; /** * Gmail's system labels are ALL_CAPS (INBOX, UNREAD, STARRED, …); user * labels use mixed case, nested slashes, or the Label_ id form. Matching * on all-caps catches any future system additions cheaply. */ export declare function isSystemLabel(id: string): boolean;