import { BaseClient } from '../base-client'; import { LogRecordsExportRequest } from '../../types/export.types'; export declare class ExportService extends BaseClient { private projectId; constructor(apiUrl: string, token: string, projectId: string); records(options: LogRecordsExportRequest): Promise>>; private fillOptionsWithDefaults; /** * Parses a CSV stream with proper line buffering to ensure complete lines. * Buffers chunks until complete lines (ending with \n) are available, then yields * each line with a newline. * * @param stream - The readable stream containing CSV data * @returns An async iterable that yields complete CSV lines * @throws Error if stream processing fails */ private parseCSVStream; /** * Parses a JSON/JSONL stream with proper line buffering to ensure complete lines. * Buffers chunks until complete lines (ending with \n) are available, then yields * records based on the export format. * * @param stream - The readable stream containing JSON/JSONL data * @param exportFormat - The export format ('jsonl' or 'json') * @returns An async iterable that yields: * - For JSONL format: Complete lines as strings (each ending with `\n`) * - For JSON format: Parsed JSON objects as `Record` * @throws Error if stream processing fails */ private parseJsonStream; }