import { AxiosResponse } from 'axios'; import { Request, Response } from 'express'; export type ExtractTokenFromResponseFn = (response: AxiosResponse) => T; export interface OAuthParams { accesTokenUrl: string; apiUrl: string; redirect_uri: string; cookieName: string; client_id: string; client_secret: string; authorizeUrl: string; } export interface OAuthCallbackParams { cookieName: string; client_id: string; client_secret: string; redirect_uri: string; extractToken: ExtractTokenFromResponseFn; } export declare function getOAuth2RedirectUrl(config: OAuthParams, req: Request, res: Response, addState?: boolean): Promise; export declare function handleOAuth2Callback(config: OAuthCallbackParams, req: Request, res: Response, checkNonceCookie?: boolean, paramCommunication?: GetAccessTokenParamCommunication, additionalHeaders?: Record): Promise<{ apiKey: string; apiUrl: string; query_params: any; }>; export declare enum GetAccessTokenParamCommunication { QUERY_PARAM = 0, X_WWW_FORM_URL_ENCODED = 1, BODY = 2 } export declare function refreshToken(accessTokenURL: string, refresh_token: string, clientId: string, clientSecret: string, paramCommunication?: GetAccessTokenParamCommunication): Promise>;