@knowledge-stack/ksapi 1.52.2 → 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/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/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/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/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/ScoredChunkResponse.md +2 -0
- package/docs/SectionResponse.md +2 -0
- package/docs/SectionSystemMetadata.md +35 -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/ScoredChunkResponse.ts +8 -0
- package/src/models/SectionResponse.ts +16 -0
- package/src/models/SectionSystemMetadata.ts +90 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.DocumentVersionActionResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfDocumentVersionActionResponse = instanceOfDocumentVersionActionResponse;
|
|
18
|
+
exports.DocumentVersionActionResponseFromJSON = DocumentVersionActionResponseFromJSON;
|
|
19
|
+
exports.DocumentVersionActionResponseFromJSONTyped = DocumentVersionActionResponseFromJSONTyped;
|
|
20
|
+
exports.DocumentVersionActionResponseToJSON = DocumentVersionActionResponseToJSON;
|
|
21
|
+
exports.DocumentVersionActionResponseToJSONTyped = DocumentVersionActionResponseToJSONTyped;
|
|
22
|
+
const DocumentVersionAction_1 = require("./DocumentVersionAction");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the DocumentVersionActionResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfDocumentVersionActionResponse(value) {
|
|
27
|
+
if (!('versionId' in value) || value['versionId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function DocumentVersionActionResponseFromJSON(json) {
|
|
36
|
+
return DocumentVersionActionResponseFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function DocumentVersionActionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'versionId': json['version_id'],
|
|
44
|
+
'action': (0, DocumentVersionAction_1.DocumentVersionActionFromJSON)(json['action']),
|
|
45
|
+
'workflowId': json['workflow_id'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function DocumentVersionActionResponseToJSON(json) {
|
|
49
|
+
return DocumentVersionActionResponseToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function DocumentVersionActionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'version_id': value['versionId'],
|
|
57
|
+
'action': (0, DocumentVersionAction_1.DocumentVersionActionToJSON)(value['action']),
|
|
58
|
+
'workflow_id': value['workflowId'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.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.
|
|
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.
|
|
@@ -20,6 +20,7 @@ exports.DocumentVersionMetadataFromJSONTyped = DocumentVersionMetadataFromJSONTy
|
|
|
20
20
|
exports.DocumentVersionMetadataToJSON = DocumentVersionMetadataToJSON;
|
|
21
21
|
exports.DocumentVersionMetadataToJSONTyped = DocumentVersionMetadataToJSONTyped;
|
|
22
22
|
const PipelineState_1 = require("./PipelineState");
|
|
23
|
+
const InformationStatistics_1 = require("./InformationStatistics");
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the DocumentVersionMetadata interface.
|
|
25
26
|
*/
|
|
@@ -46,6 +47,7 @@ function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
47
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
47
48
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
48
49
|
'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
|
|
50
|
+
'informationStatistics': json['information_statistics'] == null ? undefined : (0, InformationStatistics_1.InformationStatisticsFromJSON)(json['information_statistics']),
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
53
|
function DocumentVersionMetadataToJSON(json) {
|
|
@@ -68,6 +70,7 @@ function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
68
70
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
69
71
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
70
72
|
'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
|
|
73
|
+
'information_statistics': (0, InformationStatistics_1.InformationStatisticsToJSON)(value['informationStatistics']),
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
76
|
exports.DocumentVersionMetadataPropertyValidationAttributesMap = {};
|
|
@@ -10,6 +10,7 @@
|
|
|
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
15
|
* Partial update schema for document version metadata.
|
|
15
16
|
*
|
|
@@ -95,6 +96,12 @@ export interface DocumentVersionMetadataUpdate {
|
|
|
95
96
|
xlsxKpiCatalog?: Array<{
|
|
96
97
|
[key: string]: any;
|
|
97
98
|
}> | null;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {InformationStatistics}
|
|
102
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
103
|
+
*/
|
|
104
|
+
informationStatistics?: InformationStatistics;
|
|
98
105
|
}
|
|
99
106
|
/**
|
|
100
107
|
* Check if a given object implements the DocumentVersionMetadataUpdate interface.
|
|
@@ -20,6 +20,7 @@ exports.DocumentVersionMetadataUpdateFromJSONTyped = DocumentVersionMetadataUpda
|
|
|
20
20
|
exports.DocumentVersionMetadataUpdateToJSON = DocumentVersionMetadataUpdateToJSON;
|
|
21
21
|
exports.DocumentVersionMetadataUpdateToJSONTyped = DocumentVersionMetadataUpdateToJSONTyped;
|
|
22
22
|
const PipelineState_1 = require("./PipelineState");
|
|
23
|
+
const InformationStatistics_1 = require("./InformationStatistics");
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the DocumentVersionMetadataUpdate interface.
|
|
25
26
|
*/
|
|
@@ -46,6 +47,7 @@ function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
47
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
47
48
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
48
49
|
'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
|
|
50
|
+
'informationStatistics': json['information_statistics'] == null ? undefined : (0, InformationStatistics_1.InformationStatisticsFromJSON)(json['information_statistics']),
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
53
|
function DocumentVersionMetadataUpdateToJSON(json) {
|
|
@@ -68,6 +70,7 @@ function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscriminator = f
|
|
|
68
70
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
69
71
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
70
72
|
'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
|
|
73
|
+
'information_statistics': (0, InformationStatistics_1.InformationStatisticsToJSON)(value['informationStatistics']),
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
76
|
exports.DocumentVersionMetadataUpdatePropertyValidationAttributesMap = {};
|
|
@@ -90,7 +90,7 @@ export interface DocumentVersionResponse {
|
|
|
90
90
|
* @type {DocumentVersionMetadata}
|
|
91
91
|
* @memberof DocumentVersionResponse
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
systemMetadata?: DocumentVersionMetadata;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Check if a given object implements the DocumentVersionResponse interface.
|
|
@@ -65,7 +65,7 @@ function DocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
65
65
|
'createdAt': (new Date(json['created_at'])),
|
|
66
66
|
'updatedAt': (new Date(json['updated_at'])),
|
|
67
67
|
'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
|
|
68
|
-
'
|
|
68
|
+
'systemMetadata': json['system_metadata'] == null ? undefined : (0, DocumentVersionMetadata_1.DocumentVersionMetadataFromJSON)(json['system_metadata']),
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
function DocumentVersionResponseToJSON(json) {
|
|
@@ -87,7 +87,7 @@ function DocumentVersionResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
87
87
|
'created_at': value['createdAt'].toISOString(),
|
|
88
88
|
'updated_at': value['updatedAt'].toISOString(),
|
|
89
89
|
'asset_s3_url': value['assetS3Url'],
|
|
90
|
-
'
|
|
90
|
+
'system_metadata': (0, DocumentVersionMetadata_1.DocumentVersionMetadataToJSON)(value['systemMetadata']),
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
exports.DocumentVersionResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
* Aggregate statistics for a section subtree or document version.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface InformationStatistics
|
|
16
|
+
*/
|
|
17
|
+
export interface InformationStatistics {
|
|
18
|
+
/**
|
|
19
|
+
* Count of chunks by type (e.g. {"TEXT": 42, "TABLE": 3})
|
|
20
|
+
* @type {{ [key: string]: number; }}
|
|
21
|
+
* @memberof InformationStatistics
|
|
22
|
+
*/
|
|
23
|
+
numChunksByType?: {
|
|
24
|
+
[key: string]: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Sum of all chunk content tokens in subtree
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @memberof InformationStatistics
|
|
30
|
+
*/
|
|
31
|
+
totalTokens?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Count of immediate children (sections + chunks)
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof InformationStatistics
|
|
36
|
+
*/
|
|
37
|
+
numDirectChildren?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Max depth to deepest leaf (0 = no children)
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof InformationStatistics
|
|
42
|
+
*/
|
|
43
|
+
childrenDepth?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the InformationStatistics interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfInformationStatistics(value: object): value is InformationStatistics;
|
|
49
|
+
export declare function InformationStatisticsFromJSON(json: any): InformationStatistics;
|
|
50
|
+
export declare function InformationStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): InformationStatistics;
|
|
51
|
+
export declare function InformationStatisticsToJSON(json: any): InformationStatistics;
|
|
52
|
+
export declare function InformationStatisticsToJSONTyped(value?: InformationStatistics | null, ignoreDiscriminator?: boolean): any;
|
|
53
|
+
export declare const InformationStatisticsPropertyValidationAttributesMap: {
|
|
54
|
+
[property: string]: {
|
|
55
|
+
maxLength?: number;
|
|
56
|
+
minLength?: number;
|
|
57
|
+
pattern?: string;
|
|
58
|
+
maximum?: number;
|
|
59
|
+
exclusiveMaximum?: boolean;
|
|
60
|
+
minimum?: number;
|
|
61
|
+
exclusiveMinimum?: boolean;
|
|
62
|
+
multipleOf?: number;
|
|
63
|
+
maxItems?: number;
|
|
64
|
+
minItems?: number;
|
|
65
|
+
uniqueItems?: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.InformationStatisticsPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfInformationStatistics = instanceOfInformationStatistics;
|
|
18
|
+
exports.InformationStatisticsFromJSON = InformationStatisticsFromJSON;
|
|
19
|
+
exports.InformationStatisticsFromJSONTyped = InformationStatisticsFromJSONTyped;
|
|
20
|
+
exports.InformationStatisticsToJSON = InformationStatisticsToJSON;
|
|
21
|
+
exports.InformationStatisticsToJSONTyped = InformationStatisticsToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the InformationStatistics interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfInformationStatistics(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function InformationStatisticsFromJSON(json) {
|
|
29
|
+
return InformationStatisticsFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function InformationStatisticsFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'numChunksByType': json['num_chunks_by_type'] == null ? undefined : json['num_chunks_by_type'],
|
|
37
|
+
'totalTokens': json['total_tokens'] == null ? undefined : json['total_tokens'],
|
|
38
|
+
'numDirectChildren': json['num_direct_children'] == null ? undefined : json['num_direct_children'],
|
|
39
|
+
'childrenDepth': json['children_depth'] == null ? undefined : json['children_depth'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function InformationStatisticsToJSON(json) {
|
|
43
|
+
return InformationStatisticsToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function InformationStatisticsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'num_chunks_by_type': value['numChunksByType'],
|
|
51
|
+
'total_tokens': value['totalTokens'],
|
|
52
|
+
'num_direct_children': value['numDirectChildren'],
|
|
53
|
+
'children_depth': value['childrenDepth'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.InformationStatisticsPropertyValidationAttributesMap = {};
|
|
@@ -55,6 +55,12 @@ export interface ScoredChunkResponse {
|
|
|
55
55
|
* @memberof ScoredChunkResponse
|
|
56
56
|
*/
|
|
57
57
|
chunkMetadata: ChunkMetadataOutput;
|
|
58
|
+
/**
|
|
59
|
+
* Number of tokens in chunk content
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof ScoredChunkResponse
|
|
62
|
+
*/
|
|
63
|
+
numTokens?: number | null;
|
|
58
64
|
/**
|
|
59
65
|
* Parent PathPart ID
|
|
60
66
|
* @type {string}
|
|
@@ -69,6 +69,7 @@ function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
69
69
|
'content': json['content'],
|
|
70
70
|
'chunkType': (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
|
|
71
71
|
'chunkMetadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputFromJSON)(json['chunk_metadata']),
|
|
72
|
+
'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
|
|
72
73
|
'parentPathId': json['parent_path_id'],
|
|
73
74
|
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
74
75
|
'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
|
|
@@ -97,6 +98,7 @@ function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
97
98
|
'content': value['content'],
|
|
98
99
|
'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
|
|
99
100
|
'chunk_metadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputToJSON)(value['chunkMetadata']),
|
|
101
|
+
'num_tokens': value['numTokens'],
|
|
100
102
|
'parent_path_id': value['parentPathId'],
|
|
101
103
|
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
102
104
|
'next_sibling_path_id': value['nextSiblingPathId'],
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { SectionSystemMetadata } from './SectionSystemMetadata';
|
|
12
13
|
/**
|
|
13
14
|
* Section response model.
|
|
14
15
|
* @export
|
|
@@ -69,6 +70,12 @@ export interface SectionResponse {
|
|
|
69
70
|
* @memberof SectionResponse
|
|
70
71
|
*/
|
|
71
72
|
systemManaged: boolean;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {SectionSystemMetadata}
|
|
76
|
+
* @memberof SectionResponse
|
|
77
|
+
*/
|
|
78
|
+
systemMetadata?: SectionSystemMetadata;
|
|
72
79
|
/**
|
|
73
80
|
* Tenant ID
|
|
74
81
|
* @type {string}
|
|
@@ -19,6 +19,7 @@ exports.SectionResponseFromJSON = SectionResponseFromJSON;
|
|
|
19
19
|
exports.SectionResponseFromJSONTyped = SectionResponseFromJSONTyped;
|
|
20
20
|
exports.SectionResponseToJSON = SectionResponseToJSON;
|
|
21
21
|
exports.SectionResponseToJSONTyped = SectionResponseToJSONTyped;
|
|
22
|
+
const SectionSystemMetadata_1 = require("./SectionSystemMetadata");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the SectionResponse interface.
|
|
24
25
|
*/
|
|
@@ -60,6 +61,7 @@ function SectionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
61
|
'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
|
|
61
62
|
'materializedPath': json['materialized_path'],
|
|
62
63
|
'systemManaged': json['system_managed'],
|
|
64
|
+
'systemMetadata': json['system_metadata'] == null ? undefined : (0, SectionSystemMetadata_1.SectionSystemMetadataFromJSON)(json['system_metadata']),
|
|
63
65
|
'tenantId': json['tenant_id'],
|
|
64
66
|
'createdAt': (new Date(json['created_at'])),
|
|
65
67
|
'updatedAt': (new Date(json['updated_at'])),
|
|
@@ -82,6 +84,7 @@ function SectionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
82
84
|
'next_sibling_path_id': value['nextSiblingPathId'],
|
|
83
85
|
'materialized_path': value['materializedPath'],
|
|
84
86
|
'system_managed': value['systemManaged'],
|
|
87
|
+
'system_metadata': (0, SectionSystemMetadata_1.SectionSystemMetadataToJSON)(value['systemMetadata']),
|
|
85
88
|
'tenant_id': value['tenantId'],
|
|
86
89
|
'created_at': value['createdAt'].toISOString(),
|
|
87
90
|
'updated_at': value['updatedAt'].toISOString(),
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { InformationStatistics } from './InformationStatistics';
|
|
13
|
+
/**
|
|
14
|
+
* Schema for section.system_metadata JSONB field.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SectionSystemMetadata
|
|
17
|
+
*/
|
|
18
|
+
export interface SectionSystemMetadata {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {InformationStatistics}
|
|
22
|
+
* @memberof SectionSystemMetadata
|
|
23
|
+
*/
|
|
24
|
+
informationStatistics?: InformationStatistics;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the SectionSystemMetadata interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfSectionSystemMetadata(value: object): value is SectionSystemMetadata;
|
|
30
|
+
export declare function SectionSystemMetadataFromJSON(json: any): SectionSystemMetadata;
|
|
31
|
+
export declare function SectionSystemMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SectionSystemMetadata;
|
|
32
|
+
export declare function SectionSystemMetadataToJSON(json: any): SectionSystemMetadata;
|
|
33
|
+
export declare function SectionSystemMetadataToJSONTyped(value?: SectionSystemMetadata | null, ignoreDiscriminator?: boolean): any;
|
|
34
|
+
export declare const SectionSystemMetadataPropertyValidationAttributesMap: {
|
|
35
|
+
[property: string]: {
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
pattern?: string;
|
|
39
|
+
maximum?: number;
|
|
40
|
+
exclusiveMaximum?: boolean;
|
|
41
|
+
minimum?: number;
|
|
42
|
+
exclusiveMinimum?: boolean;
|
|
43
|
+
multipleOf?: number;
|
|
44
|
+
maxItems?: number;
|
|
45
|
+
minItems?: number;
|
|
46
|
+
uniqueItems?: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SectionSystemMetadataPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfSectionSystemMetadata = instanceOfSectionSystemMetadata;
|
|
18
|
+
exports.SectionSystemMetadataFromJSON = SectionSystemMetadataFromJSON;
|
|
19
|
+
exports.SectionSystemMetadataFromJSONTyped = SectionSystemMetadataFromJSONTyped;
|
|
20
|
+
exports.SectionSystemMetadataToJSON = SectionSystemMetadataToJSON;
|
|
21
|
+
exports.SectionSystemMetadataToJSONTyped = SectionSystemMetadataToJSONTyped;
|
|
22
|
+
const InformationStatistics_1 = require("./InformationStatistics");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the SectionSystemMetadata interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfSectionSystemMetadata(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function SectionSystemMetadataFromJSON(json) {
|
|
30
|
+
return SectionSystemMetadataFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function SectionSystemMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'informationStatistics': json['information_statistics'] == null ? undefined : (0, InformationStatistics_1.InformationStatisticsFromJSON)(json['information_statistics']),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function SectionSystemMetadataToJSON(json) {
|
|
41
|
+
return SectionSystemMetadataToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function SectionSystemMetadataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'information_statistics': (0, InformationStatistics_1.InformationStatisticsToJSON)(value['informationStatistics']),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.SectionSystemMetadataPropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/models/index.js
CHANGED
|
@@ -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,
|
package/docs/ChunkResponse.md
CHANGED
|
@@ -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
|
+
|