@knowledge-stack/ksapi 1.24.0 → 1.25.1

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 (70) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +10 -2
  3. package/dist/apis/ChunksApi.d.ts +87 -5
  4. package/dist/apis/ChunksApi.js +85 -2
  5. package/dist/apis/PathPartsApi.d.ts +86 -1
  6. package/dist/apis/PathPartsApi.js +85 -0
  7. package/dist/esm/apis/ChunksApi.d.ts +87 -5
  8. package/dist/esm/apis/ChunksApi.js +86 -3
  9. package/dist/esm/apis/PathPartsApi.d.ts +86 -1
  10. package/dist/esm/apis/PathPartsApi.js +86 -1
  11. package/dist/esm/models/ChunkBulkResponse.d.ts +139 -0
  12. package/dist/esm/models/ChunkBulkResponse.js +100 -0
  13. package/dist/esm/models/ChunkContentItem.d.ts +1 -1
  14. package/dist/esm/models/ChunkContentItem.js +3 -1
  15. package/dist/esm/models/ChunkSearchRequest.d.ts +17 -5
  16. package/dist/esm/models/ChunkSearchRequest.js +12 -4
  17. package/dist/esm/models/DocumentResponse.d.ts +1 -1
  18. package/dist/esm/models/DocumentResponse.js +3 -1
  19. package/dist/esm/models/FolderResponse.d.ts +1 -1
  20. package/dist/esm/models/FolderResponse.js +3 -1
  21. package/dist/esm/models/SectionContentItem.d.ts +1 -1
  22. package/dist/esm/models/SectionContentItem.js +3 -1
  23. package/dist/esm/models/SubtreeChunkGroup.d.ts +62 -0
  24. package/dist/esm/models/SubtreeChunkGroup.js +52 -0
  25. package/dist/esm/models/SubtreeChunksResponse.d.ts +48 -0
  26. package/dist/esm/models/SubtreeChunksResponse.js +45 -0
  27. package/dist/esm/models/VersionChunkIdsResponse.d.ts +47 -0
  28. package/dist/esm/models/VersionChunkIdsResponse.js +44 -0
  29. package/dist/esm/models/index.d.ts +4 -0
  30. package/dist/esm/models/index.js +4 -0
  31. package/dist/models/ChunkBulkResponse.d.ts +139 -0
  32. package/dist/models/ChunkBulkResponse.js +108 -0
  33. package/dist/models/ChunkContentItem.d.ts +1 -1
  34. package/dist/models/ChunkContentItem.js +3 -1
  35. package/dist/models/ChunkSearchRequest.d.ts +17 -5
  36. package/dist/models/ChunkSearchRequest.js +12 -4
  37. package/dist/models/DocumentResponse.d.ts +1 -1
  38. package/dist/models/DocumentResponse.js +3 -1
  39. package/dist/models/FolderResponse.d.ts +1 -1
  40. package/dist/models/FolderResponse.js +3 -1
  41. package/dist/models/SectionContentItem.d.ts +1 -1
  42. package/dist/models/SectionContentItem.js +3 -1
  43. package/dist/models/SubtreeChunkGroup.d.ts +62 -0
  44. package/dist/models/SubtreeChunkGroup.js +60 -0
  45. package/dist/models/SubtreeChunksResponse.d.ts +48 -0
  46. package/dist/models/SubtreeChunksResponse.js +53 -0
  47. package/dist/models/VersionChunkIdsResponse.d.ts +47 -0
  48. package/dist/models/VersionChunkIdsResponse.js +52 -0
  49. package/dist/models/index.d.ts +4 -0
  50. package/dist/models/index.js +4 -0
  51. package/docs/ChunkBulkResponse.md +65 -0
  52. package/docs/ChunkSearchRequest.md +8 -4
  53. package/docs/ChunksApi.md +145 -1
  54. package/docs/PathPartsApi.md +147 -0
  55. package/docs/SubtreeChunkGroup.md +39 -0
  56. package/docs/SubtreeChunksResponse.md +35 -0
  57. package/docs/VersionChunkIdsResponse.md +35 -0
  58. package/package.json +1 -1
  59. package/src/apis/ChunksApi.ts +165 -4
  60. package/src/apis/PathPartsApi.ts +166 -0
  61. package/src/models/ChunkBulkResponse.ts +232 -0
  62. package/src/models/ChunkContentItem.ts +3 -2
  63. package/src/models/ChunkSearchRequest.ts +29 -9
  64. package/src/models/DocumentResponse.ts +3 -2
  65. package/src/models/FolderResponse.ts +3 -2
  66. package/src/models/SectionContentItem.ts +3 -2
  67. package/src/models/SubtreeChunkGroup.ts +104 -0
  68. package/src/models/SubtreeChunksResponse.ts +91 -0
  69. package/src/models/VersionChunkIdsResponse.ts +83 -0
  70. package/src/models/index.ts +4 -0
@@ -4,6 +4,7 @@
4
4
  README.md
5
5
  docs/AuthApi.md
6
6
  docs/BulkTagRequest.md
7
+ docs/ChunkBulkResponse.md
7
8
  docs/ChunkContentItem.md
8
9
  docs/ChunkLineageResponse.md
9
10
  docs/ChunkLineagesApi.md
@@ -88,6 +89,8 @@ docs/SectionContentItemOrChunkContentItem.md
88
89
  docs/SectionResponse.md
89
90
  docs/SectionsApi.md
90
91
  docs/SignInRequest.md
92
+ docs/SubtreeChunkGroup.md
93
+ docs/SubtreeChunksResponse.md
91
94
  docs/TagResponse.md
92
95
  docs/TagsApi.md
93
96
  docs/TenantResponse.md
@@ -113,6 +116,7 @@ docs/UserPermissionsApi.md
113
116
  docs/UserResponse.md
114
117
  docs/UsersApi.md
115
118
  docs/ValidationError.md
119
+ docs/VersionChunkIdsResponse.md
116
120
  docs/WorkflowAction.md
117
121
  docs/WorkflowActionResponse.md
118
122
  docs/WorkflowDetailResponse.md
@@ -139,6 +143,7 @@ src/apis/WorkflowsApi.ts
139
143
  src/apis/index.ts
140
144
  src/index.ts
141
145
  src/models/BulkTagRequest.ts
146
+ src/models/ChunkBulkResponse.ts
142
147
  src/models/ChunkContentItem.ts
143
148
  src/models/ChunkLineageResponse.ts
144
149
  src/models/ChunkMetadataInput.ts
@@ -214,6 +219,8 @@ src/models/SectionContentItem.ts
214
219
  src/models/SectionContentItemOrChunkContentItem.ts
215
220
  src/models/SectionResponse.ts
216
221
  src/models/SignInRequest.ts
222
+ src/models/SubtreeChunkGroup.ts
223
+ src/models/SubtreeChunksResponse.ts
217
224
  src/models/TagResponse.ts
218
225
  src/models/TenantResponse.ts
219
226
  src/models/TenantUserEditRequest.ts
@@ -233,6 +240,7 @@ src/models/UpdateThreadRequest.ts
233
240
  src/models/UpdateUserRequest.ts
234
241
  src/models/UserResponse.ts
235
242
  src/models/ValidationError.ts
243
+ src/models/VersionChunkIdsResponse.ts
236
244
  src/models/WorkflowAction.ts
237
245
  src/models/WorkflowActionResponse.ts
238
246
  src/models/WorkflowDetailResponse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.24.0
1
+ # @knowledge-stack/ksapi@1.25.1
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -66,6 +66,8 @@ All URIs are relative to *http://localhost:8000*
66
66
  *ChunksApi* | [**createChunk**](docs/ChunksApi.md#createchunkoperation) | **POST** /v1/chunks | Create Chunk Handler
67
67
  *ChunksApi* | [**deleteChunk**](docs/ChunksApi.md#deletechunk) | **DELETE** /v1/chunks/{chunk_id} | Delete Chunk Handler
68
68
  *ChunksApi* | [**getChunk**](docs/ChunksApi.md#getchunk) | **GET** /v1/chunks/{chunk_id} | Get Chunk Handler
69
+ *ChunksApi* | [**getChunksBulk**](docs/ChunksApi.md#getchunksbulk) | **GET** /v1/chunks/bulk | Get Chunks Bulk Handler
70
+ *ChunksApi* | [**getVersionChunkIds**](docs/ChunksApi.md#getversionchunkids) | **GET** /v1/chunks/version-chunk-ids | Get Version Chunk Ids Handler
69
71
  *ChunksApi* | [**searchChunks**](docs/ChunksApi.md#searchchunks) | **POST** /v1/chunks/search | Search Chunks Handler
70
72
  *ChunksApi* | [**updateChunkContent**](docs/ChunksApi.md#updatechunkcontentoperation) | **PATCH** /v1/chunks/{chunk_id}/content | Update Chunk Content Handler
71
73
  *ChunksApi* | [**updateChunkMetadata**](docs/ChunksApi.md#updatechunkmetadataoperation) | **PATCH** /v1/chunks/{chunk_id} | Update Chunk Metadata Handler
@@ -97,6 +99,8 @@ All URIs are relative to *http://localhost:8000*
97
99
  *PathPartsApi* | [**bulkAddPathPartTags**](docs/PathPartsApi.md#bulkaddpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Bulk Add Path Part Tags Handler
98
100
  *PathPartsApi* | [**bulkRemovePathPartTags**](docs/PathPartsApi.md#bulkremovepathparttags) | **DELETE** /v1/path-parts/{path_part_id}/tags | Bulk Remove Path Part Tags Handler
99
101
  *PathPartsApi* | [**getPathPart**](docs/PathPartsApi.md#getpathpart) | **GET** /v1/path-parts/{path_part_id} | Get Path Part Handler
102
+ *PathPartsApi* | [**getPathPartSubtreeChunks**](docs/PathPartsApi.md#getpathpartsubtreechunks) | **GET** /v1/path-parts/{path_part_id}/subtree_chunks | Get Path Part Subtree Chunks Handler
103
+ *PathPartsApi* | [**getPathPartTags**](docs/PathPartsApi.md#getpathparttags) | **GET** /v1/path-parts/{path_part_id}/tags | Get Path Part Tags Handler
100
104
  *PathPartsApi* | [**listPathParts**](docs/PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler
101
105
  *SectionsApi* | [**createSection**](docs/SectionsApi.md#createsectionoperation) | **POST** /v1/sections | Create Section Handler
102
106
  *SectionsApi* | [**deleteSection**](docs/SectionsApi.md#deletesection) | **DELETE** /v1/sections/{section_id} | Delete Section Handler
@@ -138,6 +142,7 @@ All URIs are relative to *http://localhost:8000*
138
142
  ### Models
139
143
 
140
144
  - [BulkTagRequest](docs/BulkTagRequest.md)
145
+ - [ChunkBulkResponse](docs/ChunkBulkResponse.md)
141
146
  - [ChunkContentItem](docs/ChunkContentItem.md)
142
147
  - [ChunkLineageResponse](docs/ChunkLineageResponse.md)
143
148
  - [ChunkMetadataInput](docs/ChunkMetadataInput.md)
@@ -213,6 +218,8 @@ All URIs are relative to *http://localhost:8000*
213
218
  - [SectionContentItemOrChunkContentItem](docs/SectionContentItemOrChunkContentItem.md)
214
219
  - [SectionResponse](docs/SectionResponse.md)
215
220
  - [SignInRequest](docs/SignInRequest.md)
221
+ - [SubtreeChunkGroup](docs/SubtreeChunkGroup.md)
222
+ - [SubtreeChunksResponse](docs/SubtreeChunksResponse.md)
216
223
  - [TagResponse](docs/TagResponse.md)
217
224
  - [TenantResponse](docs/TenantResponse.md)
218
225
  - [TenantUserEditRequest](docs/TenantUserEditRequest.md)
@@ -232,6 +239,7 @@ All URIs are relative to *http://localhost:8000*
232
239
  - [UpdateUserRequest](docs/UpdateUserRequest.md)
233
240
  - [UserResponse](docs/UserResponse.md)
234
241
  - [ValidationError](docs/ValidationError.md)
242
+ - [VersionChunkIdsResponse](docs/VersionChunkIdsResponse.md)
235
243
  - [WorkflowAction](docs/WorkflowAction.md)
236
244
  - [WorkflowActionResponse](docs/WorkflowActionResponse.md)
237
245
  - [WorkflowDetailResponse](docs/WorkflowDetailResponse.md)
@@ -249,7 +257,7 @@ and is automatically generated by the
249
257
  [OpenAPI Generator](https://openapi-generator.tech) project:
250
258
 
251
259
  - API version: `0.1.0`
252
- - Package version: `1.24.0`
260
+ - Package version: `1.25.1`
253
261
  - Generator version: `7.20.0`
254
262
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
255
263
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest } from '../models/index';
13
+ import type { ChunkBulkResponse, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
14
14
  export interface CreateChunkOperationRequest {
15
15
  createChunkRequest: CreateChunkRequest;
16
16
  ksUat?: string | null;
@@ -23,6 +23,14 @@ export interface GetChunkRequest {
23
23
  chunkId: string;
24
24
  ksUat?: string | null;
25
25
  }
26
+ export interface GetChunksBulkRequest {
27
+ chunkIds?: Array<string> | null;
28
+ ksUat?: string | null;
29
+ }
30
+ export interface GetVersionChunkIdsRequest {
31
+ documentVersionId: string;
32
+ ksUat?: string | null;
33
+ }
26
34
  export interface SearchChunksRequest {
27
35
  chunkSearchRequest: ChunkSearchRequest;
28
36
  ksUat?: string | null;
@@ -113,6 +121,52 @@ export interface ChunksApiInterface {
113
121
  * Get Chunk Handler
114
122
  */
115
123
  getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
124
+ /**
125
+ * Creates request options for getChunksBulk without sending the request
126
+ * @param {Array<string>} [chunkIds] Chunk IDs to resolve (max 200)
127
+ * @param {string} [ksUat]
128
+ * @throws {RequiredError}
129
+ * @memberof ChunksApiInterface
130
+ */
131
+ getChunksBulkRequestOpts(requestParameters: GetChunksBulkRequest): Promise<runtime.RequestOpts>;
132
+ /**
133
+ * 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.
134
+ * @summary Get Chunks Bulk Handler
135
+ * @param {Array<string>} [chunkIds] Chunk IDs to resolve (max 200)
136
+ * @param {string} [ksUat]
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ * @memberof ChunksApiInterface
140
+ */
141
+ getChunksBulkRaw(requestParameters: GetChunksBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkBulkResponse>>>;
142
+ /**
143
+ * 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.
144
+ * Get Chunks Bulk Handler
145
+ */
146
+ getChunksBulk(requestParameters: GetChunksBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkBulkResponse>>;
147
+ /**
148
+ * Creates request options for getVersionChunkIds without sending the request
149
+ * @param {string} documentVersionId Document version ID
150
+ * @param {string} [ksUat]
151
+ * @throws {RequiredError}
152
+ * @memberof ChunksApiInterface
153
+ */
154
+ getVersionChunkIdsRequestOpts(requestParameters: GetVersionChunkIdsRequest): Promise<runtime.RequestOpts>;
155
+ /**
156
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
157
+ * @summary Get Version Chunk Ids Handler
158
+ * @param {string} documentVersionId Document version ID
159
+ * @param {string} [ksUat]
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ * @memberof ChunksApiInterface
163
+ */
164
+ getVersionChunkIdsRaw(requestParameters: GetVersionChunkIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VersionChunkIdsResponse>>;
165
+ /**
166
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
167
+ * Get Version Chunk Ids Handler
168
+ */
169
+ getVersionChunkIds(requestParameters: GetVersionChunkIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VersionChunkIdsResponse>;
116
170
  /**
117
171
  * Creates request options for searchChunks without sending the request
118
172
  * @param {ChunkSearchRequest} chunkSearchRequest
@@ -122,7 +176,7 @@ export interface ChunksApiInterface {
122
176
  */
123
177
  searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
124
178
  /**
125
- * Semantic search over chunks using vector similarity. Combines vector 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.
179
+ * 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.
126
180
  * @summary Search Chunks Handler
127
181
  * @param {ChunkSearchRequest} chunkSearchRequest
128
182
  * @param {string} [ksUat]
@@ -132,7 +186,7 @@ export interface ChunksApiInterface {
132
186
  */
133
187
  searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
134
188
  /**
135
- * Semantic search over chunks using vector similarity. Combines vector 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.
189
+ * 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.
136
190
  * Search Chunks Handler
137
191
  */
138
192
  searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
@@ -233,17 +287,45 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
233
287
  * Get Chunk Handler
234
288
  */
235
289
  getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
290
+ /**
291
+ * Creates request options for getChunksBulk without sending the request
292
+ */
293
+ getChunksBulkRequestOpts(requestParameters: GetChunksBulkRequest): Promise<runtime.RequestOpts>;
294
+ /**
295
+ * 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.
296
+ * Get Chunks Bulk Handler
297
+ */
298
+ getChunksBulkRaw(requestParameters: GetChunksBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkBulkResponse>>>;
299
+ /**
300
+ * 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.
301
+ * Get Chunks Bulk Handler
302
+ */
303
+ getChunksBulk(requestParameters?: GetChunksBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkBulkResponse>>;
304
+ /**
305
+ * Creates request options for getVersionChunkIds without sending the request
306
+ */
307
+ getVersionChunkIdsRequestOpts(requestParameters: GetVersionChunkIdsRequest): Promise<runtime.RequestOpts>;
308
+ /**
309
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
310
+ * Get Version Chunk Ids Handler
311
+ */
312
+ getVersionChunkIdsRaw(requestParameters: GetVersionChunkIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VersionChunkIdsResponse>>;
313
+ /**
314
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
315
+ * Get Version Chunk Ids Handler
316
+ */
317
+ getVersionChunkIds(requestParameters: GetVersionChunkIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VersionChunkIdsResponse>;
236
318
  /**
237
319
  * Creates request options for searchChunks without sending the request
238
320
  */
239
321
  searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
240
322
  /**
241
- * Semantic search over chunks using vector similarity. Combines vector 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.
323
+ * 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.
242
324
  * Search Chunks Handler
243
325
  */
244
326
  searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
245
327
  /**
246
- * Semantic search over chunks using vector similarity. Combines vector 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.
328
+ * 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.
247
329
  * Search Chunks Handler
248
330
  */
249
331
  searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
@@ -152,6 +152,89 @@ class ChunksApi extends runtime.BaseAPI {
152
152
  return yield response.value();
153
153
  });
154
154
  }
155
+ /**
156
+ * Creates request options for getChunksBulk without sending the request
157
+ */
158
+ getChunksBulkRequestOpts(requestParameters) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ const queryParameters = {};
161
+ if (requestParameters['chunkIds'] != null) {
162
+ queryParameters['chunk_ids'] = requestParameters['chunkIds'];
163
+ }
164
+ const headerParameters = {};
165
+ let urlPath = `/v1/chunks/bulk`;
166
+ return {
167
+ path: urlPath,
168
+ method: 'GET',
169
+ headers: headerParameters,
170
+ query: queryParameters,
171
+ };
172
+ });
173
+ }
174
+ /**
175
+ * 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.
176
+ * Get Chunks Bulk Handler
177
+ */
178
+ getChunksBulkRaw(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ const requestOptions = yield this.getChunksBulkRequestOpts(requestParameters);
181
+ const response = yield this.request(requestOptions, initOverrides);
182
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ChunkBulkResponseFromJSON));
183
+ });
184
+ }
185
+ /**
186
+ * 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.
187
+ * Get Chunks Bulk Handler
188
+ */
189
+ getChunksBulk() {
190
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
191
+ const response = yield this.getChunksBulkRaw(requestParameters, initOverrides);
192
+ return yield response.value();
193
+ });
194
+ }
195
+ /**
196
+ * Creates request options for getVersionChunkIds without sending the request
197
+ */
198
+ getVersionChunkIdsRequestOpts(requestParameters) {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ if (requestParameters['documentVersionId'] == null) {
201
+ throw new runtime.RequiredError('documentVersionId', 'Required parameter "documentVersionId" was null or undefined when calling getVersionChunkIds().');
202
+ }
203
+ const queryParameters = {};
204
+ if (requestParameters['documentVersionId'] != null) {
205
+ queryParameters['document_version_id'] = requestParameters['documentVersionId'];
206
+ }
207
+ const headerParameters = {};
208
+ let urlPath = `/v1/chunks/version-chunk-ids`;
209
+ return {
210
+ path: urlPath,
211
+ method: 'GET',
212
+ headers: headerParameters,
213
+ query: queryParameters,
214
+ };
215
+ });
216
+ }
217
+ /**
218
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
219
+ * Get Version Chunk Ids Handler
220
+ */
221
+ getVersionChunkIdsRaw(requestParameters, initOverrides) {
222
+ return __awaiter(this, void 0, void 0, function* () {
223
+ const requestOptions = yield this.getVersionChunkIdsRequestOpts(requestParameters);
224
+ const response = yield this.request(requestOptions, initOverrides);
225
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VersionChunkIdsResponseFromJSON)(jsonValue));
226
+ });
227
+ }
228
+ /**
229
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
230
+ * Get Version Chunk Ids Handler
231
+ */
232
+ getVersionChunkIds(requestParameters, initOverrides) {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ const response = yield this.getVersionChunkIdsRaw(requestParameters, initOverrides);
235
+ return yield response.value();
236
+ });
237
+ }
155
238
  /**
156
239
  * Creates request options for searchChunks without sending the request
157
240
  */
@@ -174,7 +257,7 @@ class ChunksApi extends runtime.BaseAPI {
174
257
  });
175
258
  }
176
259
  /**
177
- * Semantic search over chunks using vector similarity. Combines vector 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.
260
+ * 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.
178
261
  * Search Chunks Handler
179
262
  */
180
263
  searchChunksRaw(requestParameters, initOverrides) {
@@ -185,7 +268,7 @@ class ChunksApi extends runtime.BaseAPI {
185
268
  });
186
269
  }
187
270
  /**
188
- * Semantic search over chunks using vector similarity. Combines vector 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.
271
+ * 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.
189
272
  * Search Chunks Handler
190
273
  */
191
274
  searchChunks(requestParameters, initOverrides) {
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BulkTagRequest, PaginatedResponsePathPartResponse, PathOrder, PathPartResponse, PathPartTagsResponse } from '../models/index';
13
+ import type { BulkTagRequest, PaginatedResponsePathPartResponse, PathOrder, PathPartResponse, PathPartTagsResponse, SubtreeChunksResponse } from '../models/index';
14
14
  export interface BulkAddPathPartTagsRequest {
15
15
  pathPartId: string;
16
16
  bulkTagRequest: BulkTagRequest;
@@ -25,6 +25,15 @@ export interface GetPathPartRequest {
25
25
  pathPartId: string;
26
26
  ksUat?: string | null;
27
27
  }
28
+ export interface GetPathPartSubtreeChunksRequest {
29
+ pathPartId: string;
30
+ ksUat?: string | null;
31
+ }
32
+ export interface GetPathPartTagsRequest {
33
+ pathPartId: string;
34
+ includeInherited?: boolean;
35
+ ksUat?: string | null;
36
+ }
28
37
  export interface ListPathPartsRequest {
29
38
  parentPathId?: string | null;
30
39
  maxDepth?: number;
@@ -113,6 +122,54 @@ export interface PathPartsApiInterface {
113
122
  * Get Path Part Handler
114
123
  */
115
124
  getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
125
+ /**
126
+ * Creates request options for getPathPartSubtreeChunks without sending the request
127
+ * @param {string} pathPartId
128
+ * @param {string} [ksUat]
129
+ * @throws {RequiredError}
130
+ * @memberof PathPartsApiInterface
131
+ */
132
+ getPathPartSubtreeChunksRequestOpts(requestParameters: GetPathPartSubtreeChunksRequest): Promise<runtime.RequestOpts>;
133
+ /**
134
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
135
+ * @summary Get Path Part Subtree Chunks Handler
136
+ * @param {string} pathPartId
137
+ * @param {string} [ksUat]
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ * @memberof PathPartsApiInterface
141
+ */
142
+ getPathPartSubtreeChunksRaw(requestParameters: GetPathPartSubtreeChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubtreeChunksResponse>>;
143
+ /**
144
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
145
+ * Get Path Part Subtree Chunks Handler
146
+ */
147
+ getPathPartSubtreeChunks(requestParameters: GetPathPartSubtreeChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubtreeChunksResponse>;
148
+ /**
149
+ * Creates request options for getPathPartTags without sending the request
150
+ * @param {string} pathPartId
151
+ * @param {boolean} [includeInherited] Include tags inherited from ancestor path parts
152
+ * @param {string} [ksUat]
153
+ * @throws {RequiredError}
154
+ * @memberof PathPartsApiInterface
155
+ */
156
+ getPathPartTagsRequestOpts(requestParameters: GetPathPartTagsRequest): Promise<runtime.RequestOpts>;
157
+ /**
158
+ * Get tags for a path part. When include_inherited=False (default), returns only directly-attached tags. When include_inherited=True, walks the ancestor chain and returns the deduplicated union of tags from all ancestors (including the path part itself).
159
+ * @summary Get Path Part Tags Handler
160
+ * @param {string} pathPartId
161
+ * @param {boolean} [includeInherited] Include tags inherited from ancestor path parts
162
+ * @param {string} [ksUat]
163
+ * @param {*} [options] Override http request option.
164
+ * @throws {RequiredError}
165
+ * @memberof PathPartsApiInterface
166
+ */
167
+ getPathPartTagsRaw(requestParameters: GetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
168
+ /**
169
+ * Get tags for a path part. When include_inherited=False (default), returns only directly-attached tags. When include_inherited=True, walks the ancestor chain and returns the deduplicated union of tags from all ancestors (including the path part itself).
170
+ * Get Path Part Tags Handler
171
+ */
172
+ getPathPartTags(requestParameters: GetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
116
173
  /**
117
174
  * Creates request options for listPathParts without sending the request
118
175
  * @param {string} [parentPathId] Parent PathPart ID (defaults to root)
@@ -191,6 +248,34 @@ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsAp
191
248
  * Get Path Part Handler
192
249
  */
193
250
  getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
251
+ /**
252
+ * Creates request options for getPathPartSubtreeChunks without sending the request
253
+ */
254
+ getPathPartSubtreeChunksRequestOpts(requestParameters: GetPathPartSubtreeChunksRequest): Promise<runtime.RequestOpts>;
255
+ /**
256
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
257
+ * Get Path Part Subtree Chunks Handler
258
+ */
259
+ getPathPartSubtreeChunksRaw(requestParameters: GetPathPartSubtreeChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubtreeChunksResponse>>;
260
+ /**
261
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
262
+ * Get Path Part Subtree Chunks Handler
263
+ */
264
+ getPathPartSubtreeChunks(requestParameters: GetPathPartSubtreeChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubtreeChunksResponse>;
265
+ /**
266
+ * Creates request options for getPathPartTags without sending the request
267
+ */
268
+ getPathPartTagsRequestOpts(requestParameters: GetPathPartTagsRequest): Promise<runtime.RequestOpts>;
269
+ /**
270
+ * Get tags for a path part. When include_inherited=False (default), returns only directly-attached tags. When include_inherited=True, walks the ancestor chain and returns the deduplicated union of tags from all ancestors (including the path part itself).
271
+ * Get Path Part Tags Handler
272
+ */
273
+ getPathPartTagsRaw(requestParameters: GetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
274
+ /**
275
+ * Get tags for a path part. When include_inherited=False (default), returns only directly-attached tags. When include_inherited=True, walks the ancestor chain and returns the deduplicated union of tags from all ancestors (including the path part itself).
276
+ * Get Path Part Tags Handler
277
+ */
278
+ getPathPartTags(requestParameters: GetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
194
279
  /**
195
280
  * Creates request options for listPathParts without sending the request
196
281
  */
@@ -162,6 +162,91 @@ class PathPartsApi extends runtime.BaseAPI {
162
162
  return yield response.value();
163
163
  });
164
164
  }
165
+ /**
166
+ * Creates request options for getPathPartSubtreeChunks without sending the request
167
+ */
168
+ getPathPartSubtreeChunksRequestOpts(requestParameters) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ if (requestParameters['pathPartId'] == null) {
171
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getPathPartSubtreeChunks().');
172
+ }
173
+ const queryParameters = {};
174
+ const headerParameters = {};
175
+ let urlPath = `/v1/path-parts/{path_part_id}/subtree_chunks`;
176
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
177
+ return {
178
+ path: urlPath,
179
+ method: 'GET',
180
+ headers: headerParameters,
181
+ query: queryParameters,
182
+ };
183
+ });
184
+ }
185
+ /**
186
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
187
+ * Get Path Part Subtree Chunks Handler
188
+ */
189
+ getPathPartSubtreeChunksRaw(requestParameters, initOverrides) {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ const requestOptions = yield this.getPathPartSubtreeChunksRequestOpts(requestParameters);
192
+ const response = yield this.request(requestOptions, initOverrides);
193
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubtreeChunksResponseFromJSON)(jsonValue));
194
+ });
195
+ }
196
+ /**
197
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
198
+ * Get Path Part Subtree Chunks Handler
199
+ */
200
+ getPathPartSubtreeChunks(requestParameters, initOverrides) {
201
+ return __awaiter(this, void 0, void 0, function* () {
202
+ const response = yield this.getPathPartSubtreeChunksRaw(requestParameters, initOverrides);
203
+ return yield response.value();
204
+ });
205
+ }
206
+ /**
207
+ * Creates request options for getPathPartTags without sending the request
208
+ */
209
+ getPathPartTagsRequestOpts(requestParameters) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ if (requestParameters['pathPartId'] == null) {
212
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getPathPartTags().');
213
+ }
214
+ const queryParameters = {};
215
+ if (requestParameters['includeInherited'] != null) {
216
+ queryParameters['include_inherited'] = requestParameters['includeInherited'];
217
+ }
218
+ const headerParameters = {};
219
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
220
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
221
+ return {
222
+ path: urlPath,
223
+ method: 'GET',
224
+ headers: headerParameters,
225
+ query: queryParameters,
226
+ };
227
+ });
228
+ }
229
+ /**
230
+ * Get tags for a path part. When include_inherited=False (default), returns only directly-attached tags. When include_inherited=True, walks the ancestor chain and returns the deduplicated union of tags from all ancestors (including the path part itself).
231
+ * Get Path Part Tags Handler
232
+ */
233
+ getPathPartTagsRaw(requestParameters, initOverrides) {
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ const requestOptions = yield this.getPathPartTagsRequestOpts(requestParameters);
236
+ const response = yield this.request(requestOptions, initOverrides);
237
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PathPartTagsResponseFromJSON)(jsonValue));
238
+ });
239
+ }
240
+ /**
241
+ * Get tags for a path part. When include_inherited=False (default), returns only directly-attached tags. When include_inherited=True, walks the ancestor chain and returns the deduplicated union of tags from all ancestors (including the path part itself).
242
+ * Get Path Part Tags Handler
243
+ */
244
+ getPathPartTags(requestParameters, initOverrides) {
245
+ return __awaiter(this, void 0, void 0, function* () {
246
+ const response = yield this.getPathPartTagsRaw(requestParameters, initOverrides);
247
+ return yield response.value();
248
+ });
249
+ }
165
250
  /**
166
251
  * Creates request options for listPathParts without sending the request
167
252
  */