@knowledge-stack/ksapi 1.6.0 → 1.8.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 +14 -0
- package/README.md +2 -2
- package/dist/apis/ChunksApi.d.ts +175 -0
- package/dist/apis/ChunksApi.js +203 -0
- package/dist/apis/PathPartsApi.d.ts +30 -1
- package/dist/apis/PathPartsApi.js +32 -0
- package/dist/apis/SectionsApi.d.ts +144 -0
- package/dist/apis/SectionsApi.js +166 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/ChunksApi.d.ts +175 -0
- package/dist/esm/apis/ChunksApi.js +199 -0
- package/dist/esm/apis/PathPartsApi.d.ts +30 -1
- package/dist/esm/apis/PathPartsApi.js +33 -1
- package/dist/esm/apis/SectionsApi.d.ts +144 -0
- package/dist/esm/apis/SectionsApi.js +162 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/ChunkMetadataInput.d.ts +48 -0
- package/dist/esm/models/ChunkMetadataInput.js +43 -0
- package/dist/esm/models/ChunkMetadataOutput.d.ts +48 -0
- package/dist/esm/models/ChunkMetadataOutput.js +43 -0
- package/dist/esm/models/ChunkResponse.d.ts +115 -0
- package/dist/esm/models/ChunkResponse.js +86 -0
- package/dist/esm/models/ChunkType.d.ts +27 -0
- package/dist/esm/models/ChunkType.js +45 -0
- package/dist/esm/models/CreateChunkRequest.d.ts +73 -0
- package/dist/esm/models/CreateChunkRequest.js +64 -0
- package/dist/esm/models/CreateSectionRequest.d.ts +65 -0
- package/dist/esm/models/CreateSectionRequest.js +57 -0
- package/dist/esm/models/PasswordResetWithTokenRequest.d.ts +2 -8
- package/dist/esm/models/PasswordResetWithTokenRequest.js +3 -7
- package/dist/esm/models/Polygon.d.ts +65 -0
- package/dist/esm/models/Polygon.js +56 -0
- package/dist/esm/models/PolygonReference.d.ts +54 -0
- package/dist/esm/models/PolygonReference.js +49 -0
- package/dist/esm/models/SectionResponse.d.ts +101 -0
- package/dist/esm/models/SectionResponse.js +74 -0
- package/dist/esm/models/UpdateChunkContentRequest.d.ts +54 -0
- package/dist/esm/models/UpdateChunkContentRequest.js +51 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +48 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.js +45 -0
- package/dist/esm/models/UpdateSectionRequest.d.ts +65 -0
- package/dist/esm/models/UpdateSectionRequest.js +53 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/ChunkMetadataInput.d.ts +48 -0
- package/dist/models/ChunkMetadataInput.js +51 -0
- package/dist/models/ChunkMetadataOutput.d.ts +48 -0
- package/dist/models/ChunkMetadataOutput.js +51 -0
- package/dist/models/ChunkResponse.d.ts +115 -0
- package/dist/models/ChunkResponse.js +94 -0
- package/dist/models/ChunkType.d.ts +27 -0
- package/dist/models/ChunkType.js +53 -0
- package/dist/models/CreateChunkRequest.d.ts +73 -0
- package/dist/models/CreateChunkRequest.js +72 -0
- package/dist/models/CreateSectionRequest.d.ts +65 -0
- package/dist/models/CreateSectionRequest.js +65 -0
- package/dist/models/PasswordResetWithTokenRequest.d.ts +2 -8
- package/dist/models/PasswordResetWithTokenRequest.js +3 -7
- package/dist/models/Polygon.d.ts +65 -0
- package/dist/models/Polygon.js +64 -0
- package/dist/models/PolygonReference.d.ts +54 -0
- package/dist/models/PolygonReference.js +57 -0
- package/dist/models/SectionResponse.d.ts +101 -0
- package/dist/models/SectionResponse.js +82 -0
- package/dist/models/UpdateChunkContentRequest.d.ts +54 -0
- package/dist/models/UpdateChunkContentRequest.js +59 -0
- package/dist/models/UpdateChunkMetadataRequest.d.ts +48 -0
- package/dist/models/UpdateChunkMetadataRequest.js +53 -0
- package/dist/models/UpdateSectionRequest.d.ts +65 -0
- package/dist/models/UpdateSectionRequest.js +61 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +381 -0
- package/src/apis/PathPartsApi.ts +64 -0
- package/src/apis/SectionsApi.ts +305 -0
- package/src/apis/index.ts +2 -0
- package/src/models/ChunkMetadataInput.ts +90 -0
- package/src/models/ChunkMetadataOutput.ts +90 -0
- package/src/models/ChunkResponse.ts +197 -0
- package/src/models/ChunkType.ts +55 -0
- package/src/models/CreateChunkRequest.ts +138 -0
- package/src/models/CreateSectionRequest.ts +112 -0
- package/src/models/PasswordResetWithTokenRequest.ts +5 -14
- package/src/models/Polygon.ts +110 -0
- package/src/models/PolygonReference.ts +100 -0
- package/src/models/SectionResponse.ts +161 -0
- package/src/models/UpdateChunkContentRequest.ts +104 -0
- package/src/models/UpdateChunkMetadataRequest.ts +91 -0
- package/src/models/UpdateSectionRequest.ts +110 -0
- package/src/models/index.ts +12 -0
|
@@ -0,0 +1,45 @@
|
|
|
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 { ChunkMetadataInputFromJSON, ChunkMetadataInputToJSON, } from './ChunkMetadataInput';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the UpdateChunkMetadataRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfUpdateChunkMetadataRequest(value) {
|
|
19
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function UpdateChunkMetadataRequestFromJSON(json) {
|
|
24
|
+
return UpdateChunkMetadataRequestFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function UpdateChunkMetadataRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'chunkMetadata': ChunkMetadataInputFromJSON(json['chunk_metadata']),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function UpdateChunkMetadataRequestToJSON(json) {
|
|
35
|
+
return UpdateChunkMetadataRequestToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function UpdateChunkMetadataRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'chunk_metadata': ChunkMetadataInputToJSON(value['chunkMetadata']),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export const UpdateChunkMetadataRequestPropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
* Request to update a section.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UpdateSectionRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateSectionRequest {
|
|
18
|
+
/**
|
|
19
|
+
* New section name (can contain any characters)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpdateSectionRequest
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* New page number (must be > 0)
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof UpdateSectionRequest
|
|
28
|
+
*/
|
|
29
|
+
pageNumber?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Move after this sibling PathPart ID
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateSectionRequest
|
|
34
|
+
*/
|
|
35
|
+
prevSiblingPathId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Set to true to move to head of sibling list. This is needed since prev_sibling_path_id = None means no update
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof UpdateSectionRequest
|
|
40
|
+
*/
|
|
41
|
+
moveToHead?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the UpdateSectionRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfUpdateSectionRequest(value: object): value is UpdateSectionRequest;
|
|
47
|
+
export declare function UpdateSectionRequestFromJSON(json: any): UpdateSectionRequest;
|
|
48
|
+
export declare function UpdateSectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSectionRequest;
|
|
49
|
+
export declare function UpdateSectionRequestToJSON(json: any): UpdateSectionRequest;
|
|
50
|
+
export declare function UpdateSectionRequestToJSONTyped(value?: UpdateSectionRequest | null, ignoreDiscriminator?: boolean): any;
|
|
51
|
+
export declare const UpdateSectionRequestPropertyValidationAttributesMap: {
|
|
52
|
+
[property: string]: {
|
|
53
|
+
maxLength?: number;
|
|
54
|
+
minLength?: number;
|
|
55
|
+
pattern?: string;
|
|
56
|
+
maximum?: number;
|
|
57
|
+
exclusiveMaximum?: boolean;
|
|
58
|
+
minimum?: number;
|
|
59
|
+
exclusiveMinimum?: boolean;
|
|
60
|
+
multipleOf?: number;
|
|
61
|
+
maxItems?: number;
|
|
62
|
+
minItems?: number;
|
|
63
|
+
uniqueItems?: boolean;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the UpdateSectionRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfUpdateSectionRequest(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function UpdateSectionRequestFromJSON(json) {
|
|
21
|
+
return UpdateSectionRequestFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function UpdateSectionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
29
|
+
'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
|
|
30
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
31
|
+
'moveToHead': json['move_to_head'] == null ? undefined : json['move_to_head'],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function UpdateSectionRequestToJSON(json) {
|
|
35
|
+
return UpdateSectionRequestToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function UpdateSectionRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'name': value['name'],
|
|
43
|
+
'page_number': value['pageNumber'],
|
|
44
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
45
|
+
'move_to_head': value['moveToHead'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export const UpdateSectionRequestPropertyValidationAttributesMap = {
|
|
49
|
+
name: {
|
|
50
|
+
maxLength: 255,
|
|
51
|
+
minLength: 1,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
export * from './ChunkMetadataInput';
|
|
2
|
+
export * from './ChunkMetadataOutput';
|
|
3
|
+
export * from './ChunkResponse';
|
|
4
|
+
export * from './ChunkType';
|
|
5
|
+
export * from './CreateChunkRequest';
|
|
1
6
|
export * from './CreateDocumentRequest';
|
|
2
7
|
export * from './CreateFolderRequest';
|
|
3
8
|
export * from './CreatePasswordUserRequest';
|
|
9
|
+
export * from './CreateSectionRequest';
|
|
4
10
|
export * from './CreateTenantRequest';
|
|
5
11
|
export * from './DocumentOrigin';
|
|
6
12
|
export * from './DocumentResponse';
|
|
@@ -28,13 +34,19 @@ export * from './PasswordResetRequest';
|
|
|
28
34
|
export * from './PasswordResetWithTokenRequest';
|
|
29
35
|
export * from './PathOrder';
|
|
30
36
|
export * from './PathPartResponse';
|
|
37
|
+
export * from './Polygon';
|
|
38
|
+
export * from './PolygonReference';
|
|
31
39
|
export * from './RootResponse';
|
|
40
|
+
export * from './SectionResponse';
|
|
32
41
|
export * from './SignInRequest';
|
|
33
42
|
export * from './TenantResponse';
|
|
34
43
|
export * from './TenantUserInTenantResponse';
|
|
35
44
|
export * from './TenantUserRole';
|
|
45
|
+
export * from './UpdateChunkContentRequest';
|
|
46
|
+
export * from './UpdateChunkMetadataRequest';
|
|
36
47
|
export * from './UpdateDocumentRequest';
|
|
37
48
|
export * from './UpdateFolderRequest';
|
|
49
|
+
export * from './UpdateSectionRequest';
|
|
38
50
|
export * from './UpdateTenantRequest';
|
|
39
51
|
export * from './UpdateUserRequest';
|
|
40
52
|
export * from './UserResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './ChunkMetadataInput';
|
|
4
|
+
export * from './ChunkMetadataOutput';
|
|
5
|
+
export * from './ChunkResponse';
|
|
6
|
+
export * from './ChunkType';
|
|
7
|
+
export * from './CreateChunkRequest';
|
|
3
8
|
export * from './CreateDocumentRequest';
|
|
4
9
|
export * from './CreateFolderRequest';
|
|
5
10
|
export * from './CreatePasswordUserRequest';
|
|
11
|
+
export * from './CreateSectionRequest';
|
|
6
12
|
export * from './CreateTenantRequest';
|
|
7
13
|
export * from './DocumentOrigin';
|
|
8
14
|
export * from './DocumentResponse';
|
|
@@ -30,13 +36,19 @@ export * from './PasswordResetRequest';
|
|
|
30
36
|
export * from './PasswordResetWithTokenRequest';
|
|
31
37
|
export * from './PathOrder';
|
|
32
38
|
export * from './PathPartResponse';
|
|
39
|
+
export * from './Polygon';
|
|
40
|
+
export * from './PolygonReference';
|
|
33
41
|
export * from './RootResponse';
|
|
42
|
+
export * from './SectionResponse';
|
|
34
43
|
export * from './SignInRequest';
|
|
35
44
|
export * from './TenantResponse';
|
|
36
45
|
export * from './TenantUserInTenantResponse';
|
|
37
46
|
export * from './TenantUserRole';
|
|
47
|
+
export * from './UpdateChunkContentRequest';
|
|
48
|
+
export * from './UpdateChunkMetadataRequest';
|
|
38
49
|
export * from './UpdateDocumentRequest';
|
|
39
50
|
export * from './UpdateFolderRequest';
|
|
51
|
+
export * from './UpdateSectionRequest';
|
|
40
52
|
export * from './UpdateTenantRequest';
|
|
41
53
|
export * from './UpdateUserRequest';
|
|
42
54
|
export * from './UserResponse';
|
|
@@ -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 { PolygonReference } from './PolygonReference';
|
|
13
|
+
/**
|
|
14
|
+
* Metadata for a chunk including source document references.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChunkMetadataInput
|
|
17
|
+
*/
|
|
18
|
+
export interface ChunkMetadataInput {
|
|
19
|
+
/**
|
|
20
|
+
* List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages.
|
|
21
|
+
* @type {Array<PolygonReference>}
|
|
22
|
+
* @memberof ChunkMetadataInput
|
|
23
|
+
*/
|
|
24
|
+
polygons?: Array<PolygonReference>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ChunkMetadataInput interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfChunkMetadataInput(value: object): value is ChunkMetadataInput;
|
|
30
|
+
export declare function ChunkMetadataInputFromJSON(json: any): ChunkMetadataInput;
|
|
31
|
+
export declare function ChunkMetadataInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkMetadataInput;
|
|
32
|
+
export declare function ChunkMetadataInputToJSON(json: any): ChunkMetadataInput;
|
|
33
|
+
export declare function ChunkMetadataInputToJSONTyped(value?: ChunkMetadataInput | null, ignoreDiscriminator?: boolean): any;
|
|
34
|
+
export declare const ChunkMetadataInputPropertyValidationAttributesMap: {
|
|
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.ChunkMetadataInputPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfChunkMetadataInput = instanceOfChunkMetadataInput;
|
|
18
|
+
exports.ChunkMetadataInputFromJSON = ChunkMetadataInputFromJSON;
|
|
19
|
+
exports.ChunkMetadataInputFromJSONTyped = ChunkMetadataInputFromJSONTyped;
|
|
20
|
+
exports.ChunkMetadataInputToJSON = ChunkMetadataInputToJSON;
|
|
21
|
+
exports.ChunkMetadataInputToJSONTyped = ChunkMetadataInputToJSONTyped;
|
|
22
|
+
const PolygonReference_1 = require("./PolygonReference");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the ChunkMetadataInput interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfChunkMetadataInput(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ChunkMetadataInputFromJSON(json) {
|
|
30
|
+
return ChunkMetadataInputFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ChunkMetadataInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReference_1.PolygonReferenceFromJSON)),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function ChunkMetadataInputToJSON(json) {
|
|
41
|
+
return ChunkMetadataInputToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ChunkMetadataInputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReference_1.PolygonReferenceToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.ChunkMetadataInputPropertyValidationAttributesMap = {};
|
|
@@ -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 { PolygonReference } from './PolygonReference';
|
|
13
|
+
/**
|
|
14
|
+
* Metadata for a chunk including source document references.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChunkMetadataOutput
|
|
17
|
+
*/
|
|
18
|
+
export interface ChunkMetadataOutput {
|
|
19
|
+
/**
|
|
20
|
+
* List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages.
|
|
21
|
+
* @type {Array<PolygonReference>}
|
|
22
|
+
* @memberof ChunkMetadataOutput
|
|
23
|
+
*/
|
|
24
|
+
polygons?: Array<PolygonReference>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ChunkMetadataOutput interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfChunkMetadataOutput(value: object): value is ChunkMetadataOutput;
|
|
30
|
+
export declare function ChunkMetadataOutputFromJSON(json: any): ChunkMetadataOutput;
|
|
31
|
+
export declare function ChunkMetadataOutputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkMetadataOutput;
|
|
32
|
+
export declare function ChunkMetadataOutputToJSON(json: any): ChunkMetadataOutput;
|
|
33
|
+
export declare function ChunkMetadataOutputToJSONTyped(value?: ChunkMetadataOutput | null, ignoreDiscriminator?: boolean): any;
|
|
34
|
+
export declare const ChunkMetadataOutputPropertyValidationAttributesMap: {
|
|
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.ChunkMetadataOutputPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfChunkMetadataOutput = instanceOfChunkMetadataOutput;
|
|
18
|
+
exports.ChunkMetadataOutputFromJSON = ChunkMetadataOutputFromJSON;
|
|
19
|
+
exports.ChunkMetadataOutputFromJSONTyped = ChunkMetadataOutputFromJSONTyped;
|
|
20
|
+
exports.ChunkMetadataOutputToJSON = ChunkMetadataOutputToJSON;
|
|
21
|
+
exports.ChunkMetadataOutputToJSONTyped = ChunkMetadataOutputToJSONTyped;
|
|
22
|
+
const PolygonReference_1 = require("./PolygonReference");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the ChunkMetadataOutput interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfChunkMetadataOutput(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ChunkMetadataOutputFromJSON(json) {
|
|
30
|
+
return ChunkMetadataOutputFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ChunkMetadataOutputFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReference_1.PolygonReferenceFromJSON)),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function ChunkMetadataOutputToJSON(json) {
|
|
41
|
+
return ChunkMetadataOutputToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ChunkMetadataOutputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReference_1.PolygonReferenceToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.ChunkMetadataOutputPropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,115 @@
|
|
|
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 { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
13
|
+
import type { ChunkType } from './ChunkType';
|
|
14
|
+
/**
|
|
15
|
+
* Chunk response model.
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ChunkResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface ChunkResponse {
|
|
20
|
+
/**
|
|
21
|
+
* Chunk ID
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof ChunkResponse
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* PathPart ID
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof ChunkResponse
|
|
30
|
+
*/
|
|
31
|
+
pathPartId: string;
|
|
32
|
+
/**
|
|
33
|
+
* ChunkContent ID
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof ChunkResponse
|
|
36
|
+
*/
|
|
37
|
+
contentId: string;
|
|
38
|
+
/**
|
|
39
|
+
* Chunk text content
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof ChunkResponse
|
|
42
|
+
*/
|
|
43
|
+
content: string;
|
|
44
|
+
/**
|
|
45
|
+
* Type of chunk content
|
|
46
|
+
* @type {ChunkType}
|
|
47
|
+
* @memberof ChunkResponse
|
|
48
|
+
*/
|
|
49
|
+
chunkType: ChunkType;
|
|
50
|
+
/**
|
|
51
|
+
* Chunk metadata
|
|
52
|
+
* @type {ChunkMetadataOutput}
|
|
53
|
+
* @memberof ChunkResponse
|
|
54
|
+
*/
|
|
55
|
+
chunkMetadata: ChunkMetadataOutput;
|
|
56
|
+
/**
|
|
57
|
+
* Parent PathPart ID
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof ChunkResponse
|
|
60
|
+
*/
|
|
61
|
+
parentId: string;
|
|
62
|
+
/**
|
|
63
|
+
* Previous sibling PathPart ID
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof ChunkResponse
|
|
66
|
+
*/
|
|
67
|
+
prevSiblingPathId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Next sibling PathPart ID
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof ChunkResponse
|
|
72
|
+
*/
|
|
73
|
+
nextSiblingId?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Tenant ID
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof ChunkResponse
|
|
78
|
+
*/
|
|
79
|
+
tenantId: string;
|
|
80
|
+
/**
|
|
81
|
+
* Creation timestamp
|
|
82
|
+
* @type {Date}
|
|
83
|
+
* @memberof ChunkResponse
|
|
84
|
+
*/
|
|
85
|
+
createdAt: Date;
|
|
86
|
+
/**
|
|
87
|
+
* Last update timestamp
|
|
88
|
+
* @type {Date}
|
|
89
|
+
* @memberof ChunkResponse
|
|
90
|
+
*/
|
|
91
|
+
updatedAt: Date;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the ChunkResponse interface.
|
|
95
|
+
*/
|
|
96
|
+
export declare function instanceOfChunkResponse(value: object): value is ChunkResponse;
|
|
97
|
+
export declare function ChunkResponseFromJSON(json: any): ChunkResponse;
|
|
98
|
+
export declare function ChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkResponse;
|
|
99
|
+
export declare function ChunkResponseToJSON(json: any): ChunkResponse;
|
|
100
|
+
export declare function ChunkResponseToJSONTyped(value?: ChunkResponse | null, ignoreDiscriminator?: boolean): any;
|
|
101
|
+
export declare const ChunkResponsePropertyValidationAttributesMap: {
|
|
102
|
+
[property: string]: {
|
|
103
|
+
maxLength?: number;
|
|
104
|
+
minLength?: number;
|
|
105
|
+
pattern?: string;
|
|
106
|
+
maximum?: number;
|
|
107
|
+
exclusiveMaximum?: boolean;
|
|
108
|
+
minimum?: number;
|
|
109
|
+
exclusiveMinimum?: boolean;
|
|
110
|
+
multipleOf?: number;
|
|
111
|
+
maxItems?: number;
|
|
112
|
+
minItems?: number;
|
|
113
|
+
uniqueItems?: boolean;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
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.ChunkResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfChunkResponse = instanceOfChunkResponse;
|
|
18
|
+
exports.ChunkResponseFromJSON = ChunkResponseFromJSON;
|
|
19
|
+
exports.ChunkResponseFromJSONTyped = ChunkResponseFromJSONTyped;
|
|
20
|
+
exports.ChunkResponseToJSON = ChunkResponseToJSON;
|
|
21
|
+
exports.ChunkResponseToJSONTyped = ChunkResponseToJSONTyped;
|
|
22
|
+
const ChunkMetadataOutput_1 = require("./ChunkMetadataOutput");
|
|
23
|
+
const ChunkType_1 = require("./ChunkType");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the ChunkResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfChunkResponse(value) {
|
|
28
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('contentId' in value) || value['contentId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('chunkType' in value) || value['chunkType'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('parentId' in value) || value['parentId'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
function ChunkResponseFromJSON(json) {
|
|
51
|
+
return ChunkResponseFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'id': json['id'],
|
|
59
|
+
'pathPartId': json['path_part_id'],
|
|
60
|
+
'contentId': json['content_id'],
|
|
61
|
+
'content': json['content'],
|
|
62
|
+
'chunkType': (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
|
|
63
|
+
'chunkMetadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputFromJSON)(json['chunk_metadata']),
|
|
64
|
+
'parentId': json['parent_id'],
|
|
65
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
66
|
+
'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
|
|
67
|
+
'tenantId': json['tenant_id'],
|
|
68
|
+
'createdAt': (new Date(json['created_at'])),
|
|
69
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function ChunkResponseToJSON(json) {
|
|
73
|
+
return ChunkResponseToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
'id': value['id'],
|
|
81
|
+
'path_part_id': value['pathPartId'],
|
|
82
|
+
'content_id': value['contentId'],
|
|
83
|
+
'content': value['content'],
|
|
84
|
+
'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
|
|
85
|
+
'chunk_metadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputToJSON)(value['chunkMetadata']),
|
|
86
|
+
'parent_id': value['parentId'],
|
|
87
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
88
|
+
'next_sibling_id': value['nextSiblingId'],
|
|
89
|
+
'tenant_id': value['tenantId'],
|
|
90
|
+
'created_at': value['createdAt'].toISOString(),
|
|
91
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
exports.ChunkResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
* Type of chunk content.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const ChunkType: {
|
|
17
|
+
readonly Text: "TEXT";
|
|
18
|
+
readonly Table: "TABLE";
|
|
19
|
+
readonly Image: "IMAGE";
|
|
20
|
+
readonly Unknown: "UNKNOWN";
|
|
21
|
+
};
|
|
22
|
+
export type ChunkType = typeof ChunkType[keyof typeof ChunkType];
|
|
23
|
+
export declare function instanceOfChunkType(value: any): boolean;
|
|
24
|
+
export declare function ChunkTypeFromJSON(json: any): ChunkType;
|
|
25
|
+
export declare function ChunkTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkType;
|
|
26
|
+
export declare function ChunkTypeToJSON(value?: ChunkType | null): any;
|
|
27
|
+
export declare function ChunkTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ChunkType;
|