unifi-client
Version:
NodeJs client for Unifi products (https://www.ui.com/)
29 lines (28 loc) • 1.43 kB
TypeScript
import { Debugger } from 'debug';
import { AxiosInstance, RawAxiosRequestConfig } from 'axios';
import type { dateInput } from './commons';
import type { Controller } from './Controller';
/**
* create a debugger extending the default debugger
* @param name - name for the debugger
*/
export declare const createDebugger: (name: string) => Debugger;
/**
* used to log an url
* @param req - the RawAxiosRequestConfig object from axios
* @param hidePassword - to hide "auth" part of the url
*/
export declare const getUrlRepresentation: (req: RawAxiosRequestConfig, hidePassword?: boolean) => string;
export declare const removeTrailingSlash: (stringUrl: string) => string;
export declare const axiosUrlParams: (instance: AxiosInstance) => AxiosInstance;
export declare const convertTimestampSecondsToDate: (time: dateInput) => Date;
export declare const checkNeeds: (controller: Controller, minVersion?: string, unifiOs?: boolean) => boolean;
/**
*
* @param controller - the controller
* @param minVersion - the minimal semver version for this object
* @param unifiOs - need to be unifiOs ? or Unifi Controller ? if no need, pass undefined
* @param parameterName - a name for the parameter
*/
export declare const checkNeedVersion: (controller: Controller, minVersion?: string, unifiOs?: boolean, parameterName?: string) => void;
export declare const formatMacAddress: (macAddress: string, separator: string) => string;