@knowledge-stack/ksapi 1.61.0 → 1.61.2
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 +2 -2
- package/README.md +4 -3
- package/dist/apis/ChunksApi.d.ts +54 -1
- package/dist/apis/ChunksApi.js +53 -0
- package/dist/apis/DocumentsApi.d.ts +1 -7
- package/dist/apis/DocumentsApi.js +0 -6
- package/dist/esm/apis/ChunksApi.d.ts +54 -1
- package/dist/esm/apis/ChunksApi.js +54 -1
- package/dist/esm/apis/DocumentsApi.d.ts +1 -7
- package/dist/esm/apis/DocumentsApi.js +0 -6
- package/dist/esm/models/ChunkMetadataInput.d.ts +0 -7
- package/dist/esm/models/ChunkMetadataInput.js +0 -3
- package/dist/esm/models/ChunkMetadataOutput.d.ts +0 -7
- package/dist/esm/models/ChunkMetadataOutput.js +0 -3
- package/dist/esm/models/ChunkNeighborsResponse.d.ts +57 -0
- package/dist/esm/models/ChunkNeighborsResponse.js +49 -0
- package/dist/esm/models/IngestionMode.d.ts +3 -2
- package/dist/esm/models/IngestionMode.js +3 -2
- package/dist/esm/models/PipelineState.d.ts +1 -8
- package/dist/esm/models/PipelineState.js +0 -3
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/models/ChunkMetadataInput.d.ts +0 -7
- package/dist/models/ChunkMetadataInput.js +0 -3
- package/dist/models/ChunkMetadataOutput.d.ts +0 -7
- package/dist/models/ChunkMetadataOutput.js +0 -3
- package/dist/models/ChunkNeighborsResponse.d.ts +57 -0
- package/dist/models/ChunkNeighborsResponse.js +57 -0
- package/dist/models/IngestionMode.d.ts +3 -2
- package/dist/models/IngestionMode.js +3 -2
- package/dist/models/PipelineState.d.ts +1 -8
- package/dist/models/PipelineState.js +0 -3
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/docs/ChunkMetadataInput.md +0 -2
- package/docs/ChunkMetadataOutput.md +0 -2
- package/docs/ChunkNeighborsResponse.md +37 -0
- package/docs/ChunksApi.md +84 -0
- package/docs/DocumentsApi.md +4 -10
- package/docs/IngestionMode.md +1 -1
- package/docs/PipelineState.md +0 -2
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +109 -0
- package/src/apis/DocumentsApi.ts +0 -17
- package/src/models/ChunkMetadataInput.ts +0 -15
- package/src/models/ChunkMetadataOutput.ts +0 -15
- package/src/models/ChunkNeighborsResponse.ts +103 -0
- package/src/models/IngestionMode.ts +3 -2
- package/src/models/PipelineState.ts +1 -16
- package/src/models/index.ts +1 -1
- package/dist/esm/models/ConversionEngine.d.ts +0 -25
- package/dist/esm/models/ConversionEngine.js +0 -43
- package/dist/models/ConversionEngine.d.ts +0 -25
- package/dist/models/ConversionEngine.js +0 -51
- package/docs/ConversionEngine.md +0 -33
- package/src/models/ConversionEngine.ts +0 -53
|
@@ -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,49 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { SectionContentItemOrChunkContentItemFromJSON, SectionContentItemOrChunkContentItemToJSON, } from './SectionContentItemOrChunkContentItem';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ChunkNeighborsResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfChunkNeighborsResponse(value) {
|
|
19
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('anchorIndex' in value) || value['anchorIndex'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function ChunkNeighborsResponseFromJSON(json) {
|
|
26
|
+
return ChunkNeighborsResponseFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function ChunkNeighborsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'items': (json['items'].map(SectionContentItemOrChunkContentItemFromJSON)),
|
|
34
|
+
'anchorIndex': json['anchor_index'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function ChunkNeighborsResponseToJSON(json) {
|
|
38
|
+
return ChunkNeighborsResponseToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function ChunkNeighborsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'items': (value['items'].map(SectionContentItemOrChunkContentItemToJSON)),
|
|
46
|
+
'anchor_index': value['anchorIndex'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export const ChunkNeighborsResponsePropertyValidationAttributesMap = {};
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Ingestion pipeline mode — determines conversion and chunking strategy.
|
|
14
14
|
* @export
|
|
15
15
|
*/
|
|
16
16
|
export declare const IngestionMode: {
|
|
17
|
-
readonly
|
|
17
|
+
readonly HighAccuracy: "high_accuracy";
|
|
18
|
+
readonly Standard: "standard";
|
|
18
19
|
readonly SingleChunk: "single_chunk";
|
|
19
20
|
};
|
|
20
21
|
export type IngestionMode = typeof IngestionMode[keyof typeof IngestionMode];
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Ingestion pipeline mode — determines conversion and chunking strategy.
|
|
16
16
|
* @export
|
|
17
17
|
*/
|
|
18
18
|
export const IngestionMode = {
|
|
19
|
-
|
|
19
|
+
HighAccuracy: 'high_accuracy',
|
|
20
|
+
Standard: 'standard',
|
|
20
21
|
SingleChunk: 'single_chunk'
|
|
21
22
|
};
|
|
22
23
|
export function instanceOfIngestionMode(value) {
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { PipelineStatus } from './PipelineStatus';
|
|
13
|
-
import type { ConversionEngine } from './ConversionEngine';
|
|
14
13
|
import type { IngestionMode } from './IngestionMode';
|
|
15
14
|
import type { ChunkType } from './ChunkType';
|
|
16
15
|
/**
|
|
@@ -38,7 +37,7 @@ export interface PipelineState {
|
|
|
38
37
|
*/
|
|
39
38
|
lastStateUpdateTimestamp?: Date | null;
|
|
40
39
|
/**
|
|
41
|
-
* Name of the last activity that executed (e.g., '
|
|
40
|
+
* Name of the last activity that executed (e.g., 'document_preparation')
|
|
42
41
|
* @type {string}
|
|
43
42
|
* @memberof PipelineState
|
|
44
43
|
*/
|
|
@@ -79,12 +78,6 @@ export interface PipelineState {
|
|
|
79
78
|
* @memberof PipelineState
|
|
80
79
|
*/
|
|
81
80
|
chunkType?: ChunkType;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @type {ConversionEngine}
|
|
85
|
-
* @memberof PipelineState
|
|
86
|
-
*/
|
|
87
|
-
conversionEngine?: ConversionEngine;
|
|
88
81
|
}
|
|
89
82
|
/**
|
|
90
83
|
* Check if a given object implements the PipelineState interface.
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { PipelineStatusFromJSON, PipelineStatusToJSON, } from './PipelineStatus';
|
|
15
|
-
import { ConversionEngineFromJSON, ConversionEngineToJSON, } from './ConversionEngine';
|
|
16
15
|
import { IngestionModeFromJSON, IngestionModeToJSON, } from './IngestionMode';
|
|
17
16
|
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
18
17
|
/**
|
|
@@ -41,7 +40,6 @@ export function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
40
|
'pageDpi': json['page_dpi'] == null ? undefined : json['page_dpi'],
|
|
42
41
|
'ingestionMode': json['ingestion_mode'] == null ? undefined : IngestionModeFromJSON(json['ingestion_mode']),
|
|
43
42
|
'chunkType': json['chunk_type'] == null ? undefined : ChunkTypeFromJSON(json['chunk_type']),
|
|
44
|
-
'conversionEngine': json['conversion_engine'] == null ? undefined : ConversionEngineFromJSON(json['conversion_engine']),
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
export function PipelineStateToJSON(json) {
|
|
@@ -62,7 +60,6 @@ export function PipelineStateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
60
|
'page_dpi': value['pageDpi'],
|
|
63
61
|
'ingestion_mode': IngestionModeToJSON(value['ingestionMode']),
|
|
64
62
|
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
65
|
-
'conversion_engine': ConversionEngineToJSON(value['conversionEngine']),
|
|
66
63
|
};
|
|
67
64
|
}
|
|
68
65
|
export const PipelineStatePropertyValidationAttributesMap = {};
|
|
@@ -11,12 +11,12 @@ 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';
|
|
19
|
-
export * from './ConversionEngine';
|
|
20
20
|
export * from './CreateApiKeyRequest';
|
|
21
21
|
export * from './CreateApiKeyResponse';
|
|
22
22
|
export * from './CreateChunkLineageRequest';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -13,12 +13,12 @@ export * from './ChunkDocumentVersionResponse';
|
|
|
13
13
|
export * from './ChunkLineageResponse';
|
|
14
14
|
export * from './ChunkMetadataInput';
|
|
15
15
|
export * from './ChunkMetadataOutput';
|
|
16
|
+
export * from './ChunkNeighborsResponse';
|
|
16
17
|
export * from './ChunkResponse';
|
|
17
18
|
export * from './ChunkSearchRequest';
|
|
18
19
|
export * from './ChunkType';
|
|
19
20
|
export * from './Citation';
|
|
20
21
|
export * from './ClearVersionContentsResponse';
|
|
21
|
-
export * from './ConversionEngine';
|
|
22
22
|
export * from './CreateApiKeyRequest';
|
|
23
23
|
export * from './CreateApiKeyResponse';
|
|
24
24
|
export * from './CreateChunkLineageRequest';
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ImageTaxonomy } from './ImageTaxonomy';
|
|
13
|
-
import type { IngestionMode } from './IngestionMode';
|
|
14
13
|
import type { PolygonReference } from './PolygonReference';
|
|
15
14
|
/**
|
|
16
15
|
* Metadata for a chunk including source document references.
|
|
@@ -36,12 +35,6 @@ export interface ChunkMetadataInput {
|
|
|
36
35
|
* @memberof ChunkMetadataInput
|
|
37
36
|
*/
|
|
38
37
|
summary?: string | null;
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* @type {IngestionMode}
|
|
42
|
-
* @memberof ChunkMetadataInput
|
|
43
|
-
*/
|
|
44
|
-
ingestionMode?: IngestionMode;
|
|
45
38
|
/**
|
|
46
39
|
* S3 URI to extracted PDF text used for LLM grounding during enrichment
|
|
47
40
|
* @type {string}
|
|
@@ -20,7 +20,6 @@ exports.ChunkMetadataInputFromJSONTyped = ChunkMetadataInputFromJSONTyped;
|
|
|
20
20
|
exports.ChunkMetadataInputToJSON = ChunkMetadataInputToJSON;
|
|
21
21
|
exports.ChunkMetadataInputToJSONTyped = ChunkMetadataInputToJSONTyped;
|
|
22
22
|
const ImageTaxonomy_1 = require("./ImageTaxonomy");
|
|
23
|
-
const IngestionMode_1 = require("./IngestionMode");
|
|
24
23
|
const PolygonReference_1 = require("./PolygonReference");
|
|
25
24
|
/**
|
|
26
25
|
* Check if a given object implements the ChunkMetadataInput interface.
|
|
@@ -39,7 +38,6 @@ function ChunkMetadataInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
38
|
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReference_1.PolygonReferenceFromJSON)),
|
|
40
39
|
's3Urls': json['s3_urls'] == null ? undefined : json['s3_urls'],
|
|
41
40
|
'summary': json['summary'] == null ? undefined : json['summary'],
|
|
42
|
-
'ingestionMode': json['ingestion_mode'] == null ? undefined : (0, IngestionMode_1.IngestionModeFromJSON)(json['ingestion_mode']),
|
|
43
41
|
'extractedTextS3Uri': json['extracted_text_s3_uri'] == null ? undefined : json['extracted_text_s3_uri'],
|
|
44
42
|
'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : (0, ImageTaxonomy_1.ImageTaxonomyFromJSON)(json['secondary_taxonomy']),
|
|
45
43
|
'sheetName': json['sheet_name'] == null ? undefined : json['sheet_name'],
|
|
@@ -64,7 +62,6 @@ function ChunkMetadataInputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
64
62
|
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReference_1.PolygonReferenceToJSON)),
|
|
65
63
|
's3_urls': value['s3Urls'],
|
|
66
64
|
'summary': value['summary'],
|
|
67
|
-
'ingestion_mode': (0, IngestionMode_1.IngestionModeToJSON)(value['ingestionMode']),
|
|
68
65
|
'extracted_text_s3_uri': value['extractedTextS3Uri'],
|
|
69
66
|
'secondary_taxonomy': (0, ImageTaxonomy_1.ImageTaxonomyToJSON)(value['secondaryTaxonomy']),
|
|
70
67
|
'sheet_name': value['sheetName'],
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ImageTaxonomy } from './ImageTaxonomy';
|
|
13
|
-
import type { IngestionMode } from './IngestionMode';
|
|
14
13
|
import type { PolygonReference } from './PolygonReference';
|
|
15
14
|
/**
|
|
16
15
|
* Metadata for a chunk including source document references.
|
|
@@ -36,12 +35,6 @@ export interface ChunkMetadataOutput {
|
|
|
36
35
|
* @memberof ChunkMetadataOutput
|
|
37
36
|
*/
|
|
38
37
|
summary?: string | null;
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* @type {IngestionMode}
|
|
42
|
-
* @memberof ChunkMetadataOutput
|
|
43
|
-
*/
|
|
44
|
-
ingestionMode?: IngestionMode;
|
|
45
38
|
/**
|
|
46
39
|
* S3 URI to extracted PDF text used for LLM grounding during enrichment
|
|
47
40
|
* @type {string}
|
|
@@ -20,7 +20,6 @@ exports.ChunkMetadataOutputFromJSONTyped = ChunkMetadataOutputFromJSONTyped;
|
|
|
20
20
|
exports.ChunkMetadataOutputToJSON = ChunkMetadataOutputToJSON;
|
|
21
21
|
exports.ChunkMetadataOutputToJSONTyped = ChunkMetadataOutputToJSONTyped;
|
|
22
22
|
const ImageTaxonomy_1 = require("./ImageTaxonomy");
|
|
23
|
-
const IngestionMode_1 = require("./IngestionMode");
|
|
24
23
|
const PolygonReference_1 = require("./PolygonReference");
|
|
25
24
|
/**
|
|
26
25
|
* Check if a given object implements the ChunkMetadataOutput interface.
|
|
@@ -39,7 +38,6 @@ function ChunkMetadataOutputFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
38
|
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReference_1.PolygonReferenceFromJSON)),
|
|
40
39
|
's3Urls': json['s3_urls'] == null ? undefined : json['s3_urls'],
|
|
41
40
|
'summary': json['summary'] == null ? undefined : json['summary'],
|
|
42
|
-
'ingestionMode': json['ingestion_mode'] == null ? undefined : (0, IngestionMode_1.IngestionModeFromJSON)(json['ingestion_mode']),
|
|
43
41
|
'extractedTextS3Uri': json['extracted_text_s3_uri'] == null ? undefined : json['extracted_text_s3_uri'],
|
|
44
42
|
'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : (0, ImageTaxonomy_1.ImageTaxonomyFromJSON)(json['secondary_taxonomy']),
|
|
45
43
|
'sheetName': json['sheet_name'] == null ? undefined : json['sheet_name'],
|
|
@@ -64,7 +62,6 @@ function ChunkMetadataOutputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
64
62
|
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReference_1.PolygonReferenceToJSON)),
|
|
65
63
|
's3_urls': value['s3Urls'],
|
|
66
64
|
'summary': value['summary'],
|
|
67
|
-
'ingestion_mode': (0, IngestionMode_1.IngestionModeToJSON)(value['ingestionMode']),
|
|
68
65
|
'extracted_text_s3_uri': value['extractedTextS3Uri'],
|
|
69
66
|
'secondary_taxonomy': (0, ImageTaxonomy_1.ImageTaxonomyToJSON)(value['secondaryTaxonomy']),
|
|
70
67
|
'sheet_name': value['sheetName'],
|
|
@@ -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 = {};
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Ingestion pipeline mode — determines conversion and chunking strategy.
|
|
14
14
|
* @export
|
|
15
15
|
*/
|
|
16
16
|
export declare const IngestionMode: {
|
|
17
|
-
readonly
|
|
17
|
+
readonly HighAccuracy: "high_accuracy";
|
|
18
|
+
readonly Standard: "standard";
|
|
18
19
|
readonly SingleChunk: "single_chunk";
|
|
19
20
|
};
|
|
20
21
|
export type IngestionMode = typeof IngestionMode[keyof typeof IngestionMode];
|
|
@@ -20,11 +20,12 @@ exports.IngestionModeFromJSONTyped = IngestionModeFromJSONTyped;
|
|
|
20
20
|
exports.IngestionModeToJSON = IngestionModeToJSON;
|
|
21
21
|
exports.IngestionModeToJSONTyped = IngestionModeToJSONTyped;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Ingestion pipeline mode — determines conversion and chunking strategy.
|
|
24
24
|
* @export
|
|
25
25
|
*/
|
|
26
26
|
exports.IngestionMode = {
|
|
27
|
-
|
|
27
|
+
HighAccuracy: 'high_accuracy',
|
|
28
|
+
Standard: 'standard',
|
|
28
29
|
SingleChunk: 'single_chunk'
|
|
29
30
|
};
|
|
30
31
|
function instanceOfIngestionMode(value) {
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { PipelineStatus } from './PipelineStatus';
|
|
13
|
-
import type { ConversionEngine } from './ConversionEngine';
|
|
14
13
|
import type { IngestionMode } from './IngestionMode';
|
|
15
14
|
import type { ChunkType } from './ChunkType';
|
|
16
15
|
/**
|
|
@@ -38,7 +37,7 @@ export interface PipelineState {
|
|
|
38
37
|
*/
|
|
39
38
|
lastStateUpdateTimestamp?: Date | null;
|
|
40
39
|
/**
|
|
41
|
-
* Name of the last activity that executed (e.g., '
|
|
40
|
+
* Name of the last activity that executed (e.g., 'document_preparation')
|
|
42
41
|
* @type {string}
|
|
43
42
|
* @memberof PipelineState
|
|
44
43
|
*/
|
|
@@ -79,12 +78,6 @@ export interface PipelineState {
|
|
|
79
78
|
* @memberof PipelineState
|
|
80
79
|
*/
|
|
81
80
|
chunkType?: ChunkType;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @type {ConversionEngine}
|
|
85
|
-
* @memberof PipelineState
|
|
86
|
-
*/
|
|
87
|
-
conversionEngine?: ConversionEngine;
|
|
88
81
|
}
|
|
89
82
|
/**
|
|
90
83
|
* Check if a given object implements the PipelineState interface.
|
|
@@ -20,7 +20,6 @@ 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");
|
|
24
23
|
const IngestionMode_1 = require("./IngestionMode");
|
|
25
24
|
const ChunkType_1 = require("./ChunkType");
|
|
26
25
|
/**
|
|
@@ -49,7 +48,6 @@ function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
48
|
'pageDpi': json['page_dpi'] == null ? undefined : json['page_dpi'],
|
|
50
49
|
'ingestionMode': json['ingestion_mode'] == null ? undefined : (0, IngestionMode_1.IngestionModeFromJSON)(json['ingestion_mode']),
|
|
51
50
|
'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']),
|
|
53
51
|
};
|
|
54
52
|
}
|
|
55
53
|
function PipelineStateToJSON(json) {
|
|
@@ -70,7 +68,6 @@ function PipelineStateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
70
68
|
'page_dpi': value['pageDpi'],
|
|
71
69
|
'ingestion_mode': (0, IngestionMode_1.IngestionModeToJSON)(value['ingestionMode']),
|
|
72
70
|
'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
|
|
73
|
-
'conversion_engine': (0, ConversionEngine_1.ConversionEngineToJSON)(value['conversionEngine']),
|
|
74
71
|
};
|
|
75
72
|
}
|
|
76
73
|
exports.PipelineStatePropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -11,12 +11,12 @@ 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';
|
|
19
|
-
export * from './ConversionEngine';
|
|
20
20
|
export * from './CreateApiKeyRequest';
|
|
21
21
|
export * from './CreateApiKeyResponse';
|
|
22
22
|
export * from './CreateChunkLineageRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -29,12 +29,12 @@ __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);
|
|
37
|
-
__exportStar(require("./ConversionEngine"), exports);
|
|
38
38
|
__exportStar(require("./CreateApiKeyRequest"), exports);
|
|
39
39
|
__exportStar(require("./CreateApiKeyResponse"), exports);
|
|
40
40
|
__exportStar(require("./CreateChunkLineageRequest"), exports);
|
|
@@ -10,7 +10,6 @@ Name | Type
|
|
|
10
10
|
`polygons` | [Array<PolygonReference>](PolygonReference.md)
|
|
11
11
|
`s3Urls` | Array<string>
|
|
12
12
|
`summary` | string
|
|
13
|
-
`ingestionMode` | [IngestionMode](IngestionMode.md)
|
|
14
13
|
`extractedTextS3Uri` | string
|
|
15
14
|
`secondaryTaxonomy` | [ImageTaxonomy](ImageTaxonomy.md)
|
|
16
15
|
`sheetName` | string
|
|
@@ -33,7 +32,6 @@ const example = {
|
|
|
33
32
|
"polygons": null,
|
|
34
33
|
"s3Urls": null,
|
|
35
34
|
"summary": null,
|
|
36
|
-
"ingestionMode": null,
|
|
37
35
|
"extractedTextS3Uri": null,
|
|
38
36
|
"secondaryTaxonomy": null,
|
|
39
37
|
"sheetName": null,
|
|
@@ -10,7 +10,6 @@ Name | Type
|
|
|
10
10
|
`polygons` | [Array<PolygonReference>](PolygonReference.md)
|
|
11
11
|
`s3Urls` | Array<string>
|
|
12
12
|
`summary` | string
|
|
13
|
-
`ingestionMode` | [IngestionMode](IngestionMode.md)
|
|
14
13
|
`extractedTextS3Uri` | string
|
|
15
14
|
`secondaryTaxonomy` | [ImageTaxonomy](ImageTaxonomy.md)
|
|
16
15
|
`sheetName` | string
|
|
@@ -33,7 +32,6 @@ const example = {
|
|
|
33
32
|
"polygons": null,
|
|
34
33
|
"s3Urls": null,
|
|
35
34
|
"summary": null,
|
|
36
|
-
"ingestionMode": null,
|
|
37
35
|
"extractedTextS3Uri": null,
|
|
38
36
|
"secondaryTaxonomy": null,
|
|
39
37
|
"sheetName": null,
|
|
@@ -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
|
+
|