UNPKG

@apillon/sdk

Version:

▶◀ Apillon SDK for NodeJS ▶◀

44 lines 1.88 kB
import { IpfsClusterInfo, StorageInfo } from '../../docs-index'; import { ApillonModule } from '../../lib/apillon'; import { IApillonList, IApillonPagination } from '../../types/apillon'; import { StorageBucket } from './storage-bucket'; export declare class Storage extends ApillonModule { /** * API url for storage. */ private API_PREFIX; /** * Lists all buckets. * @param {IApillonPagination} params Filter for listing collections. * @returns Array of StorageBucket objects. */ listBuckets(params?: IApillonPagination): Promise<IApillonList<StorageBucket>>; /** * @param uuid Unique bucket identifier. * @returns An empty instance of StorageBucket. */ bucket(uuid: string): StorageBucket; /** * Gets overall storage info for a project - available and used storage and bandwidth * @returns {Promise<StorageInfo>} */ getInfo(): Promise<StorageInfo>; /** * Gets basic data of an IPFS cluster used by the project. * * IPFS clusters contain multiple IPFS nodes but expose a single gateway for accessing content via CID or IPNS. * * Apillon clusters (gateways) are not publicly accessible * @note Each project has its own secret for generating tokens to access content on the IPFS gateway. * @returns {Promise<IpfsClusterInfo>} */ getIpfsClusterInfo(): Promise<IpfsClusterInfo>; /** * Apillon IPFS gateways are private and can only be accessible with a token. * @docs [Generate an IPFS link](https://wiki.apillon.io/build/2-storage-api.html#get-or-generate-link-for-ipfs) * @param {string} cid The CID or IPNS address of the fie * @returns {Promise<string>} The IPFS link where the requested content can be accessed. */ generateIpfsLink(cid: string): Promise<string>; } //# sourceMappingURL=storage.d.ts.map