@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
@@ -63,6 +63,7 @@ function WorkflowDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
63
63
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
64
64
  'error': json['error'] == null ? undefined : json['error'],
65
65
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
66
+ 'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
66
67
  'createdAt': (new Date(json['created_at'])),
67
68
  'temporalStatus': json['temporal_status'],
68
69
  'startTime': (new Date(json['start_time'])),
@@ -88,6 +89,7 @@ function WorkflowDetailResponseToJSONTyped(value, ignoreDiscriminator = false) {
88
89
  'last_activity': value['lastActivity'],
89
90
  'error': value['error'],
90
91
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
92
+ 'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
91
93
  'created_at': value['createdAt'].toISOString(),
92
94
  'temporal_status': value['temporalStatus'],
93
95
  'start_time': value['startTime'].toISOString(),
@@ -58,6 +58,12 @@ export interface WorkflowSummaryResponse {
58
58
  * @memberof WorkflowSummaryResponse
59
59
  */
60
60
  lastRunTimestamp: Date;
61
+ /**
62
+ *
63
+ * @type {Date}
64
+ * @memberof WorkflowSummaryResponse
65
+ */
66
+ lastStateUpdateTimestamp?: Date | null;
61
67
  /**
62
68
  *
63
69
  * @type {Date}
@@ -53,6 +53,7 @@ function WorkflowSummaryResponseFromJSONTyped(json, ignoreDiscriminator) {
53
53
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
54
54
  'error': json['error'] == null ? undefined : json['error'],
55
55
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
56
+ 'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
56
57
  'createdAt': (new Date(json['created_at'])),
57
58
  };
58
59
  }
@@ -71,6 +72,7 @@ function WorkflowSummaryResponseToJSONTyped(value, ignoreDiscriminator = false)
71
72
  'last_activity': value['lastActivity'],
72
73
  'error': value['error'],
73
74
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
75
+ 'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
74
76
  'created_at': value['createdAt'].toISOString(),
75
77
  };
76
78
  }
@@ -31,6 +31,8 @@ export * from './CreateThreadRequest';
31
31
  export * from './DocumentOrigin';
32
32
  export * from './DocumentResponse';
33
33
  export * from './DocumentType';
34
+ export * from './DocumentVersionAction';
35
+ export * from './DocumentVersionActionResponse';
34
36
  export * from './DocumentVersionMetadata';
35
37
  export * from './DocumentVersionMetadataUpdate';
36
38
  export * from './DocumentVersionResponse';
@@ -47,6 +49,7 @@ export * from './HTTPValidationError';
47
49
  export * from './HealthCheckResponse';
48
50
  export * from './IdpType';
49
51
  export * from './ImageTaxonomy';
52
+ export * from './InformationStatistics';
50
53
  export * from './IngestDocumentResponse';
51
54
  export * from './IngestionMode';
52
55
  export * from './InviteResponse';
@@ -91,6 +94,7 @@ export * from './SearchType';
91
94
  export * from './SectionContentItem';
92
95
  export * from './SectionContentItemOrChunkContentItem';
93
96
  export * from './SectionResponse';
97
+ export * from './SectionSystemMetadata';
94
98
  export * from './SignInRequest';
95
99
  export * from './StepInput';
96
100
  export * from './StepKind';
@@ -49,6 +49,8 @@ __exportStar(require("./CreateThreadRequest"), exports);
49
49
  __exportStar(require("./DocumentOrigin"), exports);
50
50
  __exportStar(require("./DocumentResponse"), exports);
51
51
  __exportStar(require("./DocumentType"), exports);
52
+ __exportStar(require("./DocumentVersionAction"), exports);
53
+ __exportStar(require("./DocumentVersionActionResponse"), exports);
52
54
  __exportStar(require("./DocumentVersionMetadata"), exports);
53
55
  __exportStar(require("./DocumentVersionMetadataUpdate"), exports);
54
56
  __exportStar(require("./DocumentVersionResponse"), exports);
@@ -65,6 +67,7 @@ __exportStar(require("./HTTPValidationError"), exports);
65
67
  __exportStar(require("./HealthCheckResponse"), exports);
66
68
  __exportStar(require("./IdpType"), exports);
67
69
  __exportStar(require("./ImageTaxonomy"), exports);
70
+ __exportStar(require("./InformationStatistics"), exports);
68
71
  __exportStar(require("./IngestDocumentResponse"), exports);
69
72
  __exportStar(require("./IngestionMode"), exports);
70
73
  __exportStar(require("./InviteResponse"), exports);
@@ -109,6 +112,7 @@ __exportStar(require("./SearchType"), exports);
109
112
  __exportStar(require("./SectionContentItem"), exports);
110
113
  __exportStar(require("./SectionContentItemOrChunkContentItem"), exports);
111
114
  __exportStar(require("./SectionResponse"), exports);
115
+ __exportStar(require("./SectionSystemMetadata"), exports);
112
116
  __exportStar(require("./SignInRequest"), exports);
113
117
  __exportStar(require("./StepInput"), exports);
114
118
  __exportStar(require("./StepKind"), exports);
@@ -13,6 +13,7 @@ Name | Type
13
13
  `content` | string
14
14
  `chunkType` | [ChunkType](ChunkType.md)
15
15
  `chunkMetadata` | [ChunkMetadataOutput](ChunkMetadataOutput.md)
16
+ `numTokens` | number
16
17
  `parentPathId` | string
17
18
  `prevSiblingPathId` | string
18
19
  `nextSiblingPathId` | string
@@ -39,6 +40,7 @@ const example = {
39
40
  "content": null,
40
41
  "chunkType": null,
41
42
  "chunkMetadata": null,
43
+ "numTokens": null,
42
44
  "parentPathId": null,
43
45
  "prevSiblingPathId": null,
44
46
  "nextSiblingPathId": null,
@@ -13,6 +13,7 @@ Name | Type
13
13
  `content` | string
14
14
  `chunkType` | [ChunkType](ChunkType.md)
15
15
  `chunkMetadata` | [ChunkMetadataOutput](ChunkMetadataOutput.md)
16
+ `numTokens` | number
16
17
  `parentPathId` | string
17
18
  `prevSiblingPathId` | string
18
19
  `nextSiblingPathId` | string
@@ -38,6 +39,7 @@ const example = {
38
39
  "content": null,
39
40
  "chunkType": null,
40
41
  "chunkMetadata": null,
42
+ "numTokens": null,
41
43
  "parentPathId": null,
42
44
  "prevSiblingPathId": null,
43
45
  "nextSiblingPathId": null,
@@ -0,0 +1,33 @@
1
+
2
+ # DocumentVersionAction
3
+
4
+ Actions that can be performed on a document version.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { DocumentVersionAction } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies DocumentVersionAction
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as DocumentVersionAction
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+
@@ -0,0 +1,39 @@
1
+
2
+ # DocumentVersionActionResponse
3
+
4
+ Response from a document version action.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `versionId` | string
11
+ `action` | [DocumentVersionAction](DocumentVersionAction.md)
12
+ `workflowId` | string
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { DocumentVersionActionResponse } from '@knowledge-stack/ksapi'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "versionId": null,
22
+ "action": null,
23
+ "workflowId": null,
24
+ } satisfies DocumentVersionActionResponse
25
+
26
+ console.log(example)
27
+
28
+ // Convert the instance to a JSON string
29
+ const exampleJSON: string = JSON.stringify(example)
30
+ console.log(exampleJSON)
31
+
32
+ // Parse the JSON string back to an object
33
+ const exampleParsed = JSON.parse(exampleJSON) as DocumentVersionActionResponse
34
+ console.log(exampleParsed)
35
+ ```
36
+
37
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
+
39
+
@@ -1,7 +1,7 @@
1
1
 
2
2
  # DocumentVersionMetadata
3
3
 
4
- Schema for document_version.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}/...
5
5
 
6
6
  ## Properties
7
7
 
@@ -19,6 +19,7 @@ Name | Type
19
19
  `xlsxParseResultS3` | string
20
20
  `xlsxNamedRanges` | Array<{ [key: string]: any; }>
21
21
  `xlsxKpiCatalog` | Array<{ [key: string]: any; }>
22
+ `informationStatistics` | [InformationStatistics](InformationStatistics.md)
22
23
 
23
24
  ## Example
24
25
 
@@ -39,6 +40,7 @@ const example = {
39
40
  "xlsxParseResultS3": null,
40
41
  "xlsxNamedRanges": null,
41
42
  "xlsxKpiCatalog": null,
43
+ "informationStatistics": null,
42
44
  } satisfies DocumentVersionMetadata
43
45
 
44
46
  console.log(example)
@@ -19,6 +19,7 @@ Name | Type
19
19
  `xlsxParseResultS3` | string
20
20
  `xlsxNamedRanges` | Array<{ [key: string]: any; }>
21
21
  `xlsxKpiCatalog` | Array<{ [key: string]: any; }>
22
+ `informationStatistics` | [InformationStatistics](InformationStatistics.md)
22
23
 
23
24
  ## Example
24
25
 
@@ -39,6 +40,7 @@ const example = {
39
40
  "xlsxParseResultS3": null,
40
41
  "xlsxNamedRanges": null,
41
42
  "xlsxKpiCatalog": null,
43
+ "informationStatistics": null,
42
44
  } satisfies DocumentVersionMetadataUpdate
43
45
 
44
46
  console.log(example)
@@ -18,7 +18,7 @@ Name | Type
18
18
  `createdAt` | Date
19
19
  `updatedAt` | Date
20
20
  `assetS3Url` | string
21
- `metadata` | [DocumentVersionMetadata](DocumentVersionMetadata.md)
21
+ `systemMetadata` | [DocumentVersionMetadata](DocumentVersionMetadata.md)
22
22
 
23
23
  ## Example
24
24
 
@@ -38,7 +38,7 @@ const example = {
38
38
  "createdAt": null,
39
39
  "updatedAt": null,
40
40
  "assetS3Url": null,
41
- "metadata": null,
41
+ "systemMetadata": null,
42
42
  } satisfies DocumentVersionResponse
43
43
 
44
44
  console.log(example)
@@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:8000*
7
7
  | [**clearDocumentVersionContents**](DocumentVersionsApi.md#cleardocumentversioncontents) | **DELETE** /v1/document_versions/{version_id}/contents | Clear Document Version Contents Handler |
8
8
  | [**createDocumentVersion**](DocumentVersionsApi.md#createdocumentversion) | **POST** /v1/documents/{document_id}/versions | Create Document Version Handler |
9
9
  | [**deleteDocumentVersion**](DocumentVersionsApi.md#deletedocumentversion) | **DELETE** /v1/document_versions/{version_id} | Delete Document Version Handler |
10
+ | [**documentVersionAction**](DocumentVersionsApi.md#documentversionaction) | **POST** /v1/document_versions/{version_id} | Document Version Action Handler |
10
11
  | [**getDocumentVersion**](DocumentVersionsApi.md#getdocumentversion) | **GET** /v1/document_versions/{version_id} | Get Document Version Handler |
11
12
  | [**getDocumentVersionContents**](DocumentVersionsApi.md#getdocumentversioncontents) | **GET** /v1/document_versions/{version_id}/contents | Get Document Version Contents Handler |
12
13
  | [**listDocumentVersions**](DocumentVersionsApi.md#listdocumentversions) | **GET** /v1/document_versions | List Document Versions Handler |
@@ -236,6 +237,83 @@ No authorization required
236
237
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
237
238
 
238
239
 
240
+ ## documentVersionAction
241
+
242
+ > DocumentVersionActionResponse documentVersionAction(versionId, action, authorization, ksUat)
243
+
244
+ Document Version Action Handler
245
+
246
+ Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
247
+
248
+ ### Example
249
+
250
+ ```ts
251
+ import {
252
+ Configuration,
253
+ DocumentVersionsApi,
254
+ } from '@knowledge-stack/ksapi';
255
+ import type { DocumentVersionActionRequest } from '@knowledge-stack/ksapi';
256
+
257
+ async function example() {
258
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
259
+ const api = new DocumentVersionsApi();
260
+
261
+ const body = {
262
+ // string | DocumentVersion ID
263
+ versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
264
+ // DocumentVersionAction | Action to perform
265
+ action: ...,
266
+ // string (optional)
267
+ authorization: authorization_example,
268
+ // string (optional)
269
+ ksUat: ksUat_example,
270
+ } satisfies DocumentVersionActionRequest;
271
+
272
+ try {
273
+ const data = await api.documentVersionAction(body);
274
+ console.log(data);
275
+ } catch (error) {
276
+ console.error(error);
277
+ }
278
+ }
279
+
280
+ // Run the test
281
+ example().catch(console.error);
282
+ ```
283
+
284
+ ### Parameters
285
+
286
+
287
+ | Name | Type | Description | Notes |
288
+ |------------- | ------------- | ------------- | -------------|
289
+ | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
290
+ | **action** | `DocumentVersionAction` | Action to perform | [Defaults to `undefined`] [Enum: reembed] |
291
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
292
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
293
+
294
+ ### Return type
295
+
296
+ [**DocumentVersionActionResponse**](DocumentVersionActionResponse.md)
297
+
298
+ ### Authorization
299
+
300
+ No authorization required
301
+
302
+ ### HTTP request headers
303
+
304
+ - **Content-Type**: Not defined
305
+ - **Accept**: `application/json`
306
+
307
+
308
+ ### HTTP response details
309
+ | Status code | Description | Response headers |
310
+ |-------------|-------------|------------------|
311
+ | **200** | Successful Response | - |
312
+ | **422** | Validation Error | - |
313
+
314
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
315
+
316
+
239
317
  ## getDocumentVersion
240
318
 
241
319
  > DocumentVersionResponse getDocumentVersion(versionId, authorization, ksUat)
@@ -0,0 +1,41 @@
1
+
2
+ # InformationStatistics
3
+
4
+ Aggregate statistics for a section subtree or document version.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `numChunksByType` | { [key: string]: number; }
11
+ `totalTokens` | number
12
+ `numDirectChildren` | number
13
+ `childrenDepth` | number
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { InformationStatistics } from '@knowledge-stack/ksapi'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "numChunksByType": null,
23
+ "totalTokens": null,
24
+ "numDirectChildren": null,
25
+ "childrenDepth": null,
26
+ } satisfies InformationStatistics
27
+
28
+ console.log(example)
29
+
30
+ // Convert the instance to a JSON string
31
+ const exampleJSON: string = JSON.stringify(example)
32
+ console.log(exampleJSON)
33
+
34
+ // Parse the JSON string back to an object
35
+ const exampleParsed = JSON.parse(exampleJSON) as InformationStatistics
36
+ console.log(exampleParsed)
37
+ ```
38
+
39
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
40
+
41
+
@@ -9,6 +9,7 @@ Name | Type
9
9
  ------------ | -------------
10
10
  `status` | [PipelineStatus](PipelineStatus.md)
11
11
  `lastRunTimestamp` | Date
12
+ `lastStateUpdateTimestamp` | Date
12
13
  `lastActivity` | string
13
14
  `error` | string
14
15
  `temporalWorkflowId` | string
@@ -26,6 +27,7 @@ import type { PipelineState } from '@knowledge-stack/ksapi'
26
27
  const example = {
27
28
  "status": null,
28
29
  "lastRunTimestamp": null,
30
+ "lastStateUpdateTimestamp": null,
29
31
  "lastActivity": null,
30
32
  "error": null,
31
33
  "temporalWorkflowId": null,
@@ -13,6 +13,7 @@ Name | Type
13
13
  `content` | string
14
14
  `chunkType` | [ChunkType](ChunkType.md)
15
15
  `chunkMetadata` | [ChunkMetadataOutput](ChunkMetadataOutput.md)
16
+ `numTokens` | number
16
17
  `parentPathId` | string
17
18
  `prevSiblingPathId` | string
18
19
  `nextSiblingPathId` | string
@@ -39,6 +40,7 @@ const example = {
39
40
  "content": null,
40
41
  "chunkType": null,
41
42
  "chunkMetadata": null,
43
+ "numTokens": null,
42
44
  "parentPathId": null,
43
45
  "prevSiblingPathId": null,
44
46
  "nextSiblingPathId": null,
@@ -16,6 +16,7 @@ Name | Type
16
16
  `nextSiblingPathId` | string
17
17
  `materializedPath` | string
18
18
  `systemManaged` | boolean
19
+ `systemMetadata` | [SectionSystemMetadata](SectionSystemMetadata.md)
19
20
  `tenantId` | string
20
21
  `createdAt` | Date
21
22
  `updatedAt` | Date
@@ -36,6 +37,7 @@ const example = {
36
37
  "nextSiblingPathId": null,
37
38
  "materializedPath": null,
38
39
  "systemManaged": null,
40
+ "systemMetadata": null,
39
41
  "tenantId": null,
40
42
  "createdAt": null,
41
43
  "updatedAt": null,
@@ -0,0 +1,35 @@
1
+
2
+ # SectionSystemMetadata
3
+
4
+ Schema for section.system_metadata JSONB field.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `informationStatistics` | [InformationStatistics](InformationStatistics.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { SectionSystemMetadata } from '@knowledge-stack/ksapi'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "informationStatistics": null,
20
+ } satisfies SectionSystemMetadata
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as SectionSystemMetadata
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+
@@ -14,6 +14,7 @@ Name | Type
14
14
  `lastActivity` | string
15
15
  `error` | string
16
16
  `lastRunTimestamp` | Date
17
+ `lastStateUpdateTimestamp` | Date
17
18
  `createdAt` | Date
18
19
  `temporalStatus` | string
19
20
  `startTime` | Date
@@ -37,6 +38,7 @@ const example = {
37
38
  "lastActivity": null,
38
39
  "error": null,
39
40
  "lastRunTimestamp": null,
41
+ "lastStateUpdateTimestamp": null,
40
42
  "createdAt": null,
41
43
  "temporalStatus": null,
42
44
  "startTime": null,
@@ -14,6 +14,7 @@ Name | Type
14
14
  `lastActivity` | string
15
15
  `error` | string
16
16
  `lastRunTimestamp` | Date
17
+ `lastStateUpdateTimestamp` | Date
17
18
  `createdAt` | Date
18
19
 
19
20
  ## Example
@@ -30,6 +31,7 @@ const example = {
30
31
  "lastActivity": null,
31
32
  "error": null,
32
33
  "lastRunTimestamp": null,
34
+ "lastStateUpdateTimestamp": null,
33
35
  "createdAt": null,
34
36
  } satisfies WorkflowSummaryResponse
35
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.52.1",
3
+ "version": "1.53.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -16,6 +16,8 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ClearVersionContentsResponse,
19
+ DocumentVersionAction,
20
+ DocumentVersionActionResponse,
19
21
  DocumentVersionMetadataUpdate,
20
22
  DocumentVersionResponse,
21
23
  HTTPValidationError,
@@ -25,6 +27,10 @@ import type {
25
27
  import {
26
28
  ClearVersionContentsResponseFromJSON,
27
29
  ClearVersionContentsResponseToJSON,
30
+ DocumentVersionActionFromJSON,
31
+ DocumentVersionActionToJSON,
32
+ DocumentVersionActionResponseFromJSON,
33
+ DocumentVersionActionResponseToJSON,
28
34
  DocumentVersionMetadataUpdateFromJSON,
29
35
  DocumentVersionMetadataUpdateToJSON,
30
36
  DocumentVersionResponseFromJSON,
@@ -55,6 +61,13 @@ export interface DeleteDocumentVersionRequest {
55
61
  ksUat?: string | null;
56
62
  }
57
63
 
64
+ export interface DocumentVersionActionRequest {
65
+ versionId: string;
66
+ action: DocumentVersionAction;
67
+ authorization?: string | null;
68
+ ksUat?: string | null;
69
+ }
70
+
58
71
  export interface GetDocumentVersionRequest {
59
72
  versionId: string;
60
73
  authorization?: string | null;
@@ -176,6 +189,36 @@ export interface DocumentVersionsApiInterface {
176
189
  */
177
190
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
178
191
 
192
+ /**
193
+ * Creates request options for documentVersionAction without sending the request
194
+ * @param {string} versionId DocumentVersion ID
195
+ * @param {DocumentVersionAction} action Action to perform
196
+ * @param {string} [authorization]
197
+ * @param {string} [ksUat]
198
+ * @throws {RequiredError}
199
+ * @memberof DocumentVersionsApiInterface
200
+ */
201
+ documentVersionActionRequestOpts(requestParameters: DocumentVersionActionRequest): Promise<runtime.RequestOpts>;
202
+
203
+ /**
204
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
205
+ * @summary Document Version Action Handler
206
+ * @param {string} versionId DocumentVersion ID
207
+ * @param {DocumentVersionAction} action Action to perform
208
+ * @param {string} [authorization]
209
+ * @param {string} [ksUat]
210
+ * @param {*} [options] Override http request option.
211
+ * @throws {RequiredError}
212
+ * @memberof DocumentVersionsApiInterface
213
+ */
214
+ documentVersionActionRaw(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionActionResponse>>;
215
+
216
+ /**
217
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
218
+ * Document Version Action Handler
219
+ */
220
+ documentVersionAction(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionActionResponse>;
221
+
179
222
  /**
180
223
  * Creates request options for getDocumentVersion without sending the request
181
224
  * @param {string} versionId DocumentVersion ID
@@ -459,6 +502,68 @@ export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVers
459
502
  await this.deleteDocumentVersionRaw(requestParameters, initOverrides);
460
503
  }
461
504
 
505
+ /**
506
+ * Creates request options for documentVersionAction without sending the request
507
+ */
508
+ async documentVersionActionRequestOpts(requestParameters: DocumentVersionActionRequest): Promise<runtime.RequestOpts> {
509
+ if (requestParameters['versionId'] == null) {
510
+ throw new runtime.RequiredError(
511
+ 'versionId',
512
+ 'Required parameter "versionId" was null or undefined when calling documentVersionAction().'
513
+ );
514
+ }
515
+
516
+ if (requestParameters['action'] == null) {
517
+ throw new runtime.RequiredError(
518
+ 'action',
519
+ 'Required parameter "action" was null or undefined when calling documentVersionAction().'
520
+ );
521
+ }
522
+
523
+ const queryParameters: any = {};
524
+
525
+ if (requestParameters['action'] != null) {
526
+ queryParameters['action'] = requestParameters['action'];
527
+ }
528
+
529
+ const headerParameters: runtime.HTTPHeaders = {};
530
+
531
+ if (requestParameters['authorization'] != null) {
532
+ headerParameters['authorization'] = String(requestParameters['authorization']);
533
+ }
534
+
535
+
536
+ let urlPath = `/v1/document_versions/{version_id}`;
537
+ urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
538
+
539
+ return {
540
+ path: urlPath,
541
+ method: 'POST',
542
+ headers: headerParameters,
543
+ query: queryParameters,
544
+ };
545
+ }
546
+
547
+ /**
548
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
549
+ * Document Version Action Handler
550
+ */
551
+ async documentVersionActionRaw(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionActionResponse>> {
552
+ const requestOptions = await this.documentVersionActionRequestOpts(requestParameters);
553
+ const response = await this.request(requestOptions, initOverrides);
554
+
555
+ return new runtime.JSONApiResponse(response, (jsonValue) => DocumentVersionActionResponseFromJSON(jsonValue));
556
+ }
557
+
558
+ /**
559
+ * Perform an action on a document version. Supported actions: - `reembed`: Re-embed all chunks for this version into Qdrant.
560
+ * Document Version Action Handler
561
+ */
562
+ async documentVersionAction(requestParameters: DocumentVersionActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionActionResponse> {
563
+ const response = await this.documentVersionActionRaw(requestParameters, initOverrides);
564
+ return await response.value();
565
+ }
566
+
462
567
  /**
463
568
  * Creates request options for getDocumentVersion without sending the request
464
569
  */