UNPKG

@calljmp/cli

Version:
83 lines 2.38 kB
export type DataIngestionStatus = 'pending' | 'processing' | 'completed' | 'failed'; export type DataIngestionEntryType = 'document'; export type DataIngestionSegmentType = 'page' | 'sheet' | 'row' | 'text' | 'image'; export interface DataIngestionEntry { id: string; projectId: number; status: DataIngestionStatus; source: string; mimetype: string; totalSize: number; totalSegments: number; metadata: { type?: DataIngestionEntryType; title?: string; language?: string; } | null; error: { name: string; message: string; } | null; createdAt: Date; updatedAt: Date; } export interface DataIngestionSegment { id: number; entryId: string; segmentType: DataIngestionSegmentType; segmentId: number; metadata: {} | null; createdAt: Date; } export interface DataIngestionChunk { id: number; entryId: string; segmentId: number; chunkIndex: number; metadata: {} | null; createdAt: Date; } export interface DataIngestionUpload { id: string; entryId: string; } export declare function jsonToDataIngestionEntry(json: Record<string, any>): DataIngestionEntry; export declare function dataIngestionEntryToJson(entry: DataIngestionEntry): { id: string; projectId: number; status: DataIngestionStatus; error: { name: string; message: string; } | null; source: string; mimetype: string; totalSize: number; metadata: { type?: DataIngestionEntryType; title?: string; language?: string; } | null; totalSegments: number; createdAt: string; updatedAt: string; }; export declare function jsonToDataIngestionSegment(json: Record<string, any>): DataIngestionSegment; export declare function dataIngestionSegmentToJson(segment: DataIngestionSegment): { id: number; entryId: string; segmentType: DataIngestionSegmentType; segmentId: number; metadata: {} | null; createdAt: string; }; export declare function jsonToDataIngestionChunk(json: Record<string, any>): DataIngestionChunk; export declare function dataIngestionChunkToJson(chunk: DataIngestionChunk): { id: number; entryId: string; segmentId: number; chunkIndex: number; metadata: {} | null; createdAt: string; }; //# sourceMappingURL=data-ingestion.d.ts.map