import type { AppWizard } from '@sap-devx/yeoman-ui-types'; import type { ToolsLogger } from '@sap-ux/logger'; import type { ConfigPrompter } from '../app/questions/configuration.js'; /** * Values that are stashed in the App-Wizard cache. */ interface State { /** Re-use the heavy-weight ConfigPrompter when the user navigates back-and-forth. */ prompter?: ConfigPrompter; } declare const ADP_CACHE_KEY = "$adp-generator-cache"; /** * Augmented AppWizard type with optional internal cache field used for state persistence. */ export type AppWizardWithCache = AppWizard & { [ADP_CACHE_KEY]?: Partial; }; /** * Initializes the internal cache store on the AppWizard instance if it doesn't exist. * This should be called early in the generator lifecycle (typically in the constructor). * * @param {ILogWrapper} logger - Logger instance used for debugging messages. * @param {AppWizardWithCache} [wizard] - The AppWizard instance to augment with cache storage. * @returns {void} */ export declare function initCache(logger: ToolsLogger, wizard?: AppWizardWithCache): void; /** * Stores or merges partial generator state in the AppWizard’s cache. * * @param {AppWizardWithCache | undefined} wizard - The AppWizard instance (may be undefined). * @param {Partial} state - Partial state object to cache. * @param {ILogWrapper} logger - Logger instance for diagnostics. * @returns {void} */ export declare function cachePut(wizard: AppWizardWithCache | undefined, state: Partial, logger: ToolsLogger): void; /** * Retrieves a cached value from the AppWizard instance by key. * * @template T * @param {AppWizardWithCache | undefined} wizard - The AppWizard instance with cache. * @param {keyof State} key - The key to retrieve from the cached state. * @param {ILogWrapper} logger - Logger instance used for diagnostics. * @returns {T | undefined} - The cached value if present, otherwise `undefined`. */ export declare function cacheGet(wizard: AppWizardWithCache | undefined, key: keyof State, logger: ToolsLogger): T | undefined; /** * Clears the entire generator state cache from the AppWizard instance. * * @param {AppWizardWithCache | undefined} wizard - The AppWizard instance with cache to clear. * @param {ILogWrapper} logger - Logger instance for diagnostics. * @returns {void} */ export declare function cacheClear(wizard: AppWizardWithCache | undefined, logger: ToolsLogger): void; export {}; //# sourceMappingURL=appWizardCache.d.ts.map