import { LogLevel } from '../shared/logger/log-level'; import { Permission } from '../shared/types/permission'; import { Response } from 'superagent'; import { AjaxRequester } from '../shared/ajax-requester'; import { AuthCredentials, OAuthCredentials } from '../shared/auth-credentials'; import { Logger } from '../shared/logger'; import { HandlerInput } from '../shared/types/handler-input'; import { SecretsType } from '../shared/types/secrets-type'; export declare type ConnectorInput = { browserWatcherUrl: string; connectionId: string; serverUrl: string; callerId: string; epsInstanceId: string; connectorClass: string; connectionData: string; secrets: string; tacoPath: string; callerType: string; }; export declare const onInitializationFailedDefault: (connector: Connector, err: Error) => void; export default class Connector { private onInitializationSuccess; private onInitializationFailure; appSnapshot: object | null; handlerInputs: HandlerInput[]; secrets: SecretsType | undefined; /** a initCalls counter used for logging only and can be removed */ private initCalls; private options?; private isInsideIframe; private isInitialized; private readonly initializationTimeout; private logFlushingTimer; private pendingLogEntries; private _permission; constructor(onInitializationSuccess?: (connector: Connector) => void, onInitializationFailure?: (connector: Connector, err: Error) => void); private initialize; private getEpsHeaders; /** * * @param url * @param headers * @param bypassCorsPolicy Set to `true` if the requested server doesn't allow CORS requests from browser. * In this case, the request will go through EPS server which acts as a proxy between user's client * and the requested URL. * @returns */ get(url: string, headers?: object, bypassCorsPolicy?: boolean): Promise; /** * * @param url * @param body * @param headers * @param bypassCorsPolicy Set to `true` if the requested server doesn't allow CORS requests from browser. * In this case, the request will go through EPS server which acts as a proxy between user's client * and the requested URL. * @returns */ post(url: string, body?: object, headers?: object, bypassCorsPolicy?: boolean): Promise; submit(): Promise; private validateApiPermission; cancel(): void; credentials(): AuthCredentials; serverLog(msg: any, level: LogLevel, date?: Date): void; flushLogs(): Promise; private static getOptionsFromInput; private static urlParamsToObject; private static validate; get permission(): Permission; private set permission(value); } export { HandlerInput, Logger, AjaxRequester, AuthCredentials, OAuthCredentials };