import { UniFiClientOptions } from './types'; import { EventEmitter } from 'events'; import { LogLevel } from './utils/logger'; import { DeviceEndpoints, ClientEndpoints, SiteEndpoints } from './endpoints'; import { ClientIdentifier, PaginationOptions, SortOptions } from './types/clients'; import { NetworkEndpoints } from './endpoints/networks'; import { Network, FirewallRule } from './types/network'; import { WirelessEndpoints, WlanConfig, RadioSettings } from './endpoints/wireless'; import { StatsOptions } from './endpoints/stats'; import { SystemEndpoints } from './endpoints/system'; import { SystemStatus, SystemSettings, SystemSettingsUpdate, BackupOptions, BackupResponse, RestoreOptions, RestoreResponse, FirmwareInfo, UpdateResponse, LogEntry, Alert } from './types'; export declare class UniFiClient extends EventEmitter { private httpClient; private auth; private logger; devices: DeviceEndpoints; clients: ClientEndpoints; sites: SiteEndpoints; networks: NetworkEndpoints; wireless: WirelessEndpoints; private statsEndpoints; systemEndpoints: SystemEndpoints; private username?; private password?; constructor(controllerUrl: string, options?: UniFiClientOptions); setLogLevel(level: LogLevel): void; login(username?: string, password?: string): Promise; logout(): Promise; isLoggedIn(): boolean; setSite(site: string): void; getSite(): string; request(method: 'get' | 'post' | 'put' | 'delete', path: string, data?: any, params?: any): Promise; /** * List all active clients. */ getActiveClients(options?: PaginationOptions & SortOptions): Promise; /** * List all clients (active and historical). */ getAllClients(options?: PaginationOptions & SortOptions): Promise; /** * Get client details by identifier (MAC, IP, or name). */ getClientDetails(identifier: ClientIdentifier): Promise; /** * Block a client by MAC address. */ blockClient(mac: string): Promise; /** * Unblock a client by MAC address. */ unblockClient(mac: string): Promise; /** * Reconnect (kick) a client by MAC address. */ reconnectClient(mac: string): Promise; /** * Authorize a guest client for a given number of minutes. */ authorizeGuest(mac: string, minutes?: number): Promise; /** * Unauthorize a guest client by MAC address. */ unauthorizeGuest(mac: string): Promise; /** * List all networks. */ getNetworks(): Promise; /** * Create a new network. */ createNetwork(network: Network): Promise; /** * Update an existing network. */ updateNetwork(networkId: string, network: Partial): Promise; /** * Delete a network. */ deleteNetwork(networkId: string): Promise; /** * List all firewall rules. */ getFirewallRules(): Promise; /** * Create a new firewall rule. */ createFirewallRule(rule: FirewallRule): Promise; /** * Update an existing firewall rule. */ updateFirewallRule(ruleId: string, rule: Partial): Promise; /** * Delete a firewall rule. */ deleteFirewallRule(ruleId: string): Promise; /** * List all wireless networks (WLANs). */ getWlanConfigs(): Promise; /** * Create a new wireless network (WLAN). */ createWlanConfig(wlanConfig: WlanConfig): Promise; /** * Update an existing wireless network (WLAN). */ updateWlanConfig(wlanId: string, wlanConfig: Partial): Promise; /** * Delete a wireless network (WLAN). */ deleteWlanConfig(wlanId: string): Promise; /** * Get radio settings for a device. */ getRadioSettings(deviceMac: string): Promise; /** * Update radio settings for a device. */ updateRadioSettings(deviceMac: string, radioSettings: Partial): Promise; /** * Get wireless networks utilization statistics. */ getWlanUtilization(): Promise; getSiteStats(options?: StatsOptions): Promise; getClientStats(options?: StatsOptions): Promise; getDeviceStats(options?: StatsOptions): Promise; getSessions(options?: StatsOptions): Promise; getHourlySiteStats(options?: StatsOptions): Promise; getTrafficStats(options?: StatsOptions): Promise; getAllUsers(options?: StatsOptions): Promise; get5MinuteSiteStats(options?: StatsOptions): Promise; getGatewayStats(options?: StatsOptions): Promise; /** * Get controller system status */ getSystemStatus(): Promise; /** * Get controller system settings */ getSystemSettings(): Promise; /** * Update controller system settings */ updateSystemSettings(settings: SystemSettingsUpdate): Promise; /** * Create a system backup */ createSystemBackup(options?: BackupOptions): Promise; /** * Restore a system backup */ restoreSystemBackup(backupId: string, options?: RestoreOptions): Promise; /** * Get available firmware versions */ getAvailableFirmware(): Promise; /** * Update device firmware */ updateDeviceFirmware(deviceId: string, firmwareVersion: string): Promise; /** * Reboot the controller */ rebootController(): Promise; /** * Get system logs */ getSystemLogs(limit?: number): Promise; /** * Get current system alerts */ getSystemAlerts(): Promise; /** * Reboot the system (with confirmation) */ rebootSystem(confirm: boolean): Promise; /** * Factory reset the system (destructive!) */ factoryReset(confirm: boolean): Promise; /** * Export a site backup as a Buffer (binary .unf file) * @returns {Promise} The backup file contents */ exportSiteBackup(): Promise; }