@@ -5,10 +5,15 @@ import nodeUnifi, {
55 DeviceNameMapping ,
66 FullStatus ,
77 GuestAuthorization ,
8+ LanStatsSubsystem ,
89 SelfInfo ,
910 SiteStats ,
1011 SiteSysinfo ,
1112 UserGroup ,
13+ VpnStatsSubsystem ,
14+ WanStatsSubsystem ,
15+ WlanStatsSubsystem ,
16+ WwwStatsSubsystem ,
1217} from "node-unifi" ;
1318
1419// $ExpectType { Controller: typeof Controller; }
@@ -753,3 +758,134 @@ controller.customApiRequest("/api/s/default/stat/device");
753758
754759// $ExpectType Promise<true>
755760controller . listen ( ) ;
761+
762+ declare let stats : SiteStats ;
763+
764+ // $ExpectType string
765+ stats . external_id ;
766+ // ... and more test
767+
768+ // $ExpectType (WlanStatsSubsystem | WanStatsSubsystem | WwwStatsSubsystem | LanStatsSubsystem | VpnStatsSubsystem)[]
769+ stats . health ;
770+
771+ declare let wlanSubsystemHealthStats : WlanStatsSubsystem ;
772+ // $ExpectType "wlan"
773+ wlanSubsystemHealthStats . subsystem ;
774+
775+ declare let wwwSubsystemHealthStats : WwwStatsSubsystem ;
776+ // $ExpectType "www"
777+ wwwSubsystemHealthStats . subsystem ;
778+ // $ExpectType number;
779+ wwwSubsystemHealthStats . drops ;
780+ // $ExpectType string;
781+ wwwSubsystemHealthStats . gw_mac ;
782+ // $ExpectType number;
783+ wwwSubsystemHealthStats . latency ;
784+ // $ExpectType number;
785+ wwwSubsystemHealthStats [ "rx_bytes-r" ] ;
786+ // $ExpectType number;
787+ wwwSubsystemHealthStats . speedtest_lastrun ;
788+ // $ExpectType number;
789+ wwwSubsystemHealthStats . speedtest_ping ;
790+ // $ExpectType string;
791+ wwwSubsystemHealthStats . speedtest_status ;
792+ // $ExpectType string;
793+ wwwSubsystemHealthStats . status ;
794+ // $ExpectType number;
795+ wwwSubsystemHealthStats [ "tx_bytes-r" ] ;
796+ // $ExpectType number;
797+ wwwSubsystemHealthStats . uptime ;
798+ // $ExpectType number;
799+ wwwSubsystemHealthStats . xput_down ;
800+ // $ExpectType number;
801+ wwwSubsystemHealthStats . xput_up ;
802+
803+ declare let lanSubsystemHealthStats : LanStatsSubsystem ;
804+ // $ExpectType "lan"
805+ lanSubsystemHealthStats . subsystem ;
806+ // $ExpectType string | null
807+ lanSubsystemHealthStats . lap_ip ;
808+ // $ExpectType number
809+ lanSubsystemHealthStats . num_adopted ;
810+ // $ExpectType number
811+ lanSubsystemHealthStats . num_disconnected ;
812+ // $ExpectType number
813+ lanSubsystemHealthStats . num_guest ;
814+ // $ExpectType number
815+ lanSubsystemHealthStats . num_iot ;
816+ // $ExpectType number
817+ lanSubsystemHealthStats . num_pending ;
818+ // $ExpectType number
819+ lanSubsystemHealthStats . num_sw ;
820+ // $ExpectType number
821+ lanSubsystemHealthStats . num_user ;
822+ // $ExpectType number
823+ lanSubsystemHealthStats [ "rx_bytes-r" ] ;
824+ // $ExpectType string
825+ lanSubsystemHealthStats . status ;
826+ // $ExpectType number
827+ lanSubsystemHealthStats [ "tx_bytes-r" ] ;
828+
829+ declare let vpnSubsystemHealthStats : VpnStatsSubsystem ;
830+ // $ExpectType "vpn"
831+ vpnSubsystemHealthStats . subsystem ;
832+ // $ExpectType boolean
833+ vpnSubsystemHealthStats . remote_user_enabled ;
834+ // $ExpectType number
835+ vpnSubsystemHealthStats . remote_user_num_active ;
836+ // $ExpectType number
837+ vpnSubsystemHealthStats . remote_user_num_inactive ;
838+ // $ExpectType number
839+ vpnSubsystemHealthStats . remote_user_rx_bytes ;
840+ // $ExpectType number
841+ vpnSubsystemHealthStats . remote_user_rx_packets ;
842+ // $ExpectType number
843+ vpnSubsystemHealthStats . remote_user_tx_bytes ;
844+ // $ExpectType number
845+ vpnSubsystemHealthStats . remote_user_tx_packets ;
846+ // $ExpectType boolean
847+ vpnSubsystemHealthStats . site_to_site_enabled ;
848+ // $ExpectType string
849+ vpnSubsystemHealthStats . status ;
850+
851+ declare let wanSubsystemHealthStats : WanStatsSubsystem ;
852+ // $ExpectType "wan"
853+ wanSubsystemHealthStats . subsystem ;
854+ // $ExpectType string[]
855+ wanSubsystemHealthStats . gateways ;
856+ // $ExpectType string
857+ wanSubsystemHealthStats . gw_mac ;
858+ // $ExpectType string
859+ wanSubsystemHealthStats . gw_name ;
860+ // $ExpectType { cpu: string, mem: string, uptime: string }
861+ wanSubsystemHealthStats [ "gw_system-stats" ] ;
862+ // $ExpectType string
863+ wanSubsystemHealthStats . gw_version ;
864+ // $ExpectType string
865+ wanSubsystemHealthStats . isp_name ;
866+ // $ExpectType string
867+ wanSubsystemHealthStats . isp_organization ;
868+ // $ExpectType string[]
869+ wanSubsystemHealthStats . nameservers ;
870+ // $ExpectType string
871+ wanSubsystemHealthStats . netmask ;
872+ // $ExpectType number
873+ wanSubsystemHealthStats . num_adopted ;
874+ // $ExpectType number
875+ wanSubsystemHealthStats . num_disconnected ;
876+ // $ExpectType number
877+ wanSubsystemHealthStats . num_gw ;
878+ // $ExpectType number
879+ wanSubsystemHealthStats . num_pending ;
880+ // $ExpectType number
881+ wanSubsystemHealthStats . num_sta ;
882+ // $ExpectType number
883+ wanSubsystemHealthStats [ "rx_bytes-r" ] ;
884+ // $ExpectType string
885+ wanSubsystemHealthStats . status ;
886+ // $ExpectType number
887+ wanSubsystemHealthStats [ "tx_bytes-r" ] ;
888+ // $ExpectType Record<string, unknown>
889+ wanSubsystemHealthStats . uptime_stats ;
890+ // $ExpectType string
891+ wanSubsystemHealthStats . wan_ip ;
0 commit comments