/
afanasevn
/
PdfEncoder
Обзор
Документация
Войти
/
afanasevn
/
PdfEncoder
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
client/src/types/api.ts
71 строка
2 KB
IBS\NAfanasev
Parse results functional update
07 июл 2026, 00:06
07 июл 2026, 00:06
8e97443
Код
Авторство
О чём код?
export type DocumentJobStatus = "Pending" | "Processing" | "Completed" | "Failed"; export interface ParseOptions { documentType?: string; language?: "ru" | "en"; async?: boolean; } export interface KeyValueField { key: string; value: string | null; confidence: number; source: string; requiresReview: boolean; } export interface DocumentContentHint { text: string; confidence: number; } export interface GenericParseResult { documentId: string; detectedDocumentType: string; pdfKind: string; overallConfidence: number; contentHint?: DocumentContentHint | null; fields: KeyValueField[]; tables: unknown[]; textBlocks: unknown[]; warnings: string[]; steps: unknown[]; } export interface JobError { code: string; message: string; } export interface DocumentJobResponse { documentId: string; status: DocumentJobStatus; createdAt?: string; completedAt?: string | null; result?: GenericParseResult | null; error?: JobError | null; } export interface DocumentListItem { documentId: string; originalFileName: string; detectedDocumentType: string; overallConfidence: number; status: DocumentJobStatus; createdAt: string; /** Краткое описание ошибки (только при Failed). */ errorSummary?: string | null; /** Код ошибки (только при Failed). */ errorCode?: string | null; } export interface DocumentListResponse { items: DocumentListItem[]; total: number; } export interface ListParams { limit?: number; offset?: number; status?: DocumentJobStatus; }