import Emitter from './Emitter';
import { IConfig } from './Config';
import { IStorageService } from './Storage';
import Promise from 'bluebird';
export interface IApiError {
    method: string;
    data: any;
    code: number;
    statusCode: number;
    httpCode: number;
    error: any;
    httpText: any;
    message: string;
    [key: string]: any;
}
interface IApiErrorParams {
    message: string;
    [key: string]: any;
}
export interface IRequestResult<T> {
    success: boolean;
    data: T;
    httpCode: number;
    method: string;
    url: string;
}
export interface IApiTokens {
    access_token: string;
    refresh_token: string;
}
export interface IApiDataUserLogin {
    email: string;
    password: string;
    grant_type?: string;
    client_id?: string;
    client_secret?: string;
}
export interface IApiDataPluginAuth {
    client: string;
    application: string;
}
export interface IApiDataUserLogout {
    all?: string;
}
export interface IApiDataCreateFolder {
    data: IApiDataFolderData;
}
export interface IApiDataFolderData {
    name: string;
    display_name?: string;
    description?: string;
    default_symphony_sid?: string;
    page_access_mode?: number;
}
export interface IApiDataUpdateDomin {
    domainId: number;
    data: IApiDataFolderData;
}
export interface IApiDataGetPage {
    domainId: number;
    pageId: number;
    seq_no: number;
}
export interface IApiDataGetPageByName {
    domainId: string;
    pageId: string;
    seq_no: number;
}
export interface IApiDataGetPageByUuid {
    uuid: string;
    seq_no: number;
}
export interface IApiDataGetPageVerions {
    pageId: number;
    before: string;
    after: string;
    max: number;
    page: number;
}
export interface IApiDataWorkflowEventData {
    name: string;
    counterparties: number[];
    trader?: string;
    quote_basis?: string;
    when?: string;
    notes?: string;
}
export interface IApiDataWorkflowEvent {
    workflow_type: string;
    event_type: string;
    data: IApiDataWorkflowEventData;
}
export declare class ApiError extends Error implements IApiError {
    method: string;
    data: any;
    code: number;
    statusCode: number;
    httpCode: number;
    error: any;
    httpText: any;
    constructor(params: IApiErrorParams);
}
export interface IApiService extends Emitter {
    EVENT_REQ: string;
    EVENT_401: string;
    tokens: IApiTokens;
    req: any;
    lockedTimeCheck: number;
    block: () => void;
    unblock: () => void;
    getSelfInfo: () => Promise<IRequestResult<any>>;
    refreshAccessTokens: (refreshToken: string) => Promise<IRequestResult<any>>;
    userLogin: (data: IApiDataUserLogin) => Promise<IRequestResult<any>>;
    userLogout: (data?: any) => Promise<IRequestResult<any>>;
    pluginAuth: (IApiDataPluginAuth: any) => Promise<IRequestResult<any>>;
    getSchemas: () => Promise<IRequestResult<any>>;
    getSchema: (data: any) => Promise<IRequestResult<any>>;
    createSchema: (data: any) => Promise<IRequestResult<any>>;
    updateSchema: (data: any) => Promise<IRequestResult<any>>;
    deleteSchema: (id: Number) => Promise<IRequestResult<any>>;
    getUserDelegates: () => Promise<IRequestResult<any>>;
    getUserDelegate: (data: any) => Promise<IRequestResult<any>>;
    createUserDelegate: (data: any) => Promise<IRequestResult<any>>;
    updateUserDelegate: (data: any) => Promise<IRequestResult<any>>;
    deleteUserDelegate: (id: number) => Promise<IRequestResult<any>>;
    getOrganizationDomainAccess: (id: any) => Promise<IRequestResult<any>>;
    getIntegrationChannels: () => Promise<IRequestResult<any>>;
    getIntegrationChannel: (data: any) => Promise<IRequestResult<any>>;
    createIntegrationChannel: (data: any) => Promise<IRequestResult<any>>;
    saveIntegrationChannel: (data: any) => Promise<IRequestResult<any>>;
    deleteIntegrationChannel: (data: any) => Promise<IRequestResult<any>>;
    getCounterparties: () => Promise<IRequestResult<any>>;
    getCounterparty: (data: any) => Promise<IRequestResult<any>>;
    createCounterparty: (data: any) => Promise<IRequestResult<any>>;
    deleteCounterparty: (id: number) => Promise<IRequestResult<any>>;
    updateCounterparty: (data: any) => Promise<IRequestResult<any>>;
    workflowEvent: (data: IApiDataWorkflowEvent) => Promise<IRequestResult<any>>;
    createFolder: (data: IApiDataCreateFolder) => Promise<IRequestResult<any>>;
    createDomain: (data: IApiDataCreateFolder) => Promise<IRequestResult<any>>;
    getDomains: () => Promise<IRequestResult<any>>;
    getDomain: (domainId: number) => Promise<IRequestResult<any>>;
    removeDomain: (domainId: number) => Promise<IRequestResult<any>>;
    updateDomain: (data: any) => Promise<IRequestResult<any>>;
    getDomainPages: (domainId: number) => Promise<IRequestResult<any>>;
    getDomainsAndPages: (client: string) => Promise<IRequestResult<any>>;
    getPage: (data: any) => Promise<IRequestResult<any>>;
    getPageById(data: any): Promise<IRequestResult<any>>;
    getPageByName: (data: any) => Promise<IRequestResult<any>>;
    getPageByUuid: (data: any) => Promise<IRequestResult<any>>;
    getPageAccess: (data: any) => Promise<IRequestResult<any>>;
    getPageWebhooks: (data: any) => Promise<IRequestResult<any>>;
    getPageWebhook: (data: any) => Promise<IRequestResult<any>>;
    createPageWebhook: (data: any) => Promise<IRequestResult<any>>;
    savePageWebhook: (data: any) => Promise<IRequestResult<any>>;
    deletePageWebhook: (data: any) => Promise<IRequestResult<any>>;
    getNotificationDestinations: () => Promise<IRequestResult<any>>;
    getNotificationDestination: (data: any) => Promise<IRequestResult<any>>;
    createNotificationDestination: (data: any) => Promise<IRequestResult<any>>;
    saveNotificationDestination: (data: any) => Promise<IRequestResult<any>>;
    deleteNotificationDestination: (data: any) => Promise<IRequestResult<any>>;
    createNotification: (data: any) => Promise<IRequestResult<any>>;
    createPage: (data: any) => Promise<IRequestResult<any>>;
    createPageNotification: (data: any) => Promise<IRequestResult<any>>;
    createPageContentNotification: (data: any) => Promise<IRequestResult<any>>;
    createPageNotificationByUuid: (data: any) => Promise<IRequestResult<any>>;
    createAnonymousPage: (data: any) => Promise<IRequestResult<any>>;
    getPageContent: (data: any) => Promise<IRequestResult<any>>;
    queryPageContent: (data: any) => Promise<IRequestResult<any>>;
    savePageContent: (data: any) => Promise<IRequestResult<any>>;
    savePageContentDelta: (data: any) => Promise<IRequestResult<any>>;
    savePageSettings: (data: any) => Promise<IRequestResult<any>>;
    deletePage: (data: any) => Promise<IRequestResult<any>>;
    saveUserInfo: (data: any) => Promise<IRequestResult<any>>;
    getUserMetaData: (data: any) => Promise<IRequestResult<any>>;
    saveUserMetaData: (data: any) => Promise<IRequestResult<any>>;
    deleteUserMetaData: (data: any) => Promise<IRequestResult<any>>;
    changePassword: (data: any) => Promise<IRequestResult<any>>;
    changeEmail: (data: any) => Promise<IRequestResult<any>>;
    forgotPassword: (data: any) => Promise<IRequestResult<any>>;
    resetPassword: (data: any) => Promise<IRequestResult<any>>;
    inviteUsers: (data: any) => Promise<IRequestResult<any>>;
    acceptInvitation: (data: any) => Promise<IRequestResult<any>>;
    refuseInvitation: (data: any) => Promise<IRequestResult<any>>;
    domainInvitations: (data: any) => Promise<IRequestResult<any>>;
    userInvitations: () => Promise<IRequestResult<any>>;
    domainAccessLog: (data: any) => Promise<IRequestResult<any>>;
    domainUsers: (data: any) => Promise<IRequestResult<any>>;
    signupUser: (data: any) => Promise<IRequestResult<any>>;
    activateUser: (data: any) => Promise<IRequestResult<any>>;
    setDomainDefault: (data: any) => Promise<IRequestResult<any>>;
    resendInvite: (data: any) => Promise<IRequestResult<any>>;
    updateDomainAccess: (data: any) => Promise<IRequestResult<any>>;
    removeUsersFromDomain: (data: any) => Promise<IRequestResult<any>>;
    getInvitation: (data: any) => Promise<IRequestResult<any>>;
    cancelInvitations: (data: any) => Promise<IRequestResult<any>>;
    getDomainNotificationDestinations: (data: any) => Promise<IRequestResult<any>>;
    createDomainNotificationDestination: (data: any) => Promise<IRequestResult<any>>;
    updateDomainNotificationDestination: (data: any) => Promise<IRequestResult<any>>;
    removeDomainNotificationDestination: (data: any) => Promise<IRequestResult<any>>;
    getUserSymphonyStreams: (data: any) => Promise<IRequestResult<any>>;
    getDomainAccessGroups: (data: any) => Promise<IRequestResult<any>>;
    getDomainAccessGroup: (data: any) => Promise<IRequestResult<any>>;
    addDomainAccessGroup: (data: any) => Promise<IRequestResult<any>>;
    putDomainAgroupMembers: (data: any) => Promise<IRequestResult<any>>;
    putDomainAgroupPages: (data: any) => Promise<IRequestResult<any>>;
    updateDomainAgroup: (data: any) => Promise<IRequestResult<any>>;
    deleteDomainAGroup: (data: any) => Promise<IRequestResult<any>>;
    getDomainPageAccess: (data: any) => Promise<IRequestResult<any>>;
    getDomainCustomers: (data: any) => Promise<IRequestResult<any>>;
    getDomainUsage: (data: any) => Promise<IRequestResult<any>>;
    saveDomainPageAccess: (data: any) => Promise<IRequestResult<any>>;
    getTemplates: (data: any) => Promise<IRequestResult<any>>;
    saveCustomer: (data: any) => Promise<IRequestResult<any>>;
    updateCustomer: (data: any) => Promise<IRequestResult<any>>;
    removeCustomer: (data: any) => Promise<IRequestResult<any>>;
    createDocEmailRule: (data: any) => Promise<IRequestResult<any>>;
    updateDocEmailRule: (data: any) => Promise<IRequestResult<any>>;
    deleteDocEmailRule: (data: any) => Promise<IRequestResult<any>>;
    getOrganization: (data: any) => Promise<IRequestResult<any>>;
    getOrganizationMetaData: (data: any) => Promise<IRequestResult<any>>;
    saveOrganizationMetaData: (data: any) => Promise<IRequestResult<any>>;
    deleteOrganizationMetaData: (data: any) => Promise<IRequestResult<any>>;
    getOrganizationDomains: (data: any) => Promise<IRequestResult<any>>;
    getOrganizationUsers: (data: any) => Promise<IRequestResult<any>>;
    getOrganizationLinkedUsers: (data: any) => Promise<IRequestResult<any>>;
    getOrganizationUsage: (data: any) => Promise<IRequestResult<any>>;
    getApplicationPageList: (client: string) => Promise<IRequestResult<any>>;
    getSsoStatus: (email: string) => Promise<IRequestResult<any>>;
    downloadPage: (data: any) => Promise<IRequestResult<any>>;
    getWorkflowTypes: () => Promise<IRequestResult<any>>;
    getReportsClientAppUsageStats: (data: any) => Promise<IRequestResult<any>>;
    getReportsUsageStats: (data: any) => Promise<IRequestResult<any>>;
    getReportsUsageStatsByOrganization: (data: any) => Promise<IRequestResult<any>>;
}
export declare class Api extends Emitter implements IApiService {
    private config;
    private storage;
    static $inject: string[];
    readonly EVENT_REQ: string;
    readonly EVENT_401: string;
    req: any;
    tokens: IApiTokens;
    lockedTimeCheck: number;
    private _locked;
    private _lockedTime;
    private request;
    private helpers;
    private utils;
    private readonly END_POINT;
    constructor(config: IConfig, storage: IStorageService);
    block(): void;
    unblock(): void;
    getSelfInfo(): Promise<IRequestResult<any>>;
    refreshAccessTokens(refreshToken: string): Promise<IRequestResult<any>>;
    userLogin(data: IApiDataUserLogin): Promise<IRequestResult<any>>;
    pluginAuth(data: IApiDataPluginAuth): Promise<IRequestResult<any>>;
    userLoginByCode(data: any): Promise<IRequestResult<any>>;
    userLogout(data?: IApiDataUserLogout): Promise<IRequestResult<any>>;
    getOrganizationDomainAccess(id?: any): Promise<IRequestResult<any>>;
    getIntegrationChannels(): Promise<IRequestResult<any>>;
    getIntegrationChannel(data: any): Promise<IRequestResult<any>>;
    createIntegrationChannel(data: any): Promise<IRequestResult<any>>;
    saveIntegrationChannel(data: any): Promise<IRequestResult<any>>;
    deleteIntegrationChannel(data: any): Promise<IRequestResult<any>>;
    getCounterparties(): Promise<IRequestResult<any>>;
    createCounterparty(data: any): Promise<IRequestResult<any>>;
    getCounterparty(data: any): Promise<IRequestResult<any>>;
    updateCounterparty(data: any): Promise<IRequestResult<any>>;
    deleteCounterparty(id: number): Promise<IRequestResult<any>>;
    workflowEvent(data: IApiDataWorkflowEvent): Promise<IRequestResult<any>>;
    getDomains(): Promise<IRequestResult<any>>;
    getDomain(domainId: number): Promise<IRequestResult<any>>;
    createFolder(data: IApiDataCreateFolder): Promise<IRequestResult<any>>;
    createDomain(data: IApiDataCreateFolder): Promise<IRequestResult<any>>;
    updateDomain(data: IApiDataUpdateDomin): Promise<IRequestResult<any>>;
    removeDomain(domainId: number): Promise<IRequestResult<any>>;
    disableDomain(data: any): Promise<IRequestResult<any>>;
    getDomainPages(domainId: number): Promise<IRequestResult<any>>;
    getDomainsAndPages(client: string): Promise<IRequestResult<any>>;
    getPage(data: IApiDataGetPage): Promise<IRequestResult<any>>;
    getPageByName(data: IApiDataGetPageByName): Promise<IRequestResult<any>>;
    getPageByUuid(data: any): Promise<IRequestResult<any>>;
    getPageVerions(data: IApiDataGetPageVerions): Promise<IRequestResult<any>>;
    getPageVerion(data: any): Promise<IRequestResult<any>>;
    restorePageVerion(data: any): Promise<IRequestResult<any>>;
    getPageAccess(data: any): Promise<IRequestResult<any>>;
    getPageWebhooks(data: any): Promise<IRequestResult<any>>;
    createPageWebhook(data: any): Promise<IRequestResult<any>>;
    getPageWebhook(data: any): Promise<IRequestResult<any>>;
    savePageWebhook(data: any): Promise<IRequestResult<any>>;
    deletePageWebhook(data: any): Promise<IRequestResult<any>>;
    getPageById(data: any): Promise<IRequestResult<any>>;
    createPage(data: any): Promise<IRequestResult<any>>;
    createPageNotification(data: any): Promise<IRequestResult<any>>;
    createPageContentNotification(data: any): Promise<IRequestResult<any>>;
    createPageNotificationByUuid(data: any): Promise<IRequestResult<any>>;
    createAnonymousPage(data: any): Promise<IRequestResult<any>>;
    getPageContent(data: any): Promise<IRequestResult<any>>;
    queryPageContent(data: any): Promise<IRequestResult<any>>;
    savePageContent(data: any): Promise<IRequestResult<any>>;
    savePageContentDelta(data: any): Promise<IRequestResult<any>>;
    savePageSettings(data: any): Promise<IRequestResult<any>>;
    deletePage(data: any): Promise<IRequestResult<any>>;
    saveUserInfo(data: any): Promise<IRequestResult<any>>;
    getUserMetaData(data: any): Promise<IRequestResult<any>>;
    saveUserMetaData(data: any): Promise<IRequestResult<any>>;
    deleteUserMetaData(data: any): Promise<IRequestResult<any>>;
    changePassword(data: any): Promise<IRequestResult<any>>;
    changeEmail(data: any): Promise<IRequestResult<any>>;
    forgotPassword(data: any): Promise<IRequestResult<any>>;
    resetPassword(data: any): Promise<IRequestResult<any>>;
    inviteUsers(data: any): Promise<IRequestResult<any>>;
    acceptInvitation(data: any): Promise<IRequestResult<any>>;
    refuseInvitation(data: any): Promise<IRequestResult<any>>;
    domainInvitations(data: any): Promise<IRequestResult<any>>;
    userInvitations(): Promise<IRequestResult<any>>;
    domainAccessLog(data: any): Promise<IRequestResult<any>>;
    domainUsers(data: any): Promise<IRequestResult<any>>;
    signupUser(data: any): Promise<IRequestResult<any>>;
    activateUser(data: any): Promise<IRequestResult<any>>;
    setDomainDefault(data: any): Promise<IRequestResult<any>>;
    resendInvite(data: any): Promise<IRequestResult<any>>;
    updateDomainAccess(data: any): Promise<IRequestResult<any>>;
    removeUsersFromDomain(data: any): Promise<IRequestResult<any>>;
    getInvitation(data: any): Promise<IRequestResult<any>>;
    cancelInvitations(data: any): Promise<IRequestResult<any>>;
    getDomainNotificationDestinations(data: any): Promise<IRequestResult<any>>;
    createDomainNotificationDestination(data: any): Promise<IRequestResult<any>>;
    updateDomainNotificationDestination(data: any): Promise<IRequestResult<any>>;
    removeDomainNotificationDestination(data: any): Promise<IRequestResult<any>>;
    getNotificationHistory(data: any): Promise<IRequestResult<any>>;
    getNotificationDestinations(): Promise<IRequestResult<any>>;
    getNotificationDestination(data: any): Promise<IRequestResult<any>>;
    createNotificationDestination(data: any): Promise<IRequestResult<any>>;
    saveNotificationDestination(data: any): Promise<IRequestResult<any>>;
    deleteNotificationDestination(data: any): Promise<IRequestResult<any>>;
    createNotification(data: any): Promise<IRequestResult<any>>;
    getUserSymphonyStreams(data: any): Promise<IRequestResult<any>>;
    getDomainAccessGroups(data: any): Promise<IRequestResult<any>>;
    getDomainAccessGroup(data: any): Promise<IRequestResult<any>>;
    addDomainAccessGroup(data: any): Promise<IRequestResult<any>>;
    putDomainAgroupMembers(data: any): Promise<IRequestResult<any>>;
    putDomainAgroupPages(data: any): Promise<IRequestResult<any>>;
    updateDomainAgroup(data: any): Promise<IRequestResult<any>>;
    deleteDomainAGroup(data: any): Promise<IRequestResult<any>>;
    getDomainPageAccess(data: any): Promise<IRequestResult<any>>;
    getDomainCustomers(data: any): Promise<IRequestResult<any>>;
    getDomainUsage(data?: any): Promise<IRequestResult<any>>;
    saveDomainPageAccess(data: any): Promise<IRequestResult<any>>;
    getTemplates(data: any): Promise<IRequestResult<any>>;
    saveCustomer(data: any): Promise<IRequestResult<any>>;
    updateCustomer(data: any): Promise<IRequestResult<any>>;
    removeCustomer(data: any): Promise<IRequestResult<any>>;
    createDocEmailRule(data: any): Promise<IRequestResult<any>>;
    updateDocEmailRule(data: any): Promise<IRequestResult<any>>;
    deleteDocEmailRule(data: any): Promise<IRequestResult<any>>;
    private send;
    getApplicationPageList(client?: string): Promise<IRequestResult<any>>;
    getOrganization(data: any): Promise<IRequestResult<any>>;
    getOrganizationMetaData(data: any): Promise<IRequestResult<any>>;
    saveOrganizationMetaData(data: any): Promise<IRequestResult<any>>;
    deleteOrganizationMetaData(data: any): Promise<IRequestResult<any>>;
    getOrganizationUsers(data: any): Promise<IRequestResult<any>>;
    getOrganizationLinkedUsers(data: any): Promise<IRequestResult<any>>;
    getOrganizationUsage(data?: any): Promise<IRequestResult<any>>;
    getOrganizationUser(data: any): Promise<IRequestResult<any>>;
    createOrganizationUser(data: any): Promise<IRequestResult<any>>;
    saveOrganizationUser(data: any): Promise<IRequestResult<any>>;
    getOrganizationDomains(data: any): Promise<IRequestResult<any>>;
    createOrganizationDomain(data: any): Promise<IRequestResult<any>>;
    saveOrganizationDomain(data: any): Promise<IRequestResult<any>>;
    getSsoStatus(email: string): Promise<IRequestResult<any>>;
    downloadPage(data: any): Promise<IRequestResult<any>>;
    getTokens(): Promise<IRequestResult<any>>;
    generateToken(): Promise<IRequestResult<any>>;
    deleteToken(id: Number): Promise<IRequestResult<any>>;
    getSchemas(): Promise<IRequestResult<any>>;
    getSchema(data: any): Promise<IRequestResult<any>>;
    createSchema(data: any): Promise<IRequestResult<any>>;
    updateSchema(data: any): Promise<IRequestResult<any>>;
    deleteSchema(id: Number): Promise<IRequestResult<any>>;
    getUserDelegates(): Promise<IRequestResult<any>>;
    getUserDelegate(data: any): Promise<IRequestResult<any>>;
    createUserDelegate(data: any): Promise<IRequestResult<any>>;
    updateUserDelegate(data: any): Promise<IRequestResult<any>>;
    deleteUserDelegate(id: Number): Promise<IRequestResult<any>>;
    getConnectedHistory(id: Number): Promise<IRequestResult<any>>;
    getWorkflowTypes(): Promise<IRequestResult<any>>;
    getReportsClientAppUsageStats(data: any): Promise<IRequestResult<any>>;
    getReportsUsageStats(data: any): Promise<IRequestResult<any>>;
    getReportsUsageStatsByOrganization(data: any): Promise<IRequestResult<any>>;
    private dummyRequest;
    private handleSuccess;
}
export {};
