export interface StorageTransactionLease { assertValid(): void; } export interface StorageTransactionOptions { readonly storagePath: string; readonly load: () => Promise; readonly persist: (storage: Persisted) => Promise; readonly handler: (current: Current, persist: (storage: Persisted) => Promise) => Promise; } export declare function getStorageTransactionLockPath(storagePath: string): string; export declare function getRefreshLeasePath(storagePath: string): string; /** * Serialize a refresh-token exchange for one storage file across processes. * * The callback runs with NO storage lease held, so it is free to perform the * provider round trip and to open short storage transactions of its own for the * pre-check and the commit. */ export declare function withRefreshLease(storagePath: string, operation: (lease: StorageTransactionLease) => Promise): Promise; export declare function withStorageTransaction(options: StorageTransactionOptions): Promise; //# sourceMappingURL=transaction-lock.d.ts.map