@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
@@ -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>>;
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { ChunkResponseFromJSON, ChunkSearchRequestToJSON, CreateChunkRequestToJSON, ScoredChunkResponseFromJSON, UpdateChunkContentRequestToJSON, UpdateChunkMetadataRequestToJSON, } from '../models/index';
24
+ import { ChunkBulkResponseFromJSON, ChunkResponseFromJSON, ChunkSearchRequestToJSON, CreateChunkRequestToJSON, ScoredChunkResponseFromJSON, UpdateChunkContentRequestToJSON, UpdateChunkMetadataRequestToJSON, VersionChunkIdsResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -149,6 +149,89 @@ export class ChunksApi extends runtime.BaseAPI {
149
149
  return yield response.value();
150
150
  });
151
151
  }
152
+ /**
153
+ * Creates request options for getChunksBulk without sending the request
154
+ */
155
+ getChunksBulkRequestOpts(requestParameters) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const queryParameters = {};
158
+ if (requestParameters['chunkIds'] != null) {
159
+ queryParameters['chunk_ids'] = requestParameters['chunkIds'];
160
+ }
161
+ const headerParameters = {};
162
+ let urlPath = `/v1/chunks/bulk`;
163
+ return {
164
+ path: urlPath,
165
+ method: 'GET',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ };
169
+ });
170
+ }
171
+ /**
172
+ * Batch-fetch chunks with their full ancestor path part IDs. Returns standard chunk data plus path_part_id_segments (the ordered ancestor chain from root to chunk) for each requested chunk. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
173
+ * Get Chunks Bulk Handler
174
+ */
175
+ getChunksBulkRaw(requestParameters, initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const requestOptions = yield this.getChunksBulkRequestOpts(requestParameters);
178
+ const response = yield this.request(requestOptions, initOverrides);
179
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ChunkBulkResponseFromJSON));
180
+ });
181
+ }
182
+ /**
183
+ * Batch-fetch chunks with their full ancestor path part IDs. Returns standard chunk data plus path_part_id_segments (the ordered ancestor chain from root to chunk) for each requested chunk. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
184
+ * Get Chunks Bulk Handler
185
+ */
186
+ getChunksBulk() {
187
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
188
+ const response = yield this.getChunksBulkRaw(requestParameters, initOverrides);
189
+ return yield response.value();
190
+ });
191
+ }
192
+ /**
193
+ * Creates request options for getVersionChunkIds without sending the request
194
+ */
195
+ getVersionChunkIdsRequestOpts(requestParameters) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ if (requestParameters['documentVersionId'] == null) {
198
+ throw new runtime.RequiredError('documentVersionId', 'Required parameter "documentVersionId" was null or undefined when calling getVersionChunkIds().');
199
+ }
200
+ const queryParameters = {};
201
+ if (requestParameters['documentVersionId'] != null) {
202
+ queryParameters['document_version_id'] = requestParameters['documentVersionId'];
203
+ }
204
+ const headerParameters = {};
205
+ let urlPath = `/v1/chunks/version-chunk-ids`;
206
+ return {
207
+ path: urlPath,
208
+ method: 'GET',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ };
212
+ });
213
+ }
214
+ /**
215
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
216
+ * Get Version Chunk Ids Handler
217
+ */
218
+ getVersionChunkIdsRaw(requestParameters, initOverrides) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ const requestOptions = yield this.getVersionChunkIdsRequestOpts(requestParameters);
221
+ const response = yield this.request(requestOptions, initOverrides);
222
+ return new runtime.JSONApiResponse(response, (jsonValue) => VersionChunkIdsResponseFromJSON(jsonValue));
223
+ });
224
+ }
225
+ /**
226
+ * Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
227
+ * Get Version Chunk Ids Handler
228
+ */
229
+ getVersionChunkIds(requestParameters, initOverrides) {
230
+ return __awaiter(this, void 0, void 0, function* () {
231
+ const response = yield this.getVersionChunkIdsRaw(requestParameters, initOverrides);
232
+ return yield response.value();
233
+ });
234
+ }
152
235
  /**
153
236
  * Creates request options for searchChunks without sending the request
154
237
  */
@@ -171,7 +254,7 @@ export class ChunksApi extends runtime.BaseAPI {
171
254
  });
172
255
  }
173
256
  /**
174
- * 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.
257
+ * Semantic search over chunks using Qdrant vector similarity. Combines vector similarity with path-based authorization and optional metadata filters. Uses Qdrant for vector search and hydrates results from Postgres.
175
258
  * Search Chunks Handler
176
259
  */
177
260
  searchChunksRaw(requestParameters, initOverrides) {
@@ -182,7 +265,7 @@ export class ChunksApi extends runtime.BaseAPI {
182
265
  });
183
266
  }
184
267
  /**
185
- * 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.
268
+ * Semantic search over chunks using Qdrant vector similarity. Combines vector similarity with path-based authorization and optional metadata filters. Uses Qdrant for vector search and hydrates results from Postgres.
186
269
  * Search Chunks Handler
187
270
  */
188
271
  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
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { BulkTagRequestToJSON, PaginatedResponsePathPartResponseFromJSON, PathPartResponseFromJSON, PathPartTagsResponseFromJSON, } from '../models/index';
24
+ import { BulkTagRequestToJSON, PaginatedResponsePathPartResponseFromJSON, PathPartResponseFromJSON, PathPartTagsResponseFromJSON, SubtreeChunksResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -159,6 +159,91 @@ export class PathPartsApi extends runtime.BaseAPI {
159
159
  return yield response.value();
160
160
  });
161
161
  }
162
+ /**
163
+ * Creates request options for getPathPartSubtreeChunks without sending the request
164
+ */
165
+ getPathPartSubtreeChunksRequestOpts(requestParameters) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ if (requestParameters['pathPartId'] == null) {
168
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getPathPartSubtreeChunks().');
169
+ }
170
+ const queryParameters = {};
171
+ const headerParameters = {};
172
+ let urlPath = `/v1/path-parts/{path_part_id}/subtree_chunks`;
173
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
174
+ return {
175
+ path: urlPath,
176
+ method: 'GET',
177
+ headers: headerParameters,
178
+ query: queryParameters,
179
+ };
180
+ });
181
+ }
182
+ /**
183
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
184
+ * Get Path Part Subtree Chunks Handler
185
+ */
186
+ getPathPartSubtreeChunksRaw(requestParameters, initOverrides) {
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ const requestOptions = yield this.getPathPartSubtreeChunksRequestOpts(requestParameters);
189
+ const response = yield this.request(requestOptions, initOverrides);
190
+ return new runtime.JSONApiResponse(response, (jsonValue) => SubtreeChunksResponseFromJSON(jsonValue));
191
+ });
192
+ }
193
+ /**
194
+ * Resolve all descendant chunks for a subtree root. Returns chunks grouped by identical (path_part_ids, tag_ids) tuples.
195
+ * Get Path Part Subtree Chunks Handler
196
+ */
197
+ getPathPartSubtreeChunks(requestParameters, initOverrides) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ const response = yield this.getPathPartSubtreeChunksRaw(requestParameters, initOverrides);
200
+ return yield response.value();
201
+ });
202
+ }
203
+ /**
204
+ * Creates request options for getPathPartTags without sending the request
205
+ */
206
+ getPathPartTagsRequestOpts(requestParameters) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ if (requestParameters['pathPartId'] == null) {
209
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getPathPartTags().');
210
+ }
211
+ const queryParameters = {};
212
+ if (requestParameters['includeInherited'] != null) {
213
+ queryParameters['include_inherited'] = requestParameters['includeInherited'];
214
+ }
215
+ const headerParameters = {};
216
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
217
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
218
+ return {
219
+ path: urlPath,
220
+ method: 'GET',
221
+ headers: headerParameters,
222
+ query: queryParameters,
223
+ };
224
+ });
225
+ }
226
+ /**
227
+ * 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).
228
+ * Get Path Part Tags Handler
229
+ */
230
+ getPathPartTagsRaw(requestParameters, initOverrides) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ const requestOptions = yield this.getPathPartTagsRequestOpts(requestParameters);
233
+ const response = yield this.request(requestOptions, initOverrides);
234
+ return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
235
+ });
236
+ }
237
+ /**
238
+ * 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).
239
+ * Get Path Part Tags Handler
240
+ */
241
+ getPathPartTags(requestParameters, initOverrides) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ const response = yield this.getPathPartTagsRaw(requestParameters, initOverrides);
244
+ return yield response.value();
245
+ });
246
+ }
162
247
  /**
163
248
  * Creates request options for listPathParts without sending the request
164
249
  */
@@ -0,0 +1,139 @@
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 type { ChunkMetadataOutput } from './ChunkMetadataOutput';
13
+ import type { ChunkType } from './ChunkType';
14
+ /**
15
+ * Chunk response with ancestor path part IDs for Qdrant payload construction.
16
+ * @export
17
+ * @interface ChunkBulkResponse
18
+ */
19
+ export interface ChunkBulkResponse {
20
+ /**
21
+ * Chunk ID
22
+ * @type {string}
23
+ * @memberof ChunkBulkResponse
24
+ */
25
+ id: string;
26
+ /**
27
+ * PathPart ID
28
+ * @type {string}
29
+ * @memberof ChunkBulkResponse
30
+ */
31
+ pathPartId: string;
32
+ /**
33
+ * ChunkContent ID
34
+ * @type {string}
35
+ * @memberof ChunkBulkResponse
36
+ */
37
+ contentId: string;
38
+ /**
39
+ * Chunk text content
40
+ * @type {string}
41
+ * @memberof ChunkBulkResponse
42
+ */
43
+ content: string;
44
+ /**
45
+ *
46
+ * @type {ChunkType}
47
+ * @memberof ChunkBulkResponse
48
+ */
49
+ chunkType: ChunkType;
50
+ /**
51
+ *
52
+ * @type {ChunkMetadataOutput}
53
+ * @memberof ChunkBulkResponse
54
+ */
55
+ chunkMetadata: ChunkMetadataOutput;
56
+ /**
57
+ * Parent PathPart ID
58
+ * @type {string}
59
+ * @memberof ChunkBulkResponse
60
+ */
61
+ parentPathId: string;
62
+ /**
63
+ * Previous sibling PathPart ID
64
+ * @type {string}
65
+ * @memberof ChunkBulkResponse
66
+ */
67
+ prevSiblingPathId?: string | null;
68
+ /**
69
+ * Next sibling PathPart ID
70
+ * @type {string}
71
+ * @memberof ChunkBulkResponse
72
+ */
73
+ nextSiblingPathId?: string | null;
74
+ /**
75
+ * Full materialized path from root
76
+ * @type {string}
77
+ * @memberof ChunkBulkResponse
78
+ */
79
+ materializedPath: string;
80
+ /**
81
+ * Whether this chunk is system-managed
82
+ * @type {boolean}
83
+ * @memberof ChunkBulkResponse
84
+ */
85
+ systemManaged: boolean;
86
+ /**
87
+ * Tenant ID
88
+ * @type {string}
89
+ * @memberof ChunkBulkResponse
90
+ */
91
+ tenantId: string;
92
+ /**
93
+ * Creation timestamp
94
+ * @type {Date}
95
+ * @memberof ChunkBulkResponse
96
+ */
97
+ createdAt: Date;
98
+ /**
99
+ * Last update timestamp
100
+ * @type {Date}
101
+ * @memberof ChunkBulkResponse
102
+ */
103
+ updatedAt: Date;
104
+ /**
105
+ * Presigned URL to download the chunk's visual asset (6-hour validity)
106
+ * @type {string}
107
+ * @memberof ChunkBulkResponse
108
+ */
109
+ assetS3Url?: string | null;
110
+ /**
111
+ * Ordered ancestor PathPart IDs from root to chunk
112
+ * @type {Array<string>}
113
+ * @memberof ChunkBulkResponse
114
+ */
115
+ pathPartIdSegments: Array<string>;
116
+ }
117
+ /**
118
+ * Check if a given object implements the ChunkBulkResponse interface.
119
+ */
120
+ export declare function instanceOfChunkBulkResponse(value: object): value is ChunkBulkResponse;
121
+ export declare function ChunkBulkResponseFromJSON(json: any): ChunkBulkResponse;
122
+ export declare function ChunkBulkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkBulkResponse;
123
+ export declare function ChunkBulkResponseToJSON(json: any): ChunkBulkResponse;
124
+ export declare function ChunkBulkResponseToJSONTyped(value?: ChunkBulkResponse | null, ignoreDiscriminator?: boolean): any;
125
+ export declare const ChunkBulkResponsePropertyValidationAttributesMap: {
126
+ [property: string]: {
127
+ maxLength?: number;
128
+ minLength?: number;
129
+ pattern?: string;
130
+ maximum?: number;
131
+ exclusiveMaximum?: boolean;
132
+ minimum?: number;
133
+ exclusiveMinimum?: boolean;
134
+ multipleOf?: number;
135
+ maxItems?: number;
136
+ minItems?: number;
137
+ uniqueItems?: boolean;
138
+ };
139
+ };