import { Configuration, App } from './@types/app.mjs'; import { config } from './@types/wifi/config.mjs'; import { state } from './@types/wifi/state.mjs'; import { AP } from './@types/wifi/AP.mjs'; import { LanHost } from './@types/lan/host.mjs'; import { LanInterface } from './@types/lan/interfaces.mjs'; import { LanConfig } from './@types/lan/config.mjs'; import { Response, VoidResponse } from './@types/index.mjs'; import { ConnectionStatus } from './@types/connection/status.mjs'; import { ConnectionConfig, IPv6ConnectionConfiguration } from './@types/connection/config.mjs'; import Port from './@types/port.mjs'; declare class Submodule { private _freebox; baseUrl: string; token: string; constructor(freebox: Freebox); } declare class Wifi extends Submodule { constructor(freebox: Freebox); config(): Promise>; state(): Promise>; AP(id?: number): Promise>; BSS(): Promise>; } /** * Lan browser API allow you to discover hosts on the local network * @link https://mafreebox.freebox.fr/doc/index.html#lan-browser-api * @class LAN * @extends Submodule */ declare class LAN extends Submodule { constructor(freebox: Freebox); /** * Returns the current LanConfig * @link https://mafreebox.freebox.fr/doc/index.html#get-the-current-lan-configuration * @returns {Promise>} */ config(): Promise>; /** * Update the current LanConfig * @link https://mafreebox.freebox.fr/doc/index.html#update-the-current-lan-configuration * @param config The new partial LanConfig * @returns {Promise>>} */ update(config: Partial): Promise>>; /** * Getting the list of browsable LAN interfaces * @link https://mafreebox.freebox.fr/doc/index.html#getting-the-list-of-browsable-lan-interfaces * @returns {Promise>} */ interfaces(): Promise>; /** * Getting the list of hosts on a given interface * @link https://mafreebox.freebox.fr/doc/index.html#getting-the-list-of-hosts-on-a-given-interface * @param _interface Returns the list of LanHost on this interface * @returns {Promise>} */ hosts(_interface?: string): Promise>; /** * Getting an host information * @link https://mafreebox.freebox.fr/doc/index.html#getting-an-host-information * @param _interface - The interface to which the host is connected * @param id - The id of the host * @returns {Promise>} */ host(_interface: string, id: string): Promise>; /** * Updating an host information * @link https://mafreebox.freebox.fr/doc/index.html#updating-an-host-information * @param _interface The interface to which the host is connected * @param id The id of the host * @param data The data to update * @returns {Promise>>} */ updateHost(_interface: string, id: string, data: Partial> & Required>): Promise>>; /** * Send a wake on LAN packet to the specified host with an optional password * @link https://mafreebox.freebox.fr/doc/index.html#send-wake-ok-lan-packet-to-an-host * @param _interface The interface to which the host is connected * @param mac The MAC address of the host * @param password - [OPTIONAL] The password to use to send the WOL packet * @returns */ WOL(_interface: string, mac: string, password?: string): Promise; } declare class Connection extends Submodule { constructor(freebox: Freebox); /** * Get the current Connection status * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#connection-status-object * @returns {Promise>} */ status(): Promise>; /** * Get the current Connection configuration * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#get-the-current-connection-configuration * @returns {Promise>} */ config(): Promise>; /** * Update the Connection configuration * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#update-the-connection-configuration * @param body The new configuration * @returns {Promise>} */ updateConfig(body: Partial): Promise>; /** * Get the current IPv6 Connection configuration * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#get-the-current-ipv6-connection-configuration * @returns {Promise>} */ IPv6config(): Promise>; /** * Update the IPv6 Connection configuration * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#update-the-ipv6-connection-configuration * @param body The new configuration * @returns {Promise>} */ updateIPv6Config(body: Partial): Promise>; } type TPort = Port; declare class PortForwarding extends Submodule { constructor(freebox: Freebox); /** * Retrieves the status of a port or all ports. * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#getting-the-list-of-port-forwarding * @param id - The ID of the port to retrieve the status for. If not provided, retrieves the status of all ports. * @returns {Promise>} */ status(id?: number): Promise>; /** * Updating a port forwarding * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#updating-a-port-forwarding * @param id The id of the port to update * @param data The data to update * @returns {Promise>} */ update(id: number, data: Partial): Promise>; /** * Add a port forwarding * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#add-a-port-forwarding * @param data Add a port forwarding * @returns {Promise>} */ add(data: Required): Promise>; /** * Delete a port forwarding * @link https://mafreebox.freebox.fr/doc/index.html?v=b828168f17942dd3e241fff4f01ccdd14bcc89aa#delete-a-port-forwarding * @param id The id of the port to delete * @returns {Promise} */ delete(id: number): Promise; } type OnLoginApp = Pick; declare class Freebox { wifi: Wifi; LAN: LAN; connection: Connection; port: PortForwarding; private readonly logger; _configuration?: Configuration; _app: App; token: string; constructor(app: OnLoginApp); login(): Promise; } export { Connection as C, Freebox as F, LAN as L, PortForwarding as P, Submodule as S, Wifi as W };