Configuration types for UniFi API Client

interface UniFiClientConfig {
    baseUrl: string;
    username: string;
    password: string;
    site?: string;
    timeout?: number;
    verifySsl?: boolean;
    debug?: boolean;
    headers?: Record<string, string>;
    maxRetries?: number;
    retryDelay?: number;
    autoReauth?: boolean;
}

Properties

baseUrl: string

Base URL of the UniFi Controller (e.g., 'https://unifi.example.com:8443')

username: string

Username for authentication

password: string

Password for authentication

site?: string

Site name/ID (defaults to 'default')

timeout?: number

Request timeout in milliseconds (defaults to 30000)

verifySsl?: boolean

Whether to verify SSL certificates (defaults to true)

debug?: boolean

Enable debug logging (defaults to false)

headers?: Record<string, string>

Custom headers to include with requests

maxRetries?: number

Maximum number of retry attempts (defaults to 3)

retryDelay?: number

Retry delay in milliseconds (defaults to 1000)

autoReauth?: boolean

Whether to automatically re-authenticate on auth failures (defaults to true)