@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
@@ -21,16 +21,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { ChunkResponseFromJSON, ChunkSearchRequestToJSON, CreateChunkRequestToJSON, ScoredChunkResponseFromJSON, UpdateChunkContentRequestToJSON, UpdateChunkMetadataRequestToJSON, } from '../models/index';
24
+ import { ChunkBulkResponseFromJSON, ChunkResponseFromJSON, ChunkSearchRequestToJSON, CreateChunkRequestToJSON, ScoredChunkResponseFromJSON, UpdateChunkContentRequestToJSON, UpdateChunkMetadataRequestToJSON, VersionChunkIdsResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class ChunksApi extends runtime.BaseAPI {
29
29
  /**
30
- * Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
31
- * Create Chunk Handler
30
+ * Creates request options for createChunk without sending the request
32
31
  */
33
- createChunkRaw(requestParameters, initOverrides) {
32
+ createChunkRequestOpts(requestParameters) {
34
33
  return __awaiter(this, void 0, void 0, function* () {
35
34
  if (requestParameters['createChunkRequest'] == null) {
36
35
  throw new runtime.RequiredError('createChunkRequest', 'Required parameter "createChunkRequest" was null or undefined when calling createChunk().');
@@ -39,13 +38,23 @@ export class ChunksApi extends runtime.BaseAPI {
39
38
  const headerParameters = {};
40
39
  headerParameters['Content-Type'] = 'application/json';
41
40
  let urlPath = `/v1/chunks`;
42
- const response = yield this.request({
41
+ return {
43
42
  path: urlPath,
44
43
  method: 'POST',
45
44
  headers: headerParameters,
46
45
  query: queryParameters,
47
46
  body: CreateChunkRequestToJSON(requestParameters['createChunkRequest']),
48
- }, initOverrides);
47
+ };
48
+ });
49
+ }
50
+ /**
51
+ * Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
52
+ * Create Chunk Handler
53
+ */
54
+ createChunkRaw(requestParameters, initOverrides) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const requestOptions = yield this.createChunkRequestOpts(requestParameters);
57
+ const response = yield this.request(requestOptions, initOverrides);
49
58
  return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
50
59
  });
51
60
  }
@@ -60,10 +69,9 @@ export class ChunksApi extends runtime.BaseAPI {
60
69
  });
61
70
  }
62
71
  /**
63
- * Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
64
- * Delete Chunk Handler
72
+ * Creates request options for deleteChunk without sending the request
65
73
  */
66
- deleteChunkRaw(requestParameters, initOverrides) {
74
+ deleteChunkRequestOpts(requestParameters) {
67
75
  return __awaiter(this, void 0, void 0, function* () {
68
76
  if (requestParameters['chunkId'] == null) {
69
77
  throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling deleteChunk().');
@@ -72,12 +80,22 @@ export class ChunksApi extends runtime.BaseAPI {
72
80
  const headerParameters = {};
73
81
  let urlPath = `/v1/chunks/{chunk_id}`;
74
82
  urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
75
- const response = yield this.request({
83
+ return {
76
84
  path: urlPath,
77
85
  method: 'DELETE',
78
86
  headers: headerParameters,
79
87
  query: queryParameters,
80
- }, initOverrides);
88
+ };
89
+ });
90
+ }
91
+ /**
92
+ * Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
93
+ * Delete Chunk Handler
94
+ */
95
+ deleteChunkRaw(requestParameters, initOverrides) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const requestOptions = yield this.deleteChunkRequestOpts(requestParameters);
98
+ const response = yield this.request(requestOptions, initOverrides);
81
99
  return new runtime.VoidApiResponse(response);
82
100
  });
83
101
  }
@@ -91,10 +109,9 @@ export class ChunksApi extends runtime.BaseAPI {
91
109
  });
92
110
  }
93
111
  /**
94
- * Get a chunk by its ID, including content.
95
- * Get Chunk Handler
112
+ * Creates request options for getChunk without sending the request
96
113
  */
97
- getChunkRaw(requestParameters, initOverrides) {
114
+ getChunkRequestOpts(requestParameters) {
98
115
  return __awaiter(this, void 0, void 0, function* () {
99
116
  if (requestParameters['chunkId'] == null) {
100
117
  throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunk().');
@@ -103,12 +120,22 @@ export class ChunksApi extends runtime.BaseAPI {
103
120
  const headerParameters = {};
104
121
  let urlPath = `/v1/chunks/{chunk_id}`;
105
122
  urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
106
- const response = yield this.request({
123
+ return {
107
124
  path: urlPath,
108
125
  method: 'GET',
109
126
  headers: headerParameters,
110
127
  query: queryParameters,
111
- }, initOverrides);
128
+ };
129
+ });
130
+ }
131
+ /**
132
+ * Get a chunk by its ID, including content.
133
+ * Get Chunk Handler
134
+ */
135
+ getChunkRaw(requestParameters, initOverrides) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ const requestOptions = yield this.getChunkRequestOpts(requestParameters);
138
+ const response = yield this.request(requestOptions, initOverrides);
112
139
  return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
113
140
  });
114
141
  }
@@ -123,10 +150,92 @@ export class ChunksApi extends runtime.BaseAPI {
123
150
  });
124
151
  }
125
152
  /**
126
- * Semantic search over chunks using vector similarity. Combines pgvector cosine similarity with path-based authorization and optional metadata filters. Uses a two-session design to avoid holding a DB connection during the external embedding API call.
127
- * Search Chunks Handler
153
+ * Creates request options for getChunksBulk without sending the request
128
154
  */
129
- searchChunksRaw(requestParameters, initOverrides) {
155
+ getChunksBulkRequestOpts(requestParameters) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const queryParameters = {};
158
+ if (requestParameters['chunkIds'] != null) {
159
+ queryParameters['chunk_ids'] = requestParameters['chunkIds'];
160
+ }
161
+ const headerParameters = {};
162
+ let urlPath = `/v1/chunks/bulk`;
163
+ return {
164
+ path: urlPath,
165
+ method: 'GET',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ };
169
+ });
170
+ }
171
+ /**
172
+ * Batch-fetch chunks with their full ancestor path part IDs. Returns standard chunk data plus path_part_id_segments (the ordered ancestor chain from root to chunk) for each requested chunk. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
173
+ * Get Chunks Bulk Handler
174
+ */
175
+ getChunksBulkRaw(requestParameters, initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const requestOptions = yield this.getChunksBulkRequestOpts(requestParameters);
178
+ const response = yield this.request(requestOptions, initOverrides);
179
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ChunkBulkResponseFromJSON));
180
+ });
181
+ }
182
+ /**
183
+ * Batch-fetch chunks with their full ancestor path part IDs. Returns standard chunk data plus path_part_id_segments (the ordered ancestor chain from root to chunk) for each requested chunk. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
184
+ * Get Chunks Bulk Handler
185
+ */
186
+ getChunksBulk() {
187
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
188
+ const response = yield this.getChunksBulkRaw(requestParameters, initOverrides);
189
+ return yield response.value();
190
+ });
191
+ }
192
+ /**
193
+ * Creates request options for getVersionChunkIds without sending the request
194
+ */
195
+ getVersionChunkIdsRequestOpts(requestParameters) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ if (requestParameters['documentVersionId'] == null) {
198
+ throw new runtime.RequiredError('documentVersionId', 'Required parameter "documentVersionId" was null or undefined when calling getVersionChunkIds().');
199
+ }
200
+ const queryParameters = {};
201
+ if (requestParameters['documentVersionId'] != null) {
202
+ queryParameters['document_version_id'] = requestParameters['documentVersionId'];
203
+ }
204
+ const headerParameters = {};
205
+ let urlPath = `/v1/chunks/version-chunk-ids`;
206
+ return {
207
+ path: urlPath,
208
+ method: 'GET',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ };
212
+ });
213
+ }
214
+ /**
215
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
216
+ * Get Version Chunk Ids Handler
217
+ */
218
+ getVersionChunkIdsRaw(requestParameters, initOverrides) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ const requestOptions = yield this.getVersionChunkIdsRequestOpts(requestParameters);
221
+ const response = yield this.request(requestOptions, initOverrides);
222
+ return new runtime.JSONApiResponse(response, (jsonValue) => VersionChunkIdsResponseFromJSON(jsonValue));
223
+ });
224
+ }
225
+ /**
226
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
227
+ * Get Version Chunk Ids Handler
228
+ */
229
+ getVersionChunkIds(requestParameters, initOverrides) {
230
+ return __awaiter(this, void 0, void 0, function* () {
231
+ const response = yield this.getVersionChunkIdsRaw(requestParameters, initOverrides);
232
+ return yield response.value();
233
+ });
234
+ }
235
+ /**
236
+ * Creates request options for searchChunks without sending the request
237
+ */
238
+ searchChunksRequestOpts(requestParameters) {
130
239
  return __awaiter(this, void 0, void 0, function* () {
131
240
  if (requestParameters['chunkSearchRequest'] == null) {
132
241
  throw new runtime.RequiredError('chunkSearchRequest', 'Required parameter "chunkSearchRequest" was null or undefined when calling searchChunks().');
@@ -135,18 +244,28 @@ export class ChunksApi extends runtime.BaseAPI {
135
244
  const headerParameters = {};
136
245
  headerParameters['Content-Type'] = 'application/json';
137
246
  let urlPath = `/v1/chunks/search`;
138
- const response = yield this.request({
247
+ return {
139
248
  path: urlPath,
140
249
  method: 'POST',
141
250
  headers: headerParameters,
142
251
  query: queryParameters,
143
252
  body: ChunkSearchRequestToJSON(requestParameters['chunkSearchRequest']),
144
- }, initOverrides);
253
+ };
254
+ });
255
+ }
256
+ /**
257
+ * Semantic search over chunks using Qdrant vector similarity. Combines vector similarity with path-based authorization and optional metadata filters. Uses Qdrant for vector search and hydrates results from Postgres.
258
+ * Search Chunks Handler
259
+ */
260
+ searchChunksRaw(requestParameters, initOverrides) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ const requestOptions = yield this.searchChunksRequestOpts(requestParameters);
263
+ const response = yield this.request(requestOptions, initOverrides);
145
264
  return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ScoredChunkResponseFromJSON));
146
265
  });
147
266
  }
148
267
  /**
149
- * Semantic search over chunks using vector similarity. Combines pgvector cosine similarity with path-based authorization and optional metadata filters. Uses a two-session design to avoid holding a DB connection during the external embedding API call.
268
+ * Semantic search over chunks using Qdrant vector similarity. Combines vector similarity with path-based authorization and optional metadata filters. Uses Qdrant for vector search and hydrates results from Postgres.
150
269
  * Search Chunks Handler
151
270
  */
152
271
  searchChunks(requestParameters, initOverrides) {
@@ -156,10 +275,9 @@ export class ChunksApi extends runtime.BaseAPI {
156
275
  });
157
276
  }
158
277
  /**
159
- * Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
160
- * Update Chunk Content Handler
278
+ * Creates request options for updateChunkContent without sending the request
161
279
  */
162
- updateChunkContentRaw(requestParameters, initOverrides) {
280
+ updateChunkContentRequestOpts(requestParameters) {
163
281
  return __awaiter(this, void 0, void 0, function* () {
164
282
  if (requestParameters['chunkId'] == null) {
165
283
  throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling updateChunkContent().');
@@ -172,13 +290,23 @@ export class ChunksApi extends runtime.BaseAPI {
172
290
  headerParameters['Content-Type'] = 'application/json';
173
291
  let urlPath = `/v1/chunks/{chunk_id}/content`;
174
292
  urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
175
- const response = yield this.request({
293
+ return {
176
294
  path: urlPath,
177
295
  method: 'PATCH',
178
296
  headers: headerParameters,
179
297
  query: queryParameters,
180
298
  body: UpdateChunkContentRequestToJSON(requestParameters['updateChunkContentRequest']),
181
- }, initOverrides);
299
+ };
300
+ });
301
+ }
302
+ /**
303
+ * Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
304
+ * Update Chunk Content Handler
305
+ */
306
+ updateChunkContentRaw(requestParameters, initOverrides) {
307
+ return __awaiter(this, void 0, void 0, function* () {
308
+ const requestOptions = yield this.updateChunkContentRequestOpts(requestParameters);
309
+ const response = yield this.request(requestOptions, initOverrides);
182
310
  return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
183
311
  });
184
312
  }
@@ -193,10 +321,9 @@ export class ChunksApi extends runtime.BaseAPI {
193
321
  });
194
322
  }
195
323
  /**
196
- * Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
197
- * Update Chunk Metadata Handler
324
+ * Creates request options for updateChunkMetadata without sending the request
198
325
  */
199
- updateChunkMetadataRaw(requestParameters, initOverrides) {
326
+ updateChunkMetadataRequestOpts(requestParameters) {
200
327
  return __awaiter(this, void 0, void 0, function* () {
201
328
  if (requestParameters['chunkId'] == null) {
202
329
  throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling updateChunkMetadata().');
@@ -209,13 +336,23 @@ export class ChunksApi extends runtime.BaseAPI {
209
336
  headerParameters['Content-Type'] = 'application/json';
210
337
  let urlPath = `/v1/chunks/{chunk_id}`;
211
338
  urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
212
- const response = yield this.request({
339
+ return {
213
340
  path: urlPath,
214
341
  method: 'PATCH',
215
342
  headers: headerParameters,
216
343
  query: queryParameters,
217
344
  body: UpdateChunkMetadataRequestToJSON(requestParameters['updateChunkMetadataRequest']),
218
- }, initOverrides);
345
+ };
346
+ });
347
+ }
348
+ /**
349
+ * Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
350
+ * Update Chunk Metadata Handler
351
+ */
352
+ updateChunkMetadataRaw(requestParameters, initOverrides) {
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ const requestOptions = yield this.updateChunkMetadataRequestOpts(requestParameters);
355
+ const response = yield this.request(requestOptions, initOverrides);
219
356
  return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
220
357
  });
221
358
  }
@@ -18,6 +18,12 @@ import type { HealthCheckResponse, RootResponse } from '../models/index';
18
18
  * @interface DefaultApiInterface
19
19
  */
20
20
  export interface DefaultApiInterface {
21
+ /**
22
+ * Creates request options for healthCheck without sending the request
23
+ * @throws {RequiredError}
24
+ * @memberof DefaultApiInterface
25
+ */
26
+ healthCheckRequestOpts(): Promise<runtime.RequestOpts>;
21
27
  /**
22
28
  * Health check endpoint.
23
29
  * @summary Health Check Handler
@@ -31,6 +37,12 @@ export interface DefaultApiInterface {
31
37
  * Health Check Handler
32
38
  */
33
39
  healthCheck(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HealthCheckResponse>;
40
+ /**
41
+ * Creates request options for hello without sending the request
42
+ * @throws {RequiredError}
43
+ * @memberof DefaultApiInterface
44
+ */
45
+ helloRequestOpts(): Promise<runtime.RequestOpts>;
34
46
  /**
35
47
  * Root endpoint.
36
48
  * @summary Root Handler
@@ -49,6 +61,10 @@ export interface DefaultApiInterface {
49
61
  *
50
62
  */
51
63
  export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
64
+ /**
65
+ * Creates request options for healthCheck without sending the request
66
+ */
67
+ healthCheckRequestOpts(): Promise<runtime.RequestOpts>;
52
68
  /**
53
69
  * Health check endpoint.
54
70
  * Health Check Handler
@@ -59,6 +75,10 @@ export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInt
59
75
  * Health Check Handler
60
76
  */
61
77
  healthCheck(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HealthCheckResponse>;
78
+ /**
79
+ * Creates request options for hello without sending the request
80
+ */
81
+ helloRequestOpts(): Promise<runtime.RequestOpts>;
62
82
  /**
63
83
  * Root endpoint.
64
84
  * Root Handler
@@ -27,20 +27,29 @@ import { HealthCheckResponseFromJSON, RootResponseFromJSON, } from '../models/in
27
27
  */
28
28
  export class DefaultApi extends runtime.BaseAPI {
29
29
  /**
30
- * Health check endpoint.
31
- * Health Check Handler
30
+ * Creates request options for healthCheck without sending the request
32
31
  */
33
- healthCheckRaw(initOverrides) {
32
+ healthCheckRequestOpts() {
34
33
  return __awaiter(this, void 0, void 0, function* () {
35
34
  const queryParameters = {};
36
35
  const headerParameters = {};
37
36
  let urlPath = `/healthz`;
38
- const response = yield this.request({
37
+ return {
39
38
  path: urlPath,
40
39
  method: 'GET',
41
40
  headers: headerParameters,
42
41
  query: queryParameters,
43
- }, initOverrides);
42
+ };
43
+ });
44
+ }
45
+ /**
46
+ * Health check endpoint.
47
+ * Health Check Handler
48
+ */
49
+ healthCheckRaw(initOverrides) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const requestOptions = yield this.healthCheckRequestOpts();
52
+ const response = yield this.request(requestOptions, initOverrides);
44
53
  return new runtime.JSONApiResponse(response, (jsonValue) => HealthCheckResponseFromJSON(jsonValue));
45
54
  });
46
55
  }
@@ -55,20 +64,29 @@ export class DefaultApi extends runtime.BaseAPI {
55
64
  });
56
65
  }
57
66
  /**
58
- * Root endpoint.
59
- * Root Handler
67
+ * Creates request options for hello without sending the request
60
68
  */
61
- helloRaw(initOverrides) {
69
+ helloRequestOpts() {
62
70
  return __awaiter(this, void 0, void 0, function* () {
63
71
  const queryParameters = {};
64
72
  const headerParameters = {};
65
73
  let urlPath = `/`;
66
- const response = yield this.request({
74
+ return {
67
75
  path: urlPath,
68
76
  method: 'GET',
69
77
  headers: headerParameters,
70
78
  query: queryParameters,
71
- }, initOverrides);
79
+ };
80
+ });
81
+ }
82
+ /**
83
+ * Root endpoint.
84
+ * Root Handler
85
+ */
86
+ helloRaw(initOverrides) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const requestOptions = yield this.helloRequestOpts();
89
+ const response = yield this.request(requestOptions, initOverrides);
72
90
  return new runtime.JSONApiResponse(response, (jsonValue) => RootResponseFromJSON(jsonValue));
73
91
  });
74
92
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ClearVersionContentsResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseDocumentContentPathPart, PaginatedResponseDocumentVersionResponse } from '../models/index';
13
+ import type { ClearVersionContentsResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
14
14
  export interface ClearDocumentVersionContentsRequest {
15
15
  versionId: string;
16
16
  ksUat?: string | null;
@@ -52,6 +52,14 @@ export interface UpdateDocumentVersionMetadataRequest {
52
52
  * @interface DocumentVersionsApiInterface
53
53
  */
54
54
  export interface DocumentVersionsApiInterface {
55
+ /**
56
+ * Creates request options for clearDocumentVersionContents without sending the request
57
+ * @param {string} versionId DocumentVersion ID
58
+ * @param {string} [ksUat]
59
+ * @throws {RequiredError}
60
+ * @memberof DocumentVersionsApiInterface
61
+ */
62
+ clearDocumentVersionContentsRequestOpts(requestParameters: ClearDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
55
63
  /**
56
64
  * 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.
57
65
  * @summary Clear Document Version Contents Handler
@@ -67,6 +75,14 @@ export interface DocumentVersionsApiInterface {
67
75
  * Clear Document Version Contents Handler
68
76
  */
69
77
  clearDocumentVersionContents(requestParameters: ClearDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClearVersionContentsResponse>;
78
+ /**
79
+ * Creates request options for createDocumentVersion without sending the request
80
+ * @param {string} documentId Document ID
81
+ * @param {string} [ksUat]
82
+ * @throws {RequiredError}
83
+ * @memberof DocumentVersionsApiInterface
84
+ */
85
+ createDocumentVersionRequestOpts(requestParameters: CreateDocumentVersionRequest): Promise<runtime.RequestOpts>;
70
86
  /**
71
87
  * Create a new version for a document. The version number is automatically incremented from the highest existing version.
72
88
  * @summary Create Document Version Handler
@@ -82,6 +98,14 @@ export interface DocumentVersionsApiInterface {
82
98
  * Create Document Version Handler
83
99
  */
84
100
  createDocumentVersion(requestParameters: CreateDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
101
+ /**
102
+ * Creates request options for deleteDocumentVersion without sending the request
103
+ * @param {string} versionId DocumentVersion ID
104
+ * @param {string} [ksUat]
105
+ * @throws {RequiredError}
106
+ * @memberof DocumentVersionsApiInterface
107
+ */
108
+ deleteDocumentVersionRequestOpts(requestParameters: DeleteDocumentVersionRequest): Promise<runtime.RequestOpts>;
85
109
  /**
86
110
  * Delete a document version by its ID. Cannot delete the active version of a document.
87
111
  * @summary Delete Document Version Handler
@@ -97,6 +121,14 @@ export interface DocumentVersionsApiInterface {
97
121
  * Delete Document Version Handler
98
122
  */
99
123
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
124
+ /**
125
+ * Creates request options for getDocumentVersion without sending the request
126
+ * @param {string} versionId DocumentVersion ID
127
+ * @param {string} [ksUat]
128
+ * @throws {RequiredError}
129
+ * @memberof DocumentVersionsApiInterface
130
+ */
131
+ getDocumentVersionRequestOpts(requestParameters: GetDocumentVersionRequest): Promise<runtime.RequestOpts>;
100
132
  /**
101
133
  * Get a document version by its ID.
102
134
  * @summary Get Document Version Handler
@@ -113,7 +145,18 @@ export interface DocumentVersionsApiInterface {
113
145
  */
114
146
  getDocumentVersion(requestParameters: GetDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
115
147
  /**
116
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
148
+ * Creates request options for getDocumentVersionContents without sending the request
149
+ * @param {string} versionId DocumentVersion ID
150
+ * @param {string} [sectionId] Optional section ID to scope traversal to a subtree
151
+ * @param {number} [limit] Number of items per page
152
+ * @param {number} [offset] Number of items to skip
153
+ * @param {string} [ksUat]
154
+ * @throws {RequiredError}
155
+ * @memberof DocumentVersionsApiInterface
156
+ */
157
+ getDocumentVersionContentsRequestOpts(requestParameters: GetDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
158
+ /**
159
+ * 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\").
117
160
  * @summary Get Document Version Contents Handler
118
161
  * @param {string} versionId DocumentVersion ID
119
162
  * @param {string} [sectionId] Optional section ID to scope traversal to a subtree
@@ -124,12 +167,22 @@ export interface DocumentVersionsApiInterface {
124
167
  * @throws {RequiredError}
125
168
  * @memberof DocumentVersionsApiInterface
126
169
  */
127
- getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseDocumentContentPathPart>>;
170
+ getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>>;
128
171
  /**
129
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
172
+ * 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\").
130
173
  * Get Document Version Contents Handler
131
174
  */
132
- getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentContentPathPart>;
175
+ getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>;
176
+ /**
177
+ * Creates request options for listDocumentVersions without sending the request
178
+ * @param {string} documentId Document ID to list versions for
179
+ * @param {number} [limit] Number of items per page
180
+ * @param {number} [offset] Number of items to skip
181
+ * @param {string} [ksUat]
182
+ * @throws {RequiredError}
183
+ * @memberof DocumentVersionsApiInterface
184
+ */
185
+ listDocumentVersionsRequestOpts(requestParameters: ListDocumentVersionsRequest): Promise<runtime.RequestOpts>;
133
186
  /**
134
187
  * List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
135
188
  * @summary List Document Versions Handler
@@ -147,6 +200,15 @@ export interface DocumentVersionsApiInterface {
147
200
  * List Document Versions Handler
148
201
  */
149
202
  listDocumentVersions(requestParameters: ListDocumentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentVersionResponse>;
203
+ /**
204
+ * Creates request options for updateDocumentVersionMetadata without sending the request
205
+ * @param {string} versionId DocumentVersion ID
206
+ * @param {DocumentVersionMetadataUpdate} documentVersionMetadataUpdate
207
+ * @param {string} [ksUat]
208
+ * @throws {RequiredError}
209
+ * @memberof DocumentVersionsApiInterface
210
+ */
211
+ updateDocumentVersionMetadataRequestOpts(requestParameters: UpdateDocumentVersionMetadataRequest): Promise<runtime.RequestOpts>;
150
212
  /**
151
213
  * 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.
152
214
  * @summary Update Document Version Metadata Handler
@@ -168,6 +230,10 @@ export interface DocumentVersionsApiInterface {
168
230
  *
169
231
  */
170
232
  export declare class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVersionsApiInterface {
233
+ /**
234
+ * Creates request options for clearDocumentVersionContents without sending the request
235
+ */
236
+ clearDocumentVersionContentsRequestOpts(requestParameters: ClearDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
171
237
  /**
172
238
  * 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.
173
239
  * Clear Document Version Contents Handler
@@ -178,6 +244,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
178
244
  * Clear Document Version Contents Handler
179
245
  */
180
246
  clearDocumentVersionContents(requestParameters: ClearDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClearVersionContentsResponse>;
247
+ /**
248
+ * Creates request options for createDocumentVersion without sending the request
249
+ */
250
+ createDocumentVersionRequestOpts(requestParameters: CreateDocumentVersionRequest): Promise<runtime.RequestOpts>;
181
251
  /**
182
252
  * Create a new version for a document. The version number is automatically incremented from the highest existing version.
183
253
  * Create Document Version Handler
@@ -188,6 +258,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
188
258
  * Create Document Version Handler
189
259
  */
190
260
  createDocumentVersion(requestParameters: CreateDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
261
+ /**
262
+ * Creates request options for deleteDocumentVersion without sending the request
263
+ */
264
+ deleteDocumentVersionRequestOpts(requestParameters: DeleteDocumentVersionRequest): Promise<runtime.RequestOpts>;
191
265
  /**
192
266
  * Delete a document version by its ID. Cannot delete the active version of a document.
193
267
  * Delete Document Version Handler
@@ -198,6 +272,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
198
272
  * Delete Document Version Handler
199
273
  */
200
274
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
275
+ /**
276
+ * Creates request options for getDocumentVersion without sending the request
277
+ */
278
+ getDocumentVersionRequestOpts(requestParameters: GetDocumentVersionRequest): Promise<runtime.RequestOpts>;
201
279
  /**
202
280
  * Get a document version by its ID.
203
281
  * Get Document Version Handler
@@ -209,15 +287,23 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
209
287
  */
210
288
  getDocumentVersion(requestParameters: GetDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
211
289
  /**
212
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
290
+ * Creates request options for getDocumentVersionContents without sending the request
291
+ */
292
+ getDocumentVersionContentsRequestOpts(requestParameters: GetDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
293
+ /**
294
+ * 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\").
213
295
  * Get Document Version Contents Handler
214
296
  */
215
- getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseDocumentContentPathPart>>;
297
+ getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>>;
216
298
  /**
217
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
299
+ * 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\").
218
300
  * Get Document Version Contents Handler
219
301
  */
220
- getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentContentPathPart>;
302
+ getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>;
303
+ /**
304
+ * Creates request options for listDocumentVersions without sending the request
305
+ */
306
+ listDocumentVersionsRequestOpts(requestParameters: ListDocumentVersionsRequest): Promise<runtime.RequestOpts>;
221
307
  /**
222
308
  * List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
223
309
  * List Document Versions Handler
@@ -228,6 +314,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
228
314
  * List Document Versions Handler
229
315
  */
230
316
  listDocumentVersions(requestParameters: ListDocumentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentVersionResponse>;
317
+ /**
318
+ * Creates request options for updateDocumentVersionMetadata without sending the request
319
+ */
320
+ updateDocumentVersionMetadataRequestOpts(requestParameters: UpdateDocumentVersionMetadataRequest): Promise<runtime.RequestOpts>;
231
321
  /**
232
322
  * 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.
233
323
  * Update Document Version Metadata Handler