import { FileHandle } from "fs/promises"; import { ApplicationCredentials } from "../schemas/application-credentials.js"; import { StoredCredentials } from "../schemas/credentials.js"; export declare class StorageService { private readonly configDir; private resolve; private ensureConfigDir; /** * Saves application credentials to application.json file. */ saveApplication(credentials: ApplicationCredentials): Promise; /** * Loads application credentials from application.json file. * Returns null if file doesn't exist or is invalid. */ loadApplication(): Promise; /** * Saves consumer key credentials to credentials.json file. */ saveCredentials(credentials: StoredCredentials): Promise; /** * Loads consumer key credentials from credentials.json file. * Returns null if file doesn't exist or is invalid. */ loadCredentials(): Promise; /** * Loads consumer key credentials from credentials.json. * Throws CredentialsNotFoundException if file doesn't exist. */ requireCredentials(): Promise; /** * Creates an async iterable stream of lines from a .env file. * Returns empty async iterable if file doesn't exist. */ streamEnvironmentLines(): AsyncIterable; /** * Creates a swap file for atomic .env file operations. * Returns a file handle for writing. Throws exception if swap file already exists. */ createEnvironmentSwapFile(): Promise; /** * Atomically replaces .env file with the swap file. */ activateEnvironmentSwapFile(): Promise; }