@knowledge-stack/ksapi 1.8.0 → 1.10.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/DocumentVersionsApi.d.ts +36 -1
- package/dist/apis/DocumentVersionsApi.js +41 -0
- package/dist/apis/FoldersApi.d.ts +38 -1
- package/dist/apis/FoldersApi.js +44 -0
- package/dist/apis/PathPartsApi.d.ts +4 -6
- package/dist/apis/PathPartsApi.js +2 -5
- package/dist/apis/ThreadMessagesApi.d.ts +123 -0
- package/dist/apis/ThreadMessagesApi.js +147 -0
- package/dist/apis/ThreadsApi.d.ts +177 -0
- package/dist/apis/ThreadsApi.js +203 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/DocumentVersionsApi.d.ts +36 -1
- package/dist/esm/apis/DocumentVersionsApi.js +42 -1
- package/dist/esm/apis/FoldersApi.d.ts +38 -1
- package/dist/esm/apis/FoldersApi.js +45 -1
- package/dist/esm/apis/PathPartsApi.d.ts +4 -6
- package/dist/esm/apis/PathPartsApi.js +2 -5
- package/dist/esm/apis/ThreadMessagesApi.d.ts +123 -0
- package/dist/esm/apis/ThreadMessagesApi.js +143 -0
- package/dist/esm/apis/ThreadsApi.d.ts +177 -0
- package/dist/esm/apis/ThreadsApi.js +199 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/CreateThreadMessageRequest.d.ts +58 -0
- package/dist/esm/models/CreateThreadMessageRequest.js +50 -0
- package/dist/esm/models/CreateThreadRequest.d.ts +53 -0
- package/dist/esm/models/CreateThreadRequest.js +49 -0
- package/dist/esm/models/DocumentContentPathPart.d.ts +119 -0
- package/dist/esm/models/DocumentContentPathPart.js +83 -0
- package/dist/esm/models/FolderDocumentResponse.d.ts +138 -0
- package/dist/esm/models/FolderDocumentResponse.js +88 -0
- package/dist/esm/models/MessageRole.d.ts +26 -0
- package/dist/esm/models/MessageRole.js +44 -0
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +70 -0
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +70 -0
- package/dist/esm/models/PaginatedResponseThreadMessageResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseThreadMessageResponse.js +70 -0
- package/dist/esm/models/PaginatedResponseThreadResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseThreadResponse.js +70 -0
- package/dist/esm/models/ThreadMessageResponse.d.ts +100 -0
- package/dist/esm/models/ThreadMessageResponse.js +78 -0
- package/dist/esm/models/ThreadResponse.d.ts +83 -0
- package/dist/esm/models/ThreadResponse.js +66 -0
- package/dist/esm/models/UpdateThreadRequest.d.ts +53 -0
- package/dist/esm/models/UpdateThreadRequest.js +49 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/CreateThreadMessageRequest.d.ts +58 -0
- package/dist/models/CreateThreadMessageRequest.js +58 -0
- package/dist/models/CreateThreadRequest.d.ts +53 -0
- package/dist/models/CreateThreadRequest.js +57 -0
- package/dist/models/DocumentContentPathPart.d.ts +119 -0
- package/dist/models/DocumentContentPathPart.js +91 -0
- package/dist/models/FolderDocumentResponse.d.ts +138 -0
- package/dist/models/FolderDocumentResponse.js +96 -0
- package/dist/models/MessageRole.d.ts +26 -0
- package/dist/models/MessageRole.js +52 -0
- package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
- package/dist/models/PaginatedResponseDocumentContentPathPart.js +78 -0
- package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseFolderDocumentResponse.js +78 -0
- package/dist/models/PaginatedResponseThreadMessageResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseThreadMessageResponse.js +78 -0
- package/dist/models/PaginatedResponseThreadResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseThreadResponse.js +78 -0
- package/dist/models/ThreadMessageResponse.d.ts +100 -0
- package/dist/models/ThreadMessageResponse.js +86 -0
- package/dist/models/ThreadResponse.d.ts +83 -0
- package/dist/models/ThreadResponse.js +74 -0
- package/dist/models/UpdateThreadRequest.d.ts +53 -0
- package/dist/models/UpdateThreadRequest.js +57 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/package.json +1 -1
- package/src/apis/DocumentVersionsApi.ts +82 -0
- package/src/apis/FoldersApi.ts +88 -0
- package/src/apis/PathPartsApi.ts +4 -10
- package/src/apis/ThreadMessagesApi.ts +271 -0
- package/src/apis/ThreadsApi.ts +377 -0
- package/src/apis/index.ts +2 -0
- package/src/models/CreateThreadMessageRequest.ts +105 -0
- package/src/models/CreateThreadRequest.ts +94 -0
- package/src/models/DocumentContentPathPart.ts +205 -0
- package/src/models/FolderDocumentResponse.ts +234 -0
- package/src/models/MessageRole.ts +54 -0
- package/src/models/PaginatedResponseDocumentContentPathPart.ts +130 -0
- package/src/models/PaginatedResponseFolderDocumentResponse.ts +130 -0
- package/src/models/PaginatedResponseThreadMessageResponse.ts +130 -0
- package/src/models/PaginatedResponseThreadResponse.ts +130 -0
- package/src/models/ThreadMessageResponse.ts +168 -0
- package/src/models/ThreadResponse.ts +136 -0
- package/src/models/UpdateThreadRequest.ts +94 -0
- package/src/models/index.ts +12 -0
|
@@ -0,0 +1,205 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PartType } from './PartType';
|
|
17
|
+
import {
|
|
18
|
+
PartTypeFromJSON,
|
|
19
|
+
PartTypeFromJSONTyped,
|
|
20
|
+
PartTypeToJSON,
|
|
21
|
+
PartTypeToJSONTyped,
|
|
22
|
+
} from './PartType';
|
|
23
|
+
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
24
|
+
import {
|
|
25
|
+
ChunkMetadataOutputFromJSON,
|
|
26
|
+
ChunkMetadataOutputFromJSONTyped,
|
|
27
|
+
ChunkMetadataOutputToJSON,
|
|
28
|
+
ChunkMetadataOutputToJSONTyped,
|
|
29
|
+
} from './ChunkMetadataOutput';
|
|
30
|
+
import type { ChunkType } from './ChunkType';
|
|
31
|
+
import {
|
|
32
|
+
ChunkTypeFromJSON,
|
|
33
|
+
ChunkTypeFromJSONTyped,
|
|
34
|
+
ChunkTypeToJSON,
|
|
35
|
+
ChunkTypeToJSONTyped,
|
|
36
|
+
} from './ChunkType';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Response model for a single item in the document version contents list.
|
|
40
|
+
*
|
|
41
|
+
* Represents a section or chunk with enriched data (content, metadata)
|
|
42
|
+
* returned in depth-first logical order.
|
|
43
|
+
* @export
|
|
44
|
+
* @interface DocumentContentPathPart
|
|
45
|
+
*/
|
|
46
|
+
export interface DocumentContentPathPart {
|
|
47
|
+
/**
|
|
48
|
+
* PathPart ID
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof DocumentContentPathPart
|
|
51
|
+
*/
|
|
52
|
+
pathPartId: string;
|
|
53
|
+
/**
|
|
54
|
+
* PathPart name
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof DocumentContentPathPart
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
* SECTION or CHUNK
|
|
61
|
+
* @type {PartType}
|
|
62
|
+
* @memberof DocumentContentPathPart
|
|
63
|
+
*/
|
|
64
|
+
partType: PartType;
|
|
65
|
+
/**
|
|
66
|
+
* Parent PathPart ID
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof DocumentContentPathPart
|
|
69
|
+
*/
|
|
70
|
+
parentId: string;
|
|
71
|
+
/**
|
|
72
|
+
* Section ID or Chunk ID
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof DocumentContentPathPart
|
|
75
|
+
*/
|
|
76
|
+
metadataObjId: string;
|
|
77
|
+
/**
|
|
78
|
+
* Depth relative to document version root
|
|
79
|
+
* @type {number}
|
|
80
|
+
* @memberof DocumentContentPathPart
|
|
81
|
+
*/
|
|
82
|
+
depth: number;
|
|
83
|
+
/**
|
|
84
|
+
* Chunk content (None for sections)
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof DocumentContentPathPart
|
|
87
|
+
*/
|
|
88
|
+
content?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Chunk type (None for sections)
|
|
91
|
+
* @type {ChunkType}
|
|
92
|
+
* @memberof DocumentContentPathPart
|
|
93
|
+
*/
|
|
94
|
+
chunkType?: ChunkType;
|
|
95
|
+
/**
|
|
96
|
+
* Chunk metadata (None for sections)
|
|
97
|
+
* @type {ChunkMetadataOutput}
|
|
98
|
+
* @memberof DocumentContentPathPart
|
|
99
|
+
*/
|
|
100
|
+
chunkMetadata?: ChunkMetadataOutput;
|
|
101
|
+
/**
|
|
102
|
+
* Section page number (None for chunks)
|
|
103
|
+
* @type {number}
|
|
104
|
+
* @memberof DocumentContentPathPart
|
|
105
|
+
*/
|
|
106
|
+
pageNumber?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Creation timestamp
|
|
109
|
+
* @type {Date}
|
|
110
|
+
* @memberof DocumentContentPathPart
|
|
111
|
+
*/
|
|
112
|
+
createdAt: Date;
|
|
113
|
+
/**
|
|
114
|
+
* Last update timestamp
|
|
115
|
+
* @type {Date}
|
|
116
|
+
* @memberof DocumentContentPathPart
|
|
117
|
+
*/
|
|
118
|
+
updatedAt: Date;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Check if a given object implements the DocumentContentPathPart interface.
|
|
125
|
+
*/
|
|
126
|
+
export function instanceOfDocumentContentPathPart(value: object): value is DocumentContentPathPart {
|
|
127
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
128
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
129
|
+
if (!('partType' in value) || value['partType'] === undefined) return false;
|
|
130
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
131
|
+
if (!('metadataObjId' in value) || value['metadataObjId'] === undefined) return false;
|
|
132
|
+
if (!('depth' in value) || value['depth'] === undefined) return false;
|
|
133
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
134
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function DocumentContentPathPartFromJSON(json: any): DocumentContentPathPart {
|
|
139
|
+
return DocumentContentPathPartFromJSONTyped(json, false);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function DocumentContentPathPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentContentPathPart {
|
|
143
|
+
if (json == null) {
|
|
144
|
+
return json;
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
|
|
148
|
+
'pathPartId': json['path_part_id'],
|
|
149
|
+
'name': json['name'],
|
|
150
|
+
'partType': PartTypeFromJSON(json['part_type']),
|
|
151
|
+
'parentId': json['parent_id'],
|
|
152
|
+
'metadataObjId': json['metadata_obj_id'],
|
|
153
|
+
'depth': json['depth'],
|
|
154
|
+
'content': json['content'] == null ? undefined : json['content'],
|
|
155
|
+
'chunkType': json['chunk_type'] == null ? undefined : ChunkTypeFromJSON(json['chunk_type']),
|
|
156
|
+
'chunkMetadata': json['chunk_metadata'] == null ? undefined : ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
157
|
+
'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
|
|
158
|
+
'createdAt': (new Date(json['created_at'])),
|
|
159
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function DocumentContentPathPartToJSON(json: any): DocumentContentPathPart {
|
|
164
|
+
return DocumentContentPathPartToJSONTyped(json, false);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function DocumentContentPathPartToJSONTyped(value?: DocumentContentPathPart | null, ignoreDiscriminator: boolean = false): any {
|
|
168
|
+
if (value == null) {
|
|
169
|
+
return value;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
|
|
174
|
+
'path_part_id': value['pathPartId'],
|
|
175
|
+
'name': value['name'],
|
|
176
|
+
'part_type': PartTypeToJSON(value['partType']),
|
|
177
|
+
'parent_id': value['parentId'],
|
|
178
|
+
'metadata_obj_id': value['metadataObjId'],
|
|
179
|
+
'depth': value['depth'],
|
|
180
|
+
'content': value['content'],
|
|
181
|
+
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
182
|
+
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
183
|
+
'page_number': value['pageNumber'],
|
|
184
|
+
'created_at': value['createdAt'].toISOString(),
|
|
185
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export const DocumentContentPathPartPropertyValidationAttributesMap: {
|
|
190
|
+
[property: string]: {
|
|
191
|
+
maxLength?: number,
|
|
192
|
+
minLength?: number,
|
|
193
|
+
pattern?: string,
|
|
194
|
+
maximum?: number,
|
|
195
|
+
exclusiveMaximum?: boolean,
|
|
196
|
+
minimum?: number,
|
|
197
|
+
exclusiveMinimum?: boolean,
|
|
198
|
+
multipleOf?: number,
|
|
199
|
+
maxItems?: number,
|
|
200
|
+
minItems?: number,
|
|
201
|
+
uniqueItems?: boolean
|
|
202
|
+
}
|
|
203
|
+
} = {
|
|
204
|
+
}
|
|
205
|
+
|
|
@@ -0,0 +1,234 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DocumentOrigin } from './DocumentOrigin';
|
|
17
|
+
import {
|
|
18
|
+
DocumentOriginFromJSON,
|
|
19
|
+
DocumentOriginFromJSONTyped,
|
|
20
|
+
DocumentOriginToJSON,
|
|
21
|
+
DocumentOriginToJSONTyped,
|
|
22
|
+
} from './DocumentOrigin';
|
|
23
|
+
import type { PartType } from './PartType';
|
|
24
|
+
import {
|
|
25
|
+
PartTypeFromJSON,
|
|
26
|
+
PartTypeFromJSONTyped,
|
|
27
|
+
PartTypeToJSON,
|
|
28
|
+
PartTypeToJSONTyped,
|
|
29
|
+
} from './PartType';
|
|
30
|
+
import type { DocumentType } from './DocumentType';
|
|
31
|
+
import {
|
|
32
|
+
DocumentTypeFromJSON,
|
|
33
|
+
DocumentTypeFromJSONTyped,
|
|
34
|
+
DocumentTypeToJSON,
|
|
35
|
+
DocumentTypeToJSONTyped,
|
|
36
|
+
} from './DocumentType';
|
|
37
|
+
import type { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
38
|
+
import {
|
|
39
|
+
DocumentVersionResponseFromJSON,
|
|
40
|
+
DocumentVersionResponseFromJSONTyped,
|
|
41
|
+
DocumentVersionResponseToJSON,
|
|
42
|
+
DocumentVersionResponseToJSONTyped,
|
|
43
|
+
} from './DocumentVersionResponse';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Response for folder contents - can be either a Folder or a Document.
|
|
47
|
+
*
|
|
48
|
+
* Inherits PathPart fields from PathPartResponse and adds type-specific fields.
|
|
49
|
+
*
|
|
50
|
+
* Discriminated union based on part_type:
|
|
51
|
+
* - FOLDER: folder_id is set, document fields are None
|
|
52
|
+
* - DOCUMENT: document_id and document fields are set, folder_id is None
|
|
53
|
+
*
|
|
54
|
+
* Inherited fields from PathPartResponse:
|
|
55
|
+
* - path_part_id, name, part_type, parent_id, metadata_obj_id, created_at, updated_at
|
|
56
|
+
* @export
|
|
57
|
+
* @interface FolderDocumentResponse
|
|
58
|
+
*/
|
|
59
|
+
export interface FolderDocumentResponse {
|
|
60
|
+
/**
|
|
61
|
+
* PathPart ID
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof FolderDocumentResponse
|
|
64
|
+
*/
|
|
65
|
+
pathPartId: string;
|
|
66
|
+
/**
|
|
67
|
+
* Item name
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof FolderDocumentResponse
|
|
70
|
+
*/
|
|
71
|
+
name: string;
|
|
72
|
+
/**
|
|
73
|
+
* Type (FOLDER, DOCUMENT, etc.)
|
|
74
|
+
* @type {PartType}
|
|
75
|
+
* @memberof FolderDocumentResponse
|
|
76
|
+
*/
|
|
77
|
+
partType: PartType;
|
|
78
|
+
/**
|
|
79
|
+
* Parent PathPart ID
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof FolderDocumentResponse
|
|
82
|
+
*/
|
|
83
|
+
parentId: string;
|
|
84
|
+
/**
|
|
85
|
+
* ID of the underlying object
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof FolderDocumentResponse
|
|
88
|
+
*/
|
|
89
|
+
metadataObjId: string;
|
|
90
|
+
/**
|
|
91
|
+
* Creation timestamp
|
|
92
|
+
* @type {Date}
|
|
93
|
+
* @memberof FolderDocumentResponse
|
|
94
|
+
*/
|
|
95
|
+
createdAt: Date;
|
|
96
|
+
/**
|
|
97
|
+
* Last update timestamp
|
|
98
|
+
* @type {Date}
|
|
99
|
+
* @memberof FolderDocumentResponse
|
|
100
|
+
*/
|
|
101
|
+
updatedAt: Date;
|
|
102
|
+
/**
|
|
103
|
+
* Folder ID (present for folders)
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof FolderDocumentResponse
|
|
106
|
+
*/
|
|
107
|
+
folderId?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Document ID (present for documents)
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof FolderDocumentResponse
|
|
112
|
+
*/
|
|
113
|
+
documentId?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Document type (present for documents)
|
|
116
|
+
* @type {DocumentType}
|
|
117
|
+
* @memberof FolderDocumentResponse
|
|
118
|
+
*/
|
|
119
|
+
documentType?: DocumentType;
|
|
120
|
+
/**
|
|
121
|
+
* Document origin (present for documents)
|
|
122
|
+
* @type {DocumentOrigin}
|
|
123
|
+
* @memberof FolderDocumentResponse
|
|
124
|
+
*/
|
|
125
|
+
documentOrigin?: DocumentOrigin;
|
|
126
|
+
/**
|
|
127
|
+
* Active version ID (present for documents)
|
|
128
|
+
* @type {string}
|
|
129
|
+
* @memberof FolderDocumentResponse
|
|
130
|
+
*/
|
|
131
|
+
activeVersionId?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Active version details (present for documents)
|
|
134
|
+
* @type {DocumentVersionResponse}
|
|
135
|
+
* @memberof FolderDocumentResponse
|
|
136
|
+
*/
|
|
137
|
+
activeVersion?: DocumentVersionResponse;
|
|
138
|
+
/**
|
|
139
|
+
* Tenant ID
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof FolderDocumentResponse
|
|
142
|
+
*/
|
|
143
|
+
tenantId: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Check if a given object implements the FolderDocumentResponse interface.
|
|
150
|
+
*/
|
|
151
|
+
export function instanceOfFolderDocumentResponse(value: object): value is FolderDocumentResponse {
|
|
152
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
153
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
154
|
+
if (!('partType' in value) || value['partType'] === undefined) return false;
|
|
155
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
156
|
+
if (!('metadataObjId' in value) || value['metadataObjId'] === undefined) return false;
|
|
157
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
158
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
159
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function FolderDocumentResponseFromJSON(json: any): FolderDocumentResponse {
|
|
164
|
+
return FolderDocumentResponseFromJSONTyped(json, false);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function FolderDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderDocumentResponse {
|
|
168
|
+
if (json == null) {
|
|
169
|
+
return json;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
|
|
173
|
+
'pathPartId': json['path_part_id'],
|
|
174
|
+
'name': json['name'],
|
|
175
|
+
'partType': PartTypeFromJSON(json['part_type']),
|
|
176
|
+
'parentId': json['parent_id'],
|
|
177
|
+
'metadataObjId': json['metadata_obj_id'],
|
|
178
|
+
'createdAt': (new Date(json['created_at'])),
|
|
179
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
180
|
+
'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
|
|
181
|
+
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
182
|
+
'documentType': json['document_type'] == null ? undefined : DocumentTypeFromJSON(json['document_type']),
|
|
183
|
+
'documentOrigin': json['document_origin'] == null ? undefined : DocumentOriginFromJSON(json['document_origin']),
|
|
184
|
+
'activeVersionId': json['active_version_id'] == null ? undefined : json['active_version_id'],
|
|
185
|
+
'activeVersion': json['active_version'] == null ? undefined : DocumentVersionResponseFromJSON(json['active_version']),
|
|
186
|
+
'tenantId': json['tenant_id'],
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function FolderDocumentResponseToJSON(json: any): FolderDocumentResponse {
|
|
191
|
+
return FolderDocumentResponseToJSONTyped(json, false);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function FolderDocumentResponseToJSONTyped(value?: FolderDocumentResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
195
|
+
if (value == null) {
|
|
196
|
+
return value;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
|
|
201
|
+
'path_part_id': value['pathPartId'],
|
|
202
|
+
'name': value['name'],
|
|
203
|
+
'part_type': PartTypeToJSON(value['partType']),
|
|
204
|
+
'parent_id': value['parentId'],
|
|
205
|
+
'metadata_obj_id': value['metadataObjId'],
|
|
206
|
+
'created_at': value['createdAt'].toISOString(),
|
|
207
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
208
|
+
'folder_id': value['folderId'],
|
|
209
|
+
'document_id': value['documentId'],
|
|
210
|
+
'document_type': DocumentTypeToJSON(value['documentType']),
|
|
211
|
+
'document_origin': DocumentOriginToJSON(value['documentOrigin']),
|
|
212
|
+
'active_version_id': value['activeVersionId'],
|
|
213
|
+
'active_version': DocumentVersionResponseToJSON(value['activeVersion']),
|
|
214
|
+
'tenant_id': value['tenantId'],
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export const FolderDocumentResponsePropertyValidationAttributesMap: {
|
|
219
|
+
[property: string]: {
|
|
220
|
+
maxLength?: number,
|
|
221
|
+
minLength?: number,
|
|
222
|
+
pattern?: string,
|
|
223
|
+
maximum?: number,
|
|
224
|
+
exclusiveMaximum?: boolean,
|
|
225
|
+
minimum?: number,
|
|
226
|
+
exclusiveMinimum?: boolean,
|
|
227
|
+
multipleOf?: number,
|
|
228
|
+
maxItems?: number,
|
|
229
|
+
minItems?: number,
|
|
230
|
+
uniqueItems?: boolean
|
|
231
|
+
}
|
|
232
|
+
} = {
|
|
233
|
+
}
|
|
234
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Role of message author in thread.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const MessageRole = {
|
|
21
|
+
User: 'USER',
|
|
22
|
+
Assistant: 'ASSISTANT',
|
|
23
|
+
System: 'SYSTEM'
|
|
24
|
+
} as const;
|
|
25
|
+
export type MessageRole = typeof MessageRole[keyof typeof MessageRole];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function instanceOfMessageRole(value: any): boolean {
|
|
29
|
+
for (const key in MessageRole) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(MessageRole, key)) {
|
|
31
|
+
if (MessageRole[key as keyof typeof MessageRole] === value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function MessageRoleFromJSON(json: any): MessageRole {
|
|
40
|
+
return MessageRoleFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function MessageRoleFromJSONTyped(json: any, ignoreDiscriminator: boolean): MessageRole {
|
|
44
|
+
return json as MessageRole;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function MessageRoleToJSON(value?: MessageRole | null): any {
|
|
48
|
+
return value as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function MessageRoleToJSONTyped(value: any, ignoreDiscriminator: boolean): MessageRole {
|
|
52
|
+
return value as MessageRole;
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DocumentContentPathPart } from './DocumentContentPathPart';
|
|
17
|
+
import {
|
|
18
|
+
DocumentContentPathPartFromJSON,
|
|
19
|
+
DocumentContentPathPartFromJSONTyped,
|
|
20
|
+
DocumentContentPathPartToJSON,
|
|
21
|
+
DocumentContentPathPartToJSONTyped,
|
|
22
|
+
} from './DocumentContentPathPart';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaginatedResponseDocumentContentPathPart
|
|
28
|
+
*/
|
|
29
|
+
export interface PaginatedResponseDocumentContentPathPart {
|
|
30
|
+
/**
|
|
31
|
+
* List of items
|
|
32
|
+
* @type {Array<DocumentContentPathPart>}
|
|
33
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
34
|
+
*/
|
|
35
|
+
items: Array<DocumentContentPathPart>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of items
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Number of items per page
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
46
|
+
*/
|
|
47
|
+
limit: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of items to skip
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
52
|
+
*/
|
|
53
|
+
offset: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the PaginatedResponseDocumentContentPathPart interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfPaginatedResponseDocumentContentPathPart(value: object): value is PaginatedResponseDocumentContentPathPart {
|
|
60
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
61
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
62
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
63
|
+
if (!('offset' in value) || value['offset'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function PaginatedResponseDocumentContentPathPartFromJSON(json: any): PaginatedResponseDocumentContentPathPart {
|
|
68
|
+
return PaginatedResponseDocumentContentPathPartFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PaginatedResponseDocumentContentPathPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentContentPathPart {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'items': ((json['items'] as Array<any>).map(DocumentContentPathPartFromJSON)),
|
|
78
|
+
'total': json['total'],
|
|
79
|
+
'limit': json['limit'],
|
|
80
|
+
'offset': json['offset'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PaginatedResponseDocumentContentPathPartToJSON(json: any): PaginatedResponseDocumentContentPathPart {
|
|
85
|
+
return PaginatedResponseDocumentContentPathPartToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function PaginatedResponseDocumentContentPathPartToJSONTyped(value?: PaginatedResponseDocumentContentPathPart | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'items': ((value['items'] as Array<any>).map(DocumentContentPathPartToJSON)),
|
|
96
|
+
'total': value['total'],
|
|
97
|
+
'limit': value['limit'],
|
|
98
|
+
'offset': value['offset'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const PaginatedResponseDocumentContentPathPartPropertyValidationAttributesMap: {
|
|
103
|
+
[property: string]: {
|
|
104
|
+
maxLength?: number,
|
|
105
|
+
minLength?: number,
|
|
106
|
+
pattern?: string,
|
|
107
|
+
maximum?: number,
|
|
108
|
+
exclusiveMaximum?: boolean,
|
|
109
|
+
minimum?: number,
|
|
110
|
+
exclusiveMinimum?: boolean,
|
|
111
|
+
multipleOf?: number,
|
|
112
|
+
maxItems?: number,
|
|
113
|
+
minItems?: number,
|
|
114
|
+
uniqueItems?: boolean
|
|
115
|
+
}
|
|
116
|
+
} = {
|
|
117
|
+
total: {
|
|
118
|
+
minimum: 0,
|
|
119
|
+
exclusiveMinimum: false,
|
|
120
|
+
},
|
|
121
|
+
limit: {
|
|
122
|
+
minimum: 1,
|
|
123
|
+
exclusiveMinimum: false,
|
|
124
|
+
},
|
|
125
|
+
offset: {
|
|
126
|
+
minimum: 0,
|
|
127
|
+
exclusiveMinimum: false,
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|