(
knowledgeBaseId: string,
options: {
enabledFilter?: 'all' | 'enabled' | 'disabled'
search?: string
limit?: number
offset?: number
sortBy?: DocumentSortField
sortOrder?: SortOrder
tagFilters?: TagFilterCondition[]
},
requestId: string
)
| 987 | } |
| 988 | |
| 989 | export async function getDocuments( |
| 990 | knowledgeBaseId: string, |
| 991 | options: { |
| 992 | enabledFilter?: 'all' | 'enabled' | 'disabled' |
| 993 | search?: string |
| 994 | limit?: number |
| 995 | offset?: number |
| 996 | sortBy?: DocumentSortField |
| 997 | sortOrder?: SortOrder |
| 998 | tagFilters?: TagFilterCondition[] |
| 999 | }, |
| 1000 | requestId: string |
| 1001 | ): Promise<{ |
| 1002 | documents: Array<{ |
| 1003 | id: string |
| 1004 | knowledgeBaseId: string |
| 1005 | filename: string |
| 1006 | fileUrl: string |
| 1007 | fileSize: number |
| 1008 | mimeType: string |
| 1009 | chunkCount: number |
| 1010 | tokenCount: number |
| 1011 | characterCount: number |
| 1012 | processingStatus: 'pending' | 'processing' | 'completed' | 'failed' |
| 1013 | processingStartedAt: Date | null |
| 1014 | processingCompletedAt: Date | null |
| 1015 | processingError: string | null |
| 1016 | enabled: boolean |
| 1017 | uploadedAt: Date |
| 1018 | tag1: string | null |
| 1019 | tag2: string | null |
| 1020 | tag3: string | null |
| 1021 | tag4: string | null |
| 1022 | tag5: string | null |
| 1023 | tag6: string | null |
| 1024 | tag7: string | null |
| 1025 | number1: number | null |
| 1026 | number2: number | null |
| 1027 | number3: number | null |
| 1028 | number4: number | null |
| 1029 | number5: number | null |
| 1030 | date1: Date | null |
| 1031 | date2: Date | null |
| 1032 | boolean1: boolean | null |
| 1033 | boolean2: boolean | null |
| 1034 | boolean3: boolean | null |
| 1035 | connectorId: string | null |
| 1036 | connectorType: string | null |
| 1037 | sourceUrl: string | null |
| 1038 | }> |
| 1039 | pagination: { |
| 1040 | total: number |
| 1041 | limit: number |
| 1042 | offset: number |
| 1043 | hasMore: boolean |
| 1044 | } |
| 1045 | }> { |
| 1046 | const { |
no test coverage detected