UNPKG

@awhere/api

Version:

The awesome aWhere API for JavaScript.

46 lines (45 loc) 1.46 kB
import { FileItemType } from '@awhere/interfaces'; import type { AxiosProgressEvent } from 'axios'; import ItemBase from '../../Item/ItemBase'; export interface IFileItemProps { readonly size: number; readonly filename: string; readonly originalName: string; readonly importInfo?: IImportInfo; readonly exportInfo?: any; readonly executeInfo?: any; } interface IImportInfo { driver: string; files?: IDriverInfo[]; collections?: ICollectionInfo[]; } interface IDriverInfo { driver: string; fileName: string; collections: ICollectionInfo[]; } interface ICollectionInfo { name: string; geometryType: string; } export default class FileItem extends ItemBase { get type(): import("@awhere/interfaces").ItemTypeMain.file; protected _subtype: keyof typeof FileItemType | FileItemType | string; get subtype(): keyof typeof FileItemType | FileItemType | string; protected _props: IFileItemProps; get props(): IFileItemProps; set props(value: IFileItemProps); isImage(): boolean; isDocument(): boolean; isAudio(): boolean; isVideo(): boolean; isSpreadsheet(): boolean; download(responseType?: keyof { blob: 0; arraybuffer: 1; stream: 2; }, onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void): Promise<import("axios").AxiosResponse<any, any>>; getVersions(): Promise<import("axios").AxiosResponse<any, any>>; } export {};