UNPKG

filestack-js

Version:

Official JavaScript library for Filestack

68 lines (67 loc) 1.65 kB
import { Security, Session } from '../client'; import { FsResponse } from './../request/types'; /** * Remove given file * * @private * @param session * @param handle * @param security */ export declare const remove: (session: Session, handle?: string, skipStorage?: boolean, security?: Security) => Promise<any>; export interface MetadataOptions { size?: boolean; mimetype?: boolean; filename?: boolean; width?: boolean; height?: boolean; uploaded?: boolean; writeable?: boolean; cloud?: boolean; sourceUrl?: boolean; md5?: boolean; sha1?: boolean; sha224?: boolean; sha256?: boolean; sha384?: boolean; sha512?: boolean; location?: boolean; path?: boolean; container?: boolean; exif?: boolean; } /** * Returns file metadata * * @private * @param session * @param handle * @param opts * @param security */ export declare const metadata: (session: Session, handle?: string, opts?: MetadataOptions, security?: Security) => Promise<any>; /** * Download file to blob or buffer format * * @param session * @param handle */ export declare const download: (session: Session, handle: string, security?: Security) => Promise<FsResponse>; export interface RetrieveOptions { metadata?: boolean; head?: boolean; dl?: boolean; extension?: string; cache?: boolean; } /** * Returns file information * * @private * @deprecated * @param session * @param handle * @param options * @param security */ export declare const retrieve: (session: Session, handle: string, options?: RetrieveOptions, security?: Security) => Promise<Object | Blob>;