spitfirepm
Version:
Client API Tools for Spitfire Project Management
92 lines (91 loc) • 3.09 kB
TypeScript
export declare class Client {
baseUrl: string;
beforeSend: any;
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
constructor(baseUrl?: string);
/**
* Authenticates a session and generates a FormsAuthenticationTicket and cookie
*/
apiAccount(siteID: string, uID: string): Promise<string | null>;
private apiAccountWithCallbacks;
private processApiAccountWithCallbacks;
protected processApiAccount(xhr: any): string | null | null;
/**
* Requests permission to try the UI
*/
apiUitrial(request: UITrialRequest): Promise<UITrialResponse | null>;
private apiUitrialWithCallbacks;
private processApiUitrialWithCallbacks;
protected processApiUitrial(xhr: any): UITrialResponse | null | null;
/**
* Ends this session
*/
apiAccountLogout(): Promise<boolean>;
private apiAccountLogoutWithCallbacks;
private processApiAccountLogoutWithCallbacks;
protected processApiAccountLogout(xhr: any): boolean | null;
/**
* Returns name of site
*/
apiSiteName(siteID: string): Promise<void>;
private apiSiteNameWithCallbacks;
private processApiSiteNameWithCallbacks;
protected processApiSiteName(xhr: any): void | null;
/**
* Returns license for the requested server
*/
apiSiteLicense(siteID: string, serverName: string | null): Promise<void>;
private apiSiteLicenseWithCallbacks;
private processApiSiteLicenseWithCallbacks;
protected processApiSiteLicense(xhr: any): void | null;
}
export declare class UITrialResponse implements IUITrialResponse {
responseKey: string;
permissionGranted: boolean;
grantCount: number;
grantInfo?: string | undefined;
checksum?: string | undefined;
constructor(data?: IUITrialResponse);
init(_data?: any): void;
static fromJS(data: any): UITrialResponse;
toJSON(data?: any): any;
}
export interface IUITrialResponse {
responseKey: string;
permissionGranted: boolean;
grantCount: number;
grantInfo?: string | undefined;
checksum?: string | undefined;
}
export declare class UITrialRequest implements IUITrialRequest {
email: string;
fullName: string;
userKey: string;
siteKey: string;
comment?: string | undefined;
constructor(data?: IUITrialRequest);
init(_data?: any): void;
static fromJS(data: any): UITrialRequest;
toJSON(data?: any): any;
}
export interface IUITrialRequest {
email: string;
fullName: string;
userKey: string;
siteKey: string;
comment?: string | undefined;
}
export declare class ApiException extends Error {
message: string;
status: number;
response: string;
headers: {
[key: string]: any;
};
result: any;
constructor(message: string, status: number, response: string, headers: {
[key: string]: any;
}, result: any);
protected isApiException: boolean;
static isApiException(obj: any): obj is ApiException;
}