@knowledge-stack/ksapi 1.23.4 → 1.24.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 (298) hide show
  1. package/.openapi-generator/FILES +125 -6
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +274 -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 +78 -4
  9. package/dist/apis/ChunksApi.js +85 -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 +54 -0
  21. package/dist/apis/PathPartsApi.js +56 -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 +172 -5
  27. package/dist/apis/TenantsApi.js +179 -31
  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 +78 -4
  43. package/dist/esm/apis/ChunksApi.js +85 -31
  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 +54 -0
  55. package/dist/esm/apis/PathPartsApi.js +56 -20
  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 +172 -5
  61. package/dist/esm/apis/TenantsApi.js +180 -32
  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/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
  73. package/dist/esm/models/{DocumentContentPathPart.js → ChunkContentItem.js} +17 -16
  74. package/dist/esm/models/ChunkResponse.d.ts +6 -0
  75. package/dist/esm/models/ChunkResponse.js +2 -0
  76. package/dist/esm/models/DocumentResponse.d.ts +13 -0
  77. package/dist/esm/models/DocumentResponse.js +8 -0
  78. package/dist/esm/models/FolderResponse.d.ts +13 -0
  79. package/dist/esm/models/FolderResponse.js +8 -0
  80. package/dist/esm/models/FolderResponseOrDocumentResponse.d.ts +27 -0
  81. package/dist/esm/models/FolderResponseOrDocumentResponse.js +47 -0
  82. package/dist/esm/models/InviteResponse.d.ts +7 -0
  83. package/dist/esm/models/InviteResponse.js +5 -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/PaginatedResponseTenantUserResponse.d.ts +66 -0
  89. package/dist/esm/models/{PaginatedResponseTenantUserInTenantResponse.js → PaginatedResponseTenantUserResponse.js} +12 -12
  90. package/dist/esm/models/ScoredChunkResponse.d.ts +6 -0
  91. package/dist/esm/models/ScoredChunkResponse.js +2 -0
  92. package/dist/esm/models/SectionContentItem.d.ts +114 -0
  93. package/dist/esm/models/SectionContentItem.js +86 -0
  94. package/dist/esm/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
  95. package/dist/esm/models/SectionContentItemOrChunkContentItem.js +47 -0
  96. package/dist/esm/models/TenantUserEditRequest.d.ts +48 -0
  97. package/dist/esm/models/TenantUserEditRequest.js +45 -0
  98. package/dist/esm/models/{TenantUserInTenantResponse.d.ts → TenantUserResponse.d.ts} +19 -13
  99. package/dist/esm/models/{TenantUserInTenantResponse.js → TenantUserResponse.js} +13 -9
  100. package/dist/esm/models/index.d.ts +9 -6
  101. package/dist/esm/models/index.js +9 -6
  102. package/dist/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
  103. package/dist/models/{DocumentContentPathPart.js → ChunkContentItem.js} +23 -22
  104. package/dist/models/ChunkResponse.d.ts +6 -0
  105. package/dist/models/ChunkResponse.js +2 -0
  106. package/dist/models/DocumentResponse.d.ts +13 -0
  107. package/dist/models/DocumentResponse.js +9 -1
  108. package/dist/models/FolderResponse.d.ts +13 -0
  109. package/dist/models/FolderResponse.js +9 -1
  110. package/dist/models/FolderResponseOrDocumentResponse.d.ts +27 -0
  111. package/dist/models/FolderResponseOrDocumentResponse.js +53 -0
  112. package/dist/models/InviteResponse.d.ts +7 -0
  113. package/dist/models/InviteResponse.js +5 -0
  114. package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
  115. package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +78 -0
  116. package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
  117. package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +78 -0
  118. package/dist/models/PaginatedResponseTenantUserResponse.d.ts +66 -0
  119. package/dist/models/PaginatedResponseTenantUserResponse.js +78 -0
  120. package/dist/models/ScoredChunkResponse.d.ts +6 -0
  121. package/dist/models/ScoredChunkResponse.js +2 -0
  122. package/dist/models/SectionContentItem.d.ts +114 -0
  123. package/dist/models/SectionContentItem.js +94 -0
  124. package/dist/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
  125. package/dist/models/SectionContentItemOrChunkContentItem.js +53 -0
  126. package/dist/models/TenantUserEditRequest.d.ts +48 -0
  127. package/dist/models/TenantUserEditRequest.js +53 -0
  128. package/dist/models/{TenantUserInTenantResponse.d.ts → TenantUserResponse.d.ts} +19 -13
  129. package/dist/models/{TenantUserInTenantResponse.js → TenantUserResponse.js} +19 -15
  130. package/dist/models/index.d.ts +9 -6
  131. package/dist/models/index.js +9 -6
  132. package/docs/AuthApi.md +707 -0
  133. package/docs/BulkTagRequest.md +35 -0
  134. package/docs/ChunkContentItem.md +59 -0
  135. package/docs/ChunkLineageResponse.md +41 -0
  136. package/docs/ChunkLineagesApi.md +230 -0
  137. package/docs/ChunkMetadataInput.md +37 -0
  138. package/docs/ChunkMetadataOutput.md +37 -0
  139. package/docs/ChunkResponse.md +63 -0
  140. package/docs/ChunkSearchRequest.md +47 -0
  141. package/docs/ChunkType.md +33 -0
  142. package/docs/ChunksApi.md +446 -0
  143. package/docs/ClearVersionContentsResponse.md +35 -0
  144. package/docs/CreateChunkLineageRequest.md +37 -0
  145. package/docs/CreateChunkRequest.md +43 -0
  146. package/docs/CreateDocumentRequest.md +41 -0
  147. package/docs/CreateFolderRequest.md +37 -0
  148. package/docs/CreatePasswordUserRequest.md +36 -0
  149. package/docs/CreatePermissionRequest.md +40 -0
  150. package/docs/CreateSectionRequest.md +41 -0
  151. package/docs/CreateTagRequest.md +39 -0
  152. package/docs/CreateTenantRequest.md +37 -0
  153. package/docs/CreateThreadMessageRequest.md +37 -0
  154. package/docs/CreateThreadRequest.md +37 -0
  155. package/docs/DefaultApi.md +128 -0
  156. package/docs/DocumentOrigin.md +33 -0
  157. package/docs/DocumentResponse.md +63 -0
  158. package/docs/DocumentType.md +33 -0
  159. package/docs/DocumentVersionMetadata.md +47 -0
  160. package/docs/DocumentVersionMetadataUpdate.md +47 -0
  161. package/docs/DocumentVersionResponse.md +57 -0
  162. package/docs/DocumentVersionsApi.md +530 -0
  163. package/docs/DocumentsApi.md +464 -0
  164. package/docs/EmailSentResponse.md +34 -0
  165. package/docs/EmailVerificationRequest.md +34 -0
  166. package/docs/EmbeddingModel.md +33 -0
  167. package/docs/FolderResponse.md +55 -0
  168. package/docs/FolderResponseOrDocumentResponse.md +62 -0
  169. package/docs/FoldersApi.md +473 -0
  170. package/docs/HTTPValidationError.md +34 -0
  171. package/docs/HealthCheckResponse.md +36 -0
  172. package/docs/IdpType.md +33 -0
  173. package/docs/IngestDocumentResponse.md +39 -0
  174. package/docs/InviteResponse.md +53 -0
  175. package/docs/InviteStatus.md +32 -0
  176. package/docs/InviteUserRequest.md +38 -0
  177. package/docs/InvitesApi.md +305 -0
  178. package/docs/LineageEdgeResponse.md +37 -0
  179. package/docs/LineageGraphResponse.md +37 -0
  180. package/docs/LineageNodeResponse.md +47 -0
  181. package/docs/LocationInner.md +32 -0
  182. package/docs/MessageRole.md +33 -0
  183. package/docs/OAuth2Config.md +41 -0
  184. package/docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md +40 -0
  185. package/docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md +40 -0
  186. package/docs/PaginatedResponseDocumentResponse.md +40 -0
  187. package/docs/PaginatedResponseDocumentVersionResponse.md +40 -0
  188. package/docs/PaginatedResponseFolderResponse.md +40 -0
  189. package/docs/PaginatedResponseInviteResponse.md +40 -0
  190. package/docs/PaginatedResponsePathPartResponse.md +40 -0
  191. package/docs/PaginatedResponsePermissionResponse.md +40 -0
  192. package/docs/PaginatedResponseTagResponse.md +40 -0
  193. package/docs/PaginatedResponseTenantResponse.md +40 -0
  194. package/docs/PaginatedResponseTenantUserResponse.md +40 -0
  195. package/docs/PaginatedResponseThreadMessageResponse.md +40 -0
  196. package/docs/PaginatedResponseThreadResponse.md +40 -0
  197. package/docs/PaginatedResponseWorkflowSummaryResponse.md +40 -0
  198. package/docs/PartType.md +33 -0
  199. package/docs/PasswordResetRequest.md +36 -0
  200. package/docs/PasswordResetWithTokenRequest.md +36 -0
  201. package/docs/PathOrder.md +33 -0
  202. package/docs/PathPartResponse.md +53 -0
  203. package/docs/PathPartTagsResponse.md +35 -0
  204. package/docs/PathPartsApi.md +314 -0
  205. package/docs/PermissionCapability.md +33 -0
  206. package/docs/PermissionResponse.md +48 -0
  207. package/docs/PipelineState.md +45 -0
  208. package/docs/PipelineStatus.md +33 -0
  209. package/docs/Polygon.md +41 -0
  210. package/docs/PolygonReference.md +37 -0
  211. package/docs/RootResponse.md +36 -0
  212. package/docs/ScoredChunkResponse.md +65 -0
  213. package/docs/SectionContentItem.md +55 -0
  214. package/docs/SectionContentItemOrChunkContentItem.md +60 -0
  215. package/docs/SectionResponse.md +57 -0
  216. package/docs/SectionsApi.md +299 -0
  217. package/docs/SignInRequest.md +38 -0
  218. package/docs/TagResponse.md +47 -0
  219. package/docs/TagsApi.md +374 -0
  220. package/docs/TenantResponse.md +39 -0
  221. package/docs/TenantUserEditRequest.md +35 -0
  222. package/docs/TenantUserResponse.md +43 -0
  223. package/docs/TenantUserRole.md +33 -0
  224. package/docs/TenantsApi.md +605 -0
  225. package/docs/ThreadMessageResponse.md +53 -0
  226. package/docs/ThreadMessagesApi.md +239 -0
  227. package/docs/ThreadResponse.md +49 -0
  228. package/docs/ThreadsApi.md +455 -0
  229. package/docs/UpdateChunkContentRequest.md +37 -0
  230. package/docs/UpdateChunkMetadataRequest.md +35 -0
  231. package/docs/UpdateDocumentRequest.md +39 -0
  232. package/docs/UpdateFolderRequest.md +37 -0
  233. package/docs/UpdatePermissionRequest.md +36 -0
  234. package/docs/UpdateSectionRequest.md +41 -0
  235. package/docs/UpdateTagRequest.md +39 -0
  236. package/docs/UpdateTenantRequest.md +37 -0
  237. package/docs/UpdateThreadRequest.md +37 -0
  238. package/docs/UpdateUserRequest.md +34 -0
  239. package/docs/UserPermissionsApi.md +314 -0
  240. package/docs/UserResponse.md +44 -0
  241. package/docs/UsersApi.md +149 -0
  242. package/docs/ValidationError.md +42 -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 +137 -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 +94 -20
  258. package/src/apis/SectionsApi.ts +89 -20
  259. package/src/apis/TagsApi.ts +112 -25
  260. package/src/apis/TenantsApi.ts +339 -37
  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/{DocumentContentPathPart.ts → ChunkContentItem.ts} +42 -53
  267. package/src/models/ChunkResponse.ts +8 -0
  268. package/src/models/DocumentResponse.ts +16 -0
  269. package/src/models/FolderResponse.ts +18 -0
  270. package/src/models/FolderResponseOrDocumentResponse.ts +72 -0
  271. package/src/models/InviteResponse.ts +19 -0
  272. package/src/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.ts +130 -0
  273. package/src/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.ts +130 -0
  274. package/src/models/{PaginatedResponseFolderDocumentResponse.ts → PaginatedResponseTenantUserResponse.ts} +25 -25
  275. package/src/models/ScoredChunkResponse.ts +8 -0
  276. package/src/models/SectionContentItem.ts +181 -0
  277. package/src/models/SectionContentItemOrChunkContentItem.ts +72 -0
  278. package/src/models/TenantUserEditRequest.ts +93 -0
  279. package/src/models/{TenantUserInTenantResponse.ts → TenantUserResponse.ts} +24 -15
  280. package/src/models/index.ts +9 -6
  281. package/dist/esm/models/FolderDocumentResponse.d.ts +0 -157
  282. package/dist/esm/models/FolderDocumentResponse.js +0 -99
  283. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
  284. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +0 -70
  285. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
  286. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +0 -70
  287. package/dist/esm/models/PaginatedResponseTenantUserInTenantResponse.d.ts +0 -66
  288. package/dist/models/FolderDocumentResponse.d.ts +0 -157
  289. package/dist/models/FolderDocumentResponse.js +0 -107
  290. package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
  291. package/dist/models/PaginatedResponseDocumentContentPathPart.js +0 -78
  292. package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
  293. package/dist/models/PaginatedResponseFolderDocumentResponse.js +0 -78
  294. package/dist/models/PaginatedResponseTenantUserInTenantResponse.d.ts +0 -66
  295. package/dist/models/PaginatedResponseTenantUserInTenantResponse.js +0 -78
  296. package/src/models/FolderDocumentResponse.ts +0 -267
  297. package/src/models/PaginatedResponseDocumentContentPathPart.ts +0 -130
  298. package/src/models/PaginatedResponseTenantUserInTenantResponse.ts +0 -130
@@ -0,0 +1,464 @@
1
+ # DocumentsApi
2
+
3
+ All URIs are relative to *http://localhost:8000*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**createDocument**](DocumentsApi.md#createdocumentoperation) | **POST** /v1/documents | Create Document Handler |
8
+ | [**deleteDocument**](DocumentsApi.md#deletedocument) | **DELETE** /v1/documents/{document_id} | Delete Document Handler |
9
+ | [**getDocument**](DocumentsApi.md#getdocument) | **GET** /v1/documents/{document_id} | Get Document Handler |
10
+ | [**ingestDocument**](DocumentsApi.md#ingestdocument) | **POST** /v1/documents/ingest | Ingest Document Handler |
11
+ | [**listDocuments**](DocumentsApi.md#listdocuments) | **GET** /v1/documents | List Documents Handler |
12
+ | [**updateDocument**](DocumentsApi.md#updatedocumentoperation) | **PATCH** /v1/documents/{document_id} | Update Document Handler |
13
+
14
+
15
+
16
+ ## createDocument
17
+
18
+ > DocumentResponse createDocument(createDocumentRequest, ksUat)
19
+
20
+ Create Document Handler
21
+
22
+ Create a new document with initial v0 version. The document is created as a child of the specified parent folder. An initial version (v0) is automatically created.
23
+
24
+ ### Example
25
+
26
+ ```ts
27
+ import {
28
+ Configuration,
29
+ DocumentsApi,
30
+ } from '@knowledge-stack/ksapi';
31
+ import type { CreateDocumentOperationRequest } from '@knowledge-stack/ksapi';
32
+
33
+ async function example() {
34
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
35
+ const api = new DocumentsApi();
36
+
37
+ const body = {
38
+ // CreateDocumentRequest
39
+ createDocumentRequest: ...,
40
+ // string (optional)
41
+ ksUat: ksUat_example,
42
+ } satisfies CreateDocumentOperationRequest;
43
+
44
+ try {
45
+ const data = await api.createDocument(body);
46
+ console.log(data);
47
+ } catch (error) {
48
+ console.error(error);
49
+ }
50
+ }
51
+
52
+ // Run the test
53
+ example().catch(console.error);
54
+ ```
55
+
56
+ ### Parameters
57
+
58
+
59
+ | Name | Type | Description | Notes |
60
+ |------------- | ------------- | ------------- | -------------|
61
+ | **createDocumentRequest** | [CreateDocumentRequest](CreateDocumentRequest.md) | | |
62
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
63
+
64
+ ### Return type
65
+
66
+ [**DocumentResponse**](DocumentResponse.md)
67
+
68
+ ### Authorization
69
+
70
+ No authorization required
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: `application/json`
75
+ - **Accept**: `application/json`
76
+
77
+
78
+ ### HTTP response details
79
+ | Status code | Description | Response headers |
80
+ |-------------|-------------|------------------|
81
+ | **201** | Successful Response | - |
82
+ | **422** | Validation Error | - |
83
+
84
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
85
+
86
+
87
+ ## deleteDocument
88
+
89
+ > deleteDocument(documentId, ksUat)
90
+
91
+ Delete Document Handler
92
+
93
+ Delete a document and all its contents. WARNING: This cascades to all children (versions, sections, chunks, etc.) due to parent_id ON DELETE CASCADE.
94
+
95
+ ### Example
96
+
97
+ ```ts
98
+ import {
99
+ Configuration,
100
+ DocumentsApi,
101
+ } from '@knowledge-stack/ksapi';
102
+ import type { DeleteDocumentRequest } from '@knowledge-stack/ksapi';
103
+
104
+ async function example() {
105
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
106
+ const api = new DocumentsApi();
107
+
108
+ const body = {
109
+ // string
110
+ documentId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
111
+ // string (optional)
112
+ ksUat: ksUat_example,
113
+ } satisfies DeleteDocumentRequest;
114
+
115
+ try {
116
+ const data = await api.deleteDocument(body);
117
+ console.log(data);
118
+ } catch (error) {
119
+ console.error(error);
120
+ }
121
+ }
122
+
123
+ // Run the test
124
+ example().catch(console.error);
125
+ ```
126
+
127
+ ### Parameters
128
+
129
+
130
+ | Name | Type | Description | Notes |
131
+ |------------- | ------------- | ------------- | -------------|
132
+ | **documentId** | `string` | | [Defaults to `undefined`] |
133
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
134
+
135
+ ### Return type
136
+
137
+ `void` (Empty response body)
138
+
139
+ ### Authorization
140
+
141
+ No authorization required
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: Not defined
146
+ - **Accept**: `application/json`
147
+
148
+
149
+ ### HTTP response details
150
+ | Status code | Description | Response headers |
151
+ |-------------|-------------|------------------|
152
+ | **204** | Successful Response | - |
153
+ | **422** | Validation Error | - |
154
+
155
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
156
+
157
+
158
+ ## getDocument
159
+
160
+ > DocumentResponse getDocument(documentId, withTags, ksUat)
161
+
162
+ Get Document Handler
163
+
164
+ Get a document by its document ID.
165
+
166
+ ### Example
167
+
168
+ ```ts
169
+ import {
170
+ Configuration,
171
+ DocumentsApi,
172
+ } from '@knowledge-stack/ksapi';
173
+ import type { GetDocumentRequest } from '@knowledge-stack/ksapi';
174
+
175
+ async function example() {
176
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
177
+ const api = new DocumentsApi();
178
+
179
+ const body = {
180
+ // string
181
+ documentId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
182
+ // boolean | Include tags in the response (default: false) (optional)
183
+ withTags: true,
184
+ // string (optional)
185
+ ksUat: ksUat_example,
186
+ } satisfies GetDocumentRequest;
187
+
188
+ try {
189
+ const data = await api.getDocument(body);
190
+ console.log(data);
191
+ } catch (error) {
192
+ console.error(error);
193
+ }
194
+ }
195
+
196
+ // Run the test
197
+ example().catch(console.error);
198
+ ```
199
+
200
+ ### Parameters
201
+
202
+
203
+ | Name | Type | Description | Notes |
204
+ |------------- | ------------- | ------------- | -------------|
205
+ | **documentId** | `string` | | [Defaults to `undefined`] |
206
+ | **withTags** | `boolean` | Include tags in the response (default: false) | [Optional] [Defaults to `false`] |
207
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
208
+
209
+ ### Return type
210
+
211
+ [**DocumentResponse**](DocumentResponse.md)
212
+
213
+ ### Authorization
214
+
215
+ No authorization required
216
+
217
+ ### HTTP request headers
218
+
219
+ - **Content-Type**: Not defined
220
+ - **Accept**: `application/json`
221
+
222
+
223
+ ### HTTP response details
224
+ | Status code | Description | Response headers |
225
+ |-------------|-------------|------------------|
226
+ | **200** | Successful Response | - |
227
+ | **422** | Validation Error | - |
228
+
229
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
230
+
231
+
232
+ ## ingestDocument
233
+
234
+ > IngestDocumentResponse ingestDocument(file, pathPartId, ksUat, name)
235
+
236
+ Ingest Document Handler
237
+
238
+ Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
239
+
240
+ ### Example
241
+
242
+ ```ts
243
+ import {
244
+ Configuration,
245
+ DocumentsApi,
246
+ } from '@knowledge-stack/ksapi';
247
+ import type { IngestDocumentRequest } from '@knowledge-stack/ksapi';
248
+
249
+ async function example() {
250
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
251
+ const api = new DocumentsApi();
252
+
253
+ const body = {
254
+ // Blob
255
+ file: BINARY_DATA_HERE,
256
+ // string | Parent path part ID (must be a FOLDER type)
257
+ pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
258
+ // string (optional)
259
+ ksUat: ksUat_example,
260
+ // string | Document name (defaults to filename) (optional)
261
+ name: name_example,
262
+ } satisfies IngestDocumentRequest;
263
+
264
+ try {
265
+ const data = await api.ingestDocument(body);
266
+ console.log(data);
267
+ } catch (error) {
268
+ console.error(error);
269
+ }
270
+ }
271
+
272
+ // Run the test
273
+ example().catch(console.error);
274
+ ```
275
+
276
+ ### Parameters
277
+
278
+
279
+ | Name | Type | Description | Notes |
280
+ |------------- | ------------- | ------------- | -------------|
281
+ | **file** | `Blob` | | [Defaults to `undefined`] |
282
+ | **pathPartId** | `string` | Parent path part ID (must be a FOLDER type) | [Defaults to `undefined`] |
283
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
284
+ | **name** | `string` | Document name (defaults to filename) | [Optional] [Defaults to `undefined`] |
285
+
286
+ ### Return type
287
+
288
+ [**IngestDocumentResponse**](IngestDocumentResponse.md)
289
+
290
+ ### Authorization
291
+
292
+ No authorization required
293
+
294
+ ### HTTP request headers
295
+
296
+ - **Content-Type**: `multipart/form-data`
297
+ - **Accept**: `application/json`
298
+
299
+
300
+ ### HTTP response details
301
+ | Status code | Description | Response headers |
302
+ |-------------|-------------|------------------|
303
+ | **201** | Successful Response | - |
304
+ | **422** | Validation Error | - |
305
+
306
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
307
+
308
+
309
+ ## listDocuments
310
+
311
+ > PaginatedResponseDocumentResponse listDocuments(parentPathPartId, sortOrder, withTags, limit, offset, ksUat)
312
+
313
+ List Documents Handler
314
+
315
+ List documents in a folder. Returns only direct child documents (depth=1) of the specified parent folder. If parent_path_part_id is not provided, lists top-level documents.
316
+
317
+ ### Example
318
+
319
+ ```ts
320
+ import {
321
+ Configuration,
322
+ DocumentsApi,
323
+ } from '@knowledge-stack/ksapi';
324
+ import type { ListDocumentsRequest } from '@knowledge-stack/ksapi';
325
+
326
+ async function example() {
327
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
328
+ const api = new DocumentsApi();
329
+
330
+ const body = {
331
+ // string | Parent PathPart ID (defaults to root) (optional)
332
+ parentPathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
333
+ // PathOrder | Sort order for results (default: LOGICAL) (optional)
334
+ sortOrder: ...,
335
+ // boolean | Include tags in the response (default: false) (optional)
336
+ withTags: true,
337
+ // number | Number of items per page (optional)
338
+ limit: 56,
339
+ // number | Number of items to skip (optional)
340
+ offset: 56,
341
+ // string (optional)
342
+ ksUat: ksUat_example,
343
+ } satisfies ListDocumentsRequest;
344
+
345
+ try {
346
+ const data = await api.listDocuments(body);
347
+ console.log(data);
348
+ } catch (error) {
349
+ console.error(error);
350
+ }
351
+ }
352
+
353
+ // Run the test
354
+ example().catch(console.error);
355
+ ```
356
+
357
+ ### Parameters
358
+
359
+
360
+ | Name | Type | Description | Notes |
361
+ |------------- | ------------- | ------------- | -------------|
362
+ | **parentPathPartId** | `string` | Parent PathPart ID (defaults to root) | [Optional] [Defaults to `undefined`] |
363
+ | **sortOrder** | `PathOrder` | Sort order for results (default: LOGICAL) | [Optional] [Defaults to `undefined`] [Enum: LOGICAL, NAME, UPDATED_AT, CREATED_AT] |
364
+ | **withTags** | `boolean` | Include tags in the response (default: false) | [Optional] [Defaults to `false`] |
365
+ | **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
366
+ | **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
367
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
368
+
369
+ ### Return type
370
+
371
+ [**PaginatedResponseDocumentResponse**](PaginatedResponseDocumentResponse.md)
372
+
373
+ ### Authorization
374
+
375
+ No authorization required
376
+
377
+ ### HTTP request headers
378
+
379
+ - **Content-Type**: Not defined
380
+ - **Accept**: `application/json`
381
+
382
+
383
+ ### HTTP response details
384
+ | Status code | Description | Response headers |
385
+ |-------------|-------------|------------------|
386
+ | **200** | Successful Response | - |
387
+ | **422** | Validation Error | - |
388
+
389
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
390
+
391
+
392
+ ## updateDocument
393
+
394
+ > DocumentResponse updateDocument(documentId, updateDocumentRequest, ksUat)
395
+
396
+ Update Document Handler
397
+
398
+ Update a document (rename, move, and/or change active version). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. All can be done in a single request.
399
+
400
+ ### Example
401
+
402
+ ```ts
403
+ import {
404
+ Configuration,
405
+ DocumentsApi,
406
+ } from '@knowledge-stack/ksapi';
407
+ import type { UpdateDocumentOperationRequest } from '@knowledge-stack/ksapi';
408
+
409
+ async function example() {
410
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
411
+ const api = new DocumentsApi();
412
+
413
+ const body = {
414
+ // string
415
+ documentId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
416
+ // UpdateDocumentRequest
417
+ updateDocumentRequest: ...,
418
+ // string (optional)
419
+ ksUat: ksUat_example,
420
+ } satisfies UpdateDocumentOperationRequest;
421
+
422
+ try {
423
+ const data = await api.updateDocument(body);
424
+ console.log(data);
425
+ } catch (error) {
426
+ console.error(error);
427
+ }
428
+ }
429
+
430
+ // Run the test
431
+ example().catch(console.error);
432
+ ```
433
+
434
+ ### Parameters
435
+
436
+
437
+ | Name | Type | Description | Notes |
438
+ |------------- | ------------- | ------------- | -------------|
439
+ | **documentId** | `string` | | [Defaults to `undefined`] |
440
+ | **updateDocumentRequest** | [UpdateDocumentRequest](UpdateDocumentRequest.md) | | |
441
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
442
+
443
+ ### Return type
444
+
445
+ [**DocumentResponse**](DocumentResponse.md)
446
+
447
+ ### Authorization
448
+
449
+ No authorization required
450
+
451
+ ### HTTP request headers
452
+
453
+ - **Content-Type**: `application/json`
454
+ - **Accept**: `application/json`
455
+
456
+
457
+ ### HTTP response details
458
+ | Status code | Description | Response headers |
459
+ |-------------|-------------|------------------|
460
+ | **200** | Successful Response | - |
461
+ | **422** | Validation Error | - |
462
+
463
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
464
+
@@ -0,0 +1,34 @@
1
+
2
+ # EmailSentResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `emailId` | string
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { EmailSentResponse } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "emailId": null,
19
+ } satisfies EmailSentResponse
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as EmailSentResponse
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,34 @@
1
+
2
+ # EmailVerificationRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `email` | string
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { EmailVerificationRequest } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "email": null,
19
+ } satisfies EmailVerificationRequest
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as EmailVerificationRequest
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,33 @@
1
+
2
+ # EmbeddingModel
3
+
4
+ Supported embedding models.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { EmbeddingModel } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies EmbeddingModel
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as EmbeddingModel
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+
@@ -0,0 +1,55 @@
1
+
2
+ # FolderResponse
3
+
4
+ Folder response model.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `partType` | string
11
+ `id` | string
12
+ `pathPartId` | string
13
+ `name` | string
14
+ `parentPathPartId` | string
15
+ `materializedPath` | string
16
+ `systemManaged` | boolean
17
+ `tenantId` | string
18
+ `createdAt` | Date
19
+ `updatedAt` | Date
20
+ `tags` | [Array<TagResponse>](TagResponse.md)
21
+
22
+ ## Example
23
+
24
+ ```typescript
25
+ import type { FolderResponse } from '@knowledge-stack/ksapi'
26
+
27
+ // TODO: Update the object below with actual values
28
+ const example = {
29
+ "partType": null,
30
+ "id": null,
31
+ "pathPartId": null,
32
+ "name": null,
33
+ "parentPathPartId": null,
34
+ "materializedPath": null,
35
+ "systemManaged": null,
36
+ "tenantId": null,
37
+ "createdAt": null,
38
+ "updatedAt": null,
39
+ "tags": null,
40
+ } satisfies FolderResponse
41
+
42
+ console.log(example)
43
+
44
+ // Convert the instance to a JSON string
45
+ const exampleJSON: string = JSON.stringify(example)
46
+ console.log(exampleJSON)
47
+
48
+ // Parse the JSON string back to an object
49
+ const exampleParsed = JSON.parse(exampleJSON) as FolderResponse
50
+ console.log(exampleParsed)
51
+ ```
52
+
53
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
54
+
55
+
@@ -0,0 +1,62 @@
1
+
2
+ # FolderResponseOrDocumentResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `partType` | string
10
+ `id` | string
11
+ `pathPartId` | string
12
+ `name` | string
13
+ `parentPathPartId` | string
14
+ `materializedPath` | string
15
+ `systemManaged` | boolean
16
+ `tenantId` | string
17
+ `createdAt` | Date
18
+ `updatedAt` | Date
19
+ `tags` | [Array<TagResponse>](TagResponse.md)
20
+ `documentType` | [DocumentType](DocumentType.md)
21
+ `documentOrigin` | [DocumentOrigin](DocumentOrigin.md)
22
+ `activeVersionId` | string
23
+ `activeVersion` | [DocumentVersionResponse](DocumentVersionResponse.md)
24
+
25
+ ## Example
26
+
27
+ ```typescript
28
+ import type { FolderResponseOrDocumentResponse } from '@knowledge-stack/ksapi'
29
+
30
+ // TODO: Update the object below with actual values
31
+ const example = {
32
+ "partType": null,
33
+ "id": null,
34
+ "pathPartId": null,
35
+ "name": null,
36
+ "parentPathPartId": null,
37
+ "materializedPath": null,
38
+ "systemManaged": null,
39
+ "tenantId": null,
40
+ "createdAt": null,
41
+ "updatedAt": null,
42
+ "tags": null,
43
+ "documentType": null,
44
+ "documentOrigin": null,
45
+ "activeVersionId": null,
46
+ "activeVersion": null,
47
+ } satisfies FolderResponseOrDocumentResponse
48
+
49
+ console.log(example)
50
+
51
+ // Convert the instance to a JSON string
52
+ const exampleJSON: string = JSON.stringify(example)
53
+ console.log(exampleJSON)
54
+
55
+ // Parse the JSON string back to an object
56
+ const exampleParsed = JSON.parse(exampleJSON) as FolderResponseOrDocumentResponse
57
+ console.log(exampleParsed)
58
+ ```
59
+
60
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
61
+
62
+