inet-core
Version:
iNet Core
136 lines (135 loc) • 3.87 kB
TypeScript
export declare class iNet {
/**
* Either global variable or required library
*/
private static iNetGlobal;
/**
* Returns the full url from the given relative path.
*
* @param {String} relativePath (required) The given relative path.
*
* @return {String} The string URL
*/
static getUrl(relativePath: any): string;
/**
* Returns full url form given relative path with firm prefix
* @param {String} path (required) The URL
* @return {String} The string URL
*/
static getPUrl(path: string): string;
/**
* Returns the SSO redirect url from the given url path.
*
* @param {String} url (required) The given url.
* @param {String} app (option) The given application.
*
* @return {String} The string SSO redirect URL
*/
static getSSOUrl(url: string, app?: string): string;
/**
* Gets the username of user logged
*/
static getUserName(): string;
/**
* Gets the displayName of user logged
*/
static getDisplayName(): string;
/**
* Gets the url of file server
*/
static getFileServer(): string;
/**
* Gets the image folder path of module inside cloud
*/
static getImageFolder(): string;
/**
* Gets the prefix of server
*/
static getPrefix(): string;
/**
* Gets the prefix of server
*/
static getFirmPrefix(): string;
/**
* Checks if inet layout is enabled
*/
static isEnableLayout(): boolean;
/**
* Gets the id of organization
*/
static getOrganId(): string;
/**
* Encodes an Object, Array or other value.
* @param {Object} o The variable to encode.
* @returns {String} The JSON string
*/
static encodeJSON(o: any): string;
/**
* Decodes (parses) a JSON string to an object.
* @param {String} src The JSON string.
* @returns {Object} The resulting object
*/
static decodeJSON(src: string): any;
/**
* Gets the plugin manager
*/
static getPluginManager(): any;
/**
* Gets the query param from url
*/
static getParam(param: string): string;
/**
* Gets the media path of file server
*/
static getMediaPath(): string;
/**
* The instances of global object
*/
static getInstances(): any;
/**
* Generate the identifier.
* @return {String} The string
*/
static generateId(): string;
/**
* Generate the UUID.
* @return {String} The string UUID
*/
static generateUUID(): string;
/**
* Returns true if the passed value is empty. The value is deemed to be
* empty if it is * null * undefined * an empty array * a zero length * an empty object
* string (Unless the allowBlank parameter is true)
*
* @param {Mixed} value The value to test
* @param {Boolean} allowBlank (optional) true to allow empty strings (defaults to false)
* @return {Boolean}
*/
static isEmpty(v: any, allowBlank?: boolean): boolean;
/**
* Return true if passed object is empty.
* @param {Mixed} value The value to test
* @returns {boolean}
*/
static isEmptyObject(v: any): boolean;
/**
* Return true if firm prefix is smartcloud.
*/
static isSmartCloud(): boolean;
/**
* Gets the web context of server
*/
static getWebContext(): string;
/**
* Appends content to the query string of a URL, handling logic for whether to place
* a question mark or ampersand.
* @param {String} url The URL to append to.
* @param {String} s The content to append to the URL.
* @return (String) The resulting URL
*/
static urlAppend: (url: string, s: string) => string;
/**
* Gets the max size of file upload
*/
static getMaxSizeUpload(): number;
}