Skip to content

Interface: DocumentStatsDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / DocumentStatsDto

Defined in: src/types/ingestion.ts:166

Stats for a single completed document within a session.

alreadyIngested: boolean

Defined in: src/types/ingestion.ts:174

true when these bytes were already ingested in the tenant: nothing was extracted again, and DocumentStatsDto.documentTermId names the earlier registry document that holds them (the first document with these bytes). The request’s collectionPath / previousDocumentId were applied to that document; an intent the engine cannot apply is refused, never dropped.


chunksProcessed: number

Defined in: src/types/ingestion.ts:176

Number of chunks successfully processed.


optional completedAt?: string | null

Defined in: src/types/ingestion.ts:178

When ingestion completed (ISO 8601).


documentId: string

Defined in: src/types/ingestion.ts:183

Session-tracking id of the document (UUID) — the documentId a 202 AsyncIngestionResponse returned.


optional documentTermId?: string | null

Defined in: src/types/ingestion.ts:191

Document-registry id of the document that holds this content (UUID): the id GET /api/v1/documents lists and /api/v1/documents/{document_id}/… answers to. It is the document this run linked, or, when DocumentStatsDto.alreadyIngested, the earlier document with the same bytes. Absent when document linking was skipped.


entitiesExtracted: number

Defined in: src/types/ingestion.ts:193

Number of entities extracted from text.


entitiesRefused: RefusedEntityDto[]

Defined in: src/types/ingestion.ts:200

The extracted entities the declaration verdict refused, so they were not written. Every refusal is listed, in the same shape as the synchronous ingest response: a document can be complete while part of what was extracted from it was refused. Empty when none was refused.


processingTimeMs: number

Defined in: src/types/ingestion.ts:202

Processing time in milliseconds.


relationsExtracted: number

Defined in: src/types/ingestion.ts:204

Number of relations extracted from text.


relationsIntegrated: number

Defined in: src/types/ingestion.ts:206

Number of extracted relations integrated into the OSF graph.


sortNames: string[]

Defined in: src/types/ingestion.ts:208

Names of sorts created/reused.


termIds: string[]

Defined in: src/types/ingestion.ts:210

IDs of terms created/updated during ingestion.


totalTokens: number

Defined in: src/types/ingestion.ts:212

Total tokens consumed across all LLM calls.