/**
 * @fileoverview Key-Value service functions for persistent data storage and retrieval.
 *
 * This module provides service functions for managing key-value pairs in KOS device storage.
 * Supports namespaced storage, CRUD operations, and typed value handling for configuration
 * data, user preferences, and application state persistence.
 *
 * @module KeyValueServices
 */
/**
 * Response format for key-value data retrieval.
 *
 * Represents the structure of data returned from key-value service endpoints,
 * supporting primitive types commonly used for configuration and state data.
 *
 * @group KOS Model
 * @category Key-Value Store
 */
interface KeyValueResponse {
    /** Key-value pairs with primitive values */
    [key: string]: string | number | boolean;
}
/**
 * Update request format for key-value operations.
 *
 * Defines the structure for updating individual key-value pairs within
 * specific namespaces, supporting targeted updates without affecting
 * other stored data.
 *
 * @group KOS Model
 * @category Key-Value Store
 */
export interface KeyValueUpdate {
    /** Namespace identifier for data organization */
    namespace: string;
    /** Specific key within the namespace */
    key: string;
    /** Value to store (as string for API compatibility) */
    value: string;
}
/**
 * Removes a specific key-value pair from storage.
 *
 * Permanently deletes a key and its associated value from the specified namespace.
 * This operation cannot be undone, so use with caution for critical data.
 *
 * @param namespace - Namespace containing the key to delete
 * @param key - Specific key to remove from storage
 *
 * @throws {Error} When deletion request fails or service is unavailable
 *
 * @example Delete User Preference
 * ```typescript
 * await deleteKeyValue('user-preferences', 'theme-mode');
 * console.log('Theme preference cleared');
 * ```
 *
 * @group KOS Model
 * @category Key-Value Store
 */
export declare const deleteKeyValue: (namespace: string, key: string) => Promise<void>;
/**
 * Creates or updates a key-value pair in persistent storage.
 *
 * Stores a value under the specified key within the given namespace. If the key
 * already exists, its value will be overwritten. Supports primitive types with
 * automatic string conversion for API compatibility.
 *
 * @param namespace - Namespace for organizing related key-value pairs
 * @param key - Unique identifier within the namespace
 * @param value - Value to store (primitive types supported)
 * @returns Promise resolving to the stored value
 *
 * @throws {Error} When update request fails or service returns non-200 status
 *
 * @example Store Configuration Setting
 * ```typescript
 * await updateKeyValue('device-config', 'maxRetries', 5);
 * await updateKeyValue('user-prefs', 'darkMode', true);
 * await updateKeyValue('app-state', 'lastLogin', '2024-01-15');
 * ```
 *
 * @group KOS Model
 * @category Key-Value Store
 */
export declare const updateKeyValue: (namespace: string, key: string, value: string | number | boolean) => Promise<any>;
/**
 * Retrieves all key-value pairs from a specified namespace.
 *
 * Fetches all stored data within the given namespace as a complete object.
 * Useful for loading configuration sets, user preferences, or application
 * state data in bulk operations.
 *
 * @param namespace - Namespace to retrieve data from (defaults to "studio")
 * @returns Promise resolving to object containing all key-value pairs in namespace
 *
 * @throws {Error} When retrieval fails or service returns non-200 status
 *
 * @example Load Application Configuration
 * ```typescript
 * const appConfig = await getKeyValue('app-config');
 * console.log('Max retries:', appConfig.maxRetries);
 * console.log('Debug mode:', appConfig.debugMode);
 *
 * const userPrefs = await getKeyValue('user-preferences');
 * const theme = userPrefs.themeMode || 'light';
 * ```
 *
 * @group KOS Model
 * @category Key-Value Store
 */
export declare const getKeyValue: (namespace?: string) => Promise<KeyValueResponse>;
/**
 * Removes an entire namespace and all its key-value pairs.
 *
 * Permanently deletes all data within the specified namespace. This is a
 * destructive operation that cannot be undone. Use with extreme caution
 * for critical data or production systems.
 *
 * @param namespace - Namespace to completely remove from storage
 *
 * @throws {Error} When deletion request fails or service is unavailable
 *
 * @example Clear All User Preferences
 * ```typescript
 * // Warning: This removes ALL user preferences permanently
 * await deleteKeyValueNamespace('user-preferences');
 * console.log('All user preferences cleared');
 *
 * // Better: Clear specific preferences individually
 * await deleteKeyValue('user-preferences', 'theme-mode');
 * await deleteKeyValue('user-preferences', 'language');
 * ```
 *
 * @group KOS Model
 * @category Key-Value Store
 */
export declare const deleteKeyValueNamespace: (namespace: string) => Promise<void>;
export {};
//# sourceMappingURL=key-value-services.d.ts.map