@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.
- package/.openapi-generator/FILES +8 -0
- package/README.md +7 -2
- package/dist/apis/DocumentVersionsApi.d.ts +48 -1
- package/dist/apis/DocumentVersionsApi.js +50 -0
- package/dist/esm/apis/DocumentVersionsApi.d.ts +48 -1
- package/dist/esm/apis/DocumentVersionsApi.js +51 -1
- package/dist/esm/models/ChunkBulkResponse.d.ts +6 -0
- package/dist/esm/models/ChunkBulkResponse.js +2 -0
- package/dist/esm/models/ChunkResponse.d.ts +6 -0
- package/dist/esm/models/ChunkResponse.js +2 -0
- package/dist/esm/models/DocumentVersionAction.d.ts +24 -0
- package/dist/esm/models/DocumentVersionAction.js +42 -0
- package/dist/esm/models/DocumentVersionActionResponse.d.ts +60 -0
- package/dist/esm/models/DocumentVersionActionResponse.js +53 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +8 -1
- package/dist/esm/models/DocumentVersionMetadata.js +3 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +7 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +3 -0
- package/dist/esm/models/DocumentVersionResponse.d.ts +1 -1
- package/dist/esm/models/DocumentVersionResponse.js +2 -2
- package/dist/esm/models/InformationStatistics.d.ts +67 -0
- package/dist/esm/models/InformationStatistics.js +48 -0
- package/dist/esm/models/PipelineState.d.ts +8 -2
- package/dist/esm/models/PipelineState.js +4 -4
- package/dist/esm/models/ScoredChunkResponse.d.ts +6 -0
- package/dist/esm/models/ScoredChunkResponse.js +2 -0
- package/dist/esm/models/SectionResponse.d.ts +7 -0
- package/dist/esm/models/SectionResponse.js +3 -0
- package/dist/esm/models/SectionSystemMetadata.d.ts +48 -0
- package/dist/esm/models/SectionSystemMetadata.js +43 -0
- package/dist/esm/models/WorkflowDetailResponse.d.ts +6 -0
- package/dist/esm/models/WorkflowDetailResponse.js +2 -0
- package/dist/esm/models/WorkflowSummaryResponse.d.ts +6 -0
- package/dist/esm/models/WorkflowSummaryResponse.js +2 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ChunkBulkResponse.d.ts +6 -0
- package/dist/models/ChunkBulkResponse.js +2 -0
- package/dist/models/ChunkResponse.d.ts +6 -0
- package/dist/models/ChunkResponse.js +2 -0
- package/dist/models/DocumentVersionAction.d.ts +24 -0
- package/dist/models/DocumentVersionAction.js +50 -0
- package/dist/models/DocumentVersionActionResponse.d.ts +60 -0
- package/dist/models/DocumentVersionActionResponse.js +61 -0
- package/dist/models/DocumentVersionMetadata.d.ts +8 -1
- package/dist/models/DocumentVersionMetadata.js +3 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +7 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +3 -0
- package/dist/models/DocumentVersionResponse.d.ts +1 -1
- package/dist/models/DocumentVersionResponse.js +2 -2
- package/dist/models/InformationStatistics.d.ts +67 -0
- package/dist/models/InformationStatistics.js +56 -0
- package/dist/models/PipelineState.d.ts +8 -2
- package/dist/models/PipelineState.js +4 -4
- package/dist/models/ScoredChunkResponse.d.ts +6 -0
- package/dist/models/ScoredChunkResponse.js +2 -0
- package/dist/models/SectionResponse.d.ts +7 -0
- package/dist/models/SectionResponse.js +3 -0
- package/dist/models/SectionSystemMetadata.d.ts +48 -0
- package/dist/models/SectionSystemMetadata.js +51 -0
- package/dist/models/WorkflowDetailResponse.d.ts +6 -0
- package/dist/models/WorkflowDetailResponse.js +2 -0
- package/dist/models/WorkflowSummaryResponse.d.ts +6 -0
- package/dist/models/WorkflowSummaryResponse.js +2 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ChunkBulkResponse.md +2 -0
- package/docs/ChunkResponse.md +2 -0
- package/docs/DocumentVersionAction.md +33 -0
- package/docs/DocumentVersionActionResponse.md +39 -0
- package/docs/DocumentVersionMetadata.md +3 -1
- package/docs/DocumentVersionMetadataUpdate.md +2 -0
- package/docs/DocumentVersionResponse.md +2 -2
- package/docs/DocumentVersionsApi.md +78 -0
- package/docs/InformationStatistics.md +41 -0
- package/docs/PipelineState.md +2 -0
- package/docs/ScoredChunkResponse.md +2 -0
- package/docs/SectionResponse.md +2 -0
- package/docs/SectionSystemMetadata.md +35 -0
- package/docs/WorkflowDetailResponse.md +2 -0
- package/docs/WorkflowSummaryResponse.md +2 -0
- package/package.json +1 -1
- package/src/apis/DocumentVersionsApi.ts +105 -0
- package/src/models/ChunkBulkResponse.ts +8 -0
- package/src/models/ChunkResponse.ts +8 -0
- package/src/models/DocumentVersionAction.ts +52 -0
- package/src/models/DocumentVersionActionResponse.ts +111 -0
- package/src/models/DocumentVersionMetadata.ts +16 -1
- package/src/models/DocumentVersionMetadataUpdate.ts +15 -0
- package/src/models/DocumentVersionResponse.ts +3 -3
- package/src/models/InformationStatistics.ts +106 -0
- package/src/models/PipelineState.ts +12 -5
- package/src/models/ScoredChunkResponse.ts +8 -0
- package/src/models/SectionResponse.ts +16 -0
- package/src/models/SectionSystemMetadata.ts +90 -0
- package/src/models/WorkflowDetailResponse.ts +8 -0
- package/src/models/WorkflowSummaryResponse.ts +8 -0
- package/src/models/index.ts +4 -0
|
@@ -84,6 +84,12 @@ export interface ChunkBulkResponse {
|
|
|
84
84
|
* @memberof ChunkBulkResponse
|
|
85
85
|
*/
|
|
86
86
|
chunkMetadata: ChunkMetadataOutput;
|
|
87
|
+
/**
|
|
88
|
+
* Number of tokens in chunk content
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @memberof ChunkBulkResponse
|
|
91
|
+
*/
|
|
92
|
+
numTokens?: number | null;
|
|
87
93
|
/**
|
|
88
94
|
* Parent PathPart ID
|
|
89
95
|
* @type {string}
|
|
@@ -196,6 +202,7 @@ export function ChunkBulkResponseFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
196
202
|
'content': json['content'],
|
|
197
203
|
'chunkType': ChunkTypeFromJSON(json['chunk_type']),
|
|
198
204
|
'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
205
|
+
'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
|
|
199
206
|
'parentPathId': json['parent_path_id'],
|
|
200
207
|
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
201
208
|
'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
|
|
@@ -228,6 +235,7 @@ export function ChunkBulkResponseToJSONTyped(value?: ChunkBulkResponse | null, i
|
|
|
228
235
|
'content': value['content'],
|
|
229
236
|
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
230
237
|
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
238
|
+
'num_tokens': value['numTokens'],
|
|
231
239
|
'parent_path_id': value['parentPathId'],
|
|
232
240
|
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
233
241
|
'next_sibling_path_id': value['nextSiblingPathId'],
|
|
@@ -84,6 +84,12 @@ export interface ChunkResponse {
|
|
|
84
84
|
* @memberof ChunkResponse
|
|
85
85
|
*/
|
|
86
86
|
chunkMetadata: ChunkMetadataOutput;
|
|
87
|
+
/**
|
|
88
|
+
* Number of tokens in chunk content
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @memberof ChunkResponse
|
|
91
|
+
*/
|
|
92
|
+
numTokens?: number | null;
|
|
87
93
|
/**
|
|
88
94
|
* Parent PathPart ID
|
|
89
95
|
* @type {string}
|
|
@@ -189,6 +195,7 @@ export function ChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
189
195
|
'content': json['content'],
|
|
190
196
|
'chunkType': ChunkTypeFromJSON(json['chunk_type']),
|
|
191
197
|
'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
198
|
+
'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
|
|
192
199
|
'parentPathId': json['parent_path_id'],
|
|
193
200
|
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
194
201
|
'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
|
|
@@ -220,6 +227,7 @@ export function ChunkResponseToJSONTyped(value?: ChunkResponse | null, ignoreDis
|
|
|
220
227
|
'content': value['content'],
|
|
221
228
|
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
222
229
|
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
230
|
+
'num_tokens': value['numTokens'],
|
|
223
231
|
'parent_path_id': value['parentPathId'],
|
|
224
232
|
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
225
233
|
'next_sibling_path_id': value['nextSiblingPathId'],
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Actions that can be performed on a document version.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const DocumentVersionAction = {
|
|
21
|
+
Reembed: 'reembed'
|
|
22
|
+
} as const;
|
|
23
|
+
export type DocumentVersionAction = typeof DocumentVersionAction[keyof typeof DocumentVersionAction];
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export function instanceOfDocumentVersionAction(value: any): boolean {
|
|
27
|
+
for (const key in DocumentVersionAction) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(DocumentVersionAction, key)) {
|
|
29
|
+
if (DocumentVersionAction[key as keyof typeof DocumentVersionAction] === value) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function DocumentVersionActionFromJSON(json: any): DocumentVersionAction {
|
|
38
|
+
return DocumentVersionActionFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function DocumentVersionActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionAction {
|
|
42
|
+
return json as DocumentVersionAction;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function DocumentVersionActionToJSON(value?: DocumentVersionAction | null): any {
|
|
46
|
+
return value as any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function DocumentVersionActionToJSONTyped(value: any, ignoreDiscriminator: boolean): DocumentVersionAction {
|
|
50
|
+
return value as DocumentVersionAction;
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DocumentVersionAction } from './DocumentVersionAction';
|
|
17
|
+
import {
|
|
18
|
+
DocumentVersionActionFromJSON,
|
|
19
|
+
DocumentVersionActionFromJSONTyped,
|
|
20
|
+
DocumentVersionActionToJSON,
|
|
21
|
+
DocumentVersionActionToJSONTyped,
|
|
22
|
+
} from './DocumentVersionAction';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Response from a document version action.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface DocumentVersionActionResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface DocumentVersionActionResponse {
|
|
30
|
+
/**
|
|
31
|
+
* DocumentVersion ID
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof DocumentVersionActionResponse
|
|
34
|
+
*/
|
|
35
|
+
versionId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {DocumentVersionAction}
|
|
39
|
+
* @memberof DocumentVersionActionResponse
|
|
40
|
+
*/
|
|
41
|
+
action: DocumentVersionAction;
|
|
42
|
+
/**
|
|
43
|
+
* Temporal workflow ID
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof DocumentVersionActionResponse
|
|
46
|
+
*/
|
|
47
|
+
workflowId: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the DocumentVersionActionResponse interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfDocumentVersionActionResponse(value: object): value is DocumentVersionActionResponse {
|
|
56
|
+
if (!('versionId' in value) || value['versionId'] === undefined) return false;
|
|
57
|
+
if (!('action' in value) || value['action'] === undefined) return false;
|
|
58
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function DocumentVersionActionResponseFromJSON(json: any): DocumentVersionActionResponse {
|
|
63
|
+
return DocumentVersionActionResponseFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function DocumentVersionActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionActionResponse {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'versionId': json['version_id'],
|
|
73
|
+
'action': DocumentVersionActionFromJSON(json['action']),
|
|
74
|
+
'workflowId': json['workflow_id'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function DocumentVersionActionResponseToJSON(json: any): DocumentVersionActionResponse {
|
|
79
|
+
return DocumentVersionActionResponseToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function DocumentVersionActionResponseToJSONTyped(value?: DocumentVersionActionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'version_id': value['versionId'],
|
|
90
|
+
'action': DocumentVersionActionToJSON(value['action']),
|
|
91
|
+
'workflow_id': value['workflowId'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const DocumentVersionActionResponsePropertyValidationAttributesMap: {
|
|
96
|
+
[property: string]: {
|
|
97
|
+
maxLength?: number,
|
|
98
|
+
minLength?: number,
|
|
99
|
+
pattern?: string,
|
|
100
|
+
maximum?: number,
|
|
101
|
+
exclusiveMaximum?: boolean,
|
|
102
|
+
minimum?: number,
|
|
103
|
+
exclusiveMinimum?: boolean,
|
|
104
|
+
multipleOf?: number,
|
|
105
|
+
maxItems?: number,
|
|
106
|
+
minItems?: number,
|
|
107
|
+
uniqueItems?: boolean
|
|
108
|
+
}
|
|
109
|
+
} = {
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -20,9 +20,16 @@ import {
|
|
|
20
20
|
PipelineStateToJSON,
|
|
21
21
|
PipelineStateToJSONTyped,
|
|
22
22
|
} from './PipelineState';
|
|
23
|
+
import type { InformationStatistics } from './InformationStatistics';
|
|
24
|
+
import {
|
|
25
|
+
InformationStatisticsFromJSON,
|
|
26
|
+
InformationStatisticsFromJSONTyped,
|
|
27
|
+
InformationStatisticsToJSON,
|
|
28
|
+
InformationStatisticsToJSONTyped,
|
|
29
|
+
} from './InformationStatistics';
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
|
-
* Schema for document_version.
|
|
32
|
+
* Schema for document_version.system_metadata JSONB field.
|
|
26
33
|
*
|
|
27
34
|
* Tracks S3 URLs for generated artifacts, pipeline execution state,
|
|
28
35
|
* and document statistics. Convention-based paths (images, page screenshots)
|
|
@@ -104,6 +111,12 @@ export interface DocumentVersionMetadata {
|
|
|
104
111
|
* @memberof DocumentVersionMetadata
|
|
105
112
|
*/
|
|
106
113
|
xlsxKpiCatalog?: Array<{ [key: string]: any; }> | null;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {InformationStatistics}
|
|
117
|
+
* @memberof DocumentVersionMetadata
|
|
118
|
+
*/
|
|
119
|
+
informationStatistics?: InformationStatistics;
|
|
107
120
|
}
|
|
108
121
|
|
|
109
122
|
/**
|
|
@@ -135,6 +148,7 @@ export function DocumentVersionMetadataFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
135
148
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
136
149
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
137
150
|
'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
|
|
151
|
+
'informationStatistics': json['information_statistics'] == null ? undefined : InformationStatisticsFromJSON(json['information_statistics']),
|
|
138
152
|
};
|
|
139
153
|
}
|
|
140
154
|
|
|
@@ -161,6 +175,7 @@ export function DocumentVersionMetadataToJSONTyped(value?: DocumentVersionMetada
|
|
|
161
175
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
162
176
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
163
177
|
'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
|
|
178
|
+
'information_statistics': InformationStatisticsToJSON(value['informationStatistics']),
|
|
164
179
|
};
|
|
165
180
|
}
|
|
166
181
|
|
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
PipelineStateToJSON,
|
|
21
21
|
PipelineStateToJSONTyped,
|
|
22
22
|
} from './PipelineState';
|
|
23
|
+
import type { InformationStatistics } from './InformationStatistics';
|
|
24
|
+
import {
|
|
25
|
+
InformationStatisticsFromJSON,
|
|
26
|
+
InformationStatisticsFromJSONTyped,
|
|
27
|
+
InformationStatisticsToJSON,
|
|
28
|
+
InformationStatisticsToJSONTyped,
|
|
29
|
+
} from './InformationStatistics';
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
32
|
* Partial update schema for document version metadata.
|
|
@@ -102,6 +109,12 @@ export interface DocumentVersionMetadataUpdate {
|
|
|
102
109
|
* @memberof DocumentVersionMetadataUpdate
|
|
103
110
|
*/
|
|
104
111
|
xlsxKpiCatalog?: Array<{ [key: string]: any; }> | null;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {InformationStatistics}
|
|
115
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
116
|
+
*/
|
|
117
|
+
informationStatistics?: InformationStatistics;
|
|
105
118
|
}
|
|
106
119
|
|
|
107
120
|
/**
|
|
@@ -133,6 +146,7 @@ export function DocumentVersionMetadataUpdateFromJSONTyped(json: any, ignoreDisc
|
|
|
133
146
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
134
147
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
135
148
|
'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
|
|
149
|
+
'informationStatistics': json['information_statistics'] == null ? undefined : InformationStatisticsFromJSON(json['information_statistics']),
|
|
136
150
|
};
|
|
137
151
|
}
|
|
138
152
|
|
|
@@ -159,6 +173,7 @@ export function DocumentVersionMetadataUpdateToJSONTyped(value?: DocumentVersion
|
|
|
159
173
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
160
174
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
161
175
|
'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
|
|
176
|
+
'information_statistics': InformationStatisticsToJSON(value['informationStatistics']),
|
|
162
177
|
};
|
|
163
178
|
}
|
|
164
179
|
|
|
@@ -101,7 +101,7 @@ export interface DocumentVersionResponse {
|
|
|
101
101
|
* @type {DocumentVersionMetadata}
|
|
102
102
|
* @memberof DocumentVersionResponse
|
|
103
103
|
*/
|
|
104
|
-
|
|
104
|
+
systemMetadata?: DocumentVersionMetadata;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
/**
|
|
@@ -142,7 +142,7 @@ export function DocumentVersionResponseFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
142
142
|
'createdAt': (new Date(json['created_at'])),
|
|
143
143
|
'updatedAt': (new Date(json['updated_at'])),
|
|
144
144
|
'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
|
|
145
|
-
'
|
|
145
|
+
'systemMetadata': json['system_metadata'] == null ? undefined : DocumentVersionMetadataFromJSON(json['system_metadata']),
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -168,7 +168,7 @@ export function DocumentVersionResponseToJSONTyped(value?: DocumentVersionRespon
|
|
|
168
168
|
'created_at': value['createdAt'].toISOString(),
|
|
169
169
|
'updated_at': value['updatedAt'].toISOString(),
|
|
170
170
|
'asset_s3_url': value['assetS3Url'],
|
|
171
|
-
'
|
|
171
|
+
'system_metadata': DocumentVersionMetadataToJSON(value['systemMetadata']),
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Aggregate statistics for a section subtree or document version.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface InformationStatistics
|
|
20
|
+
*/
|
|
21
|
+
export interface InformationStatistics {
|
|
22
|
+
/**
|
|
23
|
+
* Count of chunks by type (e.g. {"TEXT": 42, "TABLE": 3})
|
|
24
|
+
* @type {{ [key: string]: number; }}
|
|
25
|
+
* @memberof InformationStatistics
|
|
26
|
+
*/
|
|
27
|
+
numChunksByType?: { [key: string]: number; };
|
|
28
|
+
/**
|
|
29
|
+
* Sum of all chunk content tokens in subtree
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof InformationStatistics
|
|
32
|
+
*/
|
|
33
|
+
totalTokens?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Count of immediate children (sections + chunks)
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof InformationStatistics
|
|
38
|
+
*/
|
|
39
|
+
numDirectChildren?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Max depth to deepest leaf (0 = no children)
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof InformationStatistics
|
|
44
|
+
*/
|
|
45
|
+
childrenDepth?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the InformationStatistics interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfInformationStatistics(value: object): value is InformationStatistics {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function InformationStatisticsFromJSON(json: any): InformationStatistics {
|
|
56
|
+
return InformationStatisticsFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function InformationStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): InformationStatistics {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'numChunksByType': json['num_chunks_by_type'] == null ? undefined : json['num_chunks_by_type'],
|
|
66
|
+
'totalTokens': json['total_tokens'] == null ? undefined : json['total_tokens'],
|
|
67
|
+
'numDirectChildren': json['num_direct_children'] == null ? undefined : json['num_direct_children'],
|
|
68
|
+
'childrenDepth': json['children_depth'] == null ? undefined : json['children_depth'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function InformationStatisticsToJSON(json: any): InformationStatistics {
|
|
73
|
+
return InformationStatisticsToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function InformationStatisticsToJSONTyped(value?: InformationStatistics | null, ignoreDiscriminator: boolean = false): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'num_chunks_by_type': value['numChunksByType'],
|
|
84
|
+
'total_tokens': value['totalTokens'],
|
|
85
|
+
'num_direct_children': value['numDirectChildren'],
|
|
86
|
+
'children_depth': value['childrenDepth'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const InformationStatisticsPropertyValidationAttributesMap: {
|
|
91
|
+
[property: string]: {
|
|
92
|
+
maxLength?: number,
|
|
93
|
+
minLength?: number,
|
|
94
|
+
pattern?: string,
|
|
95
|
+
maximum?: number,
|
|
96
|
+
exclusiveMaximum?: boolean,
|
|
97
|
+
minimum?: number,
|
|
98
|
+
exclusiveMinimum?: boolean,
|
|
99
|
+
multipleOf?: number,
|
|
100
|
+
maxItems?: number,
|
|
101
|
+
minItems?: number,
|
|
102
|
+
uniqueItems?: boolean
|
|
103
|
+
}
|
|
104
|
+
} = {
|
|
105
|
+
}
|
|
106
|
+
|
|
@@ -48,11 +48,17 @@ export interface PipelineState {
|
|
|
48
48
|
*/
|
|
49
49
|
status: PipelineStatus;
|
|
50
50
|
/**
|
|
51
|
-
* Timestamp of the last pipeline execution attempt
|
|
51
|
+
* Timestamp of the last pipeline execution attempt (set once when a run starts)
|
|
52
52
|
* @type {Date}
|
|
53
53
|
* @memberof PipelineState
|
|
54
54
|
*/
|
|
55
|
-
lastRunTimestamp
|
|
55
|
+
lastRunTimestamp?: Date | null;
|
|
56
|
+
/**
|
|
57
|
+
* Timestamp of the last pipeline state change (set by activities)
|
|
58
|
+
* @type {Date}
|
|
59
|
+
* @memberof PipelineState
|
|
60
|
+
*/
|
|
61
|
+
lastStateUpdateTimestamp?: Date | null;
|
|
56
62
|
/**
|
|
57
63
|
* Name of the last activity that executed (e.g., 'docling_conversion')
|
|
58
64
|
* @type {string}
|
|
@@ -104,7 +110,6 @@ export interface PipelineState {
|
|
|
104
110
|
*/
|
|
105
111
|
export function instanceOfPipelineState(value: object): value is PipelineState {
|
|
106
112
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
107
|
-
if (!('lastRunTimestamp' in value) || value['lastRunTimestamp'] === undefined) return false;
|
|
108
113
|
return true;
|
|
109
114
|
}
|
|
110
115
|
|
|
@@ -119,7 +124,8 @@ export function PipelineStateFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
119
124
|
return {
|
|
120
125
|
|
|
121
126
|
'status': PipelineStatusFromJSON(json['status']),
|
|
122
|
-
'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
|
|
127
|
+
'lastRunTimestamp': json['last_run_timestamp'] == null ? undefined : (new Date(json['last_run_timestamp'])),
|
|
128
|
+
'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
|
|
123
129
|
'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
|
|
124
130
|
'error': json['error'] == null ? undefined : json['error'],
|
|
125
131
|
'temporalWorkflowId': json['temporal_workflow_id'] == null ? undefined : json['temporal_workflow_id'],
|
|
@@ -142,7 +148,8 @@ export function PipelineStateToJSONTyped(value?: PipelineState | null, ignoreDis
|
|
|
142
148
|
return {
|
|
143
149
|
|
|
144
150
|
'status': PipelineStatusToJSON(value['status']),
|
|
145
|
-
'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
|
|
151
|
+
'last_run_timestamp': value['lastRunTimestamp'] == null ? value['lastRunTimestamp'] : value['lastRunTimestamp'].toISOString(),
|
|
152
|
+
'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
|
|
146
153
|
'last_activity': value['lastActivity'],
|
|
147
154
|
'error': value['error'],
|
|
148
155
|
'temporal_workflow_id': value['temporalWorkflowId'],
|
|
@@ -84,6 +84,12 @@ export interface ScoredChunkResponse {
|
|
|
84
84
|
* @memberof ScoredChunkResponse
|
|
85
85
|
*/
|
|
86
86
|
chunkMetadata: ChunkMetadataOutput;
|
|
87
|
+
/**
|
|
88
|
+
* Number of tokens in chunk content
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @memberof ScoredChunkResponse
|
|
91
|
+
*/
|
|
92
|
+
numTokens?: number | null;
|
|
87
93
|
/**
|
|
88
94
|
* Parent PathPart ID
|
|
89
95
|
* @type {string}
|
|
@@ -196,6 +202,7 @@ export function ScoredChunkResponseFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
196
202
|
'content': json['content'],
|
|
197
203
|
'chunkType': ChunkTypeFromJSON(json['chunk_type']),
|
|
198
204
|
'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
205
|
+
'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
|
|
199
206
|
'parentPathId': json['parent_path_id'],
|
|
200
207
|
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
201
208
|
'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
|
|
@@ -228,6 +235,7 @@ export function ScoredChunkResponseToJSONTyped(value?: ScoredChunkResponse | nul
|
|
|
228
235
|
'content': value['content'],
|
|
229
236
|
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
230
237
|
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
238
|
+
'num_tokens': value['numTokens'],
|
|
231
239
|
'parent_path_id': value['parentPathId'],
|
|
232
240
|
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
233
241
|
'next_sibling_path_id': value['nextSiblingPathId'],
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { SectionSystemMetadata } from './SectionSystemMetadata';
|
|
17
|
+
import {
|
|
18
|
+
SectionSystemMetadataFromJSON,
|
|
19
|
+
SectionSystemMetadataFromJSONTyped,
|
|
20
|
+
SectionSystemMetadataToJSON,
|
|
21
|
+
SectionSystemMetadataToJSONTyped,
|
|
22
|
+
} from './SectionSystemMetadata';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
* Section response model.
|
|
18
26
|
* @export
|
|
@@ -73,6 +81,12 @@ export interface SectionResponse {
|
|
|
73
81
|
* @memberof SectionResponse
|
|
74
82
|
*/
|
|
75
83
|
systemManaged: boolean;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {SectionSystemMetadata}
|
|
87
|
+
* @memberof SectionResponse
|
|
88
|
+
*/
|
|
89
|
+
systemMetadata?: SectionSystemMetadata;
|
|
76
90
|
/**
|
|
77
91
|
* Tenant ID
|
|
78
92
|
* @type {string}
|
|
@@ -128,6 +142,7 @@ export function SectionResponseFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
128
142
|
'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
|
|
129
143
|
'materializedPath': json['materialized_path'],
|
|
130
144
|
'systemManaged': json['system_managed'],
|
|
145
|
+
'systemMetadata': json['system_metadata'] == null ? undefined : SectionSystemMetadataFromJSON(json['system_metadata']),
|
|
131
146
|
'tenantId': json['tenant_id'],
|
|
132
147
|
'createdAt': (new Date(json['created_at'])),
|
|
133
148
|
'updatedAt': (new Date(json['updated_at'])),
|
|
@@ -154,6 +169,7 @@ export function SectionResponseToJSONTyped(value?: SectionResponse | null, ignor
|
|
|
154
169
|
'next_sibling_path_id': value['nextSiblingPathId'],
|
|
155
170
|
'materialized_path': value['materializedPath'],
|
|
156
171
|
'system_managed': value['systemManaged'],
|
|
172
|
+
'system_metadata': SectionSystemMetadataToJSON(value['systemMetadata']),
|
|
157
173
|
'tenant_id': value['tenantId'],
|
|
158
174
|
'created_at': value['createdAt'].toISOString(),
|
|
159
175
|
'updated_at': value['updatedAt'].toISOString(),
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { InformationStatistics } from './InformationStatistics';
|
|
17
|
+
import {
|
|
18
|
+
InformationStatisticsFromJSON,
|
|
19
|
+
InformationStatisticsFromJSONTyped,
|
|
20
|
+
InformationStatisticsToJSON,
|
|
21
|
+
InformationStatisticsToJSONTyped,
|
|
22
|
+
} from './InformationStatistics';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Schema for section.system_metadata JSONB field.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface SectionSystemMetadata
|
|
28
|
+
*/
|
|
29
|
+
export interface SectionSystemMetadata {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {InformationStatistics}
|
|
33
|
+
* @memberof SectionSystemMetadata
|
|
34
|
+
*/
|
|
35
|
+
informationStatistics?: InformationStatistics;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the SectionSystemMetadata interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfSectionSystemMetadata(value: object): value is SectionSystemMetadata {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function SectionSystemMetadataFromJSON(json: any): SectionSystemMetadata {
|
|
46
|
+
return SectionSystemMetadataFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function SectionSystemMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SectionSystemMetadata {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'informationStatistics': json['information_statistics'] == null ? undefined : InformationStatisticsFromJSON(json['information_statistics']),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function SectionSystemMetadataToJSON(json: any): SectionSystemMetadata {
|
|
60
|
+
return SectionSystemMetadataToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function SectionSystemMetadataToJSONTyped(value?: SectionSystemMetadata | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'information_statistics': InformationStatisticsToJSON(value['informationStatistics']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const SectionSystemMetadataPropertyValidationAttributesMap: {
|
|
75
|
+
[property: string]: {
|
|
76
|
+
maxLength?: number,
|
|
77
|
+
minLength?: number,
|
|
78
|
+
pattern?: string,
|
|
79
|
+
maximum?: number,
|
|
80
|
+
exclusiveMaximum?: boolean,
|
|
81
|
+
minimum?: number,
|
|
82
|
+
exclusiveMinimum?: boolean,
|
|
83
|
+
multipleOf?: number,
|
|
84
|
+
maxItems?: number,
|
|
85
|
+
minItems?: number,
|
|
86
|
+
uniqueItems?: boolean
|
|
87
|
+
}
|
|
88
|
+
} = {
|
|
89
|
+
}
|
|
90
|
+
|