@apillon/sdk
Version:
▶◀ Apillon SDK for NodeJS ▶◀
48 lines • 1.45 kB
TypeScript
import { IStorageBucketContentRequest, StorageContentType } from '../../types/storage';
import { File } from './file';
import { ApillonModel } from '../../lib/apillon';
export declare class Directory extends ApillonModel {
/**
* Unique identifier of the bucket.
*/
bucketUuid: string;
/**
* Directory name.
*/
name: string;
/**
* Directory unique IPFS content identifier.
*/
CID: string;
/**
* Id of the directory in which the file resides.
*/
parentDirectoryUuid: string;
/**
* Type of content.
*/
type: StorageContentType;
/**
* Link on IPFS gateway.
*/
link: string;
content: (File | Directory)[];
/**
* Constructor which should only be called via StorageBucket class.
* @param bucketUuid Unique identifier of the directory's bucket.
* @param directoryUuid Unique identifier of the directory.
* @param data Data to populate the directory with.
*/
constructor(bucketUuid: string, directoryUuid: string, data?: Partial<Directory>);
/**
* Gets contents of a directory.
* @returns Directory data and content (files and subfolders)
*/
get(params?: IStorageBucketContentRequest): Promise<any>;
/**
* Deletes a directory from the bucket.
*/
delete(): Promise<void>;
protected serializeFilter(key: string, value: string): any;
}
//# sourceMappingURL=directory.d.ts.map