@knowledge-stack/ksapi 1.72.4 → 1.78.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 (326) hide show
  1. package/.openapi-generator/FILES +36 -4
  2. package/README.md +33 -11
  3. package/dist/apis/AgentApi.d.ts +114 -0
  4. package/dist/apis/AgentApi.js +156 -0
  5. package/dist/apis/ChunksApi.d.ts +19 -16
  6. package/dist/apis/ChunksApi.js +9 -6
  7. package/dist/apis/DocumentsApi.d.ts +4 -4
  8. package/dist/apis/DocumentsApi.js +2 -2
  9. package/dist/apis/FoldersApi.d.ts +4 -4
  10. package/dist/apis/FoldersApi.js +2 -2
  11. package/dist/apis/InvitesApi.d.ts +54 -7
  12. package/dist/apis/InvitesApi.js +51 -2
  13. package/dist/apis/PublicApi.d.ts +59 -0
  14. package/dist/apis/PublicApi.js +103 -0
  15. package/dist/apis/SubscriptionsApi.d.ts +120 -0
  16. package/dist/apis/SubscriptionsApi.js +162 -0
  17. package/dist/apis/TenantsApi.d.ts +45 -1
  18. package/dist/apis/TenantsApi.js +44 -0
  19. package/dist/apis/ThreadsApi.d.ts +4 -4
  20. package/dist/apis/ThreadsApi.js +2 -2
  21. package/dist/apis/index.d.ts +3 -0
  22. package/dist/apis/index.js +3 -0
  23. package/dist/esm/apis/AgentApi.d.ts +114 -0
  24. package/dist/esm/apis/AgentApi.js +119 -0
  25. package/dist/esm/apis/ChunksApi.d.ts +19 -16
  26. package/dist/esm/apis/ChunksApi.js +9 -6
  27. package/dist/esm/apis/DocumentsApi.d.ts +4 -4
  28. package/dist/esm/apis/DocumentsApi.js +2 -2
  29. package/dist/esm/apis/FoldersApi.d.ts +4 -4
  30. package/dist/esm/apis/FoldersApi.js +2 -2
  31. package/dist/esm/apis/InvitesApi.d.ts +54 -7
  32. package/dist/esm/apis/InvitesApi.js +52 -3
  33. package/dist/esm/apis/PublicApi.d.ts +59 -0
  34. package/dist/esm/apis/PublicApi.js +66 -0
  35. package/dist/esm/apis/SubscriptionsApi.d.ts +120 -0
  36. package/dist/esm/apis/SubscriptionsApi.js +125 -0
  37. package/dist/esm/apis/TenantsApi.d.ts +45 -1
  38. package/dist/esm/apis/TenantsApi.js +45 -1
  39. package/dist/esm/apis/ThreadsApi.d.ts +4 -4
  40. package/dist/esm/apis/ThreadsApi.js +2 -2
  41. package/dist/esm/apis/index.d.ts +3 -0
  42. package/dist/esm/apis/index.js +3 -0
  43. package/dist/esm/models/AcceptInviteResponse.d.ts +6 -0
  44. package/dist/esm/models/AcceptInviteResponse.js +2 -0
  45. package/dist/esm/models/AskRequest.d.ts +47 -0
  46. package/dist/esm/models/AskRequest.js +44 -0
  47. package/dist/esm/models/AskResponse.d.ts +47 -0
  48. package/dist/esm/models/AskResponse.js +44 -0
  49. package/dist/esm/models/ChangeSubscriptionRequest.d.ts +53 -0
  50. package/dist/esm/models/ChangeSubscriptionRequest.js +53 -0
  51. package/dist/esm/models/CheckpointDetails.d.ts +96 -0
  52. package/dist/esm/models/CheckpointDetails.js +91 -0
  53. package/dist/esm/models/ChunkBulkResponse.d.ts +3 -3
  54. package/dist/esm/models/ChunkBulkResponse.js +3 -3
  55. package/dist/esm/models/ChunkContentItem.d.ts +3 -3
  56. package/dist/esm/models/ChunkContentItem.js +3 -3
  57. package/dist/esm/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
  58. package/dist/esm/models/{ChunkMetadataInput.js → ChunkMetadata.js} +9 -9
  59. package/dist/esm/models/ChunkNeighborsResponse.d.ts +18 -0
  60. package/dist/esm/models/ChunkNeighborsResponse.js +10 -0
  61. package/dist/esm/models/ChunkResponse.d.ts +3 -3
  62. package/dist/esm/models/ChunkResponse.js +3 -3
  63. package/dist/esm/models/CreateChunkRequest.d.ts +3 -3
  64. package/dist/esm/models/CreateChunkRequest.js +3 -3
  65. package/dist/esm/models/DocumentResponse.d.ts +6 -0
  66. package/dist/esm/models/DocumentResponse.js +4 -0
  67. package/dist/esm/models/DocumentVersionMetadata.d.ts +24 -0
  68. package/dist/esm/models/DocumentVersionMetadata.js +8 -0
  69. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +24 -0
  70. package/dist/esm/models/DocumentVersionMetadataUpdate.js +8 -0
  71. package/dist/esm/models/ExtractRequest.d.ts +61 -0
  72. package/dist/esm/models/ExtractRequest.js +48 -0
  73. package/dist/esm/models/ExtractResponse.d.ts +49 -0
  74. package/dist/esm/models/ExtractResponse.js +44 -0
  75. package/dist/esm/models/FeaturesResponse.d.ts +12 -0
  76. package/dist/esm/models/FeaturesResponse.js +8 -0
  77. package/dist/esm/models/FolderResponse.d.ts +6 -0
  78. package/dist/esm/models/FolderResponse.js +4 -0
  79. package/dist/esm/models/IdpType.d.ts +2 -0
  80. package/dist/esm/models/IdpType.js +2 -0
  81. package/dist/esm/models/InviteLinkSettingsRequest.d.ts +70 -0
  82. package/dist/esm/models/InviteLinkSettingsRequest.js +58 -0
  83. package/dist/esm/models/InviteLinkSettingsResponse.d.ts +67 -0
  84. package/dist/esm/models/InviteLinkSettingsResponse.js +57 -0
  85. package/dist/esm/models/InviteResponse.d.ts +6 -0
  86. package/dist/esm/models/InviteResponse.js +2 -0
  87. package/dist/esm/models/InviteUserRequest.d.ts +6 -0
  88. package/dist/esm/models/InviteUserRequest.js +8 -1
  89. package/dist/esm/models/LineageNodeResponse.d.ts +3 -3
  90. package/dist/esm/models/LineageNodeResponse.js +3 -3
  91. package/dist/esm/models/MeteredQuotaStatus.d.ts +72 -0
  92. package/dist/esm/models/MeteredQuotaStatus.js +61 -0
  93. package/dist/esm/models/PathPartAncestorItem.d.ts +6 -0
  94. package/dist/esm/models/PathPartAncestorItem.js +4 -0
  95. package/dist/esm/models/PathPartResponse.d.ts +6 -0
  96. package/dist/esm/models/PathPartResponse.js +4 -0
  97. package/dist/esm/models/PipelineStatus.d.ts +1 -0
  98. package/dist/esm/models/PipelineStatus.js +2 -1
  99. package/dist/esm/models/ScoredChunkResponse.d.ts +3 -3
  100. package/dist/esm/models/ScoredChunkResponse.js +3 -3
  101. package/dist/esm/models/SeatQuotaStatus.d.ts +55 -0
  102. package/dist/esm/models/SeatQuotaStatus.js +48 -0
  103. package/dist/esm/models/SubscriptionPlanResponse.d.ts +101 -0
  104. package/dist/esm/models/SubscriptionPlanResponse.js +76 -0
  105. package/dist/esm/models/TenantQuotaStateResponse.d.ts +55 -0
  106. package/dist/esm/models/TenantQuotaStateResponse.js +50 -0
  107. package/dist/esm/models/TenantResponse.d.ts +12 -0
  108. package/dist/esm/models/TenantResponse.js +14 -1
  109. package/dist/esm/models/TenantSettingsResponse.d.ts +7 -0
  110. package/dist/esm/models/TenantSettingsResponse.js +5 -0
  111. package/dist/esm/models/TenantSettingsUpdate.d.ts +7 -0
  112. package/dist/esm/models/TenantSettingsUpdate.js +3 -0
  113. package/dist/esm/models/ThreadMessageDetailsInput.d.ts +7 -0
  114. package/dist/esm/models/ThreadMessageDetailsInput.js +3 -0
  115. package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +7 -0
  116. package/dist/esm/models/ThreadMessageDetailsOutput.js +3 -0
  117. package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +3 -3
  118. package/dist/esm/models/UpdateChunkMetadataRequest.js +3 -3
  119. package/dist/esm/models/UpdateDocumentRequest.d.ts +7 -1
  120. package/dist/esm/models/UpdateDocumentRequest.js +2 -0
  121. package/dist/esm/models/UpdateFolderRequest.d.ts +7 -1
  122. package/dist/esm/models/UpdateFolderRequest.js +2 -0
  123. package/dist/esm/models/UpdateInviteRequest.d.ts +53 -0
  124. package/dist/esm/models/UpdateInviteRequest.js +49 -0
  125. package/dist/esm/models/UsageMetric.d.ts +26 -0
  126. package/dist/esm/models/UsageMetric.js +44 -0
  127. package/dist/esm/models/index.d.ts +15 -2
  128. package/dist/esm/models/index.js +15 -2
  129. package/dist/models/AcceptInviteResponse.d.ts +6 -0
  130. package/dist/models/AcceptInviteResponse.js +2 -0
  131. package/dist/models/AskRequest.d.ts +47 -0
  132. package/dist/models/AskRequest.js +52 -0
  133. package/dist/models/AskResponse.d.ts +47 -0
  134. package/dist/models/AskResponse.js +52 -0
  135. package/dist/models/ChangeSubscriptionRequest.d.ts +53 -0
  136. package/dist/models/ChangeSubscriptionRequest.js +61 -0
  137. package/dist/models/CheckpointDetails.d.ts +96 -0
  138. package/dist/models/CheckpointDetails.js +99 -0
  139. package/dist/models/ChunkBulkResponse.d.ts +3 -3
  140. package/dist/models/ChunkBulkResponse.js +3 -3
  141. package/dist/models/ChunkContentItem.d.ts +3 -3
  142. package/dist/models/ChunkContentItem.js +3 -3
  143. package/dist/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
  144. package/dist/models/{ChunkMetadataInput.js → ChunkMetadata.js} +15 -15
  145. package/dist/models/ChunkNeighborsResponse.d.ts +18 -0
  146. package/dist/models/ChunkNeighborsResponse.js +10 -0
  147. package/dist/models/ChunkResponse.d.ts +3 -3
  148. package/dist/models/ChunkResponse.js +3 -3
  149. package/dist/models/CreateChunkRequest.d.ts +3 -3
  150. package/dist/models/CreateChunkRequest.js +3 -3
  151. package/dist/models/DocumentResponse.d.ts +6 -0
  152. package/dist/models/DocumentResponse.js +4 -0
  153. package/dist/models/DocumentVersionMetadata.d.ts +24 -0
  154. package/dist/models/DocumentVersionMetadata.js +8 -0
  155. package/dist/models/DocumentVersionMetadataUpdate.d.ts +24 -0
  156. package/dist/models/DocumentVersionMetadataUpdate.js +8 -0
  157. package/dist/models/ExtractRequest.d.ts +61 -0
  158. package/dist/models/ExtractRequest.js +56 -0
  159. package/dist/models/ExtractResponse.d.ts +49 -0
  160. package/dist/models/ExtractResponse.js +52 -0
  161. package/dist/models/FeaturesResponse.d.ts +12 -0
  162. package/dist/models/FeaturesResponse.js +8 -0
  163. package/dist/models/FolderResponse.d.ts +6 -0
  164. package/dist/models/FolderResponse.js +4 -0
  165. package/dist/models/IdpType.d.ts +2 -0
  166. package/dist/models/IdpType.js +2 -0
  167. package/dist/models/InviteLinkSettingsRequest.d.ts +70 -0
  168. package/dist/models/InviteLinkSettingsRequest.js +66 -0
  169. package/dist/models/InviteLinkSettingsResponse.d.ts +67 -0
  170. package/dist/models/InviteLinkSettingsResponse.js +65 -0
  171. package/dist/models/InviteResponse.d.ts +6 -0
  172. package/dist/models/InviteResponse.js +2 -0
  173. package/dist/models/InviteUserRequest.d.ts +6 -0
  174. package/dist/models/InviteUserRequest.js +8 -1
  175. package/dist/models/LineageNodeResponse.d.ts +3 -3
  176. package/dist/models/LineageNodeResponse.js +3 -3
  177. package/dist/models/MeteredQuotaStatus.d.ts +72 -0
  178. package/dist/models/MeteredQuotaStatus.js +69 -0
  179. package/dist/models/PathPartAncestorItem.d.ts +6 -0
  180. package/dist/models/PathPartAncestorItem.js +4 -0
  181. package/dist/models/PathPartResponse.d.ts +6 -0
  182. package/dist/models/PathPartResponse.js +4 -0
  183. package/dist/models/PipelineStatus.d.ts +1 -0
  184. package/dist/models/PipelineStatus.js +2 -1
  185. package/dist/models/ScoredChunkResponse.d.ts +3 -3
  186. package/dist/models/ScoredChunkResponse.js +3 -3
  187. package/dist/models/SeatQuotaStatus.d.ts +55 -0
  188. package/dist/models/SeatQuotaStatus.js +56 -0
  189. package/dist/models/SubscriptionPlanResponse.d.ts +101 -0
  190. package/dist/models/SubscriptionPlanResponse.js +84 -0
  191. package/dist/models/TenantQuotaStateResponse.d.ts +55 -0
  192. package/dist/models/TenantQuotaStateResponse.js +58 -0
  193. package/dist/models/TenantResponse.d.ts +12 -0
  194. package/dist/models/TenantResponse.js +14 -1
  195. package/dist/models/TenantSettingsResponse.d.ts +7 -0
  196. package/dist/models/TenantSettingsResponse.js +5 -0
  197. package/dist/models/TenantSettingsUpdate.d.ts +7 -0
  198. package/dist/models/TenantSettingsUpdate.js +3 -0
  199. package/dist/models/ThreadMessageDetailsInput.d.ts +7 -0
  200. package/dist/models/ThreadMessageDetailsInput.js +3 -0
  201. package/dist/models/ThreadMessageDetailsOutput.d.ts +7 -0
  202. package/dist/models/ThreadMessageDetailsOutput.js +3 -0
  203. package/dist/models/UpdateChunkMetadataRequest.d.ts +3 -3
  204. package/dist/models/UpdateChunkMetadataRequest.js +3 -3
  205. package/dist/models/UpdateDocumentRequest.d.ts +7 -1
  206. package/dist/models/UpdateDocumentRequest.js +2 -0
  207. package/dist/models/UpdateFolderRequest.d.ts +7 -1
  208. package/dist/models/UpdateFolderRequest.js +2 -0
  209. package/dist/models/UpdateInviteRequest.d.ts +53 -0
  210. package/dist/models/UpdateInviteRequest.js +57 -0
  211. package/dist/models/UsageMetric.d.ts +26 -0
  212. package/dist/models/UsageMetric.js +52 -0
  213. package/dist/models/index.d.ts +15 -2
  214. package/dist/models/index.js +15 -2
  215. package/docs/AcceptInviteResponse.md +2 -0
  216. package/docs/AgentApi.md +158 -0
  217. package/docs/AskRequest.md +35 -0
  218. package/docs/AskResponse.md +35 -0
  219. package/docs/AuthApi.md +2 -2
  220. package/docs/ChangeSubscriptionRequest.md +37 -0
  221. package/docs/CheckpointDetails.md +49 -0
  222. package/docs/ChunkBulkResponse.md +1 -1
  223. package/docs/ChunkContentItem.md +1 -1
  224. package/docs/{ChunkMetadataInput.md → ChunkMetadata.md} +4 -4
  225. package/docs/ChunkNeighborsResponse.md +6 -0
  226. package/docs/ChunkResponse.md +1 -1
  227. package/docs/ChunksApi.md +13 -10
  228. package/docs/CreateChunkRequest.md +1 -1
  229. package/docs/DocumentResponse.md +2 -0
  230. package/docs/DocumentVersionMetadata.md +8 -0
  231. package/docs/DocumentVersionMetadataUpdate.md +8 -0
  232. package/docs/DocumentsApi.md +1 -1
  233. package/docs/ExtractRequest.md +39 -0
  234. package/docs/ExtractResponse.md +35 -0
  235. package/docs/FeaturesResponse.md +4 -0
  236. package/docs/FolderResponse.md +2 -0
  237. package/docs/FolderResponseOrDocumentResponse.md +2 -0
  238. package/docs/FoldersApi.md +1 -1
  239. package/docs/InviteLinkSettingsRequest.md +39 -0
  240. package/docs/InviteLinkSettingsResponse.md +39 -0
  241. package/docs/InviteResponse.md +2 -0
  242. package/docs/InviteUserRequest.md +2 -0
  243. package/docs/InvitesApi.md +81 -3
  244. package/docs/LineageNodeResponse.md +1 -1
  245. package/docs/MeteredQuotaStatus.md +43 -0
  246. package/docs/PathPartAncestorItem.md +2 -0
  247. package/docs/PathPartResponse.md +2 -0
  248. package/docs/PublicApi.md +68 -0
  249. package/docs/ScoredChunkResponse.md +1 -1
  250. package/docs/SeatQuotaStatus.md +37 -0
  251. package/docs/SectionContentItemOrChunkContentItem.md +1 -1
  252. package/docs/SubscriptionPlanResponse.md +51 -0
  253. package/docs/SubscriptionsApi.md +164 -0
  254. package/docs/TenantQuotaStateResponse.md +37 -0
  255. package/docs/TenantResponse.md +4 -0
  256. package/docs/TenantSettingsResponse.md +2 -0
  257. package/docs/TenantSettingsUpdate.md +2 -0
  258. package/docs/TenantsApi.md +75 -0
  259. package/docs/ThreadMessageDetailsInput.md +2 -0
  260. package/docs/ThreadMessageDetailsOutput.md +2 -0
  261. package/docs/ThreadsApi.md +1 -1
  262. package/docs/UpdateChunkMetadataRequest.md +1 -1
  263. package/docs/UpdateDocumentRequest.md +3 -1
  264. package/docs/UpdateFolderRequest.md +3 -1
  265. package/docs/UpdateInviteRequest.md +37 -0
  266. package/docs/UsageMetric.md +32 -0
  267. package/package.json +1 -1
  268. package/src/apis/AgentApi.ts +225 -0
  269. package/src/apis/ChunksApi.ts +27 -17
  270. package/src/apis/DocumentsApi.ts +4 -4
  271. package/src/apis/FoldersApi.ts +4 -4
  272. package/src/apis/InvitesApi.ts +107 -6
  273. package/src/apis/PublicApi.ts +100 -0
  274. package/src/apis/SubscriptionsApi.ts +238 -0
  275. package/src/apis/TenantsApi.ts +88 -0
  276. package/src/apis/ThreadsApi.ts +4 -4
  277. package/src/apis/index.ts +3 -0
  278. package/src/models/AcceptInviteResponse.ts +8 -0
  279. package/src/models/AskRequest.ts +83 -0
  280. package/src/models/AskResponse.ts +83 -0
  281. package/src/models/ChangeSubscriptionRequest.ts +96 -0
  282. package/src/models/CheckpointDetails.ts +169 -0
  283. package/src/models/ChunkBulkResponse.ts +11 -11
  284. package/src/models/ChunkContentItem.ts +10 -10
  285. package/src/models/{ChunkMetadataInput.ts → ChunkMetadata.ts} +25 -25
  286. package/src/models/ChunkNeighborsResponse.ts +26 -0
  287. package/src/models/ChunkResponse.ts +11 -11
  288. package/src/models/CreateChunkRequest.ts +10 -10
  289. package/src/models/DocumentResponse.ts +9 -0
  290. package/src/models/DocumentVersionMetadata.ts +32 -0
  291. package/src/models/DocumentVersionMetadataUpdate.ts +32 -0
  292. package/src/models/ExtractRequest.ts +99 -0
  293. package/src/models/ExtractResponse.ts +83 -0
  294. package/src/models/FeaturesResponse.ts +18 -0
  295. package/src/models/FolderResponse.ts +9 -0
  296. package/src/models/IdpType.ts +2 -0
  297. package/src/models/InviteLinkSettingsRequest.ts +116 -0
  298. package/src/models/InviteLinkSettingsResponse.ts +111 -0
  299. package/src/models/InviteResponse.ts +8 -0
  300. package/src/models/InviteUserRequest.ts +12 -0
  301. package/src/models/LineageNodeResponse.ts +10 -10
  302. package/src/models/MeteredQuotaStatus.ts +129 -0
  303. package/src/models/PathPartAncestorItem.ts +9 -0
  304. package/src/models/PathPartResponse.ts +9 -0
  305. package/src/models/PipelineStatus.ts +2 -1
  306. package/src/models/ScoredChunkResponse.ts +11 -11
  307. package/src/models/SeatQuotaStatus.ts +94 -0
  308. package/src/models/SubscriptionPlanResponse.ts +161 -0
  309. package/src/models/TenantQuotaStateResponse.ts +107 -0
  310. package/src/models/TenantResponse.ts +22 -0
  311. package/src/models/TenantSettingsResponse.ts +16 -0
  312. package/src/models/TenantSettingsUpdate.ts +15 -0
  313. package/src/models/ThreadMessageDetailsInput.ts +15 -0
  314. package/src/models/ThreadMessageDetailsOutput.ts +15 -0
  315. package/src/models/UpdateChunkMetadataRequest.ts +10 -10
  316. package/src/models/UpdateDocumentRequest.ts +9 -1
  317. package/src/models/UpdateFolderRequest.ts +9 -1
  318. package/src/models/UpdateInviteRequest.ts +94 -0
  319. package/src/models/UsageMetric.ts +54 -0
  320. package/src/models/index.ts +15 -2
  321. package/dist/esm/models/ChunkMetadataOutput.d.ts +0 -135
  322. package/dist/esm/models/ChunkMetadataOutput.js +0 -70
  323. package/dist/models/ChunkMetadataOutput.d.ts +0 -135
  324. package/dist/models/ChunkMetadataOutput.js +0 -78
  325. package/docs/ChunkMetadataOutput.md +0 -61
  326. package/src/models/ChunkMetadataOutput.ts +0 -203
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { AskRequest, AskResponse, ExtractRequest, ExtractResponse } from '../models/index';
14
+ export interface AgentAskRequest {
15
+ askRequest: AskRequest;
16
+ authorization?: string | null;
17
+ ksUat?: string | null;
18
+ }
19
+ export interface AgentExtractRequest {
20
+ extractRequest: ExtractRequest;
21
+ authorization?: string | null;
22
+ ksUat?: string | null;
23
+ }
24
+ /**
25
+ * AgentApi - interface
26
+ *
27
+ * @export
28
+ * @interface AgentApiInterface
29
+ */
30
+ export interface AgentApiInterface {
31
+ /**
32
+ * Creates request options for agentAsk without sending the request
33
+ * @param {AskRequest} askRequest
34
+ * @param {string} [authorization]
35
+ * @param {string} [ksUat]
36
+ * @throws {RequiredError}
37
+ * @memberof AgentApiInterface
38
+ */
39
+ agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
40
+ /**
41
+ * Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
42
+ * @summary Agent Ask Handler
43
+ * @param {AskRequest} askRequest
44
+ * @param {string} [authorization]
45
+ * @param {string} [ksUat]
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ * @memberof AgentApiInterface
49
+ */
50
+ agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
51
+ /**
52
+ * Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
53
+ * Agent Ask Handler
54
+ */
55
+ agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
56
+ /**
57
+ * Creates request options for agentExtract without sending the request
58
+ * @param {ExtractRequest} extractRequest
59
+ * @param {string} [authorization]
60
+ * @param {string} [ksUat]
61
+ * @throws {RequiredError}
62
+ * @memberof AgentApiInterface
63
+ */
64
+ agentExtractRequestOpts(requestParameters: AgentExtractRequest): Promise<runtime.RequestOpts>;
65
+ /**
66
+ * Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
67
+ * @summary Agent Extract Handler
68
+ * @param {ExtractRequest} extractRequest
69
+ * @param {string} [authorization]
70
+ * @param {string} [ksUat]
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ * @memberof AgentApiInterface
74
+ */
75
+ agentExtractRaw(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExtractResponse>>;
76
+ /**
77
+ * Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
78
+ * Agent Extract Handler
79
+ */
80
+ agentExtract(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExtractResponse>;
81
+ }
82
+ /**
83
+ *
84
+ */
85
+ export declare class AgentApi extends runtime.BaseAPI implements AgentApiInterface {
86
+ /**
87
+ * Creates request options for agentAsk without sending the request
88
+ */
89
+ agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
90
+ /**
91
+ * Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
92
+ * Agent Ask Handler
93
+ */
94
+ agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
95
+ /**
96
+ * Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
97
+ * Agent Ask Handler
98
+ */
99
+ agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
100
+ /**
101
+ * Creates request options for agentExtract without sending the request
102
+ */
103
+ agentExtractRequestOpts(requestParameters: AgentExtractRequest): Promise<runtime.RequestOpts>;
104
+ /**
105
+ * Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
106
+ * Agent Extract Handler
107
+ */
108
+ agentExtractRaw(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExtractResponse>>;
109
+ /**
110
+ * Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
111
+ * Agent Extract Handler
112
+ */
113
+ agentExtract(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExtractResponse>;
114
+ }
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { AskRequestToJSON, AskResponseFromJSON, ExtractRequestToJSON, ExtractResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class AgentApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for agentAsk without sending the request
31
+ */
32
+ agentAskRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['askRequest'] == null) {
35
+ throw new runtime.RequiredError('askRequest', 'Required parameter "askRequest" was null or undefined when calling agentAsk().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ headerParameters['Content-Type'] = 'application/json';
40
+ if (requestParameters['authorization'] != null) {
41
+ headerParameters['authorization'] = String(requestParameters['authorization']);
42
+ }
43
+ let urlPath = `/v1/agent/ask`;
44
+ return {
45
+ path: urlPath,
46
+ method: 'POST',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ body: AskRequestToJSON(requestParameters['askRequest']),
50
+ };
51
+ });
52
+ }
53
+ /**
54
+ * Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
55
+ * Agent Ask Handler
56
+ */
57
+ agentAskRaw(requestParameters, initOverrides) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ const requestOptions = yield this.agentAskRequestOpts(requestParameters);
60
+ const response = yield this.request(requestOptions, initOverrides);
61
+ return new runtime.JSONApiResponse(response, (jsonValue) => AskResponseFromJSON(jsonValue));
62
+ });
63
+ }
64
+ /**
65
+ * Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
66
+ * Agent Ask Handler
67
+ */
68
+ agentAsk(requestParameters, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const response = yield this.agentAskRaw(requestParameters, initOverrides);
71
+ return yield response.value();
72
+ });
73
+ }
74
+ /**
75
+ * Creates request options for agentExtract without sending the request
76
+ */
77
+ agentExtractRequestOpts(requestParameters) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ if (requestParameters['extractRequest'] == null) {
80
+ throw new runtime.RequiredError('extractRequest', 'Required parameter "extractRequest" was null or undefined when calling agentExtract().');
81
+ }
82
+ const queryParameters = {};
83
+ const headerParameters = {};
84
+ headerParameters['Content-Type'] = 'application/json';
85
+ if (requestParameters['authorization'] != null) {
86
+ headerParameters['authorization'] = String(requestParameters['authorization']);
87
+ }
88
+ let urlPath = `/v1/agent/extract`;
89
+ return {
90
+ path: urlPath,
91
+ method: 'POST',
92
+ headers: headerParameters,
93
+ query: queryParameters,
94
+ body: ExtractRequestToJSON(requestParameters['extractRequest']),
95
+ };
96
+ });
97
+ }
98
+ /**
99
+ * Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
100
+ * Agent Extract Handler
101
+ */
102
+ agentExtractRaw(requestParameters, initOverrides) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ const requestOptions = yield this.agentExtractRequestOpts(requestParameters);
105
+ const response = yield this.request(requestOptions, initOverrides);
106
+ return new runtime.JSONApiResponse(response, (jsonValue) => ExtractResponseFromJSON(jsonValue));
107
+ });
108
+ }
109
+ /**
110
+ * Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
111
+ * Agent Extract Handler
112
+ */
113
+ agentExtract(requestParameters, initOverrides) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ const response = yield this.agentExtractRaw(requestParameters, initOverrides);
116
+ return yield response.value();
117
+ });
118
+ }
119
+ }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ChunkBulkResponse, ChunkNeighborsResponse, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
13
+ import type { ChunkBulkResponse, ChunkNeighborsResponse, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, PartType, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
14
14
  export interface CreateChunkOperationRequest {
15
15
  createChunkRequest: CreateChunkRequest;
16
16
  authorization?: string | null;
@@ -31,7 +31,8 @@ export interface GetChunkNeighborsRequest {
31
31
  chunkId: string;
32
32
  prev?: number;
33
33
  next?: number;
34
- chunksOnly?: boolean;
34
+ contentType?: PartType;
35
+ withinSection?: boolean;
35
36
  authorization?: string | null;
36
37
  ksUat?: string | null;
37
38
  }
@@ -149,9 +150,10 @@ export interface ChunksApiInterface {
149
150
  /**
150
151
  * Creates request options for getChunkNeighbors without sending the request
151
152
  * @param {string} chunkId
152
- * @param {number} [prev] Number of preceding siblings to include
153
- * @param {number} [next] Number of succeeding siblings to include
154
- * @param {boolean} [chunksOnly] When true, stop traversal at non-CHUNK siblings (default: false)
153
+ * @param {number} [prev] Number of preceding items to include (max 50).
154
+ * @param {number} [next] Number of succeeding items to include (max 50).
155
+ * @param {PartType} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both. SECTION is rejected when the anchor is a chunk (always).
156
+ * @param {boolean} [withinSection] When true (default), traverse only the anchor\&#39;s sibling chain under the same parent. When false, traverse the entire document version in DFS order, crossing section boundaries.
155
157
  * @param {string} [authorization]
156
158
  * @param {string} [ksUat]
157
159
  * @throws {RequiredError}
@@ -159,12 +161,13 @@ export interface ChunksApiInterface {
159
161
  */
160
162
  getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
161
163
  /**
162
- * Get neighboring siblings by traversing the sibling linked list. Walks the sibling chain backward (prev) and forward (next) from the anchor chunk. Returns sections and chunks in sibling order within the same parent. When ``chunks_only=true``, the traversal stops at the first non-CHUNK sibling in each direction, returning only chunk neighbors.
164
+ * Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
163
165
  * @summary Get Chunk Neighbors Handler
164
166
  * @param {string} chunkId
165
- * @param {number} [prev] Number of preceding siblings to include
166
- * @param {number} [next] Number of succeeding siblings to include
167
- * @param {boolean} [chunksOnly] When true, stop traversal at non-CHUNK siblings (default: false)
167
+ * @param {number} [prev] Number of preceding items to include (max 50).
168
+ * @param {number} [next] Number of succeeding items to include (max 50).
169
+ * @param {PartType} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both. SECTION is rejected when the anchor is a chunk (always).
170
+ * @param {boolean} [withinSection] When true (default), traverse only the anchor\&#39;s sibling chain under the same parent. When false, traverse the entire document version in DFS order, crossing section boundaries.
168
171
  * @param {string} [authorization]
169
172
  * @param {string} [ksUat]
170
173
  * @param {*} [options] Override http request option.
@@ -173,7 +176,7 @@ export interface ChunksApiInterface {
173
176
  */
174
177
  getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
175
178
  /**
176
- * Get neighboring siblings by traversing the sibling linked list. Walks the sibling chain backward (prev) and forward (next) from the anchor chunk. Returns sections and chunks in sibling order within the same parent. When ``chunks_only=true``, the traversal stops at the first non-CHUNK sibling in each direction, returning only chunk neighbors.
179
+ * Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
177
180
  * Get Chunk Neighbors Handler
178
181
  */
179
182
  getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
@@ -237,7 +240,7 @@ export interface ChunksApiInterface {
237
240
  */
238
241
  searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
239
242
  /**
240
- * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
243
+ * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
241
244
  * @summary Search Chunks Handler
242
245
  * @param {ChunkSearchRequest} chunkSearchRequest
243
246
  * @param {string} [authorization]
@@ -248,7 +251,7 @@ export interface ChunksApiInterface {
248
251
  */
249
252
  searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
250
253
  /**
251
- * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
254
+ * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
252
255
  * Search Chunks Handler
253
256
  */
254
257
  searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
@@ -358,12 +361,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
358
361
  */
359
362
  getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
360
363
  /**
361
- * Get neighboring siblings by traversing the sibling linked list. Walks the sibling chain backward (prev) and forward (next) from the anchor chunk. Returns sections and chunks in sibling order within the same parent. When ``chunks_only=true``, the traversal stops at the first non-CHUNK sibling in each direction, returning only chunk neighbors.
364
+ * Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
362
365
  * Get Chunk Neighbors Handler
363
366
  */
364
367
  getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
365
368
  /**
366
- * Get neighboring siblings by traversing the sibling linked list. Walks the sibling chain backward (prev) and forward (next) from the anchor chunk. Returns sections and chunks in sibling order within the same parent. When ``chunks_only=true``, the traversal stops at the first non-CHUNK sibling in each direction, returning only chunk neighbors.
369
+ * Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
367
370
  * Get Chunk Neighbors Handler
368
371
  */
369
372
  getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
@@ -400,12 +403,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
400
403
  */
401
404
  searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
402
405
  /**
403
- * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
406
+ * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
404
407
  * Search Chunks Handler
405
408
  */
406
409
  searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
407
410
  /**
408
- * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
411
+ * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
409
412
  * Search Chunks Handler
410
413
  */
411
414
  searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
@@ -176,8 +176,11 @@ export class ChunksApi extends runtime.BaseAPI {
176
176
  if (requestParameters['next'] != null) {
177
177
  queryParameters['next'] = requestParameters['next'];
178
178
  }
179
- if (requestParameters['chunksOnly'] != null) {
180
- queryParameters['chunks_only'] = requestParameters['chunksOnly'];
179
+ if (requestParameters['contentType'] != null) {
180
+ queryParameters['content_type'] = requestParameters['contentType'];
181
+ }
182
+ if (requestParameters['withinSection'] != null) {
183
+ queryParameters['within_section'] = requestParameters['withinSection'];
181
184
  }
182
185
  const headerParameters = {};
183
186
  if (requestParameters['authorization'] != null) {
@@ -194,7 +197,7 @@ export class ChunksApi extends runtime.BaseAPI {
194
197
  });
195
198
  }
196
199
  /**
197
- * Get neighboring siblings by traversing the sibling linked list. Walks the sibling chain backward (prev) and forward (next) from the anchor chunk. Returns sections and chunks in sibling order within the same parent. When ``chunks_only=true``, the traversal stops at the first non-CHUNK sibling in each direction, returning only chunk neighbors.
200
+ * Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
198
201
  * Get Chunk Neighbors Handler
199
202
  */
200
203
  getChunkNeighborsRaw(requestParameters, initOverrides) {
@@ -205,7 +208,7 @@ export class ChunksApi extends runtime.BaseAPI {
205
208
  });
206
209
  }
207
210
  /**
208
- * Get neighboring siblings by traversing the sibling linked list. Walks the sibling chain backward (prev) and forward (next) from the anchor chunk. Returns sections and chunks in sibling order within the same parent. When ``chunks_only=true``, the traversal stops at the first non-CHUNK sibling in each direction, returning only chunk neighbors.
211
+ * Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
209
212
  * Get Chunk Neighbors Handler
210
213
  */
211
214
  getChunkNeighbors(requestParameters, initOverrides) {
@@ -328,7 +331,7 @@ export class ChunksApi extends runtime.BaseAPI {
328
331
  });
329
332
  }
330
333
  /**
331
- * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
334
+ * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
332
335
  * Search Chunks Handler
333
336
  */
334
337
  searchChunksRaw(requestParameters, initOverrides) {
@@ -339,7 +342,7 @@ export class ChunksApi extends runtime.BaseAPI {
339
342
  });
340
343
  }
341
344
  /**
342
- * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
345
+ * Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
343
346
  * Search Chunks Handler
344
347
  */
345
348
  searchChunks(requestParameters, initOverrides) {
@@ -263,7 +263,7 @@ export interface DocumentsApiInterface {
263
263
  */
264
264
  updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts>;
265
265
  /**
266
- * 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.
266
+ * Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
267
267
  * @summary Update Document Handler
268
268
  * @param {string} documentId
269
269
  * @param {UpdateDocumentRequest} updateDocumentRequest
@@ -275,7 +275,7 @@ export interface DocumentsApiInterface {
275
275
  */
276
276
  updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResponse>>;
277
277
  /**
278
- * 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.
278
+ * Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
279
279
  * Update Document Handler
280
280
  */
281
281
  updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
@@ -373,12 +373,12 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
373
373
  */
374
374
  updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts>;
375
375
  /**
376
- * 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.
376
+ * Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
377
377
  * Update Document Handler
378
378
  */
379
379
  updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResponse>>;
380
380
  /**
381
- * 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.
381
+ * Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
382
382
  * Update Document Handler
383
383
  */
384
384
  updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
@@ -406,7 +406,7 @@ export class DocumentsApi extends runtime.BaseAPI {
406
406
  });
407
407
  }
408
408
  /**
409
- * 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.
409
+ * Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
410
410
  * Update Document Handler
411
411
  */
412
412
  updateDocumentRaw(requestParameters, initOverrides) {
@@ -417,7 +417,7 @@ export class DocumentsApi extends runtime.BaseAPI {
417
417
  });
418
418
  }
419
419
  /**
420
- * 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.
420
+ * Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
421
421
  * Update Document Handler
422
422
  */
423
423
  updateDocument(requestParameters, initOverrides) {
@@ -296,7 +296,7 @@ export interface FoldersApiInterface {
296
296
  */
297
297
  updateFolderRequestOpts(requestParameters: UpdateFolderOperationRequest): Promise<runtime.RequestOpts>;
298
298
  /**
299
- * Update a folder (rename and/or move). To rename: provide `name` field. To move: provide `parent_path_part_id` field. Both can be done in a single request.
299
+ * Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
300
300
  * @summary Update Folder Handler
301
301
  * @param {string} folderId
302
302
  * @param {UpdateFolderRequest} updateFolderRequest
@@ -308,7 +308,7 @@ export interface FoldersApiInterface {
308
308
  */
309
309
  updateFolderRaw(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderResponse>>;
310
310
  /**
311
- * Update a folder (rename and/or move). To rename: provide `name` field. To move: provide `parent_path_part_id` field. Both can be done in a single request.
311
+ * Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
312
312
  * Update Folder Handler
313
313
  */
314
314
  updateFolder(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
@@ -420,12 +420,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
420
420
  */
421
421
  updateFolderRequestOpts(requestParameters: UpdateFolderOperationRequest): Promise<runtime.RequestOpts>;
422
422
  /**
423
- * Update a folder (rename and/or move). To rename: provide `name` field. To move: provide `parent_path_part_id` field. Both can be done in a single request.
423
+ * Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
424
424
  * Update Folder Handler
425
425
  */
426
426
  updateFolderRaw(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderResponse>>;
427
427
  /**
428
- * Update a folder (rename and/or move). To rename: provide `name` field. To move: provide `parent_path_part_id` field. Both can be done in a single request.
428
+ * Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
429
429
  * Update Folder Handler
430
430
  */
431
431
  updateFolder(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
@@ -418,7 +418,7 @@ export class FoldersApi extends runtime.BaseAPI {
418
418
  });
419
419
  }
420
420
  /**
421
- * Update a folder (rename and/or move). To rename: provide `name` field. To move: provide `parent_path_part_id` field. Both can be done in a single request.
421
+ * Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
422
422
  * Update Folder Handler
423
423
  */
424
424
  updateFolderRaw(requestParameters, initOverrides) {
@@ -429,7 +429,7 @@ export class FoldersApi extends runtime.BaseAPI {
429
429
  });
430
430
  }
431
431
  /**
432
- * Update a folder (rename and/or move). To rename: provide `name` field. To move: provide `parent_path_part_id` field. Both can be done in a single request.
432
+ * Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
433
433
  * Update Folder Handler
434
434
  */
435
435
  updateFolder(requestParameters, initOverrides) {