routeros-api
Version:
Mikrotik Routerboard RouterOS API for NodeJS
73 lines (72 loc) • 1.92 kB
TypeScript
import { RouterOSAPICrud } from "./RosApiCrud";
import * as Types from "./Types";
import { RouterOSAPI } from "./RouterOSAPI";
export declare class RosApiModel extends RouterOSAPICrud {
/**
* The original item before applying the properties in the object
*/
private originalItem;
/**
* Creates a model over the item provided,
* giving options do edit, move, remove and etc
*
* @param rosApi the raw api
* @param item the item to create a model
* @param snakeCase if should turn properties to snake_case instead of camelCase
*/
constructor(rosApi: RouterOSAPI, item: any, snakeCase: boolean);
/**
* Alias to remove
*/
delete(): Types.SocPromise;
/**
* Disable itself
*/
disable(): Types.SocPromise;
/**
* Enable itself
*/
enable(): Types.SocPromise;
/**
* Move itself above the id provided, or to the end if none provided
*
* @param to where to move to
*/
move(to?: string | number): Types.SocPromise;
/**
* Unset properties of itself
* @param properties properties to unset
*/
unset(properties: string | string[]): Types.SocPromise;
/**
* Updates itself with the data provided
*
* @param data new data to update to
*/
update(data: object): Types.SocPromise;
/**
* Removes itself
*/
remove(): Types.SocPromise;
/**
* Alias to update
*
* @param data new data to update to
*/
set(data: object): Types.SocPromise;
/**
* Removes all dissolved item properties assigned to
* this object
*/
private cleanDissolvedProperties;
/**
* Dissolves all properties of the item into this
* object
*/
private dissolveProperties;
/**
* Refresh this object with new data of the item
* after printing it again
*/
private refreshData;
}