import { IFintectureConfig } from './interfaces/ConfigInterface'; /** * Class responsible for performing authentication with Fintecture * * @export * @class Authentication */ export declare class Authentication { private axiosInstance; private appId; private appSecret; /** * Creates an instance of Authentication. * * @param {string} appId */ constructor(config: IFintectureConfig); /** * The accesstoken API is used to exchange the code received * in the /authorize API for an access_token. * * @param {string} appSecret * @param {string} authCode (optional) * @returns {Promise} */ accessToken(authCode?: string, scopes?: string): Promise; /** * The accesstoken API is used to exchange the code received * in the /authorize API for an access_token. * * @param {string} appSecret * @param {string} refreshToken * @returns {Promise} */ refreshToken(refreshToken: string): Promise; /** * Private function that returns the data necessary to make an * access_token query in PIS and AIS context. * * @param {string} authCode (optional) * @returns {string} */ private _getAccessTokenData; /** * Private function that returns the data necessary to make a * refresh_token query in AIS context. * * @param {string} refreshToken * @returns {string} */ private _getRefreshTokenData; /** * Private function that creates an instance of authentication * axios. This instance of axios include all the common headers * params. * * @param {IFintectureConfig} config * @returns {axios} */ private _getAxiosInstance; /** * Private function that calculates the client token in order to * include it in the axios instance header. * * @param {string} appSecret * @returns {string} */ private _getClientToken; /** * Private function that throw a list of errors in the same error object. * * @param {string[]} parameters * @returns {Error} */ private _trowErrors; }