/** * @fileoverview Test utilities for config module * * WARNING: This file is intended for TEST USE ONLY. * Do not import from production code. * * These functions provide Effect-based wrappers for testing config operations. */ import { Effect, Either } from 'effect'; import { ConfigurationData, CommandPreset, CommandPresetsConfig, ShortcutConfig, IConfigEditor } from '../../types/index.js'; import { FileSystemError, ConfigError, ValidationError } from '../../types/errors.js'; /** * TEST ONLY: Load configuration from file with Effect-based error handling * * @param configPath - Path to the config file * @param legacyShortcutsPath - Path to legacy shortcuts file for migration * @returns Effect with ConfigurationData on success, errors on failure */ export declare function loadConfigEffect(configPath: string, legacyShortcutsPath: string): Effect.Effect; type ValidationResult = Either.Either; /** * TEST ONLY: Validate configuration structure */ export declare function validateConfig(config: unknown): ValidationResult; /** * TEST ONLY: Add or update a preset in the config manager */ export declare function addPreset(configManager: IConfigEditor, preset: CommandPreset): void; /** * TEST ONLY: Delete a preset by ID */ export declare function deletePreset(configManager: IConfigEditor, id: string): void; /** * TEST ONLY: Set the default preset ID */ export declare function setDefaultPreset(configManager: IConfigEditor, id: string): void; /** * TEST ONLY: Save configuration to file with Effect-based error handling */ export declare function saveConfigEffect(configManager: IConfigEditor, config: ConfigurationData, configPath: string): Effect.Effect; /** * TEST ONLY: Set shortcuts with Effect-based error handling */ export declare function setShortcutsEffect(configManager: IConfigEditor, shortcuts: ShortcutConfig, configPath: string): Effect.Effect; /** * TEST ONLY: Set command presets with Effect-based error handling */ export declare function setCommandPresetsEffect(configManager: IConfigEditor, presets: CommandPresetsConfig, configPath: string): Effect.Effect; /** * TEST ONLY: Add or update preset with Effect-based error handling */ export declare function addPresetEffect(configManager: IConfigEditor, preset: CommandPreset, configPath: string): Effect.Effect; /** * TEST ONLY: Delete preset with Effect-based error handling */ export declare function deletePresetEffect(configManager: IConfigEditor, id: string, configPath: string): Effect.Effect; /** * TEST ONLY: Set default preset with Effect-based error handling */ export declare function setDefaultPresetEffect(configManager: IConfigEditor, id: string, configPath: string): Effect.Effect; /** * TEST ONLY: Get the default preset */ export declare function getDefaultPreset(configManager: IConfigEditor): CommandPreset; /** * TEST ONLY: Get whether to select preset on start */ export declare function getSelectPresetOnStart(configManager: IConfigEditor): boolean; /** * TEST ONLY: Set whether to select preset on start */ export declare function setSelectPresetOnStart(configManager: IConfigEditor, enabled: boolean): void; /** * TEST ONLY: Get whether auto-approval is enabled */ export declare function isAutoApprovalEnabled(configManager: IConfigEditor): boolean; /** * TEST ONLY: Get preset by ID with Either-based error handling */ export declare function getPresetByIdEffect(configManager: IConfigEditor, id: string): Either.Either; export {};