@knowledge-stack/ksapi 1.23.5 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/.openapi-generator/FILES +130 -4
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +282 -28
  4. package/dist/apis/AuthApi.d.ts +117 -0
  5. package/dist/apis/AuthApi.js +137 -47
  6. package/dist/apis/ChunkLineagesApi.d.ts +38 -0
  7. package/dist/apis/ChunkLineagesApi.js +42 -15
  8. package/dist/apis/ChunksApi.d.ts +161 -5
  9. package/dist/apis/ChunksApi.js +168 -31
  10. package/dist/apis/DefaultApi.d.ts +20 -0
  11. package/dist/apis/DefaultApi.js +28 -10
  12. package/dist/apis/DocumentVersionsApi.d.ts +99 -9
  13. package/dist/apis/DocumentVersionsApi.js +100 -37
  14. package/dist/apis/DocumentsApi.d.ts +80 -0
  15. package/dist/apis/DocumentsApi.js +84 -30
  16. package/dist/apis/FoldersApi.d.ts +92 -9
  17. package/dist/apis/FoldersApi.js +86 -32
  18. package/dist/apis/InvitesApi.d.ts +51 -0
  19. package/dist/apis/InvitesApi.js +56 -20
  20. package/dist/apis/PathPartsApi.d.ts +140 -1
  21. package/dist/apis/PathPartsApi.js +141 -20
  22. package/dist/apis/SectionsApi.d.ts +49 -0
  23. package/dist/apis/SectionsApi.js +56 -20
  24. package/dist/apis/TagsApi.d.ts +62 -0
  25. package/dist/apis/TagsApi.js +70 -25
  26. package/dist/apis/TenantsApi.d.ts +103 -0
  27. package/dist/apis/TenantsApi.js +112 -40
  28. package/dist/apis/ThreadMessagesApi.d.ts +41 -0
  29. package/dist/apis/ThreadMessagesApi.js +42 -15
  30. package/dist/apis/ThreadsApi.d.ts +77 -0
  31. package/dist/apis/ThreadsApi.js +84 -30
  32. package/dist/apis/UserPermissionsApi.d.ts +54 -0
  33. package/dist/apis/UserPermissionsApi.js +56 -20
  34. package/dist/apis/UsersApi.d.ts +23 -0
  35. package/dist/apis/UsersApi.js +28 -10
  36. package/dist/apis/WorkflowsApi.d.ts +38 -0
  37. package/dist/apis/WorkflowsApi.js +42 -15
  38. package/dist/esm/apis/AuthApi.d.ts +117 -0
  39. package/dist/esm/apis/AuthApi.js +137 -47
  40. package/dist/esm/apis/ChunkLineagesApi.d.ts +38 -0
  41. package/dist/esm/apis/ChunkLineagesApi.js +42 -15
  42. package/dist/esm/apis/ChunksApi.d.ts +161 -5
  43. package/dist/esm/apis/ChunksApi.js +169 -32
  44. package/dist/esm/apis/DefaultApi.d.ts +20 -0
  45. package/dist/esm/apis/DefaultApi.js +28 -10
  46. package/dist/esm/apis/DocumentVersionsApi.d.ts +99 -9
  47. package/dist/esm/apis/DocumentVersionsApi.js +101 -38
  48. package/dist/esm/apis/DocumentsApi.d.ts +80 -0
  49. package/dist/esm/apis/DocumentsApi.js +84 -30
  50. package/dist/esm/apis/FoldersApi.d.ts +92 -9
  51. package/dist/esm/apis/FoldersApi.js +87 -33
  52. package/dist/esm/apis/InvitesApi.d.ts +51 -0
  53. package/dist/esm/apis/InvitesApi.js +56 -20
  54. package/dist/esm/apis/PathPartsApi.d.ts +140 -1
  55. package/dist/esm/apis/PathPartsApi.js +142 -21
  56. package/dist/esm/apis/SectionsApi.d.ts +49 -0
  57. package/dist/esm/apis/SectionsApi.js +56 -20
  58. package/dist/esm/apis/TagsApi.d.ts +62 -0
  59. package/dist/esm/apis/TagsApi.js +70 -25
  60. package/dist/esm/apis/TenantsApi.d.ts +103 -0
  61. package/dist/esm/apis/TenantsApi.js +112 -40
  62. package/dist/esm/apis/ThreadMessagesApi.d.ts +41 -0
  63. package/dist/esm/apis/ThreadMessagesApi.js +42 -15
  64. package/dist/esm/apis/ThreadsApi.d.ts +77 -0
  65. package/dist/esm/apis/ThreadsApi.js +84 -30
  66. package/dist/esm/apis/UserPermissionsApi.d.ts +54 -0
  67. package/dist/esm/apis/UserPermissionsApi.js +56 -20
  68. package/dist/esm/apis/UsersApi.d.ts +23 -0
  69. package/dist/esm/apis/UsersApi.js +28 -10
  70. package/dist/esm/apis/WorkflowsApi.d.ts +38 -0
  71. package/dist/esm/apis/WorkflowsApi.js +42 -15
  72. package/dist/esm/models/ChunkBulkResponse.d.ts +139 -0
  73. package/dist/esm/models/ChunkBulkResponse.js +100 -0
  74. package/dist/esm/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
  75. package/dist/esm/models/{DocumentContentPathPart.js → ChunkContentItem.js} +19 -16
  76. package/dist/esm/models/ChunkSearchRequest.d.ts +14 -2
  77. package/dist/esm/models/ChunkSearchRequest.js +6 -2
  78. package/dist/esm/models/DocumentResponse.d.ts +13 -0
  79. package/dist/esm/models/DocumentResponse.js +10 -0
  80. package/dist/esm/models/FolderResponse.d.ts +13 -0
  81. package/dist/esm/models/FolderResponse.js +10 -0
  82. package/dist/esm/models/FolderResponseOrDocumentResponse.d.ts +27 -0
  83. package/dist/esm/models/FolderResponseOrDocumentResponse.js +47 -0
  84. package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
  85. package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +70 -0
  86. package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
  87. package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +70 -0
  88. package/dist/esm/models/SectionContentItem.d.ts +114 -0
  89. package/dist/esm/models/SectionContentItem.js +88 -0
  90. package/dist/esm/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
  91. package/dist/esm/models/SectionContentItemOrChunkContentItem.js +47 -0
  92. package/dist/esm/models/SubtreeChunkGroup.d.ts +62 -0
  93. package/dist/esm/models/SubtreeChunkGroup.js +52 -0
  94. package/dist/esm/models/SubtreeChunksResponse.d.ts +48 -0
  95. package/dist/esm/models/SubtreeChunksResponse.js +45 -0
  96. package/dist/esm/models/VersionChunkIdsResponse.d.ts +47 -0
  97. package/dist/esm/models/VersionChunkIdsResponse.js +44 -0
  98. package/dist/esm/models/index.d.ts +10 -4
  99. package/dist/esm/models/index.js +10 -4
  100. package/dist/models/ChunkBulkResponse.d.ts +139 -0
  101. package/dist/models/ChunkBulkResponse.js +108 -0
  102. package/dist/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
  103. package/dist/models/{DocumentContentPathPart.js → ChunkContentItem.js} +25 -22
  104. package/dist/models/ChunkSearchRequest.d.ts +14 -2
  105. package/dist/models/ChunkSearchRequest.js +6 -2
  106. package/dist/models/DocumentResponse.d.ts +13 -0
  107. package/dist/models/DocumentResponse.js +11 -1
  108. package/dist/models/FolderResponse.d.ts +13 -0
  109. package/dist/models/FolderResponse.js +11 -1
  110. package/dist/models/FolderResponseOrDocumentResponse.d.ts +27 -0
  111. package/dist/models/FolderResponseOrDocumentResponse.js +53 -0
  112. package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
  113. package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +78 -0
  114. package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
  115. package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +78 -0
  116. package/dist/models/SectionContentItem.d.ts +114 -0
  117. package/dist/models/SectionContentItem.js +96 -0
  118. package/dist/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
  119. package/dist/models/SectionContentItemOrChunkContentItem.js +53 -0
  120. package/dist/models/SubtreeChunkGroup.d.ts +62 -0
  121. package/dist/models/SubtreeChunkGroup.js +60 -0
  122. package/dist/models/SubtreeChunksResponse.d.ts +48 -0
  123. package/dist/models/SubtreeChunksResponse.js +53 -0
  124. package/dist/models/VersionChunkIdsResponse.d.ts +47 -0
  125. package/dist/models/VersionChunkIdsResponse.js +52 -0
  126. package/dist/models/index.d.ts +10 -4
  127. package/dist/models/index.js +10 -4
  128. package/docs/AuthApi.md +707 -0
  129. package/docs/BulkTagRequest.md +35 -0
  130. package/docs/ChunkBulkResponse.md +65 -0
  131. package/docs/ChunkContentItem.md +59 -0
  132. package/docs/ChunkLineageResponse.md +41 -0
  133. package/docs/ChunkLineagesApi.md +230 -0
  134. package/docs/ChunkMetadataInput.md +37 -0
  135. package/docs/ChunkMetadataOutput.md +37 -0
  136. package/docs/ChunkResponse.md +63 -0
  137. package/docs/ChunkSearchRequest.md +51 -0
  138. package/docs/ChunkType.md +33 -0
  139. package/docs/ChunksApi.md +590 -0
  140. package/docs/ClearVersionContentsResponse.md +35 -0
  141. package/docs/CreateChunkLineageRequest.md +37 -0
  142. package/docs/CreateChunkRequest.md +43 -0
  143. package/docs/CreateDocumentRequest.md +41 -0
  144. package/docs/CreateFolderRequest.md +37 -0
  145. package/docs/CreatePasswordUserRequest.md +36 -0
  146. package/docs/CreatePermissionRequest.md +40 -0
  147. package/docs/CreateSectionRequest.md +41 -0
  148. package/docs/CreateTagRequest.md +39 -0
  149. package/docs/CreateTenantRequest.md +37 -0
  150. package/docs/CreateThreadMessageRequest.md +37 -0
  151. package/docs/CreateThreadRequest.md +37 -0
  152. package/docs/DefaultApi.md +128 -0
  153. package/docs/DocumentOrigin.md +33 -0
  154. package/docs/DocumentResponse.md +63 -0
  155. package/docs/DocumentType.md +33 -0
  156. package/docs/DocumentVersionMetadata.md +47 -0
  157. package/docs/DocumentVersionMetadataUpdate.md +47 -0
  158. package/docs/DocumentVersionResponse.md +57 -0
  159. package/docs/DocumentVersionsApi.md +530 -0
  160. package/docs/DocumentsApi.md +464 -0
  161. package/docs/EmailSentResponse.md +34 -0
  162. package/docs/EmailVerificationRequest.md +34 -0
  163. package/docs/EmbeddingModel.md +33 -0
  164. package/docs/FolderResponse.md +55 -0
  165. package/docs/FolderResponseOrDocumentResponse.md +62 -0
  166. package/docs/FoldersApi.md +473 -0
  167. package/docs/HTTPValidationError.md +34 -0
  168. package/docs/HealthCheckResponse.md +36 -0
  169. package/docs/IdpType.md +33 -0
  170. package/docs/IngestDocumentResponse.md +39 -0
  171. package/docs/InviteResponse.md +53 -0
  172. package/docs/InviteStatus.md +32 -0
  173. package/docs/InviteUserRequest.md +38 -0
  174. package/docs/InvitesApi.md +305 -0
  175. package/docs/LineageEdgeResponse.md +37 -0
  176. package/docs/LineageGraphResponse.md +37 -0
  177. package/docs/LineageNodeResponse.md +47 -0
  178. package/docs/LocationInner.md +32 -0
  179. package/docs/MessageRole.md +33 -0
  180. package/docs/OAuth2Config.md +41 -0
  181. package/docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md +40 -0
  182. package/docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md +40 -0
  183. package/docs/PaginatedResponseDocumentResponse.md +40 -0
  184. package/docs/PaginatedResponseDocumentVersionResponse.md +40 -0
  185. package/docs/PaginatedResponseFolderResponse.md +40 -0
  186. package/docs/PaginatedResponseInviteResponse.md +40 -0
  187. package/docs/PaginatedResponsePathPartResponse.md +40 -0
  188. package/docs/PaginatedResponsePermissionResponse.md +40 -0
  189. package/docs/PaginatedResponseTagResponse.md +40 -0
  190. package/docs/PaginatedResponseTenantResponse.md +40 -0
  191. package/docs/PaginatedResponseTenantUserResponse.md +40 -0
  192. package/docs/PaginatedResponseThreadMessageResponse.md +40 -0
  193. package/docs/PaginatedResponseThreadResponse.md +40 -0
  194. package/docs/PaginatedResponseWorkflowSummaryResponse.md +40 -0
  195. package/docs/PartType.md +33 -0
  196. package/docs/PasswordResetRequest.md +36 -0
  197. package/docs/PasswordResetWithTokenRequest.md +36 -0
  198. package/docs/PathOrder.md +33 -0
  199. package/docs/PathPartResponse.md +53 -0
  200. package/docs/PathPartTagsResponse.md +35 -0
  201. package/docs/PathPartsApi.md +461 -0
  202. package/docs/PermissionCapability.md +33 -0
  203. package/docs/PermissionResponse.md +48 -0
  204. package/docs/PipelineState.md +45 -0
  205. package/docs/PipelineStatus.md +33 -0
  206. package/docs/Polygon.md +41 -0
  207. package/docs/PolygonReference.md +37 -0
  208. package/docs/RootResponse.md +36 -0
  209. package/docs/ScoredChunkResponse.md +65 -0
  210. package/docs/SectionContentItem.md +55 -0
  211. package/docs/SectionContentItemOrChunkContentItem.md +60 -0
  212. package/docs/SectionResponse.md +57 -0
  213. package/docs/SectionsApi.md +299 -0
  214. package/docs/SignInRequest.md +38 -0
  215. package/docs/SubtreeChunkGroup.md +39 -0
  216. package/docs/SubtreeChunksResponse.md +35 -0
  217. package/docs/TagResponse.md +47 -0
  218. package/docs/TagsApi.md +374 -0
  219. package/docs/TenantResponse.md +39 -0
  220. package/docs/TenantUserEditRequest.md +35 -0
  221. package/docs/TenantUserResponse.md +43 -0
  222. package/docs/TenantUserRole.md +33 -0
  223. package/docs/TenantsApi.md +605 -0
  224. package/docs/ThreadMessageResponse.md +53 -0
  225. package/docs/ThreadMessagesApi.md +239 -0
  226. package/docs/ThreadResponse.md +49 -0
  227. package/docs/ThreadsApi.md +455 -0
  228. package/docs/UpdateChunkContentRequest.md +37 -0
  229. package/docs/UpdateChunkMetadataRequest.md +35 -0
  230. package/docs/UpdateDocumentRequest.md +39 -0
  231. package/docs/UpdateFolderRequest.md +37 -0
  232. package/docs/UpdatePermissionRequest.md +36 -0
  233. package/docs/UpdateSectionRequest.md +41 -0
  234. package/docs/UpdateTagRequest.md +39 -0
  235. package/docs/UpdateTenantRequest.md +37 -0
  236. package/docs/UpdateThreadRequest.md +37 -0
  237. package/docs/UpdateUserRequest.md +34 -0
  238. package/docs/UserPermissionsApi.md +314 -0
  239. package/docs/UserResponse.md +44 -0
  240. package/docs/UsersApi.md +149 -0
  241. package/docs/ValidationError.md +42 -0
  242. package/docs/VersionChunkIdsResponse.md +35 -0
  243. package/docs/WorkflowAction.md +33 -0
  244. package/docs/WorkflowActionResponse.md +39 -0
  245. package/docs/WorkflowDetailResponse.md +63 -0
  246. package/docs/WorkflowSummaryResponse.md +49 -0
  247. package/docs/WorkflowsApi.md +230 -0
  248. package/package.json +1 -1
  249. package/src/apis/AuthApi.ts +214 -47
  250. package/src/apis/ChunkLineagesApi.ts +68 -15
  251. package/src/apis/ChunksApi.ts +298 -33
  252. package/src/apis/DefaultApi.ts +40 -10
  253. package/src/apis/DocumentVersionsApi.ts +170 -45
  254. package/src/apis/DocumentsApi.ts +140 -30
  255. package/src/apis/FoldersApi.ts +153 -40
  256. package/src/apis/InvitesApi.ts +91 -20
  257. package/src/apis/PathPartsApi.ts +260 -20
  258. package/src/apis/SectionsApi.ts +89 -20
  259. package/src/apis/TagsApi.ts +112 -25
  260. package/src/apis/TenantsApi.ts +183 -40
  261. package/src/apis/ThreadMessagesApi.ts +71 -15
  262. package/src/apis/ThreadsApi.ts +137 -30
  263. package/src/apis/UserPermissionsApi.ts +94 -20
  264. package/src/apis/UsersApi.ts +43 -10
  265. package/src/apis/WorkflowsApi.ts +68 -15
  266. package/src/models/ChunkBulkResponse.ts +232 -0
  267. package/src/models/{DocumentContentPathPart.ts → ChunkContentItem.ts} +43 -53
  268. package/src/models/ChunkSearchRequest.ts +20 -4
  269. package/src/models/DocumentResponse.ts +17 -0
  270. package/src/models/FolderResponse.ts +19 -0
  271. package/src/models/FolderResponseOrDocumentResponse.ts +72 -0
  272. package/src/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.ts +130 -0
  273. package/src/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.ts +130 -0
  274. package/src/models/SectionContentItem.ts +182 -0
  275. package/src/models/SectionContentItemOrChunkContentItem.ts +72 -0
  276. package/src/models/SubtreeChunkGroup.ts +104 -0
  277. package/src/models/SubtreeChunksResponse.ts +91 -0
  278. package/src/models/VersionChunkIdsResponse.ts +83 -0
  279. package/src/models/index.ts +10 -4
  280. package/dist/esm/models/FolderDocumentResponse.d.ts +0 -157
  281. package/dist/esm/models/FolderDocumentResponse.js +0 -99
  282. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
  283. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +0 -70
  284. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
  285. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +0 -70
  286. package/dist/models/FolderDocumentResponse.d.ts +0 -157
  287. package/dist/models/FolderDocumentResponse.js +0 -107
  288. package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
  289. package/dist/models/PaginatedResponseDocumentContentPathPart.js +0 -78
  290. package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
  291. package/dist/models/PaginatedResponseFolderDocumentResponse.js +0 -78
  292. package/src/models/FolderDocumentResponse.ts +0 -267
  293. package/src/models/PaginatedResponseDocumentContentPathPart.ts +0 -130
  294. package/src/models/PaginatedResponseFolderDocumentResponse.ts +0 -130
@@ -0,0 +1,47 @@
1
+
2
+ # DocumentVersionMetadataUpdate
3
+
4
+ Partial update schema for document version metadata. All fields are optional. Only non-``None`` fields are merged into the existing metadata dict.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `sourceS3` | string
11
+ `cleanedSourceS3` | string
12
+ `doclingJsonS3` | string
13
+ `pipelineState` | [PipelineState](PipelineState.md)
14
+ `totalPages` | number
15
+ `totalSections` | number
16
+ `totalChunks` | number
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { DocumentVersionMetadataUpdate } from '@knowledge-stack/ksapi'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "sourceS3": null,
26
+ "cleanedSourceS3": null,
27
+ "doclingJsonS3": null,
28
+ "pipelineState": null,
29
+ "totalPages": null,
30
+ "totalSections": null,
31
+ "totalChunks": null,
32
+ } satisfies DocumentVersionMetadataUpdate
33
+
34
+ console.log(example)
35
+
36
+ // Convert the instance to a JSON string
37
+ const exampleJSON: string = JSON.stringify(example)
38
+ console.log(exampleJSON)
39
+
40
+ // Parse the JSON string back to an object
41
+ const exampleParsed = JSON.parse(exampleJSON) as DocumentVersionMetadataUpdate
42
+ console.log(exampleParsed)
43
+ ```
44
+
45
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
46
+
47
+
@@ -0,0 +1,57 @@
1
+
2
+ # DocumentVersionResponse
3
+
4
+ DocumentVersion response model. Shared schema for DocumentVersion responses, used by Document endpoints and DocumentVersion endpoints.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `id` | string
11
+ `pathPartId` | string
12
+ `version` | number
13
+ `name` | string
14
+ `parentPathId` | string
15
+ `materializedPath` | string
16
+ `systemManaged` | boolean
17
+ `tenantId` | string
18
+ `createdAt` | Date
19
+ `updatedAt` | Date
20
+ `assetS3Url` | string
21
+ `metadata` | [DocumentVersionMetadata](DocumentVersionMetadata.md)
22
+
23
+ ## Example
24
+
25
+ ```typescript
26
+ import type { DocumentVersionResponse } from '@knowledge-stack/ksapi'
27
+
28
+ // TODO: Update the object below with actual values
29
+ const example = {
30
+ "id": null,
31
+ "pathPartId": null,
32
+ "version": null,
33
+ "name": null,
34
+ "parentPathId": null,
35
+ "materializedPath": null,
36
+ "systemManaged": null,
37
+ "tenantId": null,
38
+ "createdAt": null,
39
+ "updatedAt": null,
40
+ "assetS3Url": null,
41
+ "metadata": null,
42
+ } satisfies DocumentVersionResponse
43
+
44
+ console.log(example)
45
+
46
+ // Convert the instance to a JSON string
47
+ const exampleJSON: string = JSON.stringify(example)
48
+ console.log(exampleJSON)
49
+
50
+ // Parse the JSON string back to an object
51
+ const exampleParsed = JSON.parse(exampleJSON) as DocumentVersionResponse
52
+ console.log(exampleParsed)
53
+ ```
54
+
55
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
56
+
57
+
@@ -0,0 +1,530 @@
1
+ # DocumentVersionsApi
2
+
3
+ All URIs are relative to *http://localhost:8000*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**clearDocumentVersionContents**](DocumentVersionsApi.md#cleardocumentversioncontents) | **DELETE** /v1/document_versions/{version_id}/contents | Clear Document Version Contents Handler |
8
+ | [**createDocumentVersion**](DocumentVersionsApi.md#createdocumentversion) | **POST** /v1/documents/{document_id}/versions | Create Document Version Handler |
9
+ | [**deleteDocumentVersion**](DocumentVersionsApi.md#deletedocumentversion) | **DELETE** /v1/document_versions/{version_id} | Delete Document Version Handler |
10
+ | [**getDocumentVersion**](DocumentVersionsApi.md#getdocumentversion) | **GET** /v1/document_versions/{version_id} | Get Document Version Handler |
11
+ | [**getDocumentVersionContents**](DocumentVersionsApi.md#getdocumentversioncontents) | **GET** /v1/document_versions/{version_id}/contents | Get Document Version Contents Handler |
12
+ | [**listDocumentVersions**](DocumentVersionsApi.md#listdocumentversions) | **GET** /v1/document_versions | List Document Versions Handler |
13
+ | [**updateDocumentVersionMetadata**](DocumentVersionsApi.md#updatedocumentversionmetadata) | **PATCH** /v1/document_versions/{version_id}/metadata | Update Document Version Metadata Handler |
14
+
15
+
16
+
17
+ ## clearDocumentVersionContents
18
+
19
+ > ClearVersionContentsResponse clearDocumentVersionContents(versionId, ksUat)
20
+
21
+ Clear Document Version Contents Handler
22
+
23
+ Delete all sections and chunks under a document version. Removes all content (sections and chunks) from the version while keeping the version itself intact. Used by the ingestion pipeline for idempotent re-processing.
24
+
25
+ ### Example
26
+
27
+ ```ts
28
+ import {
29
+ Configuration,
30
+ DocumentVersionsApi,
31
+ } from '@knowledge-stack/ksapi';
32
+ import type { ClearDocumentVersionContentsRequest } from '@knowledge-stack/ksapi';
33
+
34
+ async function example() {
35
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
36
+ const api = new DocumentVersionsApi();
37
+
38
+ const body = {
39
+ // string | DocumentVersion ID
40
+ versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
41
+ // string (optional)
42
+ ksUat: ksUat_example,
43
+ } satisfies ClearDocumentVersionContentsRequest;
44
+
45
+ try {
46
+ const data = await api.clearDocumentVersionContents(body);
47
+ console.log(data);
48
+ } catch (error) {
49
+ console.error(error);
50
+ }
51
+ }
52
+
53
+ // Run the test
54
+ example().catch(console.error);
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+
60
+ | Name | Type | Description | Notes |
61
+ |------------- | ------------- | ------------- | -------------|
62
+ | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
63
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
64
+
65
+ ### Return type
66
+
67
+ [**ClearVersionContentsResponse**](ClearVersionContentsResponse.md)
68
+
69
+ ### Authorization
70
+
71
+ No authorization required
72
+
73
+ ### HTTP request headers
74
+
75
+ - **Content-Type**: Not defined
76
+ - **Accept**: `application/json`
77
+
78
+
79
+ ### HTTP response details
80
+ | Status code | Description | Response headers |
81
+ |-------------|-------------|------------------|
82
+ | **200** | Successful Response | - |
83
+ | **422** | Validation Error | - |
84
+
85
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
86
+
87
+
88
+ ## createDocumentVersion
89
+
90
+ > DocumentVersionResponse createDocumentVersion(documentId, ksUat)
91
+
92
+ Create Document Version Handler
93
+
94
+ Create a new version for a document. The version number is automatically incremented from the highest existing version.
95
+
96
+ ### Example
97
+
98
+ ```ts
99
+ import {
100
+ Configuration,
101
+ DocumentVersionsApi,
102
+ } from '@knowledge-stack/ksapi';
103
+ import type { CreateDocumentVersionRequest } from '@knowledge-stack/ksapi';
104
+
105
+ async function example() {
106
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
107
+ const api = new DocumentVersionsApi();
108
+
109
+ const body = {
110
+ // string | Document ID
111
+ documentId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
112
+ // string (optional)
113
+ ksUat: ksUat_example,
114
+ } satisfies CreateDocumentVersionRequest;
115
+
116
+ try {
117
+ const data = await api.createDocumentVersion(body);
118
+ console.log(data);
119
+ } catch (error) {
120
+ console.error(error);
121
+ }
122
+ }
123
+
124
+ // Run the test
125
+ example().catch(console.error);
126
+ ```
127
+
128
+ ### Parameters
129
+
130
+
131
+ | Name | Type | Description | Notes |
132
+ |------------- | ------------- | ------------- | -------------|
133
+ | **documentId** | `string` | Document ID | [Defaults to `undefined`] |
134
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
135
+
136
+ ### Return type
137
+
138
+ [**DocumentVersionResponse**](DocumentVersionResponse.md)
139
+
140
+ ### Authorization
141
+
142
+ No authorization required
143
+
144
+ ### HTTP request headers
145
+
146
+ - **Content-Type**: Not defined
147
+ - **Accept**: `application/json`
148
+
149
+
150
+ ### HTTP response details
151
+ | Status code | Description | Response headers |
152
+ |-------------|-------------|------------------|
153
+ | **201** | Successful Response | - |
154
+ | **422** | Validation Error | - |
155
+
156
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
157
+
158
+
159
+ ## deleteDocumentVersion
160
+
161
+ > deleteDocumentVersion(versionId, ksUat)
162
+
163
+ Delete Document Version Handler
164
+
165
+ Delete a document version by its ID. Cannot delete the active version of a document.
166
+
167
+ ### Example
168
+
169
+ ```ts
170
+ import {
171
+ Configuration,
172
+ DocumentVersionsApi,
173
+ } from '@knowledge-stack/ksapi';
174
+ import type { DeleteDocumentVersionRequest } from '@knowledge-stack/ksapi';
175
+
176
+ async function example() {
177
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
178
+ const api = new DocumentVersionsApi();
179
+
180
+ const body = {
181
+ // string | DocumentVersion ID
182
+ versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
183
+ // string (optional)
184
+ ksUat: ksUat_example,
185
+ } satisfies DeleteDocumentVersionRequest;
186
+
187
+ try {
188
+ const data = await api.deleteDocumentVersion(body);
189
+ console.log(data);
190
+ } catch (error) {
191
+ console.error(error);
192
+ }
193
+ }
194
+
195
+ // Run the test
196
+ example().catch(console.error);
197
+ ```
198
+
199
+ ### Parameters
200
+
201
+
202
+ | Name | Type | Description | Notes |
203
+ |------------- | ------------- | ------------- | -------------|
204
+ | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
205
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
206
+
207
+ ### Return type
208
+
209
+ `void` (Empty response body)
210
+
211
+ ### Authorization
212
+
213
+ No authorization required
214
+
215
+ ### HTTP request headers
216
+
217
+ - **Content-Type**: Not defined
218
+ - **Accept**: `application/json`
219
+
220
+
221
+ ### HTTP response details
222
+ | Status code | Description | Response headers |
223
+ |-------------|-------------|------------------|
224
+ | **204** | Successful Response | - |
225
+ | **422** | Validation Error | - |
226
+
227
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
228
+
229
+
230
+ ## getDocumentVersion
231
+
232
+ > DocumentVersionResponse getDocumentVersion(versionId, ksUat)
233
+
234
+ Get Document Version Handler
235
+
236
+ Get a document version by its ID.
237
+
238
+ ### Example
239
+
240
+ ```ts
241
+ import {
242
+ Configuration,
243
+ DocumentVersionsApi,
244
+ } from '@knowledge-stack/ksapi';
245
+ import type { GetDocumentVersionRequest } from '@knowledge-stack/ksapi';
246
+
247
+ async function example() {
248
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
249
+ const api = new DocumentVersionsApi();
250
+
251
+ const body = {
252
+ // string | DocumentVersion ID
253
+ versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
254
+ // string (optional)
255
+ ksUat: ksUat_example,
256
+ } satisfies GetDocumentVersionRequest;
257
+
258
+ try {
259
+ const data = await api.getDocumentVersion(body);
260
+ console.log(data);
261
+ } catch (error) {
262
+ console.error(error);
263
+ }
264
+ }
265
+
266
+ // Run the test
267
+ example().catch(console.error);
268
+ ```
269
+
270
+ ### Parameters
271
+
272
+
273
+ | Name | Type | Description | Notes |
274
+ |------------- | ------------- | ------------- | -------------|
275
+ | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
276
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
277
+
278
+ ### Return type
279
+
280
+ [**DocumentVersionResponse**](DocumentVersionResponse.md)
281
+
282
+ ### Authorization
283
+
284
+ No authorization required
285
+
286
+ ### HTTP request headers
287
+
288
+ - **Content-Type**: Not defined
289
+ - **Accept**: `application/json`
290
+
291
+
292
+ ### HTTP response details
293
+ | Status code | Description | Response headers |
294
+ |-------------|-------------|------------------|
295
+ | **200** | Successful Response | - |
296
+ | **422** | Validation Error | - |
297
+
298
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
299
+
300
+
301
+ ## getDocumentVersionContents
302
+
303
+ > PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator getDocumentVersionContents(versionId, sectionId, limit, offset, ksUat)
304
+
305
+ Get Document Version Contents Handler
306
+
307
+ List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
308
+
309
+ ### Example
310
+
311
+ ```ts
312
+ import {
313
+ Configuration,
314
+ DocumentVersionsApi,
315
+ } from '@knowledge-stack/ksapi';
316
+ import type { GetDocumentVersionContentsRequest } from '@knowledge-stack/ksapi';
317
+
318
+ async function example() {
319
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
320
+ const api = new DocumentVersionsApi();
321
+
322
+ const body = {
323
+ // string | DocumentVersion ID
324
+ versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
325
+ // string | Optional section ID to scope traversal to a subtree (optional)
326
+ sectionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
327
+ // number | Number of items per page (optional)
328
+ limit: 56,
329
+ // number | Number of items to skip (optional)
330
+ offset: 56,
331
+ // string (optional)
332
+ ksUat: ksUat_example,
333
+ } satisfies GetDocumentVersionContentsRequest;
334
+
335
+ try {
336
+ const data = await api.getDocumentVersionContents(body);
337
+ console.log(data);
338
+ } catch (error) {
339
+ console.error(error);
340
+ }
341
+ }
342
+
343
+ // Run the test
344
+ example().catch(console.error);
345
+ ```
346
+
347
+ ### Parameters
348
+
349
+
350
+ | Name | Type | Description | Notes |
351
+ |------------- | ------------- | ------------- | -------------|
352
+ | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
353
+ | **sectionId** | `string` | Optional section ID to scope traversal to a subtree | [Optional] [Defaults to `undefined`] |
354
+ | **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
355
+ | **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
356
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
357
+
358
+ ### Return type
359
+
360
+ [**PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator**](PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md)
361
+
362
+ ### Authorization
363
+
364
+ No authorization required
365
+
366
+ ### HTTP request headers
367
+
368
+ - **Content-Type**: Not defined
369
+ - **Accept**: `application/json`
370
+
371
+
372
+ ### HTTP response details
373
+ | Status code | Description | Response headers |
374
+ |-------------|-------------|------------------|
375
+ | **200** | Successful Response | - |
376
+ | **422** | Validation Error | - |
377
+
378
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
379
+
380
+
381
+ ## listDocumentVersions
382
+
383
+ > PaginatedResponseDocumentVersionResponse listDocumentVersions(documentId, limit, offset, ksUat)
384
+
385
+ List Document Versions Handler
386
+
387
+ List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
388
+
389
+ ### Example
390
+
391
+ ```ts
392
+ import {
393
+ Configuration,
394
+ DocumentVersionsApi,
395
+ } from '@knowledge-stack/ksapi';
396
+ import type { ListDocumentVersionsRequest } from '@knowledge-stack/ksapi';
397
+
398
+ async function example() {
399
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
400
+ const api = new DocumentVersionsApi();
401
+
402
+ const body = {
403
+ // string | Document ID to list versions for
404
+ documentId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
405
+ // number | Number of items per page (optional)
406
+ limit: 56,
407
+ // number | Number of items to skip (optional)
408
+ offset: 56,
409
+ // string (optional)
410
+ ksUat: ksUat_example,
411
+ } satisfies ListDocumentVersionsRequest;
412
+
413
+ try {
414
+ const data = await api.listDocumentVersions(body);
415
+ console.log(data);
416
+ } catch (error) {
417
+ console.error(error);
418
+ }
419
+ }
420
+
421
+ // Run the test
422
+ example().catch(console.error);
423
+ ```
424
+
425
+ ### Parameters
426
+
427
+
428
+ | Name | Type | Description | Notes |
429
+ |------------- | ------------- | ------------- | -------------|
430
+ | **documentId** | `string` | Document ID to list versions for | [Defaults to `undefined`] |
431
+ | **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
432
+ | **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
433
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
434
+
435
+ ### Return type
436
+
437
+ [**PaginatedResponseDocumentVersionResponse**](PaginatedResponseDocumentVersionResponse.md)
438
+
439
+ ### Authorization
440
+
441
+ No authorization required
442
+
443
+ ### HTTP request headers
444
+
445
+ - **Content-Type**: Not defined
446
+ - **Accept**: `application/json`
447
+
448
+
449
+ ### HTTP response details
450
+ | Status code | Description | Response headers |
451
+ |-------------|-------------|------------------|
452
+ | **200** | Successful Response | - |
453
+ | **422** | Validation Error | - |
454
+
455
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
456
+
457
+
458
+ ## updateDocumentVersionMetadata
459
+
460
+ > DocumentVersionResponse updateDocumentVersionMetadata(versionId, documentVersionMetadataUpdate, ksUat)
461
+
462
+ Update Document Version Metadata Handler
463
+
464
+ Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
465
+
466
+ ### Example
467
+
468
+ ```ts
469
+ import {
470
+ Configuration,
471
+ DocumentVersionsApi,
472
+ } from '@knowledge-stack/ksapi';
473
+ import type { UpdateDocumentVersionMetadataRequest } from '@knowledge-stack/ksapi';
474
+
475
+ async function example() {
476
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
477
+ const api = new DocumentVersionsApi();
478
+
479
+ const body = {
480
+ // string | DocumentVersion ID
481
+ versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
482
+ // DocumentVersionMetadataUpdate
483
+ documentVersionMetadataUpdate: ...,
484
+ // string (optional)
485
+ ksUat: ksUat_example,
486
+ } satisfies UpdateDocumentVersionMetadataRequest;
487
+
488
+ try {
489
+ const data = await api.updateDocumentVersionMetadata(body);
490
+ console.log(data);
491
+ } catch (error) {
492
+ console.error(error);
493
+ }
494
+ }
495
+
496
+ // Run the test
497
+ example().catch(console.error);
498
+ ```
499
+
500
+ ### Parameters
501
+
502
+
503
+ | Name | Type | Description | Notes |
504
+ |------------- | ------------- | ------------- | -------------|
505
+ | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
506
+ | **documentVersionMetadataUpdate** | [DocumentVersionMetadataUpdate](DocumentVersionMetadataUpdate.md) | | |
507
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
508
+
509
+ ### Return type
510
+
511
+ [**DocumentVersionResponse**](DocumentVersionResponse.md)
512
+
513
+ ### Authorization
514
+
515
+ No authorization required
516
+
517
+ ### HTTP request headers
518
+
519
+ - **Content-Type**: `application/json`
520
+ - **Accept**: `application/json`
521
+
522
+
523
+ ### HTTP response details
524
+ | Status code | Description | Response headers |
525
+ |-------------|-------------|------------------|
526
+ | **200** | Successful Response | - |
527
+ | **422** | Validation Error | - |
528
+
529
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
530
+