Skip to main content

@wildix/wim-knowledge-base-client > DocumentItem

DocumentItem interface

Signature:

export interface DocumentItem 

Properties

Property

Modifiers

Type

Description

chunksCount?

number | undefined

(Optional) Total number of text chunks the document was split into for semantic search and embedding. Higher numbers indicate more detailed indexing

companyId

string

Company ID that owns this document

content?

string | undefined

(Optional) Optional document content in plain text or markdown format. For file uploads, can be the document content.

convertingDuration?

number | undefined

(Optional) Time in milliseconds spent converting the document from its original format to markdown. Only populated after processing

createdAt

string

Timestamp when the document was created (ISO 8601 format). Example: 2021-01-01T00:00:00Z

dataSourceId

string

ID of the data source containing this document

description?

string | undefined

(Optional) Optional detailed description of the document content and purpose. Helps users understand what the document is about.

errorMessage?

string | undefined

(Optional) Error message describing why document processing failed, if applicable. Only present when status is 'failed'

id

string

Unique identifier of the document

originalFormat

string

File format/extension of the original document for reference. Examples: 'pdf', 'docx', 'md', 'html', 'txt'. Helps identify source document type

originalId?

string | undefined

(Optional) Original ID from the source system, preserving the reference to the source document. Examples: 'confluence-page-1234567890' (for Confluence), 'gdrive-file-abc123' (for Google Drive), sha1(original-file-content) (for file uploads)

originalName

string

Original filename or identifier of the source document. Preserves the source document name. Examples: 'product-knowledge-base.pdf', 'installation-guide.docx'

processingDuration?

number | undefined

(Optional) Time in milliseconds spent chunking the document and generating embeddings for semantic search. Only populated after processing completes

status

DocumentStatus

Current processing status: 'draft' (not yet processed), 'pending' (queued for processing), 'processing' (currently being converted/chunked), 'completed' (ready for search), 'failed' (processing encountered errors)

title

string

Display title of the document used in search results and UI. Can differ from originalName. Examples: 'Product Installation Guide', 'API Documentation'. Length: 2-100 characters

updatedAt

string

Timestamp when the document was last updated (ISO 8601 format). Example: 2021-01-01T00:00:00Z

url?

string | undefined

(Optional) Optional URL where the document can be accessed or viewed. Used for providing direct links to the source. Example: https://confluence.company.com/wiki/Product\_Documentation