• 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.

    Parameters

    • namespace: string

      Namespace for organizing related key-value pairs

    • key: string

      Unique identifier within the namespace

    • value: string | number | boolean

      Value to store (primitive types supported)

    Returns Promise<any>

    Promise resolving to the stored value

    Throws

    When update request fails or service returns non-200 status

    Example: Store Configuration Setting

    await updateKeyValue('device-config', 'maxRetries', 5);
    await updateKeyValue('user-prefs', 'darkMode', true);
    await updateKeyValue('app-state', 'lastLogin', '2024-01-15');