import { ApiDeleteParams, ApiDeleteResponse, ApiGetPresignedUrlParams, ApiGetPresignedUrlResponse, StorageDownloadFileParams, StorageDownloadFileResponse, StorageUploadFileParams, StorageUploadFileResponse, StorageUploadFormDataParams, StorageUploadFormDataResponse } from './utils/types'; /** * @internal * This is an internal class. */ export declare class HasuraStorageApi { private url; private accessToken?; private adminSecret?; private headers; constructor({ url }: { url: string; }); uploadFormData({ formData, bucketId, headers: extraHeaders }: StorageUploadFormDataParams): Promise; uploadFile({ file, bucketId, id, name, headers: extraHeaders }: StorageUploadFileParams): Promise; downloadFile(params: StorageDownloadFileParams): Promise; getPresignedUrl(params: ApiGetPresignedUrlParams): Promise; delete(params: ApiDeleteParams): Promise; /** * Set the access token to use for authentication. * * @param accessToken Access token * @returns Hasura Storage API instance */ setAccessToken(accessToken?: string): HasuraStorageApi; /** * Set the admin secret to use for authentication. * * @param adminSecret Hasura admin secret * @returns Hasura Storage API instance */ setAdminSecret(adminSecret?: string): HasuraStorageApi; /** * Get global headers sent with all requests. * * @returns Record */ getHeaders(): Record; /** * Set global headers to be sent with all requests. * * @param headers a key value pair headers object * @returns Hasura Storage API instance */ setHeaders(headers?: Record): HasuraStorageApi; /** * Remove global headers sent with all requests, except for the role header to preserve * the role set by 'setRole' method. * * @returns {HasuraStorageApi} - Hasura Storage API instance. */ unsetHeaders(): HasuraStorageApi; private generateAuthHeaders; } //# sourceMappingURL=hasura-storage-api.d.ts.map