/**
 * Google Drive adapter — domain types (W0207).
 *
 * Narrows core's literal-free `DocSourceConfig` + ref interfaces to the
 * Drive-specific shapes. Lives in the adapter directory so adding/removing
 * Drive is a single-directory operation.
 */
import type { DocSourceConfig } from "../../../_vendor/ailf-core/index.d.ts";
/**
 * A Google Drive doc source. Validated eagerly by `defineGoogleDriveSource`.
 *
 * `recurseDepth` defaults to 3 — typical team-docs trees nest 2-3 levels.
 * Combined with the `maxFiles` ceiling, this keeps a mispointed root folder
 * from pulling arbitrarily deep trees.
 *
 * `maxFiles` defaults to 2000 — a hard ceiling that aborts the fetch
 * (citing the actual count) rather than slowly pulling thousands of files.
 */
export interface GoogleDriveSource extends DocSourceConfig {
    kind: "google-drive";
    name: string;
    /** Root folder id; the fetcher walks downward from here. */
    rootFolderId: string;
    /** Maximum recursion depth into subfolders (default 3). */
    recurseDepth?: number;
    /** Hard ceiling on enumerated files; abort with a clear error past this (default 2000). */
    maxFiles?: number;
    /**
     * Optional MIME-type allow list. When set, only files matching one of
     * these MIME types are fetched (folders are still recursed into).
     */
    mimeFilters?: string[];
}
/**
 * A single Drive file reference. The fetcher dispatches on the file's
 * MIME type at runtime: Google Docs export as markdown,
 * `text/markdown`/`text/plain` pass through, anything else is skipped.
 */
export interface DriveFileDocRef {
    kind: "drive-file";
    fileId: string;
    reason?: string;
}
/**
 * A folder reference. The fetcher lists the folder's children and recurses
 * subject to `recurseDepth`. `mimeTypes` narrows which child files are
 * included.
 */
export interface DriveFolderDocRef {
    kind: "drive-folder";
    folderId: string;
    /** Optional per-ref MIME filter; overlays with `GoogleDriveSource.mimeFilters`. */
    mimeTypes?: string[];
    reason?: string;
}
/** The full union of Drive-accepted refs. */
export type DriveDocRef = DriveFileDocRef | DriveFolderDocRef;
