chore(web): strong type (#1259)

This commit is contained in:
Rhon Joe 2023-10-07 17:42:16 +08:00 • committed by GitHub
commit 52bec63275
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 36 deletions

View file

@ -183,15 +183,22 @@ export type DocumentListResponse = {
limit: number
}
export type CreateDocumentReq = {
export type DocumentReq = {
original_document_id?: string
indexing_technique?: string
doc_form: 'text_model' | 'qa_model'
doc_language: string
data_source: DataSource
process_rule: ProcessRule
}
export type CreateDocumentReq = DocumentReq & {
data_source: DataSource
}
export type IndexingEstimateParams = DocumentReq & Partial<DataSource> & {
dataset_id: string
}
export type DataSource = {
type: DataSourceType
info_list: {