import { AssetRetentionPolicy } from './AssetRetentionPolicy'; import { HttpClient, ProgressCallback, RequestCancelable } from '../http/'; import { QualifiedId } from '../user'; export interface CipherOptions { /** Set a custom algorithm for encryption */ algorithm?: string; /** Set a custom hash for encryption */ hash?: Buffer; } export interface AssetAuditData { conversationId: QualifiedId; filename: string; filetype: string; } export interface AssetOptions extends CipherOptions { public?: boolean; retention?: AssetRetentionPolicy; /** If given, will upload an asset that can be shared in a federated env */ domain?: string; /** Used for identifying the conversation the asset belongs to */ auditData?: AssetAuditData; } export interface AssetResponse { buffer: ArrayBuffer; mimeType?: string; } export declare class AssetAPI { private readonly client; private readonly logger; constructor(client: HttpClient); private getAssetShared; private postAssetShared; getAsset(assetId: string, assetDomain: string, token?: string | null, forceCaching?: boolean, progressCallback?: ProgressCallback): RequestCancelable; getServiceAsset(assetId: string, token?: string | null, forceCaching?: boolean, progressCallback?: ProgressCallback): RequestCancelable; /** * Uploads an asset to the backend * * @param asset Raw content of the asset to upload * @param options? * @param progressCallback? Will be called at every progress of the upload */ postAsset(asset: Uint8Array, options?: AssetOptions, progressCallback?: ProgressCallback): RequestCancelable<{ key: string; domain: string; token?: string | undefined; expires?: string | undefined; }>; postServiceAsset(asset: Uint8Array, options?: AssetOptions, progressCallback?: ProgressCallback): RequestCancelable<{ key: string; domain: string; token?: string | undefined; expires?: string | undefined; }>; } //# sourceMappingURL=AssetAPI.d.ts.map