cloudbridge-sdk
Version:
CloudBridge Node.js + TypeScript SDK (simple file upload)
38 lines (36 loc) • 987 B
text/typescript
type UploadFileItem = {
id: string;
filename: string;
mime_type: string;
size: number;
public_url: string;
short_url: string;
nextcloud_path: string;
created_at: string;
};
type CloudBridgeClientOptions = {
accessKey?: string;
secretKey?: string;
timeoutMs?: number;
};
declare class CloudBridgeError extends Error {
status?: string;
statusCode?: number;
errors?: unknown;
constructor(message: string, opts?: {
status?: string;
statusCode?: number;
errors?: unknown;
});
}
declare class CloudBridgeClient {
private static readonly BASE_URL;
private readonly accessKey?;
private readonly secretKey?;
private readonly axios;
constructor(options?: CloudBridgeClientOptions);
uploadFiles(filePaths: string[], opts: {
folder: string;
}): Promise<UploadFileItem[]>;
}
export { CloudBridgeClient, type CloudBridgeClientOptions, CloudBridgeError, type UploadFileItem };