@knowledge-stack/ksapi 1.47.0 → 1.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +8 -0
- package/README.md +6 -2
- package/dist/esm/models/ChunkBulkResponse.d.ts +8 -6
- package/dist/esm/models/ChunkBulkResponse.js +6 -4
- package/dist/esm/models/ChunkDocumentResponse.d.ts +67 -0
- package/dist/esm/models/ChunkDocumentResponse.js +58 -0
- package/dist/esm/models/ChunkDocumentVersionResponse.d.ts +59 -0
- package/dist/esm/models/ChunkDocumentVersionResponse.js +52 -0
- package/dist/esm/models/ChunkResponse.d.ts +8 -6
- package/dist/esm/models/ChunkResponse.js +6 -4
- package/dist/esm/models/EnrichedCitation.d.ts +101 -0
- package/dist/esm/models/EnrichedCitation.js +73 -0
- package/dist/esm/models/EnrichedThreadMessageContent.d.ts +54 -0
- package/dist/esm/models/EnrichedThreadMessageContent.js +47 -0
- package/dist/esm/models/ScoredChunkResponse.d.ts +8 -6
- package/dist/esm/models/ScoredChunkResponse.js +6 -4
- package/dist/esm/models/ThreadMessageResponse.d.ts +3 -3
- package/dist/esm/models/ThreadMessageResponse.js +3 -3
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ChunkBulkResponse.d.ts +8 -6
- package/dist/models/ChunkBulkResponse.js +6 -4
- package/dist/models/ChunkDocumentResponse.d.ts +67 -0
- package/dist/models/ChunkDocumentResponse.js +66 -0
- package/dist/models/ChunkDocumentVersionResponse.d.ts +59 -0
- package/dist/models/ChunkDocumentVersionResponse.js +60 -0
- package/dist/models/ChunkResponse.d.ts +8 -6
- package/dist/models/ChunkResponse.js +6 -4
- package/dist/models/EnrichedCitation.d.ts +101 -0
- package/dist/models/EnrichedCitation.js +81 -0
- package/dist/models/EnrichedThreadMessageContent.d.ts +54 -0
- package/dist/models/EnrichedThreadMessageContent.js +55 -0
- package/dist/models/ScoredChunkResponse.d.ts +8 -6
- package/dist/models/ScoredChunkResponse.js +6 -4
- package/dist/models/ThreadMessageResponse.d.ts +3 -3
- package/dist/models/ThreadMessageResponse.js +3 -3
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ChunkBulkResponse.md +4 -4
- package/docs/ChunkDocumentResponse.md +41 -0
- package/docs/ChunkDocumentVersionResponse.md +39 -0
- package/docs/ChunkResponse.md +4 -4
- package/docs/EnrichedCitation.md +53 -0
- package/docs/EnrichedThreadMessageContent.md +37 -0
- package/docs/ScoredChunkResponse.md +4 -4
- package/docs/ThreadMessageResponse.md +1 -1
- package/package.json +1 -1
- package/src/models/ChunkBulkResponse.ts +24 -10
- package/src/models/ChunkDocumentResponse.ts +127 -0
- package/src/models/ChunkDocumentVersionResponse.ts +101 -0
- package/src/models/ChunkResponse.ts +24 -10
- package/src/models/EnrichedCitation.ts +162 -0
- package/src/models/EnrichedThreadMessageContent.ts +99 -0
- package/src/models/ScoredChunkResponse.ts +24 -10
- package/src/models/ThreadMessageResponse.ts +11 -11
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -10,6 +10,8 @@ docs/AuthApi.md
|
|
|
10
10
|
docs/BulkTagRequest.md
|
|
11
11
|
docs/ChunkBulkResponse.md
|
|
12
12
|
docs/ChunkContentItem.md
|
|
13
|
+
docs/ChunkDocumentResponse.md
|
|
14
|
+
docs/ChunkDocumentVersionResponse.md
|
|
13
15
|
docs/ChunkLineageResponse.md
|
|
14
16
|
docs/ChunkLineagesApi.md
|
|
15
17
|
docs/ChunkMetadataInput.md
|
|
@@ -44,6 +46,8 @@ docs/DocumentVersionsApi.md
|
|
|
44
46
|
docs/DocumentsApi.md
|
|
45
47
|
docs/EmailSentResponse.md
|
|
46
48
|
docs/EmailVerificationRequest.md
|
|
49
|
+
docs/EnrichedCitation.md
|
|
50
|
+
docs/EnrichedThreadMessageContent.md
|
|
47
51
|
docs/FolderAction.md
|
|
48
52
|
docs/FolderActionResponse.md
|
|
49
53
|
docs/FolderResponse.md
|
|
@@ -171,6 +175,8 @@ src/models/Args.ts
|
|
|
171
175
|
src/models/BulkTagRequest.ts
|
|
172
176
|
src/models/ChunkBulkResponse.ts
|
|
173
177
|
src/models/ChunkContentItem.ts
|
|
178
|
+
src/models/ChunkDocumentResponse.ts
|
|
179
|
+
src/models/ChunkDocumentVersionResponse.ts
|
|
174
180
|
src/models/ChunkLineageResponse.ts
|
|
175
181
|
src/models/ChunkMetadataInput.ts
|
|
176
182
|
src/models/ChunkMetadataOutput.ts
|
|
@@ -200,6 +206,8 @@ src/models/DocumentVersionMetadataUpdate.ts
|
|
|
200
206
|
src/models/DocumentVersionResponse.ts
|
|
201
207
|
src/models/EmailSentResponse.ts
|
|
202
208
|
src/models/EmailVerificationRequest.ts
|
|
209
|
+
src/models/EnrichedCitation.ts
|
|
210
|
+
src/models/EnrichedThreadMessageContent.ts
|
|
203
211
|
src/models/FolderAction.ts
|
|
204
212
|
src/models/FolderActionResponse.ts
|
|
205
213
|
src/models/FolderResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.48.1
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -156,6 +156,8 @@ All URIs are relative to *http://localhost:8000*
|
|
|
156
156
|
- [BulkTagRequest](docs/BulkTagRequest.md)
|
|
157
157
|
- [ChunkBulkResponse](docs/ChunkBulkResponse.md)
|
|
158
158
|
- [ChunkContentItem](docs/ChunkContentItem.md)
|
|
159
|
+
- [ChunkDocumentResponse](docs/ChunkDocumentResponse.md)
|
|
160
|
+
- [ChunkDocumentVersionResponse](docs/ChunkDocumentVersionResponse.md)
|
|
159
161
|
- [ChunkLineageResponse](docs/ChunkLineageResponse.md)
|
|
160
162
|
- [ChunkMetadataInput](docs/ChunkMetadataInput.md)
|
|
161
163
|
- [ChunkMetadataOutput](docs/ChunkMetadataOutput.md)
|
|
@@ -185,6 +187,8 @@ All URIs are relative to *http://localhost:8000*
|
|
|
185
187
|
- [DocumentVersionResponse](docs/DocumentVersionResponse.md)
|
|
186
188
|
- [EmailSentResponse](docs/EmailSentResponse.md)
|
|
187
189
|
- [EmailVerificationRequest](docs/EmailVerificationRequest.md)
|
|
190
|
+
- [EnrichedCitation](docs/EnrichedCitation.md)
|
|
191
|
+
- [EnrichedThreadMessageContent](docs/EnrichedThreadMessageContent.md)
|
|
188
192
|
- [FolderAction](docs/FolderAction.md)
|
|
189
193
|
- [FolderActionResponse](docs/FolderActionResponse.md)
|
|
190
194
|
- [FolderResponse](docs/FolderResponse.md)
|
|
@@ -287,7 +291,7 @@ and is automatically generated by the
|
|
|
287
291
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
288
292
|
|
|
289
293
|
- API version: `0.1.0`
|
|
290
|
-
- Package version: `1.
|
|
294
|
+
- Package version: `1.48.1`
|
|
291
295
|
- Generator version: `7.20.0`
|
|
292
296
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
293
297
|
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
|
|
12
13
|
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
13
14
|
import type { ChunkType } from './ChunkType';
|
|
15
|
+
import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
|
|
14
16
|
/**
|
|
15
17
|
* Chunk response with ancestor path part IDs for Qdrant payload construction.
|
|
16
18
|
* @export
|
|
@@ -108,17 +110,17 @@ export interface ChunkBulkResponse {
|
|
|
108
110
|
*/
|
|
109
111
|
assetS3Urls?: Array<string>;
|
|
110
112
|
/**
|
|
111
|
-
*
|
|
112
|
-
* @type {
|
|
113
|
+
*
|
|
114
|
+
* @type {ChunkDocumentResponse}
|
|
113
115
|
* @memberof ChunkBulkResponse
|
|
114
116
|
*/
|
|
115
|
-
|
|
117
|
+
document?: ChunkDocumentResponse;
|
|
116
118
|
/**
|
|
117
|
-
*
|
|
118
|
-
* @type {
|
|
119
|
+
*
|
|
120
|
+
* @type {ChunkDocumentVersionResponse}
|
|
119
121
|
* @memberof ChunkBulkResponse
|
|
120
122
|
*/
|
|
121
|
-
|
|
123
|
+
documentVersion?: ChunkDocumentVersionResponse;
|
|
122
124
|
/**
|
|
123
125
|
* Ordered ancestor PathPart IDs from root to chunk
|
|
124
126
|
* @type {Array<string>}
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ChunkDocumentResponseFromJSON, ChunkDocumentResponseToJSON, } from './ChunkDocumentResponse';
|
|
14
15
|
import { ChunkMetadataOutputFromJSON, ChunkMetadataOutputToJSON, } from './ChunkMetadataOutput';
|
|
15
16
|
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
17
|
+
import { ChunkDocumentVersionResponseFromJSON, ChunkDocumentVersionResponseToJSON, } from './ChunkDocumentVersionResponse';
|
|
16
18
|
/**
|
|
17
19
|
* Check if a given object implements the ChunkBulkResponse interface.
|
|
18
20
|
*/
|
|
@@ -68,8 +70,8 @@ export function ChunkBulkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
68
70
|
'createdAt': (new Date(json['created_at'])),
|
|
69
71
|
'updatedAt': (new Date(json['updated_at'])),
|
|
70
72
|
'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
+
'document': json['document'] == null ? undefined : ChunkDocumentResponseFromJSON(json['document']),
|
|
74
|
+
'documentVersion': json['document_version'] == null ? undefined : ChunkDocumentVersionResponseFromJSON(json['document_version']),
|
|
73
75
|
'pathPartIdSegments': json['path_part_id_segments'],
|
|
74
76
|
};
|
|
75
77
|
}
|
|
@@ -96,8 +98,8 @@ export function ChunkBulkResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
96
98
|
'created_at': value['createdAt'].toISOString(),
|
|
97
99
|
'updated_at': value['updatedAt'].toISOString(),
|
|
98
100
|
'asset_s3_urls': value['assetS3Urls'],
|
|
99
|
-
'
|
|
100
|
-
'
|
|
101
|
+
'document': ChunkDocumentResponseToJSON(value['document']),
|
|
102
|
+
'document_version': ChunkDocumentVersionResponseToJSON(value['documentVersion']),
|
|
101
103
|
'path_part_id_segments': value['pathPartIdSegments'],
|
|
102
104
|
};
|
|
103
105
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { DocumentOrigin } from './DocumentOrigin';
|
|
13
|
+
import type { DocumentType } from './DocumentType';
|
|
14
|
+
/**
|
|
15
|
+
* Lightweight document info attached to a chunk response.
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ChunkDocumentResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface ChunkDocumentResponse {
|
|
20
|
+
/**
|
|
21
|
+
* Document ID
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof ChunkDocumentResponse
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* Document name
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof ChunkDocumentResponse
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {DocumentType}
|
|
35
|
+
* @memberof ChunkDocumentResponse
|
|
36
|
+
*/
|
|
37
|
+
documentType: DocumentType;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {DocumentOrigin}
|
|
41
|
+
* @memberof ChunkDocumentResponse
|
|
42
|
+
*/
|
|
43
|
+
documentOrigin: DocumentOrigin;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the ChunkDocumentResponse interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfChunkDocumentResponse(value: object): value is ChunkDocumentResponse;
|
|
49
|
+
export declare function ChunkDocumentResponseFromJSON(json: any): ChunkDocumentResponse;
|
|
50
|
+
export declare function ChunkDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkDocumentResponse;
|
|
51
|
+
export declare function ChunkDocumentResponseToJSON(json: any): ChunkDocumentResponse;
|
|
52
|
+
export declare function ChunkDocumentResponseToJSONTyped(value?: ChunkDocumentResponse | null, ignoreDiscriminator?: boolean): any;
|
|
53
|
+
export declare const ChunkDocumentResponsePropertyValidationAttributesMap: {
|
|
54
|
+
[property: string]: {
|
|
55
|
+
maxLength?: number;
|
|
56
|
+
minLength?: number;
|
|
57
|
+
pattern?: string;
|
|
58
|
+
maximum?: number;
|
|
59
|
+
exclusiveMaximum?: boolean;
|
|
60
|
+
minimum?: number;
|
|
61
|
+
exclusiveMinimum?: boolean;
|
|
62
|
+
multipleOf?: number;
|
|
63
|
+
maxItems?: number;
|
|
64
|
+
minItems?: number;
|
|
65
|
+
uniqueItems?: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { DocumentOriginFromJSON, DocumentOriginToJSON, } from './DocumentOrigin';
|
|
15
|
+
import { DocumentTypeFromJSON, DocumentTypeToJSON, } from './DocumentType';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the ChunkDocumentResponse interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfChunkDocumentResponse(value) {
|
|
20
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('documentType' in value) || value['documentType'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('documentOrigin' in value) || value['documentOrigin'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function ChunkDocumentResponseFromJSON(json) {
|
|
31
|
+
return ChunkDocumentResponseFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function ChunkDocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'id': json['id'],
|
|
39
|
+
'name': json['name'],
|
|
40
|
+
'documentType': DocumentTypeFromJSON(json['document_type']),
|
|
41
|
+
'documentOrigin': DocumentOriginFromJSON(json['document_origin']),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function ChunkDocumentResponseToJSON(json) {
|
|
45
|
+
return ChunkDocumentResponseToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function ChunkDocumentResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'id': value['id'],
|
|
53
|
+
'name': value['name'],
|
|
54
|
+
'document_type': DocumentTypeToJSON(value['documentType']),
|
|
55
|
+
'document_origin': DocumentOriginToJSON(value['documentOrigin']),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export const ChunkDocumentResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* Lightweight document version info attached to a chunk response.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChunkDocumentVersionResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface ChunkDocumentVersionResponse {
|
|
18
|
+
/**
|
|
19
|
+
* DocumentVersion ID
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChunkDocumentVersionResponse
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Version number
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ChunkDocumentVersionResponse
|
|
28
|
+
*/
|
|
29
|
+
version: number;
|
|
30
|
+
/**
|
|
31
|
+
* Version path name (e.g. v0)
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ChunkDocumentVersionResponse
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the ChunkDocumentVersionResponse interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfChunkDocumentVersionResponse(value: object): value is ChunkDocumentVersionResponse;
|
|
41
|
+
export declare function ChunkDocumentVersionResponseFromJSON(json: any): ChunkDocumentVersionResponse;
|
|
42
|
+
export declare function ChunkDocumentVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkDocumentVersionResponse;
|
|
43
|
+
export declare function ChunkDocumentVersionResponseToJSON(json: any): ChunkDocumentVersionResponse;
|
|
44
|
+
export declare function ChunkDocumentVersionResponseToJSONTyped(value?: ChunkDocumentVersionResponse | null, ignoreDiscriminator?: boolean): any;
|
|
45
|
+
export declare const ChunkDocumentVersionResponsePropertyValidationAttributesMap: {
|
|
46
|
+
[property: string]: {
|
|
47
|
+
maxLength?: number;
|
|
48
|
+
minLength?: number;
|
|
49
|
+
pattern?: string;
|
|
50
|
+
maximum?: number;
|
|
51
|
+
exclusiveMaximum?: boolean;
|
|
52
|
+
minimum?: number;
|
|
53
|
+
exclusiveMinimum?: boolean;
|
|
54
|
+
multipleOf?: number;
|
|
55
|
+
maxItems?: number;
|
|
56
|
+
minItems?: number;
|
|
57
|
+
uniqueItems?: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
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 ChunkDocumentVersionResponse interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfChunkDocumentVersionResponse(value) {
|
|
18
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function ChunkDocumentVersionResponseFromJSON(json) {
|
|
27
|
+
return ChunkDocumentVersionResponseFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function ChunkDocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'id': json['id'],
|
|
35
|
+
'version': json['version'],
|
|
36
|
+
'name': json['name'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function ChunkDocumentVersionResponseToJSON(json) {
|
|
40
|
+
return ChunkDocumentVersionResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function ChunkDocumentVersionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'id': value['id'],
|
|
48
|
+
'version': value['version'],
|
|
49
|
+
'name': value['name'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export const ChunkDocumentVersionResponsePropertyValidationAttributesMap = {};
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
|
|
12
13
|
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
13
14
|
import type { ChunkType } from './ChunkType';
|
|
15
|
+
import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
|
|
14
16
|
/**
|
|
15
17
|
* Chunk response model.
|
|
16
18
|
* @export
|
|
@@ -108,17 +110,17 @@ export interface ChunkResponse {
|
|
|
108
110
|
*/
|
|
109
111
|
assetS3Urls?: Array<string>;
|
|
110
112
|
/**
|
|
111
|
-
*
|
|
112
|
-
* @type {
|
|
113
|
+
*
|
|
114
|
+
* @type {ChunkDocumentResponse}
|
|
113
115
|
* @memberof ChunkResponse
|
|
114
116
|
*/
|
|
115
|
-
|
|
117
|
+
document?: ChunkDocumentResponse;
|
|
116
118
|
/**
|
|
117
|
-
*
|
|
118
|
-
* @type {
|
|
119
|
+
*
|
|
120
|
+
* @type {ChunkDocumentVersionResponse}
|
|
119
121
|
* @memberof ChunkResponse
|
|
120
122
|
*/
|
|
121
|
-
|
|
123
|
+
documentVersion?: ChunkDocumentVersionResponse;
|
|
122
124
|
}
|
|
123
125
|
/**
|
|
124
126
|
* Check if a given object implements the ChunkResponse interface.
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ChunkDocumentResponseFromJSON, ChunkDocumentResponseToJSON, } from './ChunkDocumentResponse';
|
|
14
15
|
import { ChunkMetadataOutputFromJSON, ChunkMetadataOutputToJSON, } from './ChunkMetadataOutput';
|
|
15
16
|
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
17
|
+
import { ChunkDocumentVersionResponseFromJSON, ChunkDocumentVersionResponseToJSON, } from './ChunkDocumentVersionResponse';
|
|
16
18
|
/**
|
|
17
19
|
* Check if a given object implements the ChunkResponse interface.
|
|
18
20
|
*/
|
|
@@ -66,8 +68,8 @@ export function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
66
68
|
'createdAt': (new Date(json['created_at'])),
|
|
67
69
|
'updatedAt': (new Date(json['updated_at'])),
|
|
68
70
|
'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
+
'document': json['document'] == null ? undefined : ChunkDocumentResponseFromJSON(json['document']),
|
|
72
|
+
'documentVersion': json['document_version'] == null ? undefined : ChunkDocumentVersionResponseFromJSON(json['document_version']),
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
export function ChunkResponseToJSON(json) {
|
|
@@ -93,8 +95,8 @@ export function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
93
95
|
'created_at': value['createdAt'].toISOString(),
|
|
94
96
|
'updated_at': value['updatedAt'].toISOString(),
|
|
95
97
|
'asset_s3_urls': value['assetS3Urls'],
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
+
'document': ChunkDocumentResponseToJSON(value['document']),
|
|
99
|
+
'document_version': ChunkDocumentVersionResponseToJSON(value['documentVersion']),
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
102
|
export const ChunkResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
* Citation with optional document context, populated at read time.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EnrichedCitation
|
|
16
|
+
*/
|
|
17
|
+
export interface EnrichedCitation {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EnrichedCitation
|
|
22
|
+
*/
|
|
23
|
+
chunkId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The quote from the chunk
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EnrichedCitation
|
|
28
|
+
*/
|
|
29
|
+
quote: string;
|
|
30
|
+
/**
|
|
31
|
+
* The 0-based start character of the quote in the chunk
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof EnrichedCitation
|
|
34
|
+
*/
|
|
35
|
+
startChar: number;
|
|
36
|
+
/**
|
|
37
|
+
* The length of the quote
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof EnrichedCitation
|
|
40
|
+
*/
|
|
41
|
+
length: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof EnrichedCitation
|
|
46
|
+
*/
|
|
47
|
+
documentId?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof EnrichedCitation
|
|
52
|
+
*/
|
|
53
|
+
documentVersionId?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof EnrichedCitation
|
|
58
|
+
*/
|
|
59
|
+
documentName?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof EnrichedCitation
|
|
64
|
+
*/
|
|
65
|
+
versionNumber?: number | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof EnrichedCitation
|
|
70
|
+
*/
|
|
71
|
+
pathPartId?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof EnrichedCitation
|
|
76
|
+
*/
|
|
77
|
+
materializedPath?: string | null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the EnrichedCitation interface.
|
|
81
|
+
*/
|
|
82
|
+
export declare function instanceOfEnrichedCitation(value: object): value is EnrichedCitation;
|
|
83
|
+
export declare function EnrichedCitationFromJSON(json: any): EnrichedCitation;
|
|
84
|
+
export declare function EnrichedCitationFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrichedCitation;
|
|
85
|
+
export declare function EnrichedCitationToJSON(json: any): EnrichedCitation;
|
|
86
|
+
export declare function EnrichedCitationToJSONTyped(value?: EnrichedCitation | null, ignoreDiscriminator?: boolean): any;
|
|
87
|
+
export declare const EnrichedCitationPropertyValidationAttributesMap: {
|
|
88
|
+
[property: string]: {
|
|
89
|
+
maxLength?: number;
|
|
90
|
+
minLength?: number;
|
|
91
|
+
pattern?: string;
|
|
92
|
+
maximum?: number;
|
|
93
|
+
exclusiveMaximum?: boolean;
|
|
94
|
+
minimum?: number;
|
|
95
|
+
exclusiveMinimum?: boolean;
|
|
96
|
+
multipleOf?: number;
|
|
97
|
+
maxItems?: number;
|
|
98
|
+
minItems?: number;
|
|
99
|
+
uniqueItems?: boolean;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
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 EnrichedCitation interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfEnrichedCitation(value) {
|
|
18
|
+
if (!('chunkId' in value) || value['chunkId'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('quote' in value) || value['quote'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('startChar' in value) || value['startChar'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('length' in value) || value['length'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function EnrichedCitationFromJSON(json) {
|
|
29
|
+
return EnrichedCitationFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function EnrichedCitationFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'chunkId': json['chunk_id'],
|
|
37
|
+
'quote': json['quote'],
|
|
38
|
+
'startChar': json['start_char'],
|
|
39
|
+
'length': json['length'],
|
|
40
|
+
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
41
|
+
'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
|
|
42
|
+
'documentName': json['document_name'] == null ? undefined : json['document_name'],
|
|
43
|
+
'versionNumber': json['version_number'] == null ? undefined : json['version_number'],
|
|
44
|
+
'pathPartId': json['path_part_id'] == null ? undefined : json['path_part_id'],
|
|
45
|
+
'materializedPath': json['materialized_path'] == null ? undefined : json['materialized_path'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function EnrichedCitationToJSON(json) {
|
|
49
|
+
return EnrichedCitationToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
export function EnrichedCitationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'chunk_id': value['chunkId'],
|
|
57
|
+
'quote': value['quote'],
|
|
58
|
+
'start_char': value['startChar'],
|
|
59
|
+
'length': value['length'],
|
|
60
|
+
'document_id': value['documentId'],
|
|
61
|
+
'document_version_id': value['documentVersionId'],
|
|
62
|
+
'document_name': value['documentName'],
|
|
63
|
+
'version_number': value['versionNumber'],
|
|
64
|
+
'path_part_id': value['pathPartId'],
|
|
65
|
+
'materialized_path': value['materializedPath'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export const EnrichedCitationPropertyValidationAttributesMap = {
|
|
69
|
+
startChar: {
|
|
70
|
+
minimum: 0,
|
|
71
|
+
exclusiveMinimum: false,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { EnrichedCitation } from './EnrichedCitation';
|
|
13
|
+
/**
|
|
14
|
+
* ThreadMessageContent with enriched citations for API responses.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface EnrichedThreadMessageContent
|
|
17
|
+
*/
|
|
18
|
+
export interface EnrichedThreadMessageContent {
|
|
19
|
+
/**
|
|
20
|
+
* The text content of the message
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof EnrichedThreadMessageContent
|
|
23
|
+
*/
|
|
24
|
+
text: string;
|
|
25
|
+
/**
|
|
26
|
+
* A list of citations with document context
|
|
27
|
+
* @type {Array<EnrichedCitation>}
|
|
28
|
+
* @memberof EnrichedThreadMessageContent
|
|
29
|
+
*/
|
|
30
|
+
citations?: Array<EnrichedCitation> | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the EnrichedThreadMessageContent interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfEnrichedThreadMessageContent(value: object): value is EnrichedThreadMessageContent;
|
|
36
|
+
export declare function EnrichedThreadMessageContentFromJSON(json: any): EnrichedThreadMessageContent;
|
|
37
|
+
export declare function EnrichedThreadMessageContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrichedThreadMessageContent;
|
|
38
|
+
export declare function EnrichedThreadMessageContentToJSON(json: any): EnrichedThreadMessageContent;
|
|
39
|
+
export declare function EnrichedThreadMessageContentToJSONTyped(value?: EnrichedThreadMessageContent | null, ignoreDiscriminator?: boolean): any;
|
|
40
|
+
export declare const EnrichedThreadMessageContentPropertyValidationAttributesMap: {
|
|
41
|
+
[property: string]: {
|
|
42
|
+
maxLength?: number;
|
|
43
|
+
minLength?: number;
|
|
44
|
+
pattern?: string;
|
|
45
|
+
maximum?: number;
|
|
46
|
+
exclusiveMaximum?: boolean;
|
|
47
|
+
minimum?: number;
|
|
48
|
+
exclusiveMinimum?: boolean;
|
|
49
|
+
multipleOf?: number;
|
|
50
|
+
maxItems?: number;
|
|
51
|
+
minItems?: number;
|
|
52
|
+
uniqueItems?: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|