UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

40 lines (39 loc) 1.29 kB
/** * Dropbox Storage Provider for Vana SDK * * Implements the storage interface for Dropbox using its API. */ import { type StorageProvider, type StorageUploadResult, type StorageFile, type StorageListOptions, type StorageProviderConfig } from "../index"; export interface DropboxConfig { /** OAuth2 access token */ accessToken: string; /** Optional refresh token for token renewal */ refreshToken?: string; /** OAuth2 client ID */ clientId?: string; /** OAuth2 client secret */ clientSecret?: string; /** Root path for uploads (defaults to '/Vana Data') */ rootPath?: string; } /** * Dropbox Storage Provider * * @remarks * Implements the storage interface for Dropbox. Requires OAuth2 authentication. * * @category Storage */ export declare class DropboxStorage implements StorageProvider { private config; private readonly apiUrl; private readonly contentUrl; private readonly rootPath; constructor(config: DropboxConfig); upload(file: Blob, filename?: string): Promise<StorageUploadResult>; download(url: string): Promise<Blob>; list(options?: StorageListOptions): Promise<StorageFile[]>; delete(url: string): Promise<boolean>; getConfig(): StorageProviderConfig; private createSharedLink; }