@knowledge-stack/ksapi 1.60.0 → 1.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +5 -2
  3. package/dist/apis/DocumentsApi.d.ts +7 -1
  4. package/dist/apis/DocumentsApi.js +6 -0
  5. package/dist/apis/SectionsApi.d.ts +45 -1
  6. package/dist/apis/SectionsApi.js +44 -0
  7. package/dist/esm/apis/DocumentsApi.d.ts +7 -1
  8. package/dist/esm/apis/DocumentsApi.js +6 -0
  9. package/dist/esm/apis/SectionsApi.d.ts +45 -1
  10. package/dist/esm/apis/SectionsApi.js +45 -1
  11. package/dist/esm/models/ConversionEngine.d.ts +25 -0
  12. package/dist/esm/models/ConversionEngine.js +43 -0
  13. package/dist/esm/models/DissolveSectionResponse.d.ts +53 -0
  14. package/dist/esm/models/DissolveSectionResponse.js +48 -0
  15. package/dist/esm/models/DocumentVersionMetadata.d.ts +4 -6
  16. package/dist/esm/models/DocumentVersionMetadata.js +0 -2
  17. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +13 -1
  18. package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -2
  19. package/dist/esm/models/PipelineState.d.ts +7 -0
  20. package/dist/esm/models/PipelineState.js +3 -0
  21. package/dist/esm/models/index.d.ts +2 -0
  22. package/dist/esm/models/index.js +2 -0
  23. package/dist/models/ConversionEngine.d.ts +25 -0
  24. package/dist/models/ConversionEngine.js +51 -0
  25. package/dist/models/DissolveSectionResponse.d.ts +53 -0
  26. package/dist/models/DissolveSectionResponse.js +56 -0
  27. package/dist/models/DocumentVersionMetadata.d.ts +4 -6
  28. package/dist/models/DocumentVersionMetadata.js +0 -2
  29. package/dist/models/DocumentVersionMetadataUpdate.d.ts +13 -1
  30. package/dist/models/DocumentVersionMetadataUpdate.js +6 -2
  31. package/dist/models/PipelineState.d.ts +7 -0
  32. package/dist/models/PipelineState.js +3 -0
  33. package/dist/models/index.d.ts +2 -0
  34. package/dist/models/index.js +2 -0
  35. package/docs/ConversionEngine.md +33 -0
  36. package/docs/DissolveSectionResponse.md +37 -0
  37. package/docs/DocumentVersionMetadata.md +1 -3
  38. package/docs/DocumentVersionMetadataUpdate.md +6 -2
  39. package/docs/DocumentsApi.md +8 -2
  40. package/docs/PipelineState.md +2 -0
  41. package/docs/SectionsApi.md +75 -0
  42. package/package.json +1 -1
  43. package/src/apis/DocumentsApi.ts +17 -0
  44. package/src/apis/SectionsApi.ts +88 -0
  45. package/src/models/ConversionEngine.ts +53 -0
  46. package/src/models/DissolveSectionResponse.ts +92 -0
  47. package/src/models/DocumentVersionMetadata.ts +4 -8
  48. package/src/models/DocumentVersionMetadataUpdate.ts +19 -3
  49. package/src/models/PipelineState.ts +15 -0
  50. package/src/models/index.ts +2 -0
@@ -24,6 +24,7 @@ docs/ChunkType.md
24
24
  docs/ChunksApi.md
25
25
  docs/Citation.md
26
26
  docs/ClearVersionContentsResponse.md
27
+ docs/ConversionEngine.md
27
28
  docs/CreateApiKeyRequest.md
28
29
  docs/CreateApiKeyResponse.md
29
30
  docs/CreateChunkLineageRequest.md
@@ -38,6 +39,7 @@ docs/CreateTenantRequest.md
38
39
  docs/CreateThreadMessageRequest.md
39
40
  docs/CreateThreadRequest.md
40
41
  docs/DefaultApi.md
42
+ docs/DissolveSectionResponse.md
41
43
  docs/DocumentOrigin.md
42
44
  docs/DocumentResponse.md
43
45
  docs/DocumentType.md
@@ -207,6 +209,7 @@ src/models/ChunkSearchRequest.ts
207
209
  src/models/ChunkType.ts
208
210
  src/models/Citation.ts
209
211
  src/models/ClearVersionContentsResponse.ts
212
+ src/models/ConversionEngine.ts
210
213
  src/models/CreateApiKeyRequest.ts
211
214
  src/models/CreateApiKeyResponse.ts
212
215
  src/models/CreateChunkLineageRequest.ts
@@ -220,6 +223,7 @@ src/models/CreateTagRequest.ts
220
223
  src/models/CreateTenantRequest.ts
221
224
  src/models/CreateThreadMessageRequest.ts
222
225
  src/models/CreateThreadRequest.ts
226
+ src/models/DissolveSectionResponse.ts
223
227
  src/models/DocumentOrigin.ts
224
228
  src/models/DocumentResponse.ts
225
229
  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.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -116,6 +116,7 @@ All URIs are relative to *http://localhost:8000*
116
116
  *PathPartsApi* | [**listPathParts**](docs/PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler
117
117
  *SectionsApi* | [**createSection**](docs/SectionsApi.md#createsectionoperation) | **POST** /v1/sections | Create Section Handler
118
118
  *SectionsApi* | [**deleteSection**](docs/SectionsApi.md#deletesection) | **DELETE** /v1/sections/{section_id} | Delete Section Handler
119
+ *SectionsApi* | [**dissolveSection**](docs/SectionsApi.md#dissolvesection) | **POST** /v1/sections/{section_id}/dissolve | Dissolve Section Handler
119
120
  *SectionsApi* | [**getSection**](docs/SectionsApi.md#getsection) | **GET** /v1/sections/{section_id} | Get Section Handler
120
121
  *SectionsApi* | [**getSectionsBulk**](docs/SectionsApi.md#getsectionsbulk) | **GET** /v1/sections/bulk | Get Sections Bulk Handler
121
122
  *SectionsApi* | [**updateSection**](docs/SectionsApi.md#updatesectionoperation) | **PATCH** /v1/sections/{section_id} | Update Section Handler
@@ -177,6 +178,7 @@ All URIs are relative to *http://localhost:8000*
177
178
  - [ChunkType](docs/ChunkType.md)
178
179
  - [Citation](docs/Citation.md)
179
180
  - [ClearVersionContentsResponse](docs/ClearVersionContentsResponse.md)
181
+ - [ConversionEngine](docs/ConversionEngine.md)
180
182
  - [CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
181
183
  - [CreateApiKeyResponse](docs/CreateApiKeyResponse.md)
182
184
  - [CreateChunkLineageRequest](docs/CreateChunkLineageRequest.md)
@@ -190,6 +192,7 @@ All URIs are relative to *http://localhost:8000*
190
192
  - [CreateTenantRequest](docs/CreateTenantRequest.md)
191
193
  - [CreateThreadMessageRequest](docs/CreateThreadMessageRequest.md)
192
194
  - [CreateThreadRequest](docs/CreateThreadRequest.md)
195
+ - [DissolveSectionResponse](docs/DissolveSectionResponse.md)
193
196
  - [DocumentOrigin](docs/DocumentOrigin.md)
194
197
  - [DocumentResponse](docs/DocumentResponse.md)
195
198
  - [DocumentType](docs/DocumentType.md)
@@ -318,7 +321,7 @@ and is automatically generated by the
318
321
  [OpenAPI Generator](https://openapi-generator.tech) project:
319
322
 
320
323
  - API version: `0.1.0`
321
- - Package version: `1.60.0`
324
+ - Package version: `1.61.0`
322
325
  - Generator version: `7.20.0`
323
326
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
324
327
 
@@ -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 { 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
@@ -213,6 +213,9 @@ export class DocumentsApi extends runtime.BaseAPI {
213
213
  if (requestParameters['pageDpi'] != null) {
214
214
  formParams.append('page_dpi', requestParameters['pageDpi']);
215
215
  }
216
+ if (requestParameters['conversionEngine'] != null) {
217
+ formParams.append('conversion_engine', requestParameters['conversionEngine']);
218
+ }
216
219
  let urlPath = `/v1/documents/ingest`;
217
220
  return {
218
221
  path: urlPath,
@@ -290,6 +293,9 @@ export class DocumentsApi extends runtime.BaseAPI {
290
293
  if (requestParameters['pageDpi'] != null) {
291
294
  formParams.append('page_dpi', requestParameters['pageDpi']);
292
295
  }
296
+ if (requestParameters['conversionEngine'] != null) {
297
+ formParams.append('conversion_engine', requestParameters['conversionEngine']);
298
+ }
293
299
  let urlPath = `/v1/documents/{document_id}/ingest`;
294
300
  urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
295
301
  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
  */
@@ -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 { CreateSectionRequestToJSON, SectionResponseFromJSON, UpdateSectionRequestToJSON, } from '../models/index';
24
+ import { CreateSectionRequestToJSON, DissolveSectionResponseFromJSON, SectionResponseFromJSON, UpdateSectionRequestToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -114,6 +114,50 @@ export class SectionsApi extends runtime.BaseAPI {
114
114
  yield this.deleteSectionRaw(requestParameters, initOverrides);
115
115
  });
116
116
  }
117
+ /**
118
+ * Creates request options for dissolveSection without sending the request
119
+ */
120
+ dissolveSectionRequestOpts(requestParameters) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ if (requestParameters['sectionId'] == null) {
123
+ throw new runtime.RequiredError('sectionId', 'Required parameter "sectionId" was null or undefined when calling dissolveSection().');
124
+ }
125
+ const queryParameters = {};
126
+ const headerParameters = {};
127
+ if (requestParameters['authorization'] != null) {
128
+ headerParameters['authorization'] = String(requestParameters['authorization']);
129
+ }
130
+ let urlPath = `/v1/sections/{section_id}/dissolve`;
131
+ urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
132
+ return {
133
+ path: urlPath,
134
+ method: 'POST',
135
+ headers: headerParameters,
136
+ query: queryParameters,
137
+ };
138
+ });
139
+ }
140
+ /**
141
+ * 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.
142
+ * Dissolve Section Handler
143
+ */
144
+ dissolveSectionRaw(requestParameters, initOverrides) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ const requestOptions = yield this.dissolveSectionRequestOpts(requestParameters);
147
+ const response = yield this.request(requestOptions, initOverrides);
148
+ return new runtime.JSONApiResponse(response, (jsonValue) => DissolveSectionResponseFromJSON(jsonValue));
149
+ });
150
+ }
151
+ /**
152
+ * 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.
153
+ * Dissolve Section Handler
154
+ */
155
+ dissolveSection(requestParameters, initOverrides) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const response = yield this.dissolveSectionRaw(requestParameters, initOverrides);
158
+ return yield response.value();
159
+ });
160
+ }
117
161
  /**
118
162
  * Creates request options for getSection without sending the request
119
163
  */
@@ -0,0 +1,25 @@
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
+ /**
13
+ * Document conversion engine selection.
14
+ * @export
15
+ */
16
+ export declare const ConversionEngine: {
17
+ readonly Standard: "standard";
18
+ readonly HighAccuracy: "high_accuracy";
19
+ };
20
+ export type ConversionEngine = typeof ConversionEngine[keyof typeof ConversionEngine];
21
+ export declare function instanceOfConversionEngine(value: any): boolean;
22
+ export declare function ConversionEngineFromJSON(json: any): ConversionEngine;
23
+ export declare function ConversionEngineFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversionEngine;
24
+ export declare function ConversionEngineToJSON(value?: ConversionEngine | null): any;
25
+ export declare function ConversionEngineToJSONTyped(value: any, ignoreDiscriminator: boolean): ConversionEngine;
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Document conversion engine selection.
16
+ * @export
17
+ */
18
+ export const ConversionEngine = {
19
+ Standard: 'standard',
20
+ HighAccuracy: 'high_accuracy'
21
+ };
22
+ export function instanceOfConversionEngine(value) {
23
+ for (const key in ConversionEngine) {
24
+ if (Object.prototype.hasOwnProperty.call(ConversionEngine, key)) {
25
+ if (ConversionEngine[key] === value) {
26
+ return true;
27
+ }
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ export function ConversionEngineFromJSON(json) {
33
+ return ConversionEngineFromJSONTyped(json, false);
34
+ }
35
+ export function ConversionEngineFromJSONTyped(json, ignoreDiscriminator) {
36
+ return json;
37
+ }
38
+ export function ConversionEngineToJSON(value) {
39
+ return value;
40
+ }
41
+ export function ConversionEngineToJSONTyped(value, ignoreDiscriminator) {
42
+ return value;
43
+ }
@@ -0,0 +1,53 @@
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
+ /**
13
+ * Response from dissolving a section into a text chunk.
14
+ * @export
15
+ * @interface DissolveSectionResponse
16
+ */
17
+ export interface DissolveSectionResponse {
18
+ /**
19
+ * ID of the created text chunk
20
+ * @type {string}
21
+ * @memberof DissolveSectionResponse
22
+ */
23
+ textChunkId: string;
24
+ /**
25
+ * Number of children reparented to the parent
26
+ * @type {number}
27
+ * @memberof DissolveSectionResponse
28
+ */
29
+ reparentedChildren: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the DissolveSectionResponse interface.
33
+ */
34
+ export declare function instanceOfDissolveSectionResponse(value: object): value is DissolveSectionResponse;
35
+ export declare function DissolveSectionResponseFromJSON(json: any): DissolveSectionResponse;
36
+ export declare function DissolveSectionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DissolveSectionResponse;
37
+ export declare function DissolveSectionResponseToJSON(json: any): DissolveSectionResponse;
38
+ export declare function DissolveSectionResponseToJSONTyped(value?: DissolveSectionResponse | null, ignoreDiscriminator?: boolean): any;
39
+ export declare const DissolveSectionResponsePropertyValidationAttributesMap: {
40
+ [property: string]: {
41
+ maxLength?: number;
42
+ minLength?: number;
43
+ pattern?: string;
44
+ maximum?: number;
45
+ exclusiveMaximum?: boolean;
46
+ minimum?: number;
47
+ exclusiveMinimum?: boolean;
48
+ multipleOf?: number;
49
+ maxItems?: number;
50
+ minItems?: number;
51
+ uniqueItems?: boolean;
52
+ };
53
+ };
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the DissolveSectionResponse interface.
16
+ */
17
+ export function instanceOfDissolveSectionResponse(value) {
18
+ if (!('textChunkId' in value) || value['textChunkId'] === undefined)
19
+ return false;
20
+ if (!('reparentedChildren' in value) || value['reparentedChildren'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function DissolveSectionResponseFromJSON(json) {
25
+ return DissolveSectionResponseFromJSONTyped(json, false);
26
+ }
27
+ export function DissolveSectionResponseFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'textChunkId': json['text_chunk_id'],
33
+ 'reparentedChildren': json['reparented_children'],
34
+ };
35
+ }
36
+ export function DissolveSectionResponseToJSON(json) {
37
+ return DissolveSectionResponseToJSONTyped(json, false);
38
+ }
39
+ export function DissolveSectionResponseToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'text_chunk_id': value['textChunkId'],
45
+ 'reparented_children': value['reparentedChildren'],
46
+ };
47
+ }
48
+ export const DissolveSectionResponsePropertyValidationAttributesMap = {};