@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
147 lines (146 loc) • 5.41 kB
TypeScript
import { IPushPullReport } from '../AdaptableState/InternalState';
import { IPushPullDomain, IPushPullSchedule } from '../AdaptableState/IPushPullState';
/**
* Provides run-time access to ipushpull Plugin
*/
export interface IPushPullApi {
/**
* Retrieves `Username` from ipushpull state - AFTER someone logs in
*/
getCurrentIPushPullUsername(): string | undefined;
/**
* Retrieves `Password` from ipushpull state -- AFTER someone logs in
*/
getCurrentIPushPullPassword(): string | undefined;
/**
* Retrieves `Username` from ipushpull options (if provided)
*/
getIPushPullUsername(): string | undefined;
/**
* Retrieves `Password` from ipushpull options (if provided)
*/
getIPushPullPassword(): string | undefined;
/**
* Retrieves `AutoLogin` from ipushpull options; if `true` AdapTable will automatically log user in to ipushpull at start-up
*/
getAutoLogin(): boolean;
/**
* Retrieves current ipushpull Report from ipushpull state; A Report contains Name, Folder and ipushpull Page
*/
getCurrentLiveIPushPullReport(): IPushPullReport | undefined;
/**
* Publishes an ipushpull Report as a one-off export (i.e. with no live data)
*
* @param iPushPullReport the report to publish
*/
sendSnapshot(iPushPullReport: IPushPullReport): void;
/**
* Publishes ipushpull Report as Live Data; any changes to underlying data in report will be sent to ipushpull
*
* When this happens the 'play' button in the ipushpull toolbar changes to a red 'pause' button
*
* @param iPushPullReport the report to publish
*/
startLiveData(iPushPullReport: IPushPullReport): void;
/**
* Pauses current Live Data report
*
* When this happens the 'pause' button in the ipushpull toolbar changes back to a 'play' button
*/
stopLiveData(): void;
/**
* Retrieves the current ipushpull instance (if one has been provided by the User at design time in ipushpull state)
*/
getIPushPullInstance(): any;
/**
* Sets the current ipushpull instance - this method should not generally be used.
*/
setIPushPullInstance(ippInstance: any): void;
/**
* Retrieves all the ipushpull domain to which the current user has access
*
* An `IPushPullDomain` contains 3 properties:
*
* - **Name**: the name of the Domain / Folder
*
* - **FolderId**: the number of the Domain / Folder
*
* - **Pages**: a string array containing the names of all the Pages in the Folder
*/
getIPushPullDomains(): IPushPullDomain[];
/**
* Retrieves all pages in given ipushpull domain
* @param domain ipushpull folder which contains the pages
*/
getPagesForIPushPullDomain(domain: string): string[];
/**
* Gets the Id of the ipushpull folder / Domain with the given name
*
* @param folderName the ipushpull folder name
*/
getFolderIdForName(folderName: string): number;
/**
* Adds a new page to ipushpull using given name in the supplied folder
* @param folder the name of the folder where the page will be added
* @param page tbe name of the page to add
*/
addNewIPushPullPage(folder: string, page: string): void;
/**
* Retrieves Throttle Time from ipushpull State; how often a Live report will update ipushpull (if data changes)
*/
getIPushPullThrottleTime(): number | undefined;
/**
* Sets Throttle time for ipushpull; how often a Live report will update ipushpull (if data changes)
*
* @param throttleTime new throttle time to use
*/
setIPushPullThrottleTime(throttleTime: number): void;
/**
* Checks if given report is currently 'live' (i.e. sending updates as data changes)
*
* @param report the report to check
*/
isIPushPullReportLive(report: IPushPullReport): boolean;
/**
* Sets given Domains as those for the current User
*
* @param IPushPullDomains the ipushpull Domains to set
*/
setIPushPullDomains(IPushPullDomains: IPushPullDomain[]): void;
/**
* Opens iPushPullPopup (though its currently empty!)
*/
showIPushPullPopup(): void;
/**
* Logins in user to ipushpull with given credentials; if successful ipushpull toolbar will display full set of controls
*
* @param userName userName to send to ipushpull
*
* @param password password to send to ipushpull
*/
loginToIPushPull(userName: string, password: string): void;
/**
* Logs out the current user from ipushpull (changes ipushpull toolbar to show Login button)
*/
logoutFromIPushPull(): void;
/**
* Gets ipushpull schedules ie. reports set to run at particular times
*/
getIPushPullSchedules(): IPushPullSchedule[];
/**
* Checks if an ipushpull instance has been provided by the user
*/
isIPushPullAvailable(): boolean | undefined;
/**
* Checks to see if ipushpull is running (i.e. a user has successfully logged in)
*/
isIPushPullRunning(): boolean | undefined;
/**
* Checks if a report is sending Live Data to ipushpull
*/
isIPushPullLiveDataRunning(): boolean | undefined;
/**
* Whether to display System Reports in ipushpull toolbar
*/
includeSystemReports(): boolean;
}