/** * External Data Source Service * * Import data from external sources into Label Studio * Supports: * - REST API endpoints * - S3/Cloud Storage URLs * - Database queries (via Things Factory connections) * - CSV/JSON file URLs */ declare class ExternalDataSourceConfig { sourceType: 'api' | 'url' | 's3' | 'database' | 'csv' | 'json'; sourceUrl: string; authHeader?: string; httpMethod?: string; requestBody?: string; dataPath?: string; } declare class ImportFromExternalSourceRequest { projectId: number; source: ExternalDataSourceConfig; fieldMapping?: string; imageField?: string; autoGeneratePredictions?: boolean; limit?: number; } declare class ExternalImportResult { totalFetched: number; tasksImported: number; tasksFailed: number; taskIds: number[]; error?: string; } declare class DataSourcePreview { itemCount: number; sampleData: string; schema: string; error?: string; } export declare class ExternalDataSourceService { /** * Preview external data source before import */ previewExternalDataSource(source: ExternalDataSourceConfig, context: ResolverContext): Promise; /** * Import data from external source to Label Studio */ importFromExternalSource(input: ImportFromExternalSourceRequest, context: ResolverContext): Promise; /** * Fetch data from external source */ private fetchFromSource; /** * Fetch from REST API */ private fetchFromApi; /** * Fetch from URL (JSON file) */ private fetchFromUrl; /** * Fetch from CSV */ private fetchFromCsv; /** * Extract data by JSON path (simple implementation) */ private extractDataByPath; /** * Transform raw data item to Label Studio task format */ private transformToLabelStudioTask; /** * Detect schema from data item */ private detectSchema; } export {};