@apillon/sdk
Version:
▶◀ Apillon SDK for NodeJS ▶◀
57 lines • 1.51 kB
TypeScript
import { ApillonModel } from '../../lib/apillon';
import { FileStatus, StorageContentType } from '../../types/storage';
export declare class File extends ApillonModel {
/**
* Unique identifier of the file's bucket.
*/
bucketUuid: string;
/**
* Unique identifier of the directory in which the file resides.
*/
directoryUuid: string;
/**
* File name.
*/
name: string;
/**
* File unique IPFS content identifier.
*/
CID: string;
/**
* File upload status.
*/
status: FileStatus;
/**
* Type of content.
*/
type: StorageContentType;
/**
* Link on IPFS gateway.
*/
link: string;
/**
* Full path to file.
*/
path: string;
/**
* Constructor which should only be called via StorageBucket class.
* @param bucketUuid Unique identifier of the file's bucket.
* @param directoryUuid Unique identifier of the file's directory.
* @param fileUuid Unique identifier of the file.
* @param data Data to populate the directory with.
*/
constructor(bucketUuid: string, directoryUuid: string, fileUuid: string, data?: Partial<File & {
fileStatus: number;
}>);
/**
* Gets file details.
* @returns File instance
*/
get(): Promise<this>;
/**
* Deletes a file from the bucket.
*/
delete(): Promise<void>;
protected serializeFilter(key: string, value: any): any;
}
//# sourceMappingURL=file.d.ts.map