@knowledge-stack/ksapi 1.52.1 → 1.53.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 (98) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +7 -2
  3. package/dist/apis/DocumentVersionsApi.d.ts +48 -1
  4. package/dist/apis/DocumentVersionsApi.js +50 -0
  5. package/dist/esm/apis/DocumentVersionsApi.d.ts +48 -1
  6. package/dist/esm/apis/DocumentVersionsApi.js +51 -1
  7. package/dist/esm/models/ChunkBulkResponse.d.ts +6 -0
  8. package/dist/esm/models/ChunkBulkResponse.js +2 -0
  9. package/dist/esm/models/ChunkResponse.d.ts +6 -0
  10. package/dist/esm/models/ChunkResponse.js +2 -0
  11. package/dist/esm/models/DocumentVersionAction.d.ts +24 -0
  12. package/dist/esm/models/DocumentVersionAction.js +42 -0
  13. package/dist/esm/models/DocumentVersionActionResponse.d.ts +60 -0
  14. package/dist/esm/models/DocumentVersionActionResponse.js +53 -0
  15. package/dist/esm/models/DocumentVersionMetadata.d.ts +8 -1
  16. package/dist/esm/models/DocumentVersionMetadata.js +3 -0
  17. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +7 -0
  18. package/dist/esm/models/DocumentVersionMetadataUpdate.js +3 -0
  19. package/dist/esm/models/DocumentVersionResponse.d.ts +1 -1
  20. package/dist/esm/models/DocumentVersionResponse.js +2 -2
  21. package/dist/esm/models/InformationStatistics.d.ts +67 -0
  22. package/dist/esm/models/InformationStatistics.js +48 -0
  23. package/dist/esm/models/PipelineState.d.ts +8 -2
  24. package/dist/esm/models/PipelineState.js +4 -4
  25. package/dist/esm/models/ScoredChunkResponse.d.ts +6 -0
  26. package/dist/esm/models/ScoredChunkResponse.js +2 -0
  27. package/dist/esm/models/SectionResponse.d.ts +7 -0
  28. package/dist/esm/models/SectionResponse.js +3 -0
  29. package/dist/esm/models/SectionSystemMetadata.d.ts +48 -0
  30. package/dist/esm/models/SectionSystemMetadata.js +43 -0
  31. package/dist/esm/models/WorkflowDetailResponse.d.ts +6 -0
  32. package/dist/esm/models/WorkflowDetailResponse.js +2 -0
  33. package/dist/esm/models/WorkflowSummaryResponse.d.ts +6 -0
  34. package/dist/esm/models/WorkflowSummaryResponse.js +2 -0
  35. package/dist/esm/models/index.d.ts +4 -0
  36. package/dist/esm/models/index.js +4 -0
  37. package/dist/models/ChunkBulkResponse.d.ts +6 -0
  38. package/dist/models/ChunkBulkResponse.js +2 -0
  39. package/dist/models/ChunkResponse.d.ts +6 -0
  40. package/dist/models/ChunkResponse.js +2 -0
  41. package/dist/models/DocumentVersionAction.d.ts +24 -0
  42. package/dist/models/DocumentVersionAction.js +50 -0
  43. package/dist/models/DocumentVersionActionResponse.d.ts +60 -0
  44. package/dist/models/DocumentVersionActionResponse.js +61 -0
  45. package/dist/models/DocumentVersionMetadata.d.ts +8 -1
  46. package/dist/models/DocumentVersionMetadata.js +3 -0
  47. package/dist/models/DocumentVersionMetadataUpdate.d.ts +7 -0
  48. package/dist/models/DocumentVersionMetadataUpdate.js +3 -0
  49. package/dist/models/DocumentVersionResponse.d.ts +1 -1
  50. package/dist/models/DocumentVersionResponse.js +2 -2
  51. package/dist/models/InformationStatistics.d.ts +67 -0
  52. package/dist/models/InformationStatistics.js +56 -0
  53. package/dist/models/PipelineState.d.ts +8 -2
  54. package/dist/models/PipelineState.js +4 -4
  55. package/dist/models/ScoredChunkResponse.d.ts +6 -0
  56. package/dist/models/ScoredChunkResponse.js +2 -0
  57. package/dist/models/SectionResponse.d.ts +7 -0
  58. package/dist/models/SectionResponse.js +3 -0
  59. package/dist/models/SectionSystemMetadata.d.ts +48 -0
  60. package/dist/models/SectionSystemMetadata.js +51 -0
  61. package/dist/models/WorkflowDetailResponse.d.ts +6 -0
  62. package/dist/models/WorkflowDetailResponse.js +2 -0
  63. package/dist/models/WorkflowSummaryResponse.d.ts +6 -0
  64. package/dist/models/WorkflowSummaryResponse.js +2 -0
  65. package/dist/models/index.d.ts +4 -0
  66. package/dist/models/index.js +4 -0
  67. package/docs/ChunkBulkResponse.md +2 -0
  68. package/docs/ChunkResponse.md +2 -0
  69. package/docs/DocumentVersionAction.md +33 -0
  70. package/docs/DocumentVersionActionResponse.md +39 -0
  71. package/docs/DocumentVersionMetadata.md +3 -1
  72. package/docs/DocumentVersionMetadataUpdate.md +2 -0
  73. package/docs/DocumentVersionResponse.md +2 -2
  74. package/docs/DocumentVersionsApi.md +78 -0
  75. package/docs/InformationStatistics.md +41 -0
  76. package/docs/PipelineState.md +2 -0
  77. package/docs/ScoredChunkResponse.md +2 -0
  78. package/docs/SectionResponse.md +2 -0
  79. package/docs/SectionSystemMetadata.md +35 -0
  80. package/docs/WorkflowDetailResponse.md +2 -0
  81. package/docs/WorkflowSummaryResponse.md +2 -0
  82. package/package.json +1 -1
  83. package/src/apis/DocumentVersionsApi.ts +105 -0
  84. package/src/models/ChunkBulkResponse.ts +8 -0
  85. package/src/models/ChunkResponse.ts +8 -0
  86. package/src/models/DocumentVersionAction.ts +52 -0
  87. package/src/models/DocumentVersionActionResponse.ts +111 -0
  88. package/src/models/DocumentVersionMetadata.ts +16 -1
  89. package/src/models/DocumentVersionMetadataUpdate.ts +15 -0
  90. package/src/models/DocumentVersionResponse.ts +3 -3
  91. package/src/models/InformationStatistics.ts +106 -0
  92. package/src/models/PipelineState.ts +12 -5
  93. package/src/models/ScoredChunkResponse.ts +8 -0
  94. package/src/models/SectionResponse.ts +16 -0
  95. package/src/models/SectionSystemMetadata.ts +90 -0
  96. package/src/models/WorkflowDetailResponse.ts +8 -0
  97. package/src/models/WorkflowSummaryResponse.ts +8 -0
  98. package/src/models/index.ts +4 -0
@@ -40,6 +40,8 @@ docs/DefaultApi.md
40
40
  docs/DocumentOrigin.md
41
41
  docs/DocumentResponse.md
42
42
  docs/DocumentType.md
43
+ docs/DocumentVersionAction.md
44
+ docs/DocumentVersionActionResponse.md
43
45
  docs/DocumentVersionMetadata.md
44
46
  docs/DocumentVersionMetadataUpdate.md
45
47
  docs/DocumentVersionResponse.md
@@ -60,6 +62,7 @@ docs/HTTPValidationError.md
60
62
  docs/HealthCheckResponse.md
61
63
  docs/IdpType.md
62
64
  docs/ImageTaxonomy.md
65
+ docs/InformationStatistics.md
63
66
  docs/IngestDocumentResponse.md
64
67
  docs/IngestionMode.md
65
68
  docs/InviteResponse.md
@@ -106,6 +109,7 @@ docs/SearchType.md
106
109
  docs/SectionContentItem.md
107
110
  docs/SectionContentItemOrChunkContentItem.md
108
111
  docs/SectionResponse.md
112
+ docs/SectionSystemMetadata.md
109
113
  docs/SectionsApi.md
110
114
  docs/SignInRequest.md
111
115
  docs/StepInput.md
@@ -208,6 +212,8 @@ src/models/CreateThreadRequest.ts
208
212
  src/models/DocumentOrigin.ts
209
213
  src/models/DocumentResponse.ts
210
214
  src/models/DocumentType.ts
215
+ src/models/DocumentVersionAction.ts
216
+ src/models/DocumentVersionActionResponse.ts
211
217
  src/models/DocumentVersionMetadata.ts
212
218
  src/models/DocumentVersionMetadataUpdate.ts
213
219
  src/models/DocumentVersionResponse.ts
@@ -224,6 +230,7 @@ src/models/HTTPValidationError.ts
224
230
  src/models/HealthCheckResponse.ts
225
231
  src/models/IdpType.ts
226
232
  src/models/ImageTaxonomy.ts
233
+ src/models/InformationStatistics.ts
227
234
  src/models/IngestDocumentResponse.ts
228
235
  src/models/IngestionMode.ts
229
236
  src/models/InviteResponse.ts
@@ -268,6 +275,7 @@ src/models/SearchType.ts
268
275
  src/models/SectionContentItem.ts
269
276
  src/models/SectionContentItemOrChunkContentItem.ts
270
277
  src/models/SectionResponse.ts
278
+ src/models/SectionSystemMetadata.ts
271
279
  src/models/SignInRequest.ts
272
280
  src/models/StepInput.ts
273
281
  src/models/StepKind.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.52.1
1
+ # @knowledge-stack/ksapi@1.53.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -82,6 +82,7 @@ All URIs are relative to *http://localhost:8000*
82
82
  *DocumentVersionsApi* | [**clearDocumentVersionContents**](docs/DocumentVersionsApi.md#cleardocumentversioncontents) | **DELETE** /v1/document_versions/{version_id}/contents | Clear Document Version Contents Handler
83
83
  *DocumentVersionsApi* | [**createDocumentVersion**](docs/DocumentVersionsApi.md#createdocumentversion) | **POST** /v1/documents/{document_id}/versions | Create Document Version Handler
84
84
  *DocumentVersionsApi* | [**deleteDocumentVersion**](docs/DocumentVersionsApi.md#deletedocumentversion) | **DELETE** /v1/document_versions/{version_id} | Delete Document Version Handler
85
+ *DocumentVersionsApi* | [**documentVersionAction**](docs/DocumentVersionsApi.md#documentversionaction) | **POST** /v1/document_versions/{version_id} | Document Version Action Handler
85
86
  *DocumentVersionsApi* | [**getDocumentVersion**](docs/DocumentVersionsApi.md#getdocumentversion) | **GET** /v1/document_versions/{version_id} | Get Document Version Handler
86
87
  *DocumentVersionsApi* | [**getDocumentVersionContents**](docs/DocumentVersionsApi.md#getdocumentversioncontents) | **GET** /v1/document_versions/{version_id}/contents | Get Document Version Contents Handler
87
88
  *DocumentVersionsApi* | [**listDocumentVersions**](docs/DocumentVersionsApi.md#listdocumentversions) | **GET** /v1/document_versions | List Document Versions Handler
@@ -186,6 +187,8 @@ All URIs are relative to *http://localhost:8000*
186
187
  - [DocumentOrigin](docs/DocumentOrigin.md)
187
188
  - [DocumentResponse](docs/DocumentResponse.md)
188
189
  - [DocumentType](docs/DocumentType.md)
190
+ - [DocumentVersionAction](docs/DocumentVersionAction.md)
191
+ - [DocumentVersionActionResponse](docs/DocumentVersionActionResponse.md)
189
192
  - [DocumentVersionMetadata](docs/DocumentVersionMetadata.md)
190
193
  - [DocumentVersionMetadataUpdate](docs/DocumentVersionMetadataUpdate.md)
191
194
  - [DocumentVersionResponse](docs/DocumentVersionResponse.md)
@@ -202,6 +205,7 @@ All URIs are relative to *http://localhost:8000*
202
205
  - [HealthCheckResponse](docs/HealthCheckResponse.md)
203
206
  - [IdpType](docs/IdpType.md)
204
207
  - [ImageTaxonomy](docs/ImageTaxonomy.md)
208
+ - [InformationStatistics](docs/InformationStatistics.md)
205
209
  - [IngestDocumentResponse](docs/IngestDocumentResponse.md)
206
210
  - [IngestionMode](docs/IngestionMode.md)
207
211
  - [InviteResponse](docs/InviteResponse.md)
@@ -246,6 +250,7 @@ All URIs are relative to *http://localhost:8000*
246
250
  - [SectionContentItem](docs/SectionContentItem.md)
247
251
  - [SectionContentItemOrChunkContentItem](docs/SectionContentItemOrChunkContentItem.md)
248
252
  - [SectionResponse](docs/SectionResponse.md)
253
+ - [SectionSystemMetadata](docs/SectionSystemMetadata.md)
249
254
  - [SignInRequest](docs/SignInRequest.md)
250
255
  - [StepInput](docs/StepInput.md)
251
256
  - [StepKind](docs/StepKind.md)
@@ -298,7 +303,7 @@ and is automatically generated by the
298
303
  [OpenAPI Generator](https://openapi-generator.tech) project:
299
304
 
300
305
  - API version: `0.1.0`
301
- - Package version: `1.52.1`
306
+ - Package version: `1.53.0`
302
307
  - Generator version: `7.20.0`
303
308
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
304
309
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ClearVersionContentsResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
13
+ import type { ClearVersionContentsResponse, DocumentVersionAction, DocumentVersionActionResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
14
14
  export interface ClearDocumentVersionContentsRequest {
15
15
  versionId: string;
16
16
  authorization?: string | null;
@@ -26,6 +26,12 @@ export interface DeleteDocumentVersionRequest {
26
26
  authorization?: string | null;
27
27
  ksUat?: string | null;
28
28
  }
29
+ export interface DocumentVersionActionRequest {
30
+ versionId: string;
31
+ action: DocumentVersionAction;
32
+ authorization?: string | null;
33
+ ksUat?: string | null;
34
+ }
29
35
  export interface GetDocumentVersionRequest {
30
36
  versionId: string;
31
37
  authorization?: string | null;
@@ -134,6 +140,33 @@ export interface DocumentVersionsApiInterface {
134
140
  * Delete Document Version Handler
135
141
  */
136
142
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
143
+ /**
144
+ * Creates request options for documentVersionAction without sending the request
145
+ * @param {string} versionId DocumentVersion ID
146
+ * @param {DocumentVersionAction} action Action to perform
147
+ * @param {string} [authorization]
148
+ * @param {string} [ksUat]
149
+ * @throws {RequiredError}
150
+ * @memberof DocumentVersionsApiInterface
151
+ */
152
+ documentVersionActionRequestOpts(requestParameters: DocumentVersionActionRequest): Promise<runtime.RequestOpts>;
153
+ /**
154
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
155
+ * @summary Document Version Action Handler
156
+ * @param {string} versionId DocumentVersion ID
157
+ * @param {DocumentVersionAction} action Action to perform
158
+ * @param {string} [authorization]
159
+ * @param {string} [ksUat]
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ * @memberof DocumentVersionsApiInterface
163
+ */
164
+ documentVersionActionRaw(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionActionResponse>>;
165
+ /**
166
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
167
+ * Document Version Action Handler
168
+ */
169
+ documentVersionAction(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionActionResponse>;
137
170
  /**
138
171
  * Creates request options for getDocumentVersion without sending the request
139
172
  * @param {string} versionId DocumentVersion ID
@@ -293,6 +326,20 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
293
326
  * Delete Document Version Handler
294
327
  */
295
328
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
329
+ /**
330
+ * Creates request options for documentVersionAction without sending the request
331
+ */
332
+ documentVersionActionRequestOpts(requestParameters: DocumentVersionActionRequest): Promise<runtime.RequestOpts>;
333
+ /**
334
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
335
+ * Document Version Action Handler
336
+ */
337
+ documentVersionActionRaw(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionActionResponse>>;
338
+ /**
339
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
340
+ * Document Version Action Handler
341
+ */
342
+ documentVersionAction(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionActionResponse>;
296
343
  /**
297
344
  * Creates request options for getDocumentVersion without sending the request
298
345
  */
@@ -160,6 +160,56 @@ class DocumentVersionsApi extends runtime.BaseAPI {
160
160
  yield this.deleteDocumentVersionRaw(requestParameters, initOverrides);
161
161
  });
162
162
  }
163
+ /**
164
+ * Creates request options for documentVersionAction without sending the request
165
+ */
166
+ documentVersionActionRequestOpts(requestParameters) {
167
+ return __awaiter(this, void 0, void 0, function* () {
168
+ if (requestParameters['versionId'] == null) {
169
+ throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling documentVersionAction().');
170
+ }
171
+ if (requestParameters['action'] == null) {
172
+ throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling documentVersionAction().');
173
+ }
174
+ const queryParameters = {};
175
+ if (requestParameters['action'] != null) {
176
+ queryParameters['action'] = requestParameters['action'];
177
+ }
178
+ const headerParameters = {};
179
+ if (requestParameters['authorization'] != null) {
180
+ headerParameters['authorization'] = String(requestParameters['authorization']);
181
+ }
182
+ let urlPath = `/v1/document_versions/{version_id}`;
183
+ urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
184
+ return {
185
+ path: urlPath,
186
+ method: 'POST',
187
+ headers: headerParameters,
188
+ query: queryParameters,
189
+ };
190
+ });
191
+ }
192
+ /**
193
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
194
+ * Document Version Action Handler
195
+ */
196
+ documentVersionActionRaw(requestParameters, initOverrides) {
197
+ return __awaiter(this, void 0, void 0, function* () {
198
+ const requestOptions = yield this.documentVersionActionRequestOpts(requestParameters);
199
+ const response = yield this.request(requestOptions, initOverrides);
200
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentVersionActionResponseFromJSON)(jsonValue));
201
+ });
202
+ }
203
+ /**
204
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
205
+ * Document Version Action Handler
206
+ */
207
+ documentVersionAction(requestParameters, initOverrides) {
208
+ return __awaiter(this, void 0, void 0, function* () {
209
+ const response = yield this.documentVersionActionRaw(requestParameters, initOverrides);
210
+ return yield response.value();
211
+ });
212
+ }
163
213
  /**
164
214
  * Creates request options for getDocumentVersion without sending the request
165
215
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ClearVersionContentsResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
13
+ import type { ClearVersionContentsResponse, DocumentVersionAction, DocumentVersionActionResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
14
14
  export interface ClearDocumentVersionContentsRequest {
15
15
  versionId: string;
16
16
  authorization?: string | null;
@@ -26,6 +26,12 @@ export interface DeleteDocumentVersionRequest {
26
26
  authorization?: string | null;
27
27
  ksUat?: string | null;
28
28
  }
29
+ export interface DocumentVersionActionRequest {
30
+ versionId: string;
31
+ action: DocumentVersionAction;
32
+ authorization?: string | null;
33
+ ksUat?: string | null;
34
+ }
29
35
  export interface GetDocumentVersionRequest {
30
36
  versionId: string;
31
37
  authorization?: string | null;
@@ -134,6 +140,33 @@ export interface DocumentVersionsApiInterface {
134
140
  * Delete Document Version Handler
135
141
  */
136
142
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
143
+ /**
144
+ * Creates request options for documentVersionAction without sending the request
145
+ * @param {string} versionId DocumentVersion ID
146
+ * @param {DocumentVersionAction} action Action to perform
147
+ * @param {string} [authorization]
148
+ * @param {string} [ksUat]
149
+ * @throws {RequiredError}
150
+ * @memberof DocumentVersionsApiInterface
151
+ */
152
+ documentVersionActionRequestOpts(requestParameters: DocumentVersionActionRequest): Promise<runtime.RequestOpts>;
153
+ /**
154
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
155
+ * @summary Document Version Action Handler
156
+ * @param {string} versionId DocumentVersion ID
157
+ * @param {DocumentVersionAction} action Action to perform
158
+ * @param {string} [authorization]
159
+ * @param {string} [ksUat]
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ * @memberof DocumentVersionsApiInterface
163
+ */
164
+ documentVersionActionRaw(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionActionResponse>>;
165
+ /**
166
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
167
+ * Document Version Action Handler
168
+ */
169
+ documentVersionAction(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionActionResponse>;
137
170
  /**
138
171
  * Creates request options for getDocumentVersion without sending the request
139
172
  * @param {string} versionId DocumentVersion ID
@@ -293,6 +326,20 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
293
326
  * Delete Document Version Handler
294
327
  */
295
328
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
329
+ /**
330
+ * Creates request options for documentVersionAction without sending the request
331
+ */
332
+ documentVersionActionRequestOpts(requestParameters: DocumentVersionActionRequest): Promise<runtime.RequestOpts>;
333
+ /**
334
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
335
+ * Document Version Action Handler
336
+ */
337
+ documentVersionActionRaw(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionActionResponse>>;
338
+ /**
339
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
340
+ * Document Version Action Handler
341
+ */
342
+ documentVersionAction(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionActionResponse>;
296
343
  /**
297
344
  * Creates request options for getDocumentVersion without sending the request
298
345
  */
@@ -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 { ClearVersionContentsResponseFromJSON, DocumentVersionMetadataUpdateToJSON, DocumentVersionResponseFromJSON, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminatorFromJSON, PaginatedResponseDocumentVersionResponseFromJSON, } from '../models/index';
24
+ import { ClearVersionContentsResponseFromJSON, DocumentVersionActionResponseFromJSON, DocumentVersionMetadataUpdateToJSON, DocumentVersionResponseFromJSON, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminatorFromJSON, PaginatedResponseDocumentVersionResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -157,6 +157,56 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
157
157
  yield this.deleteDocumentVersionRaw(requestParameters, initOverrides);
158
158
  });
159
159
  }
160
+ /**
161
+ * Creates request options for documentVersionAction without sending the request
162
+ */
163
+ documentVersionActionRequestOpts(requestParameters) {
164
+ return __awaiter(this, void 0, void 0, function* () {
165
+ if (requestParameters['versionId'] == null) {
166
+ throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling documentVersionAction().');
167
+ }
168
+ if (requestParameters['action'] == null) {
169
+ throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling documentVersionAction().');
170
+ }
171
+ const queryParameters = {};
172
+ if (requestParameters['action'] != null) {
173
+ queryParameters['action'] = requestParameters['action'];
174
+ }
175
+ const headerParameters = {};
176
+ if (requestParameters['authorization'] != null) {
177
+ headerParameters['authorization'] = String(requestParameters['authorization']);
178
+ }
179
+ let urlPath = `/v1/document_versions/{version_id}`;
180
+ urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
181
+ return {
182
+ path: urlPath,
183
+ method: 'POST',
184
+ headers: headerParameters,
185
+ query: queryParameters,
186
+ };
187
+ });
188
+ }
189
+ /**
190
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
191
+ * Document Version Action Handler
192
+ */
193
+ documentVersionActionRaw(requestParameters, initOverrides) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ const requestOptions = yield this.documentVersionActionRequestOpts(requestParameters);
196
+ const response = yield this.request(requestOptions, initOverrides);
197
+ return new runtime.JSONApiResponse(response, (jsonValue) => DocumentVersionActionResponseFromJSON(jsonValue));
198
+ });
199
+ }
200
+ /**
201
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
202
+ * Document Version Action Handler
203
+ */
204
+ documentVersionAction(requestParameters, initOverrides) {
205
+ return __awaiter(this, void 0, void 0, function* () {
206
+ const response = yield this.documentVersionActionRaw(requestParameters, initOverrides);
207
+ return yield response.value();
208
+ });
209
+ }
160
210
  /**
161
211
  * Creates request options for getDocumentVersion without sending the request
162
212
  */
@@ -55,6 +55,12 @@ export interface ChunkBulkResponse {
55
55
  * @memberof ChunkBulkResponse
56
56
  */
57
57
  chunkMetadata: ChunkMetadataOutput;
58
+ /**
59
+ * Number of tokens in chunk content
60
+ * @type {number}
61
+ * @memberof ChunkBulkResponse
62
+ */
63
+ numTokens?: number | null;
58
64
  /**
59
65
  * Parent PathPart ID
60
66
  * @type {string}
@@ -61,6 +61,7 @@ export function ChunkBulkResponseFromJSONTyped(json, ignoreDiscriminator) {
61
61
  'content': json['content'],
62
62
  'chunkType': ChunkTypeFromJSON(json['chunk_type']),
63
63
  'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
64
+ 'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
64
65
  'parentPathId': json['parent_path_id'],
65
66
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
66
67
  'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
@@ -89,6 +90,7 @@ export function ChunkBulkResponseToJSONTyped(value, ignoreDiscriminator = false)
89
90
  'content': value['content'],
90
91
  'chunk_type': ChunkTypeToJSON(value['chunkType']),
91
92
  'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
93
+ 'num_tokens': value['numTokens'],
92
94
  'parent_path_id': value['parentPathId'],
93
95
  'prev_sibling_path_id': value['prevSiblingPathId'],
94
96
  'next_sibling_path_id': value['nextSiblingPathId'],
@@ -55,6 +55,12 @@ export interface ChunkResponse {
55
55
  * @memberof ChunkResponse
56
56
  */
57
57
  chunkMetadata: ChunkMetadataOutput;
58
+ /**
59
+ * Number of tokens in chunk content
60
+ * @type {number}
61
+ * @memberof ChunkResponse
62
+ */
63
+ numTokens?: number | null;
58
64
  /**
59
65
  * Parent PathPart ID
60
66
  * @type {string}
@@ -59,6 +59,7 @@ export function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
59
59
  'content': json['content'],
60
60
  'chunkType': ChunkTypeFromJSON(json['chunk_type']),
61
61
  'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
62
+ 'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
62
63
  'parentPathId': json['parent_path_id'],
63
64
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
64
65
  'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
@@ -86,6 +87,7 @@ export function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
86
87
  'content': value['content'],
87
88
  'chunk_type': ChunkTypeToJSON(value['chunkType']),
88
89
  'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
90
+ 'num_tokens': value['numTokens'],
89
91
  'parent_path_id': value['parentPathId'],
90
92
  'prev_sibling_path_id': value['prevSiblingPathId'],
91
93
  'next_sibling_path_id': value['nextSiblingPathId'],
@@ -0,0 +1,24 @@
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
+ * Actions that can be performed on a document version.
14
+ * @export
15
+ */
16
+ export declare const DocumentVersionAction: {
17
+ readonly Reembed: "reembed";
18
+ };
19
+ export type DocumentVersionAction = typeof DocumentVersionAction[keyof typeof DocumentVersionAction];
20
+ export declare function instanceOfDocumentVersionAction(value: any): boolean;
21
+ export declare function DocumentVersionActionFromJSON(json: any): DocumentVersionAction;
22
+ export declare function DocumentVersionActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionAction;
23
+ export declare function DocumentVersionActionToJSON(value?: DocumentVersionAction | null): any;
24
+ export declare function DocumentVersionActionToJSONTyped(value: any, ignoreDiscriminator: boolean): DocumentVersionAction;
@@ -0,0 +1,42 @@
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
+ * Actions that can be performed on a document version.
16
+ * @export
17
+ */
18
+ export const DocumentVersionAction = {
19
+ Reembed: 'reembed'
20
+ };
21
+ export function instanceOfDocumentVersionAction(value) {
22
+ for (const key in DocumentVersionAction) {
23
+ if (Object.prototype.hasOwnProperty.call(DocumentVersionAction, key)) {
24
+ if (DocumentVersionAction[key] === value) {
25
+ return true;
26
+ }
27
+ }
28
+ }
29
+ return false;
30
+ }
31
+ export function DocumentVersionActionFromJSON(json) {
32
+ return DocumentVersionActionFromJSONTyped(json, false);
33
+ }
34
+ export function DocumentVersionActionFromJSONTyped(json, ignoreDiscriminator) {
35
+ return json;
36
+ }
37
+ export function DocumentVersionActionToJSON(value) {
38
+ return value;
39
+ }
40
+ export function DocumentVersionActionToJSONTyped(value, ignoreDiscriminator) {
41
+ return value;
42
+ }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { DocumentVersionAction } from './DocumentVersionAction';
13
+ /**
14
+ * Response from a document version action.
15
+ * @export
16
+ * @interface DocumentVersionActionResponse
17
+ */
18
+ export interface DocumentVersionActionResponse {
19
+ /**
20
+ * DocumentVersion ID
21
+ * @type {string}
22
+ * @memberof DocumentVersionActionResponse
23
+ */
24
+ versionId: string;
25
+ /**
26
+ *
27
+ * @type {DocumentVersionAction}
28
+ * @memberof DocumentVersionActionResponse
29
+ */
30
+ action: DocumentVersionAction;
31
+ /**
32
+ * Temporal workflow ID
33
+ * @type {string}
34
+ * @memberof DocumentVersionActionResponse
35
+ */
36
+ workflowId: string;
37
+ }
38
+ /**
39
+ * Check if a given object implements the DocumentVersionActionResponse interface.
40
+ */
41
+ export declare function instanceOfDocumentVersionActionResponse(value: object): value is DocumentVersionActionResponse;
42
+ export declare function DocumentVersionActionResponseFromJSON(json: any): DocumentVersionActionResponse;
43
+ export declare function DocumentVersionActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionActionResponse;
44
+ export declare function DocumentVersionActionResponseToJSON(json: any): DocumentVersionActionResponse;
45
+ export declare function DocumentVersionActionResponseToJSONTyped(value?: DocumentVersionActionResponse | null, ignoreDiscriminator?: boolean): any;
46
+ export declare const DocumentVersionActionResponsePropertyValidationAttributesMap: {
47
+ [property: string]: {
48
+ maxLength?: number;
49
+ minLength?: number;
50
+ pattern?: string;
51
+ maximum?: number;
52
+ exclusiveMaximum?: boolean;
53
+ minimum?: number;
54
+ exclusiveMinimum?: boolean;
55
+ multipleOf?: number;
56
+ maxItems?: number;
57
+ minItems?: number;
58
+ uniqueItems?: boolean;
59
+ };
60
+ };
@@ -0,0 +1,53 @@
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
+ import { DocumentVersionActionFromJSON, DocumentVersionActionToJSON, } from './DocumentVersionAction';
15
+ /**
16
+ * Check if a given object implements the DocumentVersionActionResponse interface.
17
+ */
18
+ export function instanceOfDocumentVersionActionResponse(value) {
19
+ if (!('versionId' in value) || value['versionId'] === undefined)
20
+ return false;
21
+ if (!('action' in value) || value['action'] === undefined)
22
+ return false;
23
+ if (!('workflowId' in value) || value['workflowId'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function DocumentVersionActionResponseFromJSON(json) {
28
+ return DocumentVersionActionResponseFromJSONTyped(json, false);
29
+ }
30
+ export function DocumentVersionActionResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'versionId': json['version_id'],
36
+ 'action': DocumentVersionActionFromJSON(json['action']),
37
+ 'workflowId': json['workflow_id'],
38
+ };
39
+ }
40
+ export function DocumentVersionActionResponseToJSON(json) {
41
+ return DocumentVersionActionResponseToJSONTyped(json, false);
42
+ }
43
+ export function DocumentVersionActionResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'version_id': value['versionId'],
49
+ 'action': DocumentVersionActionToJSON(value['action']),
50
+ 'workflow_id': value['workflowId'],
51
+ };
52
+ }
53
+ export const DocumentVersionActionResponsePropertyValidationAttributesMap = {};
@@ -10,8 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PipelineState } from './PipelineState';
13
+ import type { InformationStatistics } from './InformationStatistics';
13
14
  /**
14
- * Schema for document_version.metadata JSONB field.
15
+ * Schema for document_version.system_metadata JSONB field.
15
16
  *
16
17
  * Tracks S3 URLs for generated artifacts, pipeline execution state,
17
18
  * and document statistics. Convention-based paths (images, page screenshots)
@@ -97,6 +98,12 @@ export interface DocumentVersionMetadata {
97
98
  xlsxKpiCatalog?: Array<{
98
99
  [key: string]: any;
99
100
  }> | null;
101
+ /**
102
+ *
103
+ * @type {InformationStatistics}
104
+ * @memberof DocumentVersionMetadata
105
+ */
106
+ informationStatistics?: InformationStatistics;
100
107
  }
101
108
  /**
102
109
  * Check if a given object implements the DocumentVersionMetadata interface.