import type { TokenManager } from './client.ts'; import type { ByteWindow } from '../../utils/ranges.ts'; export declare const MIME_TO_EXT: Readonly>; interface DriveOwner { me?: boolean; displayName?: string; emailAddress?: string; } export interface DriveFile { id: string; name: string; mimeType?: string; driveId?: string; size?: string; quotaBytesUsed?: string; createdTime?: string; modifiedTime?: string; owners?: DriveOwner[]; capabilities?: { canEdit?: boolean; }; parents?: string[]; } export interface SharedDrive { id: string; name: string; } export declare function listFiles(tm: TokenManager, opts?: { folderId?: string; driveId?: string | null; mimeType?: string | null; trashed?: boolean; pageSize?: number; modifiedAfter?: string | null; modifiedBefore?: string | null; name?: string | null; /** * Stop once this many files are in hand and do not request another * page. An emptiness probe wants one entry, and `pageSize` alone * cannot express that: it caps the page, not the walk, so a small * page turned a listing of a large folder into many requests * instead of fewer. */ limit?: number | null; }): Promise; export declare function listSharedDrives(tm: TokenManager, opts?: { pageSize?: number; }): Promise; export declare function listAllFiles(tm: TokenManager, opts?: { mimeType?: string | null; trashed?: boolean; pageSize?: number; modifiedAfter?: string | null; modifiedBefore?: string | null; }): Promise<{ files: DriveFile[]; complete: boolean; }>; export declare function downloadFile(tm: TokenManager, fileId: string, window?: ByteWindow): Promise; export declare function deleteFile(tm: TokenManager, fileId: string): Promise; export declare function downloadFileStream(tm: TokenManager, fileId: string): AsyncIterable; export declare const FOLDER_MIME = "application/vnd.google-apps.folder"; export declare function getFile(tm: TokenManager, fileId: string): Promise; export declare function createFolder(tm: TokenManager, name: string, parentId: string): Promise; export declare function uploadFile(tm: TokenManager, name: string, parentId: string, data: Uint8Array, mimeType?: string): Promise; export declare function updateFileContent(tm: TokenManager, fileId: string, data: Uint8Array, mimeType?: string): Promise; export declare function patchFile(tm: TokenManager, fileId: string, opts?: { body?: Record; addParents?: string; removeParents?: string; }): Promise; export declare function copyFile(tm: TokenManager, fileId: string, name: string, parentId: string): Promise; export {}; //# sourceMappingURL=drive.d.ts.map