@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
@@ -0,0 +1,37 @@
1
+
2
+ # DissolveSectionResponse
3
+
4
+ Response from dissolving a section into a text chunk.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `textChunkId` | string
11
+ `reparentedChildren` | number
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { DissolveSectionResponse } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "textChunkId": null,
21
+ "reparentedChildren": null,
22
+ } satisfies DissolveSectionResponse
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as DissolveSectionResponse
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -1,7 +1,7 @@
1
1
 
2
2
  # DocumentVersionMetadata
3
3
 
4
- Schema for document_version.system_metadata JSONB field. Tracks S3 URLs for generated artifacts, pipeline execution state, and document statistics. Convention-based paths (images, page screenshots) are derived from document_id/document_version_id via s3_paths helpers, using a flat S3 layout: documents/{document_id}/{document_version_id}/...
4
+ Schema for document_version.system_metadata JSONB field. Tracks S3 URLs for generated artifacts, pipeline execution state, and document statistics. Convention-based paths (images, page screenshots) are derived from document_id/document_version_id via s3_paths helpers, using a flat S3 layout: documents/{document_id}/{document_version_id}/... Internal conversion artifact paths (standard_pipeline_json_s3, high_accuracy_*_s3) are excluded from API responses via ``Field(exclude=True)`` so we don\'t expose underlying technology names to external consumers.
5
5
 
6
6
  ## Properties
7
7
 
@@ -9,7 +9,6 @@ Name | Type
9
9
  ------------ | -------------
10
10
  `sourceS3` | string
11
11
  `cleanedSourceS3` | string
12
- `doclingJsonS3` | string
13
12
  `fastPlaintextS3` | string
14
13
  `hash` | string
15
14
  `pipelineState` | [PipelineState](PipelineState.md)
@@ -31,7 +30,6 @@ import type { DocumentVersionMetadata } from '@knowledge-stack/ksapi'
31
30
  const example = {
32
31
  "sourceS3": null,
33
32
  "cleanedSourceS3": null,
34
- "doclingJsonS3": null,
35
33
  "fastPlaintextS3": null,
36
34
  "hash": null,
37
35
  "pipelineState": null,
@@ -9,8 +9,10 @@ Name | Type
9
9
  ------------ | -------------
10
10
  `sourceS3` | string
11
11
  `cleanedSourceS3` | string
12
- `doclingJsonS3` | string
12
+ `standardPipelineJsonS3` | string
13
13
  `fastPlaintextS3` | string
14
+ `highAccuracyContentListS3` | string
15
+ `highAccuracyMiddleS3` | string
14
16
  `hash` | string
15
17
  `pipelineState` | [PipelineState](PipelineState.md)
16
18
  `totalPages` | number
@@ -31,8 +33,10 @@ import type { DocumentVersionMetadataUpdate } from '@knowledge-stack/ksapi'
31
33
  const example = {
32
34
  "sourceS3": null,
33
35
  "cleanedSourceS3": null,
34
- "doclingJsonS3": null,
36
+ "standardPipelineJsonS3": null,
35
37
  "fastPlaintextS3": null,
38
+ "highAccuracyContentListS3": null,
39
+ "highAccuracyMiddleS3": null,
36
40
  "hash": null,
37
41
  "pipelineState": null,
38
42
  "totalPages": null,
@@ -241,7 +241,7 @@ No authorization required
241
241
 
242
242
  ## ingestDocument
243
243
 
244
- > IngestDocumentResponse ingestDocument(file, pathPartId, authorization, ksUat, name, ingestionMode, chunkType, secondaryTaxonomy, pageDpi)
244
+ > IngestDocumentResponse ingestDocument(file, pathPartId, authorization, ksUat, name, ingestionMode, chunkType, secondaryTaxonomy, pageDpi, conversionEngine)
245
245
 
246
246
  Ingest Document Handler
247
247
 
@@ -279,6 +279,8 @@ async function example() {
279
279
  secondaryTaxonomy: ...,
280
280
  // number | DPI for PDF page screenshots (default 72, min 36, max 216). (optional)
281
281
  pageDpi: 56,
282
+ // ConversionEngine (optional)
283
+ conversionEngine: ...,
282
284
  } satisfies IngestDocumentRequest;
283
285
 
284
286
  try {
@@ -307,6 +309,7 @@ example().catch(console.error);
307
309
  | **chunkType** | `ChunkType` | | [Optional] [Defaults to `undefined`] [Enum: TEXT, TABLE, IMAGE, HTML, UNKNOWN] |
308
310
  | **secondaryTaxonomy** | `ImageTaxonomy` | | [Optional] [Defaults to `undefined`] [Enum: picture, flowchart] |
309
311
  | **pageDpi** | `number` | DPI for PDF page screenshots (default 72, min 36, max 216). | [Optional] [Defaults to `72`] |
312
+ | **conversionEngine** | `ConversionEngine` | | [Optional] [Defaults to `undefined`] [Enum: standard, high_accuracy] |
310
313
 
311
314
  ### Return type
312
315
 
@@ -333,7 +336,7 @@ No authorization required
333
336
 
334
337
  ## ingestDocumentVersion
335
338
 
336
- > IngestDocumentResponse ingestDocumentVersion(documentId, file, authorization, ksUat, ingestionMode, chunkType, secondaryTaxonomy, pageDpi)
339
+ > IngestDocumentResponse ingestDocumentVersion(documentId, file, authorization, ksUat, ingestionMode, chunkType, secondaryTaxonomy, pageDpi, conversionEngine)
337
340
 
338
341
  Ingest Document Version Handler
339
342
 
@@ -369,6 +372,8 @@ async function example() {
369
372
  secondaryTaxonomy: ...,
370
373
  // number | DPI for PDF page screenshots (default 72, min 36, max 216). (optional)
371
374
  pageDpi: 56,
375
+ // ConversionEngine (optional)
376
+ conversionEngine: ...,
372
377
  } satisfies IngestDocumentVersionRequest;
373
378
 
374
379
  try {
@@ -396,6 +401,7 @@ example().catch(console.error);
396
401
  | **chunkType** | `ChunkType` | | [Optional] [Defaults to `undefined`] [Enum: TEXT, TABLE, IMAGE, HTML, UNKNOWN] |
397
402
  | **secondaryTaxonomy** | `ImageTaxonomy` | | [Optional] [Defaults to `undefined`] [Enum: picture, flowchart] |
398
403
  | **pageDpi** | `number` | DPI for PDF page screenshots (default 72, min 36, max 216). | [Optional] [Defaults to `72`] |
404
+ | **conversionEngine** | `ConversionEngine` | | [Optional] [Defaults to `undefined`] [Enum: standard, high_accuracy] |
399
405
 
400
406
  ### Return type
401
407
 
@@ -17,6 +17,7 @@ Name | Type
17
17
  `pageDpi` | number
18
18
  `ingestionMode` | [IngestionMode](IngestionMode.md)
19
19
  `chunkType` | [ChunkType](ChunkType.md)
20
+ `conversionEngine` | [ConversionEngine](ConversionEngine.md)
20
21
 
21
22
  ## Example
22
23
 
@@ -35,6 +36,7 @@ const example = {
35
36
  "pageDpi": null,
36
37
  "ingestionMode": null,
37
38
  "chunkType": null,
39
+ "conversionEngine": null,
38
40
  } satisfies PipelineState
39
41
 
40
42
  console.log(example)
@@ -6,6 +6,7 @@ All URIs are relative to *http://localhost:8000*
6
6
  |------------- | ------------- | -------------|
7
7
  | [**createSection**](SectionsApi.md#createsectionoperation) | **POST** /v1/sections | Create Section Handler |
8
8
  | [**deleteSection**](SectionsApi.md#deletesection) | **DELETE** /v1/sections/{section_id} | Delete Section Handler |
9
+ | [**dissolveSection**](SectionsApi.md#dissolvesection) | **POST** /v1/sections/{section_id}/dissolve | Dissolve Section Handler |
9
10
  | [**getSection**](SectionsApi.md#getsection) | **GET** /v1/sections/{section_id} | Get Section Handler |
10
11
  | [**getSectionsBulk**](SectionsApi.md#getsectionsbulk) | **GET** /v1/sections/bulk | Get Sections Bulk Handler |
11
12
  | [**updateSection**](SectionsApi.md#updatesectionoperation) | **PATCH** /v1/sections/{section_id} | Update Section Handler |
@@ -160,6 +161,80 @@ No authorization required
160
161
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
161
162
 
162
163
 
164
+ ## dissolveSection
165
+
166
+ > DissolveSectionResponse dissolveSection(sectionId, authorization, ksUat)
167
+
168
+ Dissolve Section Handler
169
+
170
+ 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.
171
+
172
+ ### Example
173
+
174
+ ```ts
175
+ import {
176
+ Configuration,
177
+ SectionsApi,
178
+ } from '@knowledge-stack/ksapi';
179
+ import type { DissolveSectionRequest } from '@knowledge-stack/ksapi';
180
+
181
+ async function example() {
182
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
183
+ const api = new SectionsApi();
184
+
185
+ const body = {
186
+ // string
187
+ sectionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
188
+ // string (optional)
189
+ authorization: authorization_example,
190
+ // string (optional)
191
+ ksUat: ksUat_example,
192
+ } satisfies DissolveSectionRequest;
193
+
194
+ try {
195
+ const data = await api.dissolveSection(body);
196
+ console.log(data);
197
+ } catch (error) {
198
+ console.error(error);
199
+ }
200
+ }
201
+
202
+ // Run the test
203
+ example().catch(console.error);
204
+ ```
205
+
206
+ ### Parameters
207
+
208
+
209
+ | Name | Type | Description | Notes |
210
+ |------------- | ------------- | ------------- | -------------|
211
+ | **sectionId** | `string` | | [Defaults to `undefined`] |
212
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
213
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
214
+
215
+ ### Return type
216
+
217
+ [**DissolveSectionResponse**](DissolveSectionResponse.md)
218
+
219
+ ### Authorization
220
+
221
+ No authorization required
222
+
223
+ ### HTTP request headers
224
+
225
+ - **Content-Type**: Not defined
226
+ - **Accept**: `application/json`
227
+
228
+
229
+ ### HTTP response details
230
+ | Status code | Description | Response headers |
231
+ |-------------|-------------|------------------|
232
+ | **200** | Successful Response | - |
233
+ | **422** | Validation Error | - |
234
+
235
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
236
+
237
+
163
238
  ## getSection
164
239
 
165
240
  > SectionResponse getSection(sectionId, authorization, ksUat)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.60.0",
3
+ "version": "1.61.1",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ChunkBulkResponse,
19
+ ChunkNeighborsResponse,
19
20
  ChunkResponse,
20
21
  ChunkSearchRequest,
21
22
  CreateChunkRequest,
@@ -28,6 +29,8 @@ import type {
28
29
  import {
29
30
  ChunkBulkResponseFromJSON,
30
31
  ChunkBulkResponseToJSON,
32
+ ChunkNeighborsResponseFromJSON,
33
+ ChunkNeighborsResponseToJSON,
31
34
  ChunkResponseFromJSON,
32
35
  ChunkResponseToJSON,
33
36
  ChunkSearchRequestFromJSON,
@@ -65,6 +68,15 @@ export interface GetChunkRequest {
65
68
  ksUat?: string | null;
66
69
  }
67
70
 
71
+ export interface GetChunkNeighborsRequest {
72
+ chunkId: string;
73
+ prev?: number;
74
+ next?: number;
75
+ chunksOnly?: boolean;
76
+ authorization?: string | null;
77
+ ksUat?: string | null;
78
+ }
79
+
68
80
  export interface GetChunksBulkRequest {
69
81
  chunkIds?: Array<string> | null;
70
82
  authorization?: string | null;
@@ -190,6 +202,40 @@ export interface ChunksApiInterface {
190
202
  */
191
203
  getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
192
204
 
205
+ /**
206
+ * Creates request options for getChunkNeighbors without sending the request
207
+ * @param {string} chunkId
208
+ * @param {number} [prev] Number of preceding siblings to include
209
+ * @param {number} [next] Number of succeeding siblings to include
210
+ * @param {boolean} [chunksOnly] When true, stop traversal at non-CHUNK siblings (default: false)
211
+ * @param {string} [authorization]
212
+ * @param {string} [ksUat]
213
+ * @throws {RequiredError}
214
+ * @memberof ChunksApiInterface
215
+ */
216
+ getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
217
+
218
+ /**
219
+ * 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.
220
+ * @summary Get Chunk Neighbors Handler
221
+ * @param {string} chunkId
222
+ * @param {number} [prev] Number of preceding siblings to include
223
+ * @param {number} [next] Number of succeeding siblings to include
224
+ * @param {boolean} [chunksOnly] When true, stop traversal at non-CHUNK siblings (default: false)
225
+ * @param {string} [authorization]
226
+ * @param {string} [ksUat]
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ * @memberof ChunksApiInterface
230
+ */
231
+ getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
232
+
233
+ /**
234
+ * 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.
235
+ * Get Chunk Neighbors Handler
236
+ */
237
+ getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
238
+
193
239
  /**
194
240
  * Creates request options for getChunksBulk without sending the request
195
241
  * @param {Array<string>} [chunkIds] Chunk IDs to resolve (max 200)
@@ -499,6 +545,69 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
499
545
  return await response.value();
500
546
  }
501
547
 
548
+ /**
549
+ * Creates request options for getChunkNeighbors without sending the request
550
+ */
551
+ async getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts> {
552
+ if (requestParameters['chunkId'] == null) {
553
+ throw new runtime.RequiredError(
554
+ 'chunkId',
555
+ 'Required parameter "chunkId" was null or undefined when calling getChunkNeighbors().'
556
+ );
557
+ }
558
+
559
+ const queryParameters: any = {};
560
+
561
+ if (requestParameters['prev'] != null) {
562
+ queryParameters['prev'] = requestParameters['prev'];
563
+ }
564
+
565
+ if (requestParameters['next'] != null) {
566
+ queryParameters['next'] = requestParameters['next'];
567
+ }
568
+
569
+ if (requestParameters['chunksOnly'] != null) {
570
+ queryParameters['chunks_only'] = requestParameters['chunksOnly'];
571
+ }
572
+
573
+ const headerParameters: runtime.HTTPHeaders = {};
574
+
575
+ if (requestParameters['authorization'] != null) {
576
+ headerParameters['authorization'] = String(requestParameters['authorization']);
577
+ }
578
+
579
+
580
+ let urlPath = `/v1/chunks/{chunk_id}/neighbors`;
581
+ urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
582
+
583
+ return {
584
+ path: urlPath,
585
+ method: 'GET',
586
+ headers: headerParameters,
587
+ query: queryParameters,
588
+ };
589
+ }
590
+
591
+ /**
592
+ * 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.
593
+ * Get Chunk Neighbors Handler
594
+ */
595
+ async getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>> {
596
+ const requestOptions = await this.getChunkNeighborsRequestOpts(requestParameters);
597
+ const response = await this.request(requestOptions, initOverrides);
598
+
599
+ return new runtime.JSONApiResponse(response, (jsonValue) => ChunkNeighborsResponseFromJSON(jsonValue));
600
+ }
601
+
602
+ /**
603
+ * 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.
604
+ * Get Chunk Neighbors Handler
605
+ */
606
+ async getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse> {
607
+ const response = await this.getChunkNeighborsRaw(requestParameters, initOverrides);
608
+ return await response.value();
609
+ }
610
+
502
611
  /**
503
612
  * Creates request options for getChunksBulk without sending the request
504
613
  */
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ChunkType,
19
+ ConversionEngine,
19
20
  CreateDocumentRequest,
20
21
  DocumentResponse,
21
22
  HTTPValidationError,
@@ -29,6 +30,8 @@ import type {
29
30
  import {
30
31
  ChunkTypeFromJSON,
31
32
  ChunkTypeToJSON,
33
+ ConversionEngineFromJSON,
34
+ ConversionEngineToJSON,
32
35
  CreateDocumentRequestFromJSON,
33
36
  CreateDocumentRequestToJSON,
34
37
  DocumentResponseFromJSON,
@@ -78,6 +81,7 @@ export interface IngestDocumentRequest {
78
81
  chunkType?: ChunkType;
79
82
  secondaryTaxonomy?: ImageTaxonomy;
80
83
  pageDpi?: number;
84
+ conversionEngine?: ConversionEngine;
81
85
  }
82
86
 
83
87
  export interface IngestDocumentVersionRequest {
@@ -89,6 +93,7 @@ export interface IngestDocumentVersionRequest {
89
93
  chunkType?: ChunkType;
90
94
  secondaryTaxonomy?: ImageTaxonomy;
91
95
  pageDpi?: number;
96
+ conversionEngine?: ConversionEngine;
92
97
  }
93
98
 
94
99
  export interface ListDocumentsRequest {
@@ -212,6 +217,7 @@ export interface DocumentsApiInterface {
212
217
  * @param {ChunkType} [chunkType]
213
218
  * @param {ImageTaxonomy} [secondaryTaxonomy]
214
219
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
220
+ * @param {ConversionEngine} [conversionEngine]
215
221
  * @throws {RequiredError}
216
222
  * @memberof DocumentsApiInterface
217
223
  */
@@ -229,6 +235,7 @@ export interface DocumentsApiInterface {
229
235
  * @param {ChunkType} [chunkType]
230
236
  * @param {ImageTaxonomy} [secondaryTaxonomy]
231
237
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
238
+ * @param {ConversionEngine} [conversionEngine]
232
239
  * @param {*} [options] Override http request option.
233
240
  * @throws {RequiredError}
234
241
  * @memberof DocumentsApiInterface
@@ -251,6 +258,7 @@ export interface DocumentsApiInterface {
251
258
  * @param {ChunkType} [chunkType]
252
259
  * @param {ImageTaxonomy} [secondaryTaxonomy]
253
260
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
261
+ * @param {ConversionEngine} [conversionEngine]
254
262
  * @throws {RequiredError}
255
263
  * @memberof DocumentsApiInterface
256
264
  */
@@ -267,6 +275,7 @@ export interface DocumentsApiInterface {
267
275
  * @param {ChunkType} [chunkType]
268
276
  * @param {ImageTaxonomy} [secondaryTaxonomy]
269
277
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
278
+ * @param {ConversionEngine} [conversionEngine]
270
279
  * @param {*} [options] Override http request option.
271
280
  * @throws {RequiredError}
272
281
  * @memberof DocumentsApiInterface
@@ -580,6 +589,10 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
580
589
  formParams.append('page_dpi', requestParameters['pageDpi'] as any);
581
590
  }
582
591
 
592
+ if (requestParameters['conversionEngine'] != null) {
593
+ formParams.append('conversion_engine', requestParameters['conversionEngine'] as any);
594
+ }
595
+
583
596
 
584
597
  let urlPath = `/v1/documents/ingest`;
585
598
 
@@ -674,6 +687,10 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
674
687
  formParams.append('page_dpi', requestParameters['pageDpi'] as any);
675
688
  }
676
689
 
690
+ if (requestParameters['conversionEngine'] != null) {
691
+ formParams.append('conversion_engine', requestParameters['conversionEngine'] as any);
692
+ }
693
+
677
694
 
678
695
  let urlPath = `/v1/documents/{document_id}/ingest`;
679
696
  urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  CreateSectionRequest,
19
+ DissolveSectionResponse,
19
20
  HTTPValidationError,
20
21
  SectionResponse,
21
22
  UpdateSectionRequest,
@@ -23,6 +24,8 @@ import type {
23
24
  import {
24
25
  CreateSectionRequestFromJSON,
25
26
  CreateSectionRequestToJSON,
27
+ DissolveSectionResponseFromJSON,
28
+ DissolveSectionResponseToJSON,
26
29
  HTTPValidationErrorFromJSON,
27
30
  HTTPValidationErrorToJSON,
28
31
  SectionResponseFromJSON,
@@ -43,6 +46,12 @@ export interface DeleteSectionRequest {
43
46
  ksUat?: string | null;
44
47
  }
45
48
 
49
+ export interface DissolveSectionRequest {
50
+ sectionId: string;
51
+ authorization?: string | null;
52
+ ksUat?: string | null;
53
+ }
54
+
46
55
  export interface GetSectionRequest {
47
56
  sectionId: string;
48
57
  authorization?: string | null;
@@ -125,6 +134,34 @@ export interface SectionsApiInterface {
125
134
  */
126
135
  deleteSection(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
127
136
 
137
+ /**
138
+ * Creates request options for dissolveSection without sending the request
139
+ * @param {string} sectionId
140
+ * @param {string} [authorization]
141
+ * @param {string} [ksUat]
142
+ * @throws {RequiredError}
143
+ * @memberof SectionsApiInterface
144
+ */
145
+ dissolveSectionRequestOpts(requestParameters: DissolveSectionRequest): Promise<runtime.RequestOpts>;
146
+
147
+ /**
148
+ * 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.
149
+ * @summary Dissolve Section Handler
150
+ * @param {string} sectionId
151
+ * @param {string} [authorization]
152
+ * @param {string} [ksUat]
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ * @memberof SectionsApiInterface
156
+ */
157
+ dissolveSectionRaw(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DissolveSectionResponse>>;
158
+
159
+ /**
160
+ * 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.
161
+ * Dissolve Section Handler
162
+ */
163
+ dissolveSection(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DissolveSectionResponse>;
164
+
128
165
  /**
129
166
  * Creates request options for getSection without sending the request
130
167
  * @param {string} sectionId
@@ -321,6 +358,57 @@ export class SectionsApi extends runtime.BaseAPI implements SectionsApiInterface
321
358
  await this.deleteSectionRaw(requestParameters, initOverrides);
322
359
  }
323
360
 
361
+ /**
362
+ * Creates request options for dissolveSection without sending the request
363
+ */
364
+ async dissolveSectionRequestOpts(requestParameters: DissolveSectionRequest): Promise<runtime.RequestOpts> {
365
+ if (requestParameters['sectionId'] == null) {
366
+ throw new runtime.RequiredError(
367
+ 'sectionId',
368
+ 'Required parameter "sectionId" was null or undefined when calling dissolveSection().'
369
+ );
370
+ }
371
+
372
+ const queryParameters: any = {};
373
+
374
+ const headerParameters: runtime.HTTPHeaders = {};
375
+
376
+ if (requestParameters['authorization'] != null) {
377
+ headerParameters['authorization'] = String(requestParameters['authorization']);
378
+ }
379
+
380
+
381
+ let urlPath = `/v1/sections/{section_id}/dissolve`;
382
+ urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
383
+
384
+ return {
385
+ path: urlPath,
386
+ method: 'POST',
387
+ headers: headerParameters,
388
+ query: queryParameters,
389
+ };
390
+ }
391
+
392
+ /**
393
+ * 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.
394
+ * Dissolve Section Handler
395
+ */
396
+ async dissolveSectionRaw(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DissolveSectionResponse>> {
397
+ const requestOptions = await this.dissolveSectionRequestOpts(requestParameters);
398
+ const response = await this.request(requestOptions, initOverrides);
399
+
400
+ return new runtime.JSONApiResponse(response, (jsonValue) => DissolveSectionResponseFromJSON(jsonValue));
401
+ }
402
+
403
+ /**
404
+ * 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.
405
+ * Dissolve Section Handler
406
+ */
407
+ async dissolveSection(requestParameters: DissolveSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DissolveSectionResponse> {
408
+ const response = await this.dissolveSectionRaw(requestParameters, initOverrides);
409
+ return await response.value();
410
+ }
411
+
324
412
  /**
325
413
  * Creates request options for getSection without sending the request
326
414
  */