@knowledge-stack/ksapi 1.60.0 → 1.61.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 (62) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +7 -2
  3. package/dist/apis/ChunksApi.d.ts +54 -1
  4. package/dist/apis/ChunksApi.js +53 -0
  5. package/dist/apis/DocumentsApi.d.ts +7 -1
  6. package/dist/apis/DocumentsApi.js +6 -0
  7. package/dist/apis/SectionsApi.d.ts +45 -1
  8. package/dist/apis/SectionsApi.js +44 -0
  9. package/dist/esm/apis/ChunksApi.d.ts +54 -1
  10. package/dist/esm/apis/ChunksApi.js +54 -1
  11. package/dist/esm/apis/DocumentsApi.d.ts +7 -1
  12. package/dist/esm/apis/DocumentsApi.js +6 -0
  13. package/dist/esm/apis/SectionsApi.d.ts +45 -1
  14. package/dist/esm/apis/SectionsApi.js +45 -1
  15. package/dist/esm/models/ChunkNeighborsResponse.d.ts +57 -0
  16. package/dist/esm/models/ChunkNeighborsResponse.js +49 -0
  17. package/dist/esm/models/ConversionEngine.d.ts +25 -0
  18. package/dist/esm/models/ConversionEngine.js +43 -0
  19. package/dist/esm/models/DissolveSectionResponse.d.ts +53 -0
  20. package/dist/esm/models/DissolveSectionResponse.js +48 -0
  21. package/dist/esm/models/DocumentVersionMetadata.d.ts +4 -6
  22. package/dist/esm/models/DocumentVersionMetadata.js +0 -2
  23. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +13 -1
  24. package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -2
  25. package/dist/esm/models/PipelineState.d.ts +7 -0
  26. package/dist/esm/models/PipelineState.js +3 -0
  27. package/dist/esm/models/index.d.ts +3 -0
  28. package/dist/esm/models/index.js +3 -0
  29. package/dist/models/ChunkNeighborsResponse.d.ts +57 -0
  30. package/dist/models/ChunkNeighborsResponse.js +57 -0
  31. package/dist/models/ConversionEngine.d.ts +25 -0
  32. package/dist/models/ConversionEngine.js +51 -0
  33. package/dist/models/DissolveSectionResponse.d.ts +53 -0
  34. package/dist/models/DissolveSectionResponse.js +56 -0
  35. package/dist/models/DocumentVersionMetadata.d.ts +4 -6
  36. package/dist/models/DocumentVersionMetadata.js +0 -2
  37. package/dist/models/DocumentVersionMetadataUpdate.d.ts +13 -1
  38. package/dist/models/DocumentVersionMetadataUpdate.js +6 -2
  39. package/dist/models/PipelineState.d.ts +7 -0
  40. package/dist/models/PipelineState.js +3 -0
  41. package/dist/models/index.d.ts +3 -0
  42. package/dist/models/index.js +3 -0
  43. package/docs/ChunkNeighborsResponse.md +37 -0
  44. package/docs/ChunksApi.md +84 -0
  45. package/docs/ConversionEngine.md +33 -0
  46. package/docs/DissolveSectionResponse.md +37 -0
  47. package/docs/DocumentVersionMetadata.md +1 -3
  48. package/docs/DocumentVersionMetadataUpdate.md +6 -2
  49. package/docs/DocumentsApi.md +8 -2
  50. package/docs/PipelineState.md +2 -0
  51. package/docs/SectionsApi.md +75 -0
  52. package/package.json +1 -1
  53. package/src/apis/ChunksApi.ts +109 -0
  54. package/src/apis/DocumentsApi.ts +17 -0
  55. package/src/apis/SectionsApi.ts +88 -0
  56. package/src/models/ChunkNeighborsResponse.ts +103 -0
  57. package/src/models/ConversionEngine.ts +53 -0
  58. package/src/models/DissolveSectionResponse.ts +92 -0
  59. package/src/models/DocumentVersionMetadata.ts +4 -8
  60. package/src/models/DocumentVersionMetadataUpdate.ts +19 -3
  61. package/src/models/PipelineState.ts +15 -0
  62. package/src/models/index.ts +3 -0
@@ -18,12 +18,14 @@ docs/ChunkLineageResponse.md
18
18
  docs/ChunkLineagesApi.md
19
19
  docs/ChunkMetadataInput.md
20
20
  docs/ChunkMetadataOutput.md
21
+ docs/ChunkNeighborsResponse.md
21
22
  docs/ChunkResponse.md
22
23
  docs/ChunkSearchRequest.md
23
24
  docs/ChunkType.md
24
25
  docs/ChunksApi.md
25
26
  docs/Citation.md
26
27
  docs/ClearVersionContentsResponse.md
28
+ docs/ConversionEngine.md
27
29
  docs/CreateApiKeyRequest.md
28
30
  docs/CreateApiKeyResponse.md
29
31
  docs/CreateChunkLineageRequest.md
@@ -38,6 +40,7 @@ docs/CreateTenantRequest.md
38
40
  docs/CreateThreadMessageRequest.md
39
41
  docs/CreateThreadRequest.md
40
42
  docs/DefaultApi.md
43
+ docs/DissolveSectionResponse.md
41
44
  docs/DocumentOrigin.md
42
45
  docs/DocumentResponse.md
43
46
  docs/DocumentType.md
@@ -202,11 +205,13 @@ src/models/ChunkDocumentVersionResponse.ts
202
205
  src/models/ChunkLineageResponse.ts
203
206
  src/models/ChunkMetadataInput.ts
204
207
  src/models/ChunkMetadataOutput.ts
208
+ src/models/ChunkNeighborsResponse.ts
205
209
  src/models/ChunkResponse.ts
206
210
  src/models/ChunkSearchRequest.ts
207
211
  src/models/ChunkType.ts
208
212
  src/models/Citation.ts
209
213
  src/models/ClearVersionContentsResponse.ts
214
+ src/models/ConversionEngine.ts
210
215
  src/models/CreateApiKeyRequest.ts
211
216
  src/models/CreateApiKeyResponse.ts
212
217
  src/models/CreateChunkLineageRequest.ts
@@ -220,6 +225,7 @@ src/models/CreateTagRequest.ts
220
225
  src/models/CreateTenantRequest.ts
221
226
  src/models/CreateThreadMessageRequest.ts
222
227
  src/models/CreateThreadRequest.ts
228
+ src/models/DissolveSectionResponse.ts
223
229
  src/models/DocumentOrigin.ts
224
230
  src/models/DocumentResponse.ts
225
231
  src/models/DocumentType.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.60.0
1
+ # @knowledge-stack/ksapi@1.61.1
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -72,6 +72,7 @@ All URIs are relative to *http://localhost:8000*
72
72
  *ChunksApi* | [**createChunk**](docs/ChunksApi.md#createchunkoperation) | **POST** /v1/chunks | Create Chunk Handler
73
73
  *ChunksApi* | [**deleteChunk**](docs/ChunksApi.md#deletechunk) | **DELETE** /v1/chunks/{chunk_id} | Delete Chunk Handler
74
74
  *ChunksApi* | [**getChunk**](docs/ChunksApi.md#getchunk) | **GET** /v1/chunks/{chunk_id} | Get Chunk Handler
75
+ *ChunksApi* | [**getChunkNeighbors**](docs/ChunksApi.md#getchunkneighbors) | **GET** /v1/chunks/{chunk_id}/neighbors | Get Chunk Neighbors Handler
75
76
  *ChunksApi* | [**getChunksBulk**](docs/ChunksApi.md#getchunksbulk) | **GET** /v1/chunks/bulk | Get Chunks Bulk Handler
76
77
  *ChunksApi* | [**getVersionChunkIds**](docs/ChunksApi.md#getversionchunkids) | **GET** /v1/chunks/version-chunk-ids | Get Version Chunk Ids Handler
77
78
  *ChunksApi* | [**searchChunks**](docs/ChunksApi.md#searchchunks) | **POST** /v1/chunks/search | Search Chunks Handler
@@ -116,6 +117,7 @@ All URIs are relative to *http://localhost:8000*
116
117
  *PathPartsApi* | [**listPathParts**](docs/PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler
117
118
  *SectionsApi* | [**createSection**](docs/SectionsApi.md#createsectionoperation) | **POST** /v1/sections | Create Section Handler
118
119
  *SectionsApi* | [**deleteSection**](docs/SectionsApi.md#deletesection) | **DELETE** /v1/sections/{section_id} | Delete Section Handler
120
+ *SectionsApi* | [**dissolveSection**](docs/SectionsApi.md#dissolvesection) | **POST** /v1/sections/{section_id}/dissolve | Dissolve Section Handler
119
121
  *SectionsApi* | [**getSection**](docs/SectionsApi.md#getsection) | **GET** /v1/sections/{section_id} | Get Section Handler
120
122
  *SectionsApi* | [**getSectionsBulk**](docs/SectionsApi.md#getsectionsbulk) | **GET** /v1/sections/bulk | Get Sections Bulk Handler
121
123
  *SectionsApi* | [**updateSection**](docs/SectionsApi.md#updatesectionoperation) | **PATCH** /v1/sections/{section_id} | Update Section Handler
@@ -172,11 +174,13 @@ All URIs are relative to *http://localhost:8000*
172
174
  - [ChunkLineageResponse](docs/ChunkLineageResponse.md)
173
175
  - [ChunkMetadataInput](docs/ChunkMetadataInput.md)
174
176
  - [ChunkMetadataOutput](docs/ChunkMetadataOutput.md)
177
+ - [ChunkNeighborsResponse](docs/ChunkNeighborsResponse.md)
175
178
  - [ChunkResponse](docs/ChunkResponse.md)
176
179
  - [ChunkSearchRequest](docs/ChunkSearchRequest.md)
177
180
  - [ChunkType](docs/ChunkType.md)
178
181
  - [Citation](docs/Citation.md)
179
182
  - [ClearVersionContentsResponse](docs/ClearVersionContentsResponse.md)
183
+ - [ConversionEngine](docs/ConversionEngine.md)
180
184
  - [CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
181
185
  - [CreateApiKeyResponse](docs/CreateApiKeyResponse.md)
182
186
  - [CreateChunkLineageRequest](docs/CreateChunkLineageRequest.md)
@@ -190,6 +194,7 @@ All URIs are relative to *http://localhost:8000*
190
194
  - [CreateTenantRequest](docs/CreateTenantRequest.md)
191
195
  - [CreateThreadMessageRequest](docs/CreateThreadMessageRequest.md)
192
196
  - [CreateThreadRequest](docs/CreateThreadRequest.md)
197
+ - [DissolveSectionResponse](docs/DissolveSectionResponse.md)
193
198
  - [DocumentOrigin](docs/DocumentOrigin.md)
194
199
  - [DocumentResponse](docs/DocumentResponse.md)
195
200
  - [DocumentType](docs/DocumentType.md)
@@ -318,7 +323,7 @@ and is automatically generated by the
318
323
  [OpenAPI Generator](https://openapi-generator.tech) project:
319
324
 
320
325
  - API version: `0.1.0`
321
- - Package version: `1.60.0`
326
+ - Package version: `1.61.1`
322
327
  - Generator version: `7.20.0`
323
328
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
324
329
 
@@ -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, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
13
+ import type { ChunkBulkResponse, ChunkNeighborsResponse, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
14
14
  export interface CreateChunkOperationRequest {
15
15
  createChunkRequest: CreateChunkRequest;
16
16
  authorization?: string | null;
@@ -27,6 +27,14 @@ export interface GetChunkRequest {
27
27
  authorization?: string | null;
28
28
  ksUat?: string | null;
29
29
  }
30
+ export interface GetChunkNeighborsRequest {
31
+ chunkId: string;
32
+ prev?: number;
33
+ next?: number;
34
+ chunksOnly?: boolean;
35
+ authorization?: string | null;
36
+ ksUat?: string | null;
37
+ }
30
38
  export interface GetChunksBulkRequest {
31
39
  chunkIds?: Array<string> | null;
32
40
  authorization?: string | null;
@@ -138,6 +146,37 @@ export interface ChunksApiInterface {
138
146
  * Get Chunk Handler
139
147
  */
140
148
  getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
149
+ /**
150
+ * Creates request options for getChunkNeighbors without sending the request
151
+ * @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)
155
+ * @param {string} [authorization]
156
+ * @param {string} [ksUat]
157
+ * @throws {RequiredError}
158
+ * @memberof ChunksApiInterface
159
+ */
160
+ getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
161
+ /**
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.
163
+ * @summary Get Chunk Neighbors Handler
164
+ * @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)
168
+ * @param {string} [authorization]
169
+ * @param {string} [ksUat]
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ * @memberof ChunksApiInterface
173
+ */
174
+ getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
175
+ /**
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.
177
+ * Get Chunk Neighbors Handler
178
+ */
179
+ getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
141
180
  /**
142
181
  * Creates request options for getChunksBulk without sending the request
143
182
  * @param {Array<string>} [chunkIds] Chunk IDs to resolve (max 200)
@@ -314,6 +353,20 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
314
353
  * Get Chunk Handler
315
354
  */
316
355
  getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
356
+ /**
357
+ * Creates request options for getChunkNeighbors without sending the request
358
+ */
359
+ getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
360
+ /**
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.
362
+ * Get Chunk Neighbors Handler
363
+ */
364
+ getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
365
+ /**
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.
367
+ * Get Chunk Neighbors Handler
368
+ */
369
+ getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
317
370
  /**
318
371
  * Creates request options for getChunksBulk without sending the request
319
372
  */
@@ -164,6 +164,59 @@ class ChunksApi extends runtime.BaseAPI {
164
164
  return yield response.value();
165
165
  });
166
166
  }
167
+ /**
168
+ * Creates request options for getChunkNeighbors without sending the request
169
+ */
170
+ getChunkNeighborsRequestOpts(requestParameters) {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ if (requestParameters['chunkId'] == null) {
173
+ throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunkNeighbors().');
174
+ }
175
+ const queryParameters = {};
176
+ if (requestParameters['prev'] != null) {
177
+ queryParameters['prev'] = requestParameters['prev'];
178
+ }
179
+ if (requestParameters['next'] != null) {
180
+ queryParameters['next'] = requestParameters['next'];
181
+ }
182
+ if (requestParameters['chunksOnly'] != null) {
183
+ queryParameters['chunks_only'] = requestParameters['chunksOnly'];
184
+ }
185
+ const headerParameters = {};
186
+ if (requestParameters['authorization'] != null) {
187
+ headerParameters['authorization'] = String(requestParameters['authorization']);
188
+ }
189
+ let urlPath = `/v1/chunks/{chunk_id}/neighbors`;
190
+ urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
191
+ return {
192
+ path: urlPath,
193
+ method: 'GET',
194
+ headers: headerParameters,
195
+ query: queryParameters,
196
+ };
197
+ });
198
+ }
199
+ /**
200
+ * 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.
201
+ * Get Chunk Neighbors Handler
202
+ */
203
+ getChunkNeighborsRaw(requestParameters, initOverrides) {
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ const requestOptions = yield this.getChunkNeighborsRequestOpts(requestParameters);
206
+ const response = yield this.request(requestOptions, initOverrides);
207
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ChunkNeighborsResponseFromJSON)(jsonValue));
208
+ });
209
+ }
210
+ /**
211
+ * 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.
212
+ * Get Chunk Neighbors Handler
213
+ */
214
+ getChunkNeighbors(requestParameters, initOverrides) {
215
+ return __awaiter(this, void 0, void 0, function* () {
216
+ const response = yield this.getChunkNeighborsRaw(requestParameters, initOverrides);
217
+ return yield response.value();
218
+ });
219
+ }
167
220
  /**
168
221
  * Creates request options for getChunksBulk without sending the request
169
222
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ChunkType, CreateDocumentRequest, DocumentResponse, ImageTaxonomy, IngestDocumentResponse, IngestionMode, PaginatedResponseDocumentResponse, PathOrder, UpdateDocumentRequest } from '../models/index';
13
+ import type { ChunkType, ConversionEngine, CreateDocumentRequest, DocumentResponse, ImageTaxonomy, IngestDocumentResponse, IngestionMode, PaginatedResponseDocumentResponse, PathOrder, UpdateDocumentRequest } from '../models/index';
14
14
  export interface CreateDocumentOperationRequest {
15
15
  createDocumentRequest: CreateDocumentRequest;
16
16
  authorization?: string | null;
@@ -37,6 +37,7 @@ export interface IngestDocumentRequest {
37
37
  chunkType?: ChunkType;
38
38
  secondaryTaxonomy?: ImageTaxonomy;
39
39
  pageDpi?: number;
40
+ conversionEngine?: ConversionEngine;
40
41
  }
41
42
  export interface IngestDocumentVersionRequest {
42
43
  documentId: string;
@@ -47,6 +48,7 @@ export interface IngestDocumentVersionRequest {
47
48
  chunkType?: ChunkType;
48
49
  secondaryTaxonomy?: ImageTaxonomy;
49
50
  pageDpi?: number;
51
+ conversionEngine?: ConversionEngine;
50
52
  }
51
53
  export interface ListDocumentsRequest {
52
54
  parentPathPartId?: string | null;
@@ -158,6 +160,7 @@ export interface DocumentsApiInterface {
158
160
  * @param {ChunkType} [chunkType]
159
161
  * @param {ImageTaxonomy} [secondaryTaxonomy]
160
162
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
163
+ * @param {ConversionEngine} [conversionEngine]
161
164
  * @throws {RequiredError}
162
165
  * @memberof DocumentsApiInterface
163
166
  */
@@ -174,6 +177,7 @@ export interface DocumentsApiInterface {
174
177
  * @param {ChunkType} [chunkType]
175
178
  * @param {ImageTaxonomy} [secondaryTaxonomy]
176
179
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
180
+ * @param {ConversionEngine} [conversionEngine]
177
181
  * @param {*} [options] Override http request option.
178
182
  * @throws {RequiredError}
179
183
  * @memberof DocumentsApiInterface
@@ -194,6 +198,7 @@ export interface DocumentsApiInterface {
194
198
  * @param {ChunkType} [chunkType]
195
199
  * @param {ImageTaxonomy} [secondaryTaxonomy]
196
200
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
201
+ * @param {ConversionEngine} [conversionEngine]
197
202
  * @throws {RequiredError}
198
203
  * @memberof DocumentsApiInterface
199
204
  */
@@ -209,6 +214,7 @@ export interface DocumentsApiInterface {
209
214
  * @param {ChunkType} [chunkType]
210
215
  * @param {ImageTaxonomy} [secondaryTaxonomy]
211
216
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
217
+ * @param {ConversionEngine} [conversionEngine]
212
218
  * @param {*} [options] Override http request option.
213
219
  * @throws {RequiredError}
214
220
  * @memberof DocumentsApiInterface
@@ -216,6 +216,9 @@ class DocumentsApi extends runtime.BaseAPI {
216
216
  if (requestParameters['pageDpi'] != null) {
217
217
  formParams.append('page_dpi', requestParameters['pageDpi']);
218
218
  }
219
+ if (requestParameters['conversionEngine'] != null) {
220
+ formParams.append('conversion_engine', requestParameters['conversionEngine']);
221
+ }
219
222
  let urlPath = `/v1/documents/ingest`;
220
223
  return {
221
224
  path: urlPath,
@@ -293,6 +296,9 @@ class DocumentsApi extends runtime.BaseAPI {
293
296
  if (requestParameters['pageDpi'] != null) {
294
297
  formParams.append('page_dpi', requestParameters['pageDpi']);
295
298
  }
299
+ if (requestParameters['conversionEngine'] != null) {
300
+ formParams.append('conversion_engine', requestParameters['conversionEngine']);
301
+ }
296
302
  let urlPath = `/v1/documents/{document_id}/ingest`;
297
303
  urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
298
304
  return {
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateSectionRequest, SectionResponse, UpdateSectionRequest } from '../models/index';
13
+ import type { CreateSectionRequest, DissolveSectionResponse, SectionResponse, UpdateSectionRequest } from '../models/index';
14
14
  export interface CreateSectionOperationRequest {
15
15
  createSectionRequest: CreateSectionRequest;
16
16
  authorization?: string | null;
@@ -21,6 +21,11 @@ export interface DeleteSectionRequest {
21
21
  authorization?: string | null;
22
22
  ksUat?: string | null;
23
23
  }
24
+ export interface DissolveSectionRequest {
25
+ sectionId: string;
26
+ authorization?: string | null;
27
+ ksUat?: string | null;
28
+ }
24
29
  export interface GetSectionRequest {
25
30
  sectionId: string;
26
31
  authorization?: string | null;
@@ -94,6 +99,31 @@ export interface SectionsApiInterface {
94
99
  * Delete Section Handler
95
100
  */
96
101
  deleteSection(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
102
+ /**
103
+ * Creates request options for dissolveSection without sending the request
104
+ * @param {string} sectionId
105
+ * @param {string} [authorization]
106
+ * @param {string} [ksUat]
107
+ * @throws {RequiredError}
108
+ * @memberof SectionsApiInterface
109
+ */
110
+ dissolveSectionRequestOpts(requestParameters: DissolveSectionRequest): Promise<runtime.RequestOpts>;
111
+ /**
112
+ * Dissolve a section: convert it to a text chunk, reparent children, delete the section. The section\'s name becomes the content of a new TEXT chunk. Any children of the section are reparented to the section\'s parent, preserving order. The section itself is then deleted.
113
+ * @summary Dissolve Section Handler
114
+ * @param {string} sectionId
115
+ * @param {string} [authorization]
116
+ * @param {string} [ksUat]
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ * @memberof SectionsApiInterface
120
+ */
121
+ dissolveSectionRaw(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DissolveSectionResponse>>;
122
+ /**
123
+ * Dissolve a section: convert it to a text chunk, reparent children, delete the section. The section\'s name becomes the content of a new TEXT chunk. Any children of the section are reparented to the section\'s parent, preserving order. The section itself is then deleted.
124
+ * Dissolve Section Handler
125
+ */
126
+ dissolveSection(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DissolveSectionResponse>;
97
127
  /**
98
128
  * Creates request options for getSection without sending the request
99
129
  * @param {string} sectionId
@@ -204,6 +234,20 @@ export declare class SectionsApi extends runtime.BaseAPI implements SectionsApiI
204
234
  * Delete Section Handler
205
235
  */
206
236
  deleteSection(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
237
+ /**
238
+ * Creates request options for dissolveSection without sending the request
239
+ */
240
+ dissolveSectionRequestOpts(requestParameters: DissolveSectionRequest): Promise<runtime.RequestOpts>;
241
+ /**
242
+ * Dissolve a section: convert it to a text chunk, reparent children, delete the section. The section\'s name becomes the content of a new TEXT chunk. Any children of the section are reparented to the section\'s parent, preserving order. The section itself is then deleted.
243
+ * Dissolve Section Handler
244
+ */
245
+ dissolveSectionRaw(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DissolveSectionResponse>>;
246
+ /**
247
+ * Dissolve a section: convert it to a text chunk, reparent children, delete the section. The section\'s name becomes the content of a new TEXT chunk. Any children of the section are reparented to the section\'s parent, preserving order. The section itself is then deleted.
248
+ * Dissolve Section Handler
249
+ */
250
+ dissolveSection(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DissolveSectionResponse>;
207
251
  /**
208
252
  * Creates request options for getSection without sending the request
209
253
  */
@@ -117,6 +117,50 @@ class SectionsApi extends runtime.BaseAPI {
117
117
  yield this.deleteSectionRaw(requestParameters, initOverrides);
118
118
  });
119
119
  }
120
+ /**
121
+ * Creates request options for dissolveSection without sending the request
122
+ */
123
+ dissolveSectionRequestOpts(requestParameters) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ if (requestParameters['sectionId'] == null) {
126
+ throw new runtime.RequiredError('sectionId', 'Required parameter "sectionId" was null or undefined when calling dissolveSection().');
127
+ }
128
+ const queryParameters = {};
129
+ const headerParameters = {};
130
+ if (requestParameters['authorization'] != null) {
131
+ headerParameters['authorization'] = String(requestParameters['authorization']);
132
+ }
133
+ let urlPath = `/v1/sections/{section_id}/dissolve`;
134
+ urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
135
+ return {
136
+ path: urlPath,
137
+ method: 'POST',
138
+ headers: headerParameters,
139
+ query: queryParameters,
140
+ };
141
+ });
142
+ }
143
+ /**
144
+ * Dissolve a section: convert it to a text chunk, reparent children, delete the section. The section\'s name becomes the content of a new TEXT chunk. Any children of the section are reparented to the section\'s parent, preserving order. The section itself is then deleted.
145
+ * Dissolve Section Handler
146
+ */
147
+ dissolveSectionRaw(requestParameters, initOverrides) {
148
+ return __awaiter(this, void 0, void 0, function* () {
149
+ const requestOptions = yield this.dissolveSectionRequestOpts(requestParameters);
150
+ const response = yield this.request(requestOptions, initOverrides);
151
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DissolveSectionResponseFromJSON)(jsonValue));
152
+ });
153
+ }
154
+ /**
155
+ * Dissolve a section: convert it to a text chunk, reparent children, delete the section. The section\'s name becomes the content of a new TEXT chunk. Any children of the section are reparented to the section\'s parent, preserving order. The section itself is then deleted.
156
+ * Dissolve Section Handler
157
+ */
158
+ dissolveSection(requestParameters, initOverrides) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ const response = yield this.dissolveSectionRaw(requestParameters, initOverrides);
161
+ return yield response.value();
162
+ });
163
+ }
120
164
  /**
121
165
  * Creates request options for getSection without sending the request
122
166
  */
@@ -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, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
13
+ import type { ChunkBulkResponse, ChunkNeighborsResponse, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
14
14
  export interface CreateChunkOperationRequest {
15
15
  createChunkRequest: CreateChunkRequest;
16
16
  authorization?: string | null;
@@ -27,6 +27,14 @@ export interface GetChunkRequest {
27
27
  authorization?: string | null;
28
28
  ksUat?: string | null;
29
29
  }
30
+ export interface GetChunkNeighborsRequest {
31
+ chunkId: string;
32
+ prev?: number;
33
+ next?: number;
34
+ chunksOnly?: boolean;
35
+ authorization?: string | null;
36
+ ksUat?: string | null;
37
+ }
30
38
  export interface GetChunksBulkRequest {
31
39
  chunkIds?: Array<string> | null;
32
40
  authorization?: string | null;
@@ -138,6 +146,37 @@ export interface ChunksApiInterface {
138
146
  * Get Chunk Handler
139
147
  */
140
148
  getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
149
+ /**
150
+ * Creates request options for getChunkNeighbors without sending the request
151
+ * @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)
155
+ * @param {string} [authorization]
156
+ * @param {string} [ksUat]
157
+ * @throws {RequiredError}
158
+ * @memberof ChunksApiInterface
159
+ */
160
+ getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
161
+ /**
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.
163
+ * @summary Get Chunk Neighbors Handler
164
+ * @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)
168
+ * @param {string} [authorization]
169
+ * @param {string} [ksUat]
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ * @memberof ChunksApiInterface
173
+ */
174
+ getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
175
+ /**
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.
177
+ * Get Chunk Neighbors Handler
178
+ */
179
+ getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
141
180
  /**
142
181
  * Creates request options for getChunksBulk without sending the request
143
182
  * @param {Array<string>} [chunkIds] Chunk IDs to resolve (max 200)
@@ -314,6 +353,20 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
314
353
  * Get Chunk Handler
315
354
  */
316
355
  getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
356
+ /**
357
+ * Creates request options for getChunkNeighbors without sending the request
358
+ */
359
+ getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
360
+ /**
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.
362
+ * Get Chunk Neighbors Handler
363
+ */
364
+ getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
365
+ /**
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.
367
+ * Get Chunk Neighbors Handler
368
+ */
369
+ getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
317
370
  /**
318
371
  * Creates request options for getChunksBulk without sending the request
319
372
  */
@@ -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 { ChunkBulkResponseFromJSON, ChunkResponseFromJSON, ChunkSearchRequestToJSON, CreateChunkRequestToJSON, ScoredChunkResponseFromJSON, UpdateChunkContentRequestToJSON, UpdateChunkMetadataRequestToJSON, VersionChunkIdsResponseFromJSON, } from '../models/index';
24
+ import { ChunkBulkResponseFromJSON, ChunkNeighborsResponseFromJSON, ChunkResponseFromJSON, ChunkSearchRequestToJSON, CreateChunkRequestToJSON, ScoredChunkResponseFromJSON, UpdateChunkContentRequestToJSON, UpdateChunkMetadataRequestToJSON, VersionChunkIdsResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -161,6 +161,59 @@ export class ChunksApi extends runtime.BaseAPI {
161
161
  return yield response.value();
162
162
  });
163
163
  }
164
+ /**
165
+ * Creates request options for getChunkNeighbors without sending the request
166
+ */
167
+ getChunkNeighborsRequestOpts(requestParameters) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ if (requestParameters['chunkId'] == null) {
170
+ throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunkNeighbors().');
171
+ }
172
+ const queryParameters = {};
173
+ if (requestParameters['prev'] != null) {
174
+ queryParameters['prev'] = requestParameters['prev'];
175
+ }
176
+ if (requestParameters['next'] != null) {
177
+ queryParameters['next'] = requestParameters['next'];
178
+ }
179
+ if (requestParameters['chunksOnly'] != null) {
180
+ queryParameters['chunks_only'] = requestParameters['chunksOnly'];
181
+ }
182
+ const headerParameters = {};
183
+ if (requestParameters['authorization'] != null) {
184
+ headerParameters['authorization'] = String(requestParameters['authorization']);
185
+ }
186
+ let urlPath = `/v1/chunks/{chunk_id}/neighbors`;
187
+ urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
188
+ return {
189
+ path: urlPath,
190
+ method: 'GET',
191
+ headers: headerParameters,
192
+ query: queryParameters,
193
+ };
194
+ });
195
+ }
196
+ /**
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.
198
+ * Get Chunk Neighbors Handler
199
+ */
200
+ getChunkNeighborsRaw(requestParameters, initOverrides) {
201
+ return __awaiter(this, void 0, void 0, function* () {
202
+ const requestOptions = yield this.getChunkNeighborsRequestOpts(requestParameters);
203
+ const response = yield this.request(requestOptions, initOverrides);
204
+ return new runtime.JSONApiResponse(response, (jsonValue) => ChunkNeighborsResponseFromJSON(jsonValue));
205
+ });
206
+ }
207
+ /**
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.
209
+ * Get Chunk Neighbors Handler
210
+ */
211
+ getChunkNeighbors(requestParameters, initOverrides) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ const response = yield this.getChunkNeighborsRaw(requestParameters, initOverrides);
214
+ return yield response.value();
215
+ });
216
+ }
164
217
  /**
165
218
  * Creates request options for getChunksBulk without sending the request
166
219
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ChunkType, CreateDocumentRequest, DocumentResponse, ImageTaxonomy, IngestDocumentResponse, IngestionMode, PaginatedResponseDocumentResponse, PathOrder, UpdateDocumentRequest } from '../models/index';
13
+ import type { ChunkType, ConversionEngine, CreateDocumentRequest, DocumentResponse, ImageTaxonomy, IngestDocumentResponse, IngestionMode, PaginatedResponseDocumentResponse, PathOrder, UpdateDocumentRequest } from '../models/index';
14
14
  export interface CreateDocumentOperationRequest {
15
15
  createDocumentRequest: CreateDocumentRequest;
16
16
  authorization?: string | null;
@@ -37,6 +37,7 @@ export interface IngestDocumentRequest {
37
37
  chunkType?: ChunkType;
38
38
  secondaryTaxonomy?: ImageTaxonomy;
39
39
  pageDpi?: number;
40
+ conversionEngine?: ConversionEngine;
40
41
  }
41
42
  export interface IngestDocumentVersionRequest {
42
43
  documentId: string;
@@ -47,6 +48,7 @@ export interface IngestDocumentVersionRequest {
47
48
  chunkType?: ChunkType;
48
49
  secondaryTaxonomy?: ImageTaxonomy;
49
50
  pageDpi?: number;
51
+ conversionEngine?: ConversionEngine;
50
52
  }
51
53
  export interface ListDocumentsRequest {
52
54
  parentPathPartId?: string | null;
@@ -158,6 +160,7 @@ export interface DocumentsApiInterface {
158
160
  * @param {ChunkType} [chunkType]
159
161
  * @param {ImageTaxonomy} [secondaryTaxonomy]
160
162
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
163
+ * @param {ConversionEngine} [conversionEngine]
161
164
  * @throws {RequiredError}
162
165
  * @memberof DocumentsApiInterface
163
166
  */
@@ -174,6 +177,7 @@ export interface DocumentsApiInterface {
174
177
  * @param {ChunkType} [chunkType]
175
178
  * @param {ImageTaxonomy} [secondaryTaxonomy]
176
179
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
180
+ * @param {ConversionEngine} [conversionEngine]
177
181
  * @param {*} [options] Override http request option.
178
182
  * @throws {RequiredError}
179
183
  * @memberof DocumentsApiInterface
@@ -194,6 +198,7 @@ export interface DocumentsApiInterface {
194
198
  * @param {ChunkType} [chunkType]
195
199
  * @param {ImageTaxonomy} [secondaryTaxonomy]
196
200
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
201
+ * @param {ConversionEngine} [conversionEngine]
197
202
  * @throws {RequiredError}
198
203
  * @memberof DocumentsApiInterface
199
204
  */
@@ -209,6 +214,7 @@ export interface DocumentsApiInterface {
209
214
  * @param {ChunkType} [chunkType]
210
215
  * @param {ImageTaxonomy} [secondaryTaxonomy]
211
216
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
217
+ * @param {ConversionEngine} [conversionEngine]
212
218
  * @param {*} [options] Override http request option.
213
219
  * @throws {RequiredError}
214
220
  * @memberof DocumentsApiInterface