import type { GoogleDriveOptionsWithDefaults } from './google-drive-types.ts'; import { DriveStructure } from './init.ts'; export type DriveTransaction = { etag: string; }; export type TransactionFileContent = { createdAtClientTime: number; }; export declare const TRANSACTION_FILE_NAME = "transaction.json"; export declare const TRANSACTION_BLOCKED_FLAG: { readonly retry: true; }; export declare function startTransactionTryOnce(googleDriveOptions: GoogleDriveOptionsWithDefaults, init: DriveStructure): Promise; export declare function startTransaction(googleDriveOptions: GoogleDriveOptionsWithDefaults, init: DriveStructure): Promise; export declare function isTransactionTimedOut(googleDriveOptions: GoogleDriveOptionsWithDefaults, init: DriveStructure): Promise<{ timeLeft: number; transactionAge: number; expired: boolean; etag: any; }>; export declare function commitTransaction(googleDriveOptions: GoogleDriveOptionsWithDefaults, init: DriveStructure, transactionInput: DriveTransaction | typeof TRANSACTION_BLOCKED_FLAG): Promise; export declare function runInTransaction(googleDriveOptions: GoogleDriveOptionsWithDefaults, init: DriveStructure, primaryPath: string, fn: () => Promise, runAfter?: () => any): Promise;