UNPKG

lomi.cli

Version:

Command line interface for lomi's payment infrastructure

45 lines (44 loc) 1.51 kB
export interface ConfigData { projectName?: string; apiKey?: string; cliToken?: string; environment?: "production" | "sandbox"; language?: "TypeScript" | "JavaScript"; supabaseUrl?: string; } /** * Saves the configuration data. * Merges with existing data by default. * @param {Partial<ConfigData>} data - The configuration data to save. */ export declare function saveConfig(data: Partial<ConfigData>): void; /** * Loads the entire configuration object. * @returns {ConfigData | null} The configuration data, or null if not found/empty. */ export declare function loadConfig(): ConfigData | null; /** * Gets a specific configuration value. * @param {keyof ConfigData} key - The configuration key to retrieve. * @returns {T | undefined} The value or undefined if not set. */ export declare function getConfigValue<K extends keyof ConfigData>(key: K): ConfigData[K] | undefined; /** * Deletes a specific configuration key. * @param {keyof ConfigData} key - The key to delete. */ export declare function deleteConfigValue(key: keyof ConfigData): void; /** * Clears the entire configuration. */ export declare function clearConfig(): void; /** * Gets the path to the configuration file. * @returns {string} The absolute path to the config file. */ export declare function getConfigFilePath(): string; /** * Checks if the user is logged in (CLI token exists). * If not, prints an error message and exits the process. */ export declare function ensureLoggedIn(): void;