@xuanqikai/one-click-upload
Version:
A CLI tool for one-click file upload to cloud storage services (OSS, TOS)
38 lines • 1.04 kB
TypeScript
import { ServiceConfig, ServiceType } from '../types';
import { BaseUploader } from './BaseUploader';
export declare class UploaderFactory {
/**
* 创建上传器实例
*/
static createUploader(config: ServiceConfig): BaseUploader;
/**
* 获取支持的服务类型列表
*/
static getSupportedTypes(): ServiceType[];
/**
* 检查服务类型是否支持
*/
static isTypeSupported(type: string): boolean;
/**
* 获取服务类型的显示名称
*/
static getTypeDisplayName(type: ServiceType): string;
/**
* 获取服务类型的配置字段说明
*/
static getConfigFields(type: ServiceType): Array<{
key: string;
label: string;
required: boolean;
type: 'string' | 'password';
description?: string;
}>;
/**
* 验证配置完整性
*/
static validateConfig(config: ServiceConfig): {
valid: boolean;
errors: string[];
};
}
//# sourceMappingURL=UploaderFactory.d.ts.map