UNPKG

unifi-client

Version:

NodeJs client for Unifi products (https://www.ui.com/)

137 lines (136 loc) 4.44 kB
/// <reference types="debug" /> import { _ObjectSubSite, IObjectSubSiteConfig } from '../commons/_ObjectSubSite'; import { IBaseDeviceMandatoryRaw, IBaseDeviceRaw } from './IBaseDeviceRaw'; import { IConfigNetwork, EConnectionNetworkName, IDownlinkTable, IEthernetTable, ILastUplink, ILldpTable, IPortTable, IStat, ISwitchCaps, ISysStats, ISystemStats, IUplink } from './interfaces'; import { hexColor } from '../commons/types'; import { EDeviceStates } from './EDeviceStates'; import { EDeviceType } from './EDeviceType'; export interface ILedOverrideProps { mode?: 'on' | 'off' | 'default'; color?: hexColor; brightness?: number; } export declare class BaseDevice extends _ObjectSubSite { static debug: import("debug").Debugger; constructor(config: IObjectSubSiteConfig, props: Partial<IBaseDeviceRaw> & { mac: string; }); import(props: Partial<IBaseDeviceRaw> & IBaseDeviceMandatoryRaw): this; /** * * @param type - two options: 'soft' or 'hard', defaults to soft * soft can be used for all devices, requests a plain restart of that device * hard is special for PoE switches and besides the restart also requests a * power cycle on all PoE capable ports. Keep in mind that a 'hard' reboot * does *NOT* trigger a factory-reset. */ reboot(type?: 'soft' | 'hard'): Promise<boolean>; forceProvision(): Promise<unknown>; /** * Override LED mode for a device (using REST) */ setLedOverride(props: ILedOverrideProps): unknown; locate(locate?: boolean): Promise<boolean>; updateDevice(payload: Partial<IBaseDeviceRaw>): Promise<this>; protected _updateDevice(payload: unknown): Promise<this>; mac: string; _id: string; ip: string; model: string; modelInLTS: boolean; modelInEOL: boolean; type: EDeviceType; version: string; adopted: boolean; siteId: string; xAuthkey: string; cfgVersion: string; syslogKey: string; configNetwork: IConfigNetwork; setupId: string; dot1xPortctrlEnabled: boolean; licenseState: string; xFingerprint: string; informUrl: string; informIp: string; xAesGcm: boolean; requiredVersion: string; kernelVersion: string; architecture: string; boardRevision: number; manufacturerId: number; modelIncompatible: boolean; internet: boolean; ethernetTable: Array<IEthernetTable>; portTable: Array<IPortTable>; hasSpeaker?: boolean; hasEth1?: boolean; fwCaps: number; hwCaps: number; wifiCaps?: number; switchCaps: ISwitchCaps; hasFan: boolean; hasTemperature: boolean; connectedAt: number; provisionedAt: number; unsupported: boolean; unsupportedReason: number; serial: string; hashId: string; anonId: string; twoPhaseAdopt: boolean; name?: string; deviceId: string; state: EDeviceStates; startDisconnectedMillis: number; lastSeen: number; knownCfgversion: string; startConnectedMillis: number; minInformIntervalSeconds: number; upgradable: boolean; adoptableWhenUpgraded: boolean; rollupgrade: boolean; nextInterval: number; uptime: number; locating: boolean; sysStats: ISysStats; systemStats: ISystemStats; lldpTable: Array<ILldpTable>; displayableVersion: string; connectionNetworkName: EConnectionNetworkName; startupTimestamp: number; guestKicks?: number; guestToken?: string; uplink: IUplink; downlinkTable: Array<IDownlinkTable>; connectRequestIp: string; connectRequestPort: string; prevNonBusyState: number; stat: IStat; txBytes: number; rxBytes: number; bytes: number; numSta: number; userWLANNumSta?: number; userNumSta: number; guestWLANNumSta?: number; guestNumSta: number; xHasSshHostkey: boolean; gatewayMac?: string; xSshHostkeyFingerprint?: string; satisfaction?: number; sysErrorCaps?: number; lastUplink?: ILastUplink; sshSessionTable?: Array<unknown>; ledOverride?: string; ledOverrideColor?: string; ledOverrideColorBrightness?: number; outdoorModeOverride?: string; lcmBrightnessOverride?: boolean; lcmIdleTimeoutOverride?: boolean; default?: boolean; discoveredVia?: string; adoptIp?: string; adoptUrl?: string; disabled?: boolean; }