import { Resource } from '@opencloud-eu/web-client'; import { MaybeRef } from '../../utils'; import { ClientService } from '../../services'; import { FileContext } from './types'; import { FileResource, SpaceResource } from '@opencloud-eu/web-client'; import { ListFilesOptions } from '@opencloud-eu/web-client/webdav'; import { WebDAV } from '@opencloud-eu/web-client/webdav'; interface AppFileHandlingOptions { clientService: ClientService; } export type FileContentOptions = { responseType?: 'arraybuffer' | 'blob' | 'text'; signal?: AbortSignal; } & Record; export type UrlForResourceOptions = Omit[2], 'isUrlSigningEnabled'>; export interface AppFileHandlingResult { getUrlForResource(space: SpaceResource, resource: Resource, options?: UrlForResourceOptions): Promise; revokeUrl(url: string): void; getFileInfo(fileContext: MaybeRef, options?: ListFilesOptions): Promise; getFileContents(fileContext: MaybeRef, options?: FileContentOptions): Promise; putFileContents(fileContext: MaybeRef, putFileOptions: { content?: string | ArrayBuffer; } & Record): Promise; } export declare function useAppFileHandling({ clientService }: AppFileHandlingOptions): AppFileHandlingResult; export {};