@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,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,43 @@
|
|
|
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 { PolygonReferenceFromJSON, PolygonReferenceToJSON, } from './PolygonReference';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ChunkMetadataInput interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfChunkMetadataInput(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function ChunkMetadataInputFromJSON(json) {
|
|
22
|
+
return ChunkMetadataInputFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function ChunkMetadataInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReferenceFromJSON)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function ChunkMetadataInputToJSON(json) {
|
|
33
|
+
return ChunkMetadataInputToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ChunkMetadataInputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReferenceToJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export const 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,43 @@
|
|
|
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 { PolygonReferenceFromJSON, PolygonReferenceToJSON, } from './PolygonReference';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ChunkMetadataOutput interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfChunkMetadataOutput(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function ChunkMetadataOutputFromJSON(json) {
|
|
22
|
+
return ChunkMetadataOutputFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function ChunkMetadataOutputFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReferenceFromJSON)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function ChunkMetadataOutputToJSON(json) {
|
|
33
|
+
return ChunkMetadataOutputToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ChunkMetadataOutputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReferenceToJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export const 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,86 @@
|
|
|
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 { ChunkMetadataOutputFromJSON, ChunkMetadataOutputToJSON, } from './ChunkMetadataOutput';
|
|
15
|
+
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the ChunkResponse interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfChunkResponse(value) {
|
|
20
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('contentId' in value) || value['contentId'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('chunkType' in value) || value['chunkType'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('parentId' in value) || value['parentId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
export function ChunkResponseFromJSON(json) {
|
|
43
|
+
return ChunkResponseFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'id': json['id'],
|
|
51
|
+
'pathPartId': json['path_part_id'],
|
|
52
|
+
'contentId': json['content_id'],
|
|
53
|
+
'content': json['content'],
|
|
54
|
+
'chunkType': ChunkTypeFromJSON(json['chunk_type']),
|
|
55
|
+
'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
56
|
+
'parentId': json['parent_id'],
|
|
57
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
58
|
+
'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
|
|
59
|
+
'tenantId': json['tenant_id'],
|
|
60
|
+
'createdAt': (new Date(json['created_at'])),
|
|
61
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function ChunkResponseToJSON(json) {
|
|
65
|
+
return ChunkResponseToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
export function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'id': value['id'],
|
|
73
|
+
'path_part_id': value['pathPartId'],
|
|
74
|
+
'content_id': value['contentId'],
|
|
75
|
+
'content': value['content'],
|
|
76
|
+
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
77
|
+
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
78
|
+
'parent_id': value['parentId'],
|
|
79
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
80
|
+
'next_sibling_id': value['nextSiblingId'],
|
|
81
|
+
'tenant_id': value['tenantId'],
|
|
82
|
+
'created_at': value['createdAt'].toISOString(),
|
|
83
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export const 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;
|
|
@@ -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
|
+
/**
|
|
15
|
+
* Type of chunk content.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ChunkType = {
|
|
19
|
+
Text: 'TEXT',
|
|
20
|
+
Table: 'TABLE',
|
|
21
|
+
Image: 'IMAGE',
|
|
22
|
+
Unknown: 'UNKNOWN'
|
|
23
|
+
};
|
|
24
|
+
export function instanceOfChunkType(value) {
|
|
25
|
+
for (const key in ChunkType) {
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(ChunkType, key)) {
|
|
27
|
+
if (ChunkType[key] === value) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
export function ChunkTypeFromJSON(json) {
|
|
35
|
+
return ChunkTypeFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function ChunkTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
export function ChunkTypeToJSON(value) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
export function ChunkTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 { ChunkMetadataInput } from './ChunkMetadataInput';
|
|
13
|
+
import type { ChunkType } from './ChunkType';
|
|
14
|
+
/**
|
|
15
|
+
* Request to create a new chunk.
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CreateChunkRequest
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateChunkRequest {
|
|
20
|
+
/**
|
|
21
|
+
* Parent PathPart ID (must be DOCUMENT_VERSION or SECTION)
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof CreateChunkRequest
|
|
24
|
+
*/
|
|
25
|
+
parentPathId: string;
|
|
26
|
+
/**
|
|
27
|
+
* Chunk text content
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof CreateChunkRequest
|
|
30
|
+
*/
|
|
31
|
+
content: string;
|
|
32
|
+
/**
|
|
33
|
+
* Type of chunk content (TEXT, TABLE, IMAGE, UNKNOWN)
|
|
34
|
+
* @type {ChunkType}
|
|
35
|
+
* @memberof CreateChunkRequest
|
|
36
|
+
*/
|
|
37
|
+
chunkType: ChunkType;
|
|
38
|
+
/**
|
|
39
|
+
* Chunk metadata as JSON (title, description, etc.)
|
|
40
|
+
* @type {ChunkMetadataInput}
|
|
41
|
+
* @memberof CreateChunkRequest
|
|
42
|
+
*/
|
|
43
|
+
chunkMetadata: ChunkMetadataInput;
|
|
44
|
+
/**
|
|
45
|
+
* PathPart ID to insert after (null = append to tail)
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof CreateChunkRequest
|
|
48
|
+
*/
|
|
49
|
+
prevSiblingPathId?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the CreateChunkRequest interface.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instanceOfCreateChunkRequest(value: object): value is CreateChunkRequest;
|
|
55
|
+
export declare function CreateChunkRequestFromJSON(json: any): CreateChunkRequest;
|
|
56
|
+
export declare function CreateChunkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateChunkRequest;
|
|
57
|
+
export declare function CreateChunkRequestToJSON(json: any): CreateChunkRequest;
|
|
58
|
+
export declare function CreateChunkRequestToJSONTyped(value?: CreateChunkRequest | null, ignoreDiscriminator?: boolean): any;
|
|
59
|
+
export declare const CreateChunkRequestPropertyValidationAttributesMap: {
|
|
60
|
+
[property: string]: {
|
|
61
|
+
maxLength?: number;
|
|
62
|
+
minLength?: number;
|
|
63
|
+
pattern?: string;
|
|
64
|
+
maximum?: number;
|
|
65
|
+
exclusiveMaximum?: boolean;
|
|
66
|
+
minimum?: number;
|
|
67
|
+
exclusiveMinimum?: boolean;
|
|
68
|
+
multipleOf?: number;
|
|
69
|
+
maxItems?: number;
|
|
70
|
+
minItems?: number;
|
|
71
|
+
uniqueItems?: boolean;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the CreateChunkRequest interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfCreateChunkRequest(value) {
|
|
20
|
+
if (!('parentPathId' in value) || value['parentPathId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('chunkType' in value) || value['chunkType'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function CreateChunkRequestFromJSON(json) {
|
|
31
|
+
return CreateChunkRequestFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function CreateChunkRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'parentPathId': json['parent_path_id'],
|
|
39
|
+
'content': json['content'],
|
|
40
|
+
'chunkType': ChunkTypeFromJSON(json['chunk_type']),
|
|
41
|
+
'chunkMetadata': ChunkMetadataInputFromJSON(json['chunk_metadata']),
|
|
42
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function CreateChunkRequestToJSON(json) {
|
|
46
|
+
return CreateChunkRequestToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function CreateChunkRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'parent_path_id': value['parentPathId'],
|
|
54
|
+
'content': value['content'],
|
|
55
|
+
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
56
|
+
'chunk_metadata': ChunkMetadataInputToJSON(value['chunkMetadata']),
|
|
57
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export const CreateChunkRequestPropertyValidationAttributesMap = {
|
|
61
|
+
content: {
|
|
62
|
+
minLength: 1,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -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 create a new section.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateSectionRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateSectionRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Section name (can contain any characters)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateSectionRequest
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Parent PathPart ID (must be DOCUMENT_VERSION or SECTION)
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateSectionRequest
|
|
28
|
+
*/
|
|
29
|
+
parentPathId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Page number in source document (must be > 0)
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof CreateSectionRequest
|
|
34
|
+
*/
|
|
35
|
+
pageNumber?: number;
|
|
36
|
+
/**
|
|
37
|
+
* PathPart ID to insert after (null = append to tail)
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateSectionRequest
|
|
40
|
+
*/
|
|
41
|
+
prevSiblingPathId?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the CreateSectionRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfCreateSectionRequest(value: object): value is CreateSectionRequest;
|
|
47
|
+
export declare function CreateSectionRequestFromJSON(json: any): CreateSectionRequest;
|
|
48
|
+
export declare function CreateSectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSectionRequest;
|
|
49
|
+
export declare function CreateSectionRequestToJSON(json: any): CreateSectionRequest;
|
|
50
|
+
export declare function CreateSectionRequestToJSONTyped(value?: CreateSectionRequest | null, ignoreDiscriminator?: boolean): any;
|
|
51
|
+
export declare const CreateSectionRequestPropertyValidationAttributesMap: {
|
|
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
|
+
};
|