@knowledge-stack/ksapi 1.7.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 +10 -0
- package/README.md +2 -2
- package/dist/apis/ChunksApi.d.ts +175 -0
- package/dist/apis/ChunksApi.js +203 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChunksApi.d.ts +175 -0
- package/dist/esm/apis/ChunksApi.js +199 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -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/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/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/index.d.ts +9 -0
- package/dist/esm/models/index.js +9 -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/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/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/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +381 -0
- package/src/apis/index.ts +1 -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/PasswordResetWithTokenRequest.ts +5 -14
- package/src/models/Polygon.ts +110 -0
- package/src/models/PolygonReference.ts +100 -0
- package/src/models/UpdateChunkContentRequest.ts +104 -0
- package/src/models/UpdateChunkMetadataRequest.ts +91 -0
- package/src/models/index.ts +9 -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,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;
|
|
@@ -0,0 +1,53 @@
|
|
|
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.ChunkType = void 0;
|
|
17
|
+
exports.instanceOfChunkType = instanceOfChunkType;
|
|
18
|
+
exports.ChunkTypeFromJSON = ChunkTypeFromJSON;
|
|
19
|
+
exports.ChunkTypeFromJSONTyped = ChunkTypeFromJSONTyped;
|
|
20
|
+
exports.ChunkTypeToJSON = ChunkTypeToJSON;
|
|
21
|
+
exports.ChunkTypeToJSONTyped = ChunkTypeToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Type of chunk content.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ChunkType = {
|
|
27
|
+
Text: 'TEXT',
|
|
28
|
+
Table: 'TABLE',
|
|
29
|
+
Image: 'IMAGE',
|
|
30
|
+
Unknown: 'UNKNOWN'
|
|
31
|
+
};
|
|
32
|
+
function instanceOfChunkType(value) {
|
|
33
|
+
for (const key in exports.ChunkType) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(exports.ChunkType, key)) {
|
|
35
|
+
if (exports.ChunkType[key] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
function ChunkTypeFromJSON(json) {
|
|
43
|
+
return ChunkTypeFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function ChunkTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
function ChunkTypeToJSON(value) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
function ChunkTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
@@ -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,72 @@
|
|
|
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.CreateChunkRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfCreateChunkRequest = instanceOfCreateChunkRequest;
|
|
18
|
+
exports.CreateChunkRequestFromJSON = CreateChunkRequestFromJSON;
|
|
19
|
+
exports.CreateChunkRequestFromJSONTyped = CreateChunkRequestFromJSONTyped;
|
|
20
|
+
exports.CreateChunkRequestToJSON = CreateChunkRequestToJSON;
|
|
21
|
+
exports.CreateChunkRequestToJSONTyped = CreateChunkRequestToJSONTyped;
|
|
22
|
+
const ChunkMetadataInput_1 = require("./ChunkMetadataInput");
|
|
23
|
+
const ChunkType_1 = require("./ChunkType");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the CreateChunkRequest interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfCreateChunkRequest(value) {
|
|
28
|
+
if (!('parentPathId' in value) || value['parentPathId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('chunkType' in value) || value['chunkType'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function CreateChunkRequestFromJSON(json) {
|
|
39
|
+
return CreateChunkRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function CreateChunkRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'parentPathId': json['parent_path_id'],
|
|
47
|
+
'content': json['content'],
|
|
48
|
+
'chunkType': (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
|
|
49
|
+
'chunkMetadata': (0, ChunkMetadataInput_1.ChunkMetadataInputFromJSON)(json['chunk_metadata']),
|
|
50
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function CreateChunkRequestToJSON(json) {
|
|
54
|
+
return CreateChunkRequestToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function CreateChunkRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'parent_path_id': value['parentPathId'],
|
|
62
|
+
'content': value['content'],
|
|
63
|
+
'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
|
|
64
|
+
'chunk_metadata': (0, ChunkMetadataInput_1.ChunkMetadataInputToJSON)(value['chunkMetadata']),
|
|
65
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.CreateChunkRequestPropertyValidationAttributesMap = {
|
|
69
|
+
content: {
|
|
70
|
+
minLength: 1,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -16,23 +16,17 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface PasswordResetWithTokenRequest {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Email verification token
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof PasswordResetWithTokenRequest
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
emailToken: string;
|
|
24
24
|
/**
|
|
25
25
|
* New password
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof PasswordResetWithTokenRequest
|
|
28
28
|
*/
|
|
29
29
|
newPassword: string;
|
|
30
|
-
/**
|
|
31
|
-
* Email verification token
|
|
32
|
-
* @type {string}
|
|
33
|
-
* @memberof PasswordResetWithTokenRequest
|
|
34
|
-
*/
|
|
35
|
-
emailToken: string;
|
|
36
30
|
}
|
|
37
31
|
/**
|
|
38
32
|
* Check if a given object implements the PasswordResetWithTokenRequest interface.
|