@knowledge-stack/ksapi 1.60.0 → 1.61.1
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 +6 -0
- package/README.md +7 -2
- package/dist/apis/ChunksApi.d.ts +54 -1
- package/dist/apis/ChunksApi.js +53 -0
- package/dist/apis/DocumentsApi.d.ts +7 -1
- package/dist/apis/DocumentsApi.js +6 -0
- package/dist/apis/SectionsApi.d.ts +45 -1
- package/dist/apis/SectionsApi.js +44 -0
- package/dist/esm/apis/ChunksApi.d.ts +54 -1
- package/dist/esm/apis/ChunksApi.js +54 -1
- package/dist/esm/apis/DocumentsApi.d.ts +7 -1
- package/dist/esm/apis/DocumentsApi.js +6 -0
- package/dist/esm/apis/SectionsApi.d.ts +45 -1
- package/dist/esm/apis/SectionsApi.js +45 -1
- package/dist/esm/models/ChunkNeighborsResponse.d.ts +57 -0
- package/dist/esm/models/ChunkNeighborsResponse.js +49 -0
- package/dist/esm/models/ConversionEngine.d.ts +25 -0
- package/dist/esm/models/ConversionEngine.js +43 -0
- package/dist/esm/models/DissolveSectionResponse.d.ts +53 -0
- package/dist/esm/models/DissolveSectionResponse.js +48 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +4 -6
- package/dist/esm/models/DocumentVersionMetadata.js +0 -2
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +13 -1
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -2
- package/dist/esm/models/PipelineState.d.ts +7 -0
- package/dist/esm/models/PipelineState.js +3 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/ChunkNeighborsResponse.d.ts +57 -0
- package/dist/models/ChunkNeighborsResponse.js +57 -0
- package/dist/models/ConversionEngine.d.ts +25 -0
- package/dist/models/ConversionEngine.js +51 -0
- package/dist/models/DissolveSectionResponse.d.ts +53 -0
- package/dist/models/DissolveSectionResponse.js +56 -0
- package/dist/models/DocumentVersionMetadata.d.ts +4 -6
- package/dist/models/DocumentVersionMetadata.js +0 -2
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +13 -1
- package/dist/models/DocumentVersionMetadataUpdate.js +6 -2
- package/dist/models/PipelineState.d.ts +7 -0
- package/dist/models/PipelineState.js +3 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/ChunkNeighborsResponse.md +37 -0
- package/docs/ChunksApi.md +84 -0
- package/docs/ConversionEngine.md +33 -0
- package/docs/DissolveSectionResponse.md +37 -0
- package/docs/DocumentVersionMetadata.md +1 -3
- package/docs/DocumentVersionMetadataUpdate.md +6 -2
- package/docs/DocumentsApi.md +8 -2
- package/docs/PipelineState.md +2 -0
- package/docs/SectionsApi.md +75 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +109 -0
- package/src/apis/DocumentsApi.ts +17 -0
- package/src/apis/SectionsApi.ts +88 -0
- package/src/models/ChunkNeighborsResponse.ts +103 -0
- package/src/models/ConversionEngine.ts +53 -0
- package/src/models/DissolveSectionResponse.ts +92 -0
- package/src/models/DocumentVersionMetadata.ts +4 -8
- package/src/models/DocumentVersionMetadataUpdate.ts +19 -3
- package/src/models/PipelineState.ts +15 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,57 @@
|
|
|
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 { SectionContentItemOrChunkContentItem } from './SectionContentItemOrChunkContentItem';
|
|
13
|
+
/**
|
|
14
|
+
* Response for chunk neighbor traversal.
|
|
15
|
+
*
|
|
16
|
+
* Returns items in the same ``SectionOrChunkItem`` discriminated union
|
|
17
|
+
* format used by the document version contents endpoint.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ChunkNeighborsResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ChunkNeighborsResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Ordered siblings: preceding → anchor → succeeding
|
|
24
|
+
* @type {Array<SectionContentItemOrChunkContentItem>}
|
|
25
|
+
* @memberof ChunkNeighborsResponse
|
|
26
|
+
*/
|
|
27
|
+
items: Array<SectionContentItemOrChunkContentItem>;
|
|
28
|
+
/**
|
|
29
|
+
* Index of the anchor chunk in items
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ChunkNeighborsResponse
|
|
32
|
+
*/
|
|
33
|
+
anchorIndex: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check if a given object implements the ChunkNeighborsResponse interface.
|
|
37
|
+
*/
|
|
38
|
+
export declare function instanceOfChunkNeighborsResponse(value: object): value is ChunkNeighborsResponse;
|
|
39
|
+
export declare function ChunkNeighborsResponseFromJSON(json: any): ChunkNeighborsResponse;
|
|
40
|
+
export declare function ChunkNeighborsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkNeighborsResponse;
|
|
41
|
+
export declare function ChunkNeighborsResponseToJSON(json: any): ChunkNeighborsResponse;
|
|
42
|
+
export declare function ChunkNeighborsResponseToJSONTyped(value?: ChunkNeighborsResponse | null, ignoreDiscriminator?: boolean): any;
|
|
43
|
+
export declare const ChunkNeighborsResponsePropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
exclusiveMaximum?: boolean;
|
|
50
|
+
minimum?: number;
|
|
51
|
+
exclusiveMinimum?: boolean;
|
|
52
|
+
multipleOf?: number;
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
uniqueItems?: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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.ChunkNeighborsResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfChunkNeighborsResponse = instanceOfChunkNeighborsResponse;
|
|
18
|
+
exports.ChunkNeighborsResponseFromJSON = ChunkNeighborsResponseFromJSON;
|
|
19
|
+
exports.ChunkNeighborsResponseFromJSONTyped = ChunkNeighborsResponseFromJSONTyped;
|
|
20
|
+
exports.ChunkNeighborsResponseToJSON = ChunkNeighborsResponseToJSON;
|
|
21
|
+
exports.ChunkNeighborsResponseToJSONTyped = ChunkNeighborsResponseToJSONTyped;
|
|
22
|
+
const SectionContentItemOrChunkContentItem_1 = require("./SectionContentItemOrChunkContentItem");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the ChunkNeighborsResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfChunkNeighborsResponse(value) {
|
|
27
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('anchorIndex' in value) || value['anchorIndex'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function ChunkNeighborsResponseFromJSON(json) {
|
|
34
|
+
return ChunkNeighborsResponseFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function ChunkNeighborsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'items': (json['items'].map(SectionContentItemOrChunkContentItem_1.SectionContentItemOrChunkContentItemFromJSON)),
|
|
42
|
+
'anchorIndex': json['anchor_index'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function ChunkNeighborsResponseToJSON(json) {
|
|
46
|
+
return ChunkNeighborsResponseToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function ChunkNeighborsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'items': (value['items'].map(SectionContentItemOrChunkContentItem_1.SectionContentItemOrChunkContentItemToJSON)),
|
|
54
|
+
'anchor_index': value['anchorIndex'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
exports.ChunkNeighborsResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Document conversion engine selection.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const ConversionEngine: {
|
|
17
|
+
readonly Standard: "standard";
|
|
18
|
+
readonly HighAccuracy: "high_accuracy";
|
|
19
|
+
};
|
|
20
|
+
export type ConversionEngine = typeof ConversionEngine[keyof typeof ConversionEngine];
|
|
21
|
+
export declare function instanceOfConversionEngine(value: any): boolean;
|
|
22
|
+
export declare function ConversionEngineFromJSON(json: any): ConversionEngine;
|
|
23
|
+
export declare function ConversionEngineFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversionEngine;
|
|
24
|
+
export declare function ConversionEngineToJSON(value?: ConversionEngine | null): any;
|
|
25
|
+
export declare function ConversionEngineToJSONTyped(value: any, ignoreDiscriminator: boolean): ConversionEngine;
|
|
@@ -0,0 +1,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.ConversionEngine = void 0;
|
|
17
|
+
exports.instanceOfConversionEngine = instanceOfConversionEngine;
|
|
18
|
+
exports.ConversionEngineFromJSON = ConversionEngineFromJSON;
|
|
19
|
+
exports.ConversionEngineFromJSONTyped = ConversionEngineFromJSONTyped;
|
|
20
|
+
exports.ConversionEngineToJSON = ConversionEngineToJSON;
|
|
21
|
+
exports.ConversionEngineToJSONTyped = ConversionEngineToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Document conversion engine selection.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ConversionEngine = {
|
|
27
|
+
Standard: 'standard',
|
|
28
|
+
HighAccuracy: 'high_accuracy'
|
|
29
|
+
};
|
|
30
|
+
function instanceOfConversionEngine(value) {
|
|
31
|
+
for (const key in exports.ConversionEngine) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(exports.ConversionEngine, key)) {
|
|
33
|
+
if (exports.ConversionEngine[key] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function ConversionEngineFromJSON(json) {
|
|
41
|
+
return ConversionEngineFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ConversionEngineFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
function ConversionEngineToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function ConversionEngineToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Response from dissolving a section into a text chunk.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DissolveSectionResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface DissolveSectionResponse {
|
|
18
|
+
/**
|
|
19
|
+
* ID of the created text chunk
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof DissolveSectionResponse
|
|
22
|
+
*/
|
|
23
|
+
textChunkId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Number of children reparented to the parent
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof DissolveSectionResponse
|
|
28
|
+
*/
|
|
29
|
+
reparentedChildren: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the DissolveSectionResponse interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfDissolveSectionResponse(value: object): value is DissolveSectionResponse;
|
|
35
|
+
export declare function DissolveSectionResponseFromJSON(json: any): DissolveSectionResponse;
|
|
36
|
+
export declare function DissolveSectionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DissolveSectionResponse;
|
|
37
|
+
export declare function DissolveSectionResponseToJSON(json: any): DissolveSectionResponse;
|
|
38
|
+
export declare function DissolveSectionResponseToJSONTyped(value?: DissolveSectionResponse | null, ignoreDiscriminator?: boolean): any;
|
|
39
|
+
export declare const DissolveSectionResponsePropertyValidationAttributesMap: {
|
|
40
|
+
[property: string]: {
|
|
41
|
+
maxLength?: number;
|
|
42
|
+
minLength?: number;
|
|
43
|
+
pattern?: string;
|
|
44
|
+
maximum?: number;
|
|
45
|
+
exclusiveMaximum?: boolean;
|
|
46
|
+
minimum?: number;
|
|
47
|
+
exclusiveMinimum?: boolean;
|
|
48
|
+
multipleOf?: number;
|
|
49
|
+
maxItems?: number;
|
|
50
|
+
minItems?: number;
|
|
51
|
+
uniqueItems?: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,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.DissolveSectionResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfDissolveSectionResponse = instanceOfDissolveSectionResponse;
|
|
18
|
+
exports.DissolveSectionResponseFromJSON = DissolveSectionResponseFromJSON;
|
|
19
|
+
exports.DissolveSectionResponseFromJSONTyped = DissolveSectionResponseFromJSONTyped;
|
|
20
|
+
exports.DissolveSectionResponseToJSON = DissolveSectionResponseToJSON;
|
|
21
|
+
exports.DissolveSectionResponseToJSONTyped = DissolveSectionResponseToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the DissolveSectionResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfDissolveSectionResponse(value) {
|
|
26
|
+
if (!('textChunkId' in value) || value['textChunkId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('reparentedChildren' in value) || value['reparentedChildren'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function DissolveSectionResponseFromJSON(json) {
|
|
33
|
+
return DissolveSectionResponseFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function DissolveSectionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'textChunkId': json['text_chunk_id'],
|
|
41
|
+
'reparentedChildren': json['reparented_children'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function DissolveSectionResponseToJSON(json) {
|
|
45
|
+
return DissolveSectionResponseToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function DissolveSectionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'text_chunk_id': value['textChunkId'],
|
|
53
|
+
'reparented_children': value['reparentedChildren'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.DissolveSectionResponsePropertyValidationAttributesMap = {};
|
|
@@ -18,6 +18,10 @@ import type { InformationStatistics } from './InformationStatistics';
|
|
|
18
18
|
* and document statistics. Convention-based paths (images, page screenshots)
|
|
19
19
|
* are derived from document_id/document_version_id via s3_paths helpers,
|
|
20
20
|
* using a flat S3 layout: documents/{document_id}/{document_version_id}/...
|
|
21
|
+
*
|
|
22
|
+
* Internal conversion artifact paths (standard_pipeline_json_s3, high_accuracy_*_s3) are
|
|
23
|
+
* excluded from API responses via ``Field(exclude=True)`` so we don't
|
|
24
|
+
* expose underlying technology names to external consumers.
|
|
21
25
|
* @export
|
|
22
26
|
* @interface DocumentVersionMetadata
|
|
23
27
|
*/
|
|
@@ -34,12 +38,6 @@ export interface DocumentVersionMetadata {
|
|
|
34
38
|
* @memberof DocumentVersionMetadata
|
|
35
39
|
*/
|
|
36
40
|
cleanedSourceS3?: string | null;
|
|
37
|
-
/**
|
|
38
|
-
* S3 URL to the Docling JSON conversion output
|
|
39
|
-
* @type {string}
|
|
40
|
-
* @memberof DocumentVersionMetadata
|
|
41
|
-
*/
|
|
42
|
-
doclingJsonS3?: string | null;
|
|
43
41
|
/**
|
|
44
42
|
* S3 URL to the fast plaintext export of the document
|
|
45
43
|
* @type {string}
|
|
@@ -37,7 +37,6 @@ function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
return {
|
|
38
38
|
'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
|
|
39
39
|
'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
|
|
40
|
-
'doclingJsonS3': json['docling_json_s3'] == null ? undefined : json['docling_json_s3'],
|
|
41
40
|
'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
|
|
42
41
|
'hash': json['hash'] == null ? undefined : json['hash'],
|
|
43
42
|
'pipelineState': json['pipeline_state'] == null ? undefined : (0, PipelineState_1.PipelineStateFromJSON)(json['pipeline_state']),
|
|
@@ -61,7 +60,6 @@ function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
61
60
|
return {
|
|
62
61
|
'source_s3': value['sourceS3'],
|
|
63
62
|
'cleaned_source_s3': value['cleanedSourceS3'],
|
|
64
|
-
'docling_json_s3': value['doclingJsonS3'],
|
|
65
63
|
'fast_plaintext_s3': value['fastPlaintextS3'],
|
|
66
64
|
'hash': value['hash'],
|
|
67
65
|
'pipeline_state': (0, PipelineState_1.PipelineStateToJSON)(value['pipelineState']),
|
|
@@ -37,13 +37,25 @@ export interface DocumentVersionMetadataUpdate {
|
|
|
37
37
|
* @type {string}
|
|
38
38
|
* @memberof DocumentVersionMetadataUpdate
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
standardPipelineJsonS3?: string | null;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @memberof DocumentVersionMetadataUpdate
|
|
45
45
|
*/
|
|
46
46
|
fastPlaintextS3?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
51
|
+
*/
|
|
52
|
+
highAccuracyContentListS3?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
57
|
+
*/
|
|
58
|
+
highAccuracyMiddleS3?: string | null;
|
|
47
59
|
/**
|
|
48
60
|
*
|
|
49
61
|
* @type {string}
|
|
@@ -37,8 +37,10 @@ function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
return {
|
|
38
38
|
'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
|
|
39
39
|
'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
|
|
40
|
-
'
|
|
40
|
+
'standardPipelineJsonS3': json['standard_pipeline_json_s3'] == null ? undefined : json['standard_pipeline_json_s3'],
|
|
41
41
|
'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
|
|
42
|
+
'highAccuracyContentListS3': json['high_accuracy_content_list_s3'] == null ? undefined : json['high_accuracy_content_list_s3'],
|
|
43
|
+
'highAccuracyMiddleS3': json['high_accuracy_middle_s3'] == null ? undefined : json['high_accuracy_middle_s3'],
|
|
42
44
|
'hash': json['hash'] == null ? undefined : json['hash'],
|
|
43
45
|
'pipelineState': json['pipeline_state'] == null ? undefined : (0, PipelineState_1.PipelineStateFromJSON)(json['pipeline_state']),
|
|
44
46
|
'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
|
|
@@ -61,8 +63,10 @@ function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscriminator = f
|
|
|
61
63
|
return {
|
|
62
64
|
'source_s3': value['sourceS3'],
|
|
63
65
|
'cleaned_source_s3': value['cleanedSourceS3'],
|
|
64
|
-
'
|
|
66
|
+
'standard_pipeline_json_s3': value['standardPipelineJsonS3'],
|
|
65
67
|
'fast_plaintext_s3': value['fastPlaintextS3'],
|
|
68
|
+
'high_accuracy_content_list_s3': value['highAccuracyContentListS3'],
|
|
69
|
+
'high_accuracy_middle_s3': value['highAccuracyMiddleS3'],
|
|
66
70
|
'hash': value['hash'],
|
|
67
71
|
'pipeline_state': (0, PipelineState_1.PipelineStateToJSON)(value['pipelineState']),
|
|
68
72
|
'total_pages': value['totalPages'],
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { PipelineStatus } from './PipelineStatus';
|
|
13
|
+
import type { ConversionEngine } from './ConversionEngine';
|
|
13
14
|
import type { IngestionMode } from './IngestionMode';
|
|
14
15
|
import type { ChunkType } from './ChunkType';
|
|
15
16
|
/**
|
|
@@ -78,6 +79,12 @@ export interface PipelineState {
|
|
|
78
79
|
* @memberof PipelineState
|
|
79
80
|
*/
|
|
80
81
|
chunkType?: ChunkType;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {ConversionEngine}
|
|
85
|
+
* @memberof PipelineState
|
|
86
|
+
*/
|
|
87
|
+
conversionEngine?: ConversionEngine;
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
83
90
|
* Check if a given object implements the PipelineState interface.
|
|
@@ -20,6 +20,7 @@ exports.PipelineStateFromJSONTyped = PipelineStateFromJSONTyped;
|
|
|
20
20
|
exports.PipelineStateToJSON = PipelineStateToJSON;
|
|
21
21
|
exports.PipelineStateToJSONTyped = PipelineStateToJSONTyped;
|
|
22
22
|
const PipelineStatus_1 = require("./PipelineStatus");
|
|
23
|
+
const ConversionEngine_1 = require("./ConversionEngine");
|
|
23
24
|
const IngestionMode_1 = require("./IngestionMode");
|
|
24
25
|
const ChunkType_1 = require("./ChunkType");
|
|
25
26
|
/**
|
|
@@ -48,6 +49,7 @@ function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
49
|
'pageDpi': json['page_dpi'] == null ? undefined : json['page_dpi'],
|
|
49
50
|
'ingestionMode': json['ingestion_mode'] == null ? undefined : (0, IngestionMode_1.IngestionModeFromJSON)(json['ingestion_mode']),
|
|
50
51
|
'chunkType': json['chunk_type'] == null ? undefined : (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
|
|
52
|
+
'conversionEngine': json['conversion_engine'] == null ? undefined : (0, ConversionEngine_1.ConversionEngineFromJSON)(json['conversion_engine']),
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
55
|
function PipelineStateToJSON(json) {
|
|
@@ -68,6 +70,7 @@ function PipelineStateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
68
70
|
'page_dpi': value['pageDpi'],
|
|
69
71
|
'ingestion_mode': (0, IngestionMode_1.IngestionModeToJSON)(value['ingestionMode']),
|
|
70
72
|
'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
|
|
73
|
+
'conversion_engine': (0, ConversionEngine_1.ConversionEngineToJSON)(value['conversionEngine']),
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
76
|
exports.PipelineStatePropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -11,11 +11,13 @@ export * from './ChunkDocumentVersionResponse';
|
|
|
11
11
|
export * from './ChunkLineageResponse';
|
|
12
12
|
export * from './ChunkMetadataInput';
|
|
13
13
|
export * from './ChunkMetadataOutput';
|
|
14
|
+
export * from './ChunkNeighborsResponse';
|
|
14
15
|
export * from './ChunkResponse';
|
|
15
16
|
export * from './ChunkSearchRequest';
|
|
16
17
|
export * from './ChunkType';
|
|
17
18
|
export * from './Citation';
|
|
18
19
|
export * from './ClearVersionContentsResponse';
|
|
20
|
+
export * from './ConversionEngine';
|
|
19
21
|
export * from './CreateApiKeyRequest';
|
|
20
22
|
export * from './CreateApiKeyResponse';
|
|
21
23
|
export * from './CreateChunkLineageRequest';
|
|
@@ -29,6 +31,7 @@ export * from './CreateTagRequest';
|
|
|
29
31
|
export * from './CreateTenantRequest';
|
|
30
32
|
export * from './CreateThreadMessageRequest';
|
|
31
33
|
export * from './CreateThreadRequest';
|
|
34
|
+
export * from './DissolveSectionResponse';
|
|
32
35
|
export * from './DocumentOrigin';
|
|
33
36
|
export * from './DocumentResponse';
|
|
34
37
|
export * from './DocumentType';
|
package/dist/models/index.js
CHANGED
|
@@ -29,11 +29,13 @@ __exportStar(require("./ChunkDocumentVersionResponse"), exports);
|
|
|
29
29
|
__exportStar(require("./ChunkLineageResponse"), exports);
|
|
30
30
|
__exportStar(require("./ChunkMetadataInput"), exports);
|
|
31
31
|
__exportStar(require("./ChunkMetadataOutput"), exports);
|
|
32
|
+
__exportStar(require("./ChunkNeighborsResponse"), exports);
|
|
32
33
|
__exportStar(require("./ChunkResponse"), exports);
|
|
33
34
|
__exportStar(require("./ChunkSearchRequest"), exports);
|
|
34
35
|
__exportStar(require("./ChunkType"), exports);
|
|
35
36
|
__exportStar(require("./Citation"), exports);
|
|
36
37
|
__exportStar(require("./ClearVersionContentsResponse"), exports);
|
|
38
|
+
__exportStar(require("./ConversionEngine"), exports);
|
|
37
39
|
__exportStar(require("./CreateApiKeyRequest"), exports);
|
|
38
40
|
__exportStar(require("./CreateApiKeyResponse"), exports);
|
|
39
41
|
__exportStar(require("./CreateChunkLineageRequest"), exports);
|
|
@@ -47,6 +49,7 @@ __exportStar(require("./CreateTagRequest"), exports);
|
|
|
47
49
|
__exportStar(require("./CreateTenantRequest"), exports);
|
|
48
50
|
__exportStar(require("./CreateThreadMessageRequest"), exports);
|
|
49
51
|
__exportStar(require("./CreateThreadRequest"), exports);
|
|
52
|
+
__exportStar(require("./DissolveSectionResponse"), exports);
|
|
50
53
|
__exportStar(require("./DocumentOrigin"), exports);
|
|
51
54
|
__exportStar(require("./DocumentResponse"), exports);
|
|
52
55
|
__exportStar(require("./DocumentType"), exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkNeighborsResponse
|
|
3
|
+
|
|
4
|
+
Response for chunk neighbor traversal. Returns items in the same ``SectionOrChunkItem`` discriminated union format used by the document version contents endpoint.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`items` | [Array<SectionContentItemOrChunkContentItem>](SectionContentItemOrChunkContentItem.md)
|
|
11
|
+
`anchorIndex` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ChunkNeighborsResponse } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"items": null,
|
|
21
|
+
"anchorIndex": null,
|
|
22
|
+
} satisfies ChunkNeighborsResponse
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChunkNeighborsResponse
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/docs/ChunksApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
7
7
|
| [**createChunk**](ChunksApi.md#createchunkoperation) | **POST** /v1/chunks | Create Chunk Handler |
|
|
8
8
|
| [**deleteChunk**](ChunksApi.md#deletechunk) | **DELETE** /v1/chunks/{chunk_id} | Delete Chunk Handler |
|
|
9
9
|
| [**getChunk**](ChunksApi.md#getchunk) | **GET** /v1/chunks/{chunk_id} | Get Chunk Handler |
|
|
10
|
+
| [**getChunkNeighbors**](ChunksApi.md#getchunkneighbors) | **GET** /v1/chunks/{chunk_id}/neighbors | Get Chunk Neighbors Handler |
|
|
10
11
|
| [**getChunksBulk**](ChunksApi.md#getchunksbulk) | **GET** /v1/chunks/bulk | Get Chunks Bulk Handler |
|
|
11
12
|
| [**getVersionChunkIds**](ChunksApi.md#getversionchunkids) | **GET** /v1/chunks/version-chunk-ids | Get Version Chunk Ids Handler |
|
|
12
13
|
| [**searchChunks**](ChunksApi.md#searchchunks) | **POST** /v1/chunks/search | Search Chunks Handler |
|
|
@@ -240,6 +241,89 @@ No authorization required
|
|
|
240
241
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
241
242
|
|
|
242
243
|
|
|
244
|
+
## getChunkNeighbors
|
|
245
|
+
|
|
246
|
+
> ChunkNeighborsResponse getChunkNeighbors(chunkId, prev, next, chunksOnly, authorization, ksUat)
|
|
247
|
+
|
|
248
|
+
Get Chunk Neighbors Handler
|
|
249
|
+
|
|
250
|
+
Get neighboring siblings by traversing the sibling linked list. Walks the sibling chain backward (prev) and forward (next) from the anchor chunk. Returns sections and chunks in sibling order within the same parent. When ``chunks_only=true``, the traversal stops at the first non-CHUNK sibling in each direction, returning only chunk neighbors.
|
|
251
|
+
|
|
252
|
+
### Example
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
import {
|
|
256
|
+
Configuration,
|
|
257
|
+
ChunksApi,
|
|
258
|
+
} from '@knowledge-stack/ksapi';
|
|
259
|
+
import type { GetChunkNeighborsRequest } from '@knowledge-stack/ksapi';
|
|
260
|
+
|
|
261
|
+
async function example() {
|
|
262
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
263
|
+
const api = new ChunksApi();
|
|
264
|
+
|
|
265
|
+
const body = {
|
|
266
|
+
// string
|
|
267
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
268
|
+
// number | Number of preceding siblings to include (optional)
|
|
269
|
+
prev: 56,
|
|
270
|
+
// number | Number of succeeding siblings to include (optional)
|
|
271
|
+
next: 56,
|
|
272
|
+
// boolean | When true, stop traversal at non-CHUNK siblings (default: false) (optional)
|
|
273
|
+
chunksOnly: true,
|
|
274
|
+
// string (optional)
|
|
275
|
+
authorization: authorization_example,
|
|
276
|
+
// string (optional)
|
|
277
|
+
ksUat: ksUat_example,
|
|
278
|
+
} satisfies GetChunkNeighborsRequest;
|
|
279
|
+
|
|
280
|
+
try {
|
|
281
|
+
const data = await api.getChunkNeighbors(body);
|
|
282
|
+
console.log(data);
|
|
283
|
+
} catch (error) {
|
|
284
|
+
console.error(error);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Run the test
|
|
289
|
+
example().catch(console.error);
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Parameters
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
| Name | Type | Description | Notes |
|
|
296
|
+
|------------- | ------------- | ------------- | -------------|
|
|
297
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
298
|
+
| **prev** | `number` | Number of preceding siblings to include | [Optional] [Defaults to `1`] |
|
|
299
|
+
| **next** | `number` | Number of succeeding siblings to include | [Optional] [Defaults to `1`] |
|
|
300
|
+
| **chunksOnly** | `boolean` | When true, stop traversal at non-CHUNK siblings (default: false) | [Optional] [Defaults to `false`] |
|
|
301
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
302
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
303
|
+
|
|
304
|
+
### Return type
|
|
305
|
+
|
|
306
|
+
[**ChunkNeighborsResponse**](ChunkNeighborsResponse.md)
|
|
307
|
+
|
|
308
|
+
### Authorization
|
|
309
|
+
|
|
310
|
+
No authorization required
|
|
311
|
+
|
|
312
|
+
### HTTP request headers
|
|
313
|
+
|
|
314
|
+
- **Content-Type**: Not defined
|
|
315
|
+
- **Accept**: `application/json`
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
### HTTP response details
|
|
319
|
+
| Status code | Description | Response headers |
|
|
320
|
+
|-------------|-------------|------------------|
|
|
321
|
+
| **200** | Successful Response | - |
|
|
322
|
+
| **422** | Validation Error | - |
|
|
323
|
+
|
|
324
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
325
|
+
|
|
326
|
+
|
|
243
327
|
## getChunksBulk
|
|
244
328
|
|
|
245
329
|
> Array<ChunkBulkResponse> getChunksBulk(chunkIds, authorization, ksUat)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# ConversionEngine
|
|
3
|
+
|
|
4
|
+
Document conversion engine selection.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ConversionEngine } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies ConversionEngine
|
|
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 ConversionEngine
|
|
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
|
+
|