import type { API, DynamicPlatformPlugin, HAP, Logging, PlatformAccessory } from 'homebridge'; import type { CloudflaredTunnelPlatformConfig } from './settings.js'; import { CloudflaredTunnel } from './cloudflared-tunnel.js'; /** * HomebridgePlatform * This class is the main constructor for your plugin, this is where you should * parse the user config and discover/register accessories with Homebridge. */ export declare class CloudflaredTunnelPlatform implements DynamicPlatformPlugin { accessories: PlatformAccessory[]; readonly api: API; readonly log: Logging; protected readonly hap: HAP; config: CloudflaredTunnelPlatformConfig; protected readonly tunnelAccessoryName = "Cloudflared Tunnel Status"; protected readonly tunnelAccessoryUUID: string; protected tunnelAccessory: PlatformAccessory | undefined; protected tunnelRunning: boolean; protected tunnel: CloudflaredTunnel | undefined; platformConfig: CloudflaredTunnelPlatformConfig; platformLogging: CloudflaredTunnelPlatformConfig['logging']; version: string; constructor(log: Logging, config: CloudflaredTunnelPlatformConfig, api: API); protected postAccessorySetup(): Promise; protected shouldPublishHapTunnelAccessory(): boolean; protected unregisterTunnelAccessoryIfPresent(): void; protected setupTunnelAccessory(): Promise; protected configureTunnelAccessory(accessory: PlatformAccessory): void; protected updateTunnelStatus(running: boolean, reason: string): Promise; protected onTunnelStatusChanged(_running: boolean): Promise; /** * This function is invoked when homebridge restores cached accessories from disk at startup. * It should be used to setup event handlers for characteristics and update respective values. */ configureAccessory(accessory: PlatformAccessory): void; /** * Verify the config passed to the plugin is valid */ verifyConfig(): Promise; existingTunnel(): Promise; createTunnel(): Promise; getPlatformLogSettings(): Promise; getPlatformConfigSettings(): Promise; /** * Asynchronously retrieves the version of the plugin from the package.json file. * * This method reads the package.json file located in the parent directory, * parses its content to extract the version, and logs the version using the debug logger. * The extracted version is then assigned to the `version` property of the class. * * @returns {Promise} A promise that resolves when the version has been retrieved and logged. */ getVersion(): Promise; /** * Validate and clean a string value for a Name Characteristic. * @param displayName - The display name of the accessory. * @param name - The name of the characteristic. * @param value - The value to be validated and cleaned. * @returns The cleaned string value. */ validateAndCleanDisplayName(displayName: string, name: string, value: string): Promise; /** * If device level logging is turned on, log to log.warn * Otherwise send debug logs to log.debug */ infoLog(...log: any[]): Promise; successLog(...log: any[]): Promise; debugSuccessLog(...log: any[]): Promise; warnLog(...log: any[]): Promise; debugWarnLog(...log: any[]): Promise; errorLog(...log: any[]): Promise; debugErrorLog(...log: any[]): Promise; debugLog(...log: any[]): Promise; /** * ⚠️ True in a normal install, because 'debugMode' means "let Homebridge * decide" rather than "debug is on". Only ever gate 'log.debug' on this. * * Gating 'log.warn', 'log.error' or 'log.success' on it prints those lines to * everyone, since Homebridge shows those levels whatever its debug setting - * which is exactly what happened to three of the helpers above (#243). */ loggingIsDebug(): Promise; enablingPlatformLogging(): Promise; } //# sourceMappingURL=Platform.HAP.d.ts.map