import { Agent } from 'https'; import { FormData } from '../external'; import { PublishScheme } from '../types'; export declare function getAxiosOptions(url: string): { headers: { [x: string]: string; }; auth?: undefined; } | { auth: { username: string; password: string; }; headers?: undefined; } | { headers?: undefined; auth?: undefined; }; export declare function getCertificate(cert?: string): Promise; export declare function getAuthorizationHeaders(scheme: PublishScheme, key: string): { authorization: string; } | { authorization?: undefined; }; export interface AgentOptions { ca?: Buffer; allowSelfSigned?: boolean; } export declare function getDefaultAgent(): Promise; export declare function getAgent({ allowSelfSigned, ca }: AgentOptions): Agent; export declare function downloadFile(target: string, httpsAgent: Agent): Promise>; export type FormDataObj = Record; export declare function createAxiosForm(formData: FormDataObj): FormData; export declare function handleAxiosError(error: any, interactive: boolean, httpsAgent: Agent, refetch: (mode: PublishScheme, key: string) => Promise, onfail?: (status: number, statusText: string, response: string) => any): any; export interface PostFormResult { status: number; success: boolean; response?: object; } export declare function postData(target: string, scheme: PublishScheme, key: string, data: any, customHeaders?: Record, httpsAgent?: Agent, isForm?: boolean, interactive?: boolean): Promise; export declare function postForm(target: string, scheme: PublishScheme, key: string, formData: FormDataObj, customHeaders?: Record, httpsAgent?: Agent, interactive?: boolean): Promise; export declare function postFile(target: string, scheme: PublishScheme, key: string, file: Buffer, customFields?: Record, customHeaders?: Record, agent?: Agent, interactive?: boolean): Promise;