///
/**
* The Rest service provides functionality for interacting with the FakeYou API and handles authentication.
*/
export declare class Rest {
#private;
/**
* Light wrapper over fetch, provides authentication and logging automatically.
* The correct headers are automatically set to comply with the FakeYou API.
*
* Note: If `FAKEYOU_COOKIE` environment variable is set, it will be used for authentication.
*
* @param url The URL to send the request to.
* @param request The request options to send.
*/
send(url: string, request?: RequestInit): Promise;
/**
* Download a file from the given URL.
*
* @param url The URL to download from.
* @param mime The mime type of the file.
*/
download(url: string, mime: string): Promise;
/**
* Upload a file to the given URL.
*
* @param url The URL to upload to.
* @param data The data to upload as a buffer.
* @param mime The mime type of the file.
* @returns The response from the server.
*/
upload(url: string, data: Buffer, mime: string): Promise;
/**
* Set the cookie to use for authentication.
*/
set cookie(cookie: string | undefined);
/**
* Authentication status.
*
* @returns Whether or not the user is authenticated.
*/
get isAuthenticated(): boolean;
}
export declare const rest: Rest;