export type DatasetRow = {
    id: string;
    name: string;
    fields: unknown;
    projectId: string;
    workspaceId: string | null;
    type: string | null;
    config: unknown;
};
export declare class DatasetRowsService {
    private static MAX_FILE_BYTES;
    /** Sum cap for all media in one row (allows e.g. two 50MB image/video fields). */
    private static MAX_ROW_BYTES;
    private static maxFileBytesForExpectedType;
    private getEffectiveFieldType;
    /**
     * For upload datasets: request SAS on blob URLs only for non-audio / non-CSV (TEXT) data types
     * (e.g. image, video, conversation, documents).
     */
    private getGenerateSasTokenForUploadRow;
    private getDatasetOrThrow;
    private ingestRemoteUrlToAzure;
    private uploadMulterFileToAzure;
    private normalizeAndValidateRow;
    /**
     * Resolve remote media URLs to Trusys blob URLs (batch). Already-Trusys URLs are returned unchanged.
     * Used by the ingest-media-urls-batch HTTP route; dataset row flows call normalization instead.
     */
    ingestMediaUrlItemsForDataset(params: {
        datasetId: string;
        token: string | string[] | undefined;
        items: Array<{
            url: string;
            expectedType?: string;
        }>;
    }): Promise<string[]>;
    /**
     * Normalize persisted dataset record JSON (media URL ingest, validation).
     * Used by bulk CSV import and legacy PATCH /dataset/:id/table updates.
     */
    normalizeDatasetRecordForPersist(params: {
        datasetId: string;
        token: string | string[] | undefined;
        input: Record<string, any>;
        mode: 'create' | 'update';
        existingRecordData?: Record<string, any>;
        datasetCached?: DatasetRow;
    }): Promise<{
        recordData: Record<string, any>;
    }>;
    /** Bulk CSV import: normalize one row (including ingesting external media URLs). */
    normalizeRecordDataForBulkCsvRow(params: {
        datasetId: string;
        token: string | string[] | undefined;
        input: Record<string, any>;
        datasetCached: DatasetRow;
    }): Promise<{
        recordData: Record<string, any>;
    }>;
    createRow(params: {
        datasetId: string;
        token: string | string[] | undefined;
        input: Record<string, any>;
        filesByField?: Record<string, Express.Multer.File>;
    }): Promise<{
        recordId: string;
        recordData: Record<string, any>;
        recordIndex: number;
    }>;
    updateRow(params: {
        datasetId: string;
        recordId: string;
        token: string | string[] | undefined;
        input: Record<string, any>;
        filesByField?: Record<string, Express.Multer.File>;
    }): Promise<{
        recordId: string;
        recordData: Record<string, any>;
    }>;
    deleteRow(params: {
        datasetId: string;
        recordId: string;
    }): Promise<void>;
    bulkDelete(params: {
        datasetId: string;
        recordIds: string[];
    }): Promise<{
        deletedIds: string[];
        failed: Array<{
            id: string;
            reason: string;
        }>;
    }>;
}
export declare const datasetRowsService: DatasetRowsService;
//# sourceMappingURL=datasetRowsService.d.ts.map