unified-plugin
Version:
NPAW's Unified Plugin
54 lines (53 loc) • 1.82 kB
TypeScript
export default class Core {
private static _instance;
private options;
private coreDatabase;
private coreStorage;
private browserStorage;
private fastDataService;
private nqsService;
private commonVariables;
private registeredPeriodicPushes;
static getInstance(accountCode?: string): Core;
private constructor();
/**
* Return the Unified Plugin versions
*/
static getPluginVersion(): string;
/**
* Stores a common value for a product that might need to be used by other products
*
* @param productKey Product identifier (e.g. balancer)
* @param variableKey Variable identifier (e.g. balancer-id)
* @param value Value to be stored
*/
registerCommonVariable(productKey: string, variableKey: string, value: any): void;
/**
* Deletes a common variable for the specified product
* @param productKey Product identifier (e.g. balancer)
* @param variableKey Variable identifier (e.g. balancer-id)
*/
unregisterCommonVariable(productKey: string, variableKey: string): void;
/**
* Fetches the value stored for a product and variable identifiers
*
* @param productKey Product identifier (e.g. balancer)
* @param variableKey Variable identifier (e.g. balancer-id)
* @returns The value of the variable associated with the product or undefined if it is not set
*/
getCommonVariable(productKey: string, variableKey: string): any | undefined;
/**
*
* @returns The FastData service session token
*/
getFastDataSessionToken(): string;
/**
* Refreshes the session token
*/
refreshSessionToken(): void;
/**
*
* @returns true if the session token is expired, false otherwise
*/
isSessionTokenExpired(): boolean;
}