@knowledge-stack/ksapi 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +14 -0
- package/README.md +2 -2
- package/dist/apis/ChunksApi.d.ts +175 -0
- package/dist/apis/ChunksApi.js +203 -0
- package/dist/apis/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/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/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/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/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/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/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 +13 -0
- package/dist/esm/models/index.js +13 -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/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/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/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 +13 -0
- package/dist/models/index.js +13 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +381 -0
- package/src/apis/DocumentVersionsApi.ts +82 -0
- package/src/apis/FoldersApi.ts +88 -0
- package/src/apis/PathPartsApi.ts +4 -10
- 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/DocumentContentPathPart.ts +205 -0
- package/src/models/FolderDocumentResponse.ts +234 -0
- package/src/models/PaginatedResponseDocumentContentPathPart.ts +130 -0
- package/src/models/PaginatedResponseFolderDocumentResponse.ts +130 -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 +13 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateFolderRequest, FolderResponse, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
13
|
+
import type { CreateFolderRequest, FolderResponse, PaginatedResponseFolderDocumentResponse, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
14
14
|
export interface CreateFolderOperationRequest {
|
|
15
15
|
createFolderRequest: CreateFolderRequest;
|
|
16
16
|
ksUat?: string;
|
|
@@ -23,6 +23,14 @@ export interface GetFolderRequest {
|
|
|
23
23
|
folderId: string;
|
|
24
24
|
ksUat?: string;
|
|
25
25
|
}
|
|
26
|
+
export interface ListFolderContentsRequest {
|
|
27
|
+
folderId: string;
|
|
28
|
+
maxDepth?: number;
|
|
29
|
+
sortOrder?: PathOrder;
|
|
30
|
+
limit?: number;
|
|
31
|
+
offset?: number;
|
|
32
|
+
ksUat?: string;
|
|
33
|
+
}
|
|
26
34
|
export interface ListFoldersRequest {
|
|
27
35
|
parentId?: string;
|
|
28
36
|
sortOrder?: PathOrder;
|
|
@@ -87,6 +95,25 @@ export interface FoldersApiInterface {
|
|
|
87
95
|
* Get Folder Handler
|
|
88
96
|
*/
|
|
89
97
|
getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
|
|
100
|
+
* @summary List Folder Contents Handler
|
|
101
|
+
* @param {string} folderId
|
|
102
|
+
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
103
|
+
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
104
|
+
* @param {number} [limit] Number of items per page
|
|
105
|
+
* @param {number} [offset] Number of items to skip
|
|
106
|
+
* @param {string} [ksUat]
|
|
107
|
+
* @param {*} [options] Override http request option.
|
|
108
|
+
* @throws {RequiredError}
|
|
109
|
+
* @memberof FoldersApiInterface
|
|
110
|
+
*/
|
|
111
|
+
listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
|
|
112
|
+
/**
|
|
113
|
+
* List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
|
|
114
|
+
* List Folder Contents Handler
|
|
115
|
+
*/
|
|
116
|
+
listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
|
|
90
117
|
/**
|
|
91
118
|
* List child folders of a parent folder. Returns only direct child folders (depth=1) of the specified parent. If parent_id is not provided, lists folders in the root folder.
|
|
92
119
|
* @summary List Folders Handler
|
|
@@ -156,6 +183,16 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
156
183
|
* Get Folder Handler
|
|
157
184
|
*/
|
|
158
185
|
getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
|
|
186
|
+
/**
|
|
187
|
+
* List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
|
|
188
|
+
* List Folder Contents Handler
|
|
189
|
+
*/
|
|
190
|
+
listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
|
|
191
|
+
/**
|
|
192
|
+
* List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
|
|
193
|
+
* List Folder Contents Handler
|
|
194
|
+
*/
|
|
195
|
+
listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
|
|
159
196
|
/**
|
|
160
197
|
* List child folders of a parent folder. Returns only direct child folders (depth=1) of the specified parent. If parent_id is not provided, lists folders in the root folder.
|
|
161
198
|
* List Folders Handler
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateFolderRequestToJSON, FolderResponseFromJSON, PaginatedResponseFolderResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
24
|
+
import { CreateFolderRequestToJSON, FolderResponseFromJSON, PaginatedResponseFolderDocumentResponseFromJSON, PaginatedResponseFolderResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -122,6 +122,50 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
122
122
|
return yield response.value();
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
|
|
127
|
+
* List Folder Contents Handler
|
|
128
|
+
*/
|
|
129
|
+
listFolderContentsRaw(requestParameters, initOverrides) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
if (requestParameters['folderId'] == null) {
|
|
132
|
+
throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling listFolderContents().');
|
|
133
|
+
}
|
|
134
|
+
const queryParameters = {};
|
|
135
|
+
if (requestParameters['maxDepth'] != null) {
|
|
136
|
+
queryParameters['max_depth'] = requestParameters['maxDepth'];
|
|
137
|
+
}
|
|
138
|
+
if (requestParameters['sortOrder'] != null) {
|
|
139
|
+
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
140
|
+
}
|
|
141
|
+
if (requestParameters['limit'] != null) {
|
|
142
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
143
|
+
}
|
|
144
|
+
if (requestParameters['offset'] != null) {
|
|
145
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
146
|
+
}
|
|
147
|
+
const headerParameters = {};
|
|
148
|
+
let urlPath = `/v1/folders/{folder_id}/contents`;
|
|
149
|
+
urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
|
|
150
|
+
const response = yield this.request({
|
|
151
|
+
path: urlPath,
|
|
152
|
+
method: 'GET',
|
|
153
|
+
headers: headerParameters,
|
|
154
|
+
query: queryParameters,
|
|
155
|
+
}, initOverrides);
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseFolderDocumentResponseFromJSON(jsonValue));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
|
|
161
|
+
* List Folder Contents Handler
|
|
162
|
+
*/
|
|
163
|
+
listFolderContents(requestParameters, initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const response = yield this.listFolderContentsRaw(requestParameters, initOverrides);
|
|
166
|
+
return yield response.value();
|
|
167
|
+
});
|
|
168
|
+
}
|
|
125
169
|
/**
|
|
126
170
|
* List child folders of a parent folder. Returns only direct child folders (depth=1) of the specified parent. If parent_id is not provided, lists folders in the root folder.
|
|
127
171
|
* List Folders Handler
|
|
@@ -17,7 +17,6 @@ export interface GetPathPartRequest {
|
|
|
17
17
|
}
|
|
18
18
|
export interface ListPathPartsRequest {
|
|
19
19
|
parentId?: string;
|
|
20
|
-
includeDocuments?: boolean;
|
|
21
20
|
maxDepth?: number;
|
|
22
21
|
sortOrder?: PathOrder;
|
|
23
22
|
limit?: number;
|
|
@@ -47,10 +46,9 @@ export interface PathPartsApiInterface {
|
|
|
47
46
|
*/
|
|
48
47
|
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
49
48
|
/**
|
|
50
|
-
* List path parts under a parent with
|
|
49
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
51
50
|
* @summary List Path Parts Handler
|
|
52
51
|
* @param {string} [parentId] Parent PathPart ID (defaults to root)
|
|
53
|
-
* @param {boolean} [includeDocuments] Include documents in results (default: False, folders only)
|
|
54
52
|
* @param {number} [maxDepth] Maximum depth to traverse (1 = direct children, default: 1)
|
|
55
53
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
56
54
|
* @param {number} [limit] Number of items per page
|
|
@@ -62,7 +60,7 @@ export interface PathPartsApiInterface {
|
|
|
62
60
|
*/
|
|
63
61
|
listPathPartsRaw(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponsePathPartResponse>>;
|
|
64
62
|
/**
|
|
65
|
-
* List path parts under a parent with
|
|
63
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
66
64
|
* List Path Parts Handler
|
|
67
65
|
*/
|
|
68
66
|
listPathParts(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
|
|
@@ -82,12 +80,12 @@ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsAp
|
|
|
82
80
|
*/
|
|
83
81
|
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
84
82
|
/**
|
|
85
|
-
* List path parts under a parent with
|
|
83
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
86
84
|
* List Path Parts Handler
|
|
87
85
|
*/
|
|
88
86
|
listPathPartsRaw(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponsePathPartResponse>>;
|
|
89
87
|
/**
|
|
90
|
-
* List path parts under a parent with
|
|
88
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
91
89
|
* List Path Parts Handler
|
|
92
90
|
*/
|
|
93
91
|
listPathParts(requestParameters?: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
|
|
@@ -59,7 +59,7 @@ export class PathPartsApi extends runtime.BaseAPI {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* List path parts under a parent with
|
|
62
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
63
63
|
* List Path Parts Handler
|
|
64
64
|
*/
|
|
65
65
|
listPathPartsRaw(requestParameters, initOverrides) {
|
|
@@ -68,9 +68,6 @@ export class PathPartsApi extends runtime.BaseAPI {
|
|
|
68
68
|
if (requestParameters['parentId'] != null) {
|
|
69
69
|
queryParameters['parent_id'] = requestParameters['parentId'];
|
|
70
70
|
}
|
|
71
|
-
if (requestParameters['includeDocuments'] != null) {
|
|
72
|
-
queryParameters['include_documents'] = requestParameters['includeDocuments'];
|
|
73
|
-
}
|
|
74
71
|
if (requestParameters['maxDepth'] != null) {
|
|
75
72
|
queryParameters['max_depth'] = requestParameters['maxDepth'];
|
|
76
73
|
}
|
|
@@ -95,7 +92,7 @@ export class PathPartsApi extends runtime.BaseAPI {
|
|
|
95
92
|
});
|
|
96
93
|
}
|
|
97
94
|
/**
|
|
98
|
-
* List path parts under a parent with
|
|
95
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
99
96
|
* List Path Parts Handler
|
|
100
97
|
*/
|
|
101
98
|
listPathParts() {
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { PolygonReference } from './PolygonReference';
|
|
13
|
+
/**
|
|
14
|
+
* Metadata for a chunk including source document references.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChunkMetadataInput
|
|
17
|
+
*/
|
|
18
|
+
export interface ChunkMetadataInput {
|
|
19
|
+
/**
|
|
20
|
+
* List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages.
|
|
21
|
+
* @type {Array<PolygonReference>}
|
|
22
|
+
* @memberof ChunkMetadataInput
|
|
23
|
+
*/
|
|
24
|
+
polygons?: Array<PolygonReference>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ChunkMetadataInput interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfChunkMetadataInput(value: object): value is ChunkMetadataInput;
|
|
30
|
+
export declare function ChunkMetadataInputFromJSON(json: any): ChunkMetadataInput;
|
|
31
|
+
export declare function ChunkMetadataInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkMetadataInput;
|
|
32
|
+
export declare function ChunkMetadataInputToJSON(json: any): ChunkMetadataInput;
|
|
33
|
+
export declare function ChunkMetadataInputToJSONTyped(value?: ChunkMetadataInput | null, ignoreDiscriminator?: boolean): any;
|
|
34
|
+
export declare const ChunkMetadataInputPropertyValidationAttributesMap: {
|
|
35
|
+
[property: string]: {
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
pattern?: string;
|
|
39
|
+
maximum?: number;
|
|
40
|
+
exclusiveMaximum?: boolean;
|
|
41
|
+
minimum?: number;
|
|
42
|
+
exclusiveMinimum?: boolean;
|
|
43
|
+
multipleOf?: number;
|
|
44
|
+
maxItems?: number;
|
|
45
|
+
minItems?: number;
|
|
46
|
+
uniqueItems?: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { PolygonReferenceFromJSON, PolygonReferenceToJSON, } from './PolygonReference';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ChunkMetadataInput interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfChunkMetadataInput(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function ChunkMetadataInputFromJSON(json) {
|
|
22
|
+
return ChunkMetadataInputFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function ChunkMetadataInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReferenceFromJSON)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function ChunkMetadataInputToJSON(json) {
|
|
33
|
+
return ChunkMetadataInputToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ChunkMetadataInputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReferenceToJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export const ChunkMetadataInputPropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { PolygonReference } from './PolygonReference';
|
|
13
|
+
/**
|
|
14
|
+
* Metadata for a chunk including source document references.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChunkMetadataOutput
|
|
17
|
+
*/
|
|
18
|
+
export interface ChunkMetadataOutput {
|
|
19
|
+
/**
|
|
20
|
+
* List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages.
|
|
21
|
+
* @type {Array<PolygonReference>}
|
|
22
|
+
* @memberof ChunkMetadataOutput
|
|
23
|
+
*/
|
|
24
|
+
polygons?: Array<PolygonReference>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ChunkMetadataOutput interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfChunkMetadataOutput(value: object): value is ChunkMetadataOutput;
|
|
30
|
+
export declare function ChunkMetadataOutputFromJSON(json: any): ChunkMetadataOutput;
|
|
31
|
+
export declare function ChunkMetadataOutputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkMetadataOutput;
|
|
32
|
+
export declare function ChunkMetadataOutputToJSON(json: any): ChunkMetadataOutput;
|
|
33
|
+
export declare function ChunkMetadataOutputToJSONTyped(value?: ChunkMetadataOutput | null, ignoreDiscriminator?: boolean): any;
|
|
34
|
+
export declare const ChunkMetadataOutputPropertyValidationAttributesMap: {
|
|
35
|
+
[property: string]: {
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
pattern?: string;
|
|
39
|
+
maximum?: number;
|
|
40
|
+
exclusiveMaximum?: boolean;
|
|
41
|
+
minimum?: number;
|
|
42
|
+
exclusiveMinimum?: boolean;
|
|
43
|
+
multipleOf?: number;
|
|
44
|
+
maxItems?: number;
|
|
45
|
+
minItems?: number;
|
|
46
|
+
uniqueItems?: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { PolygonReferenceFromJSON, PolygonReferenceToJSON, } from './PolygonReference';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ChunkMetadataOutput interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfChunkMetadataOutput(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function ChunkMetadataOutputFromJSON(json) {
|
|
22
|
+
return ChunkMetadataOutputFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function ChunkMetadataOutputFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'polygons': json['polygons'] == null ? undefined : (json['polygons'].map(PolygonReferenceFromJSON)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function ChunkMetadataOutputToJSON(json) {
|
|
33
|
+
return ChunkMetadataOutputToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ChunkMetadataOutputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'polygons': value['polygons'] == null ? undefined : (value['polygons'].map(PolygonReferenceToJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export const ChunkMetadataOutputPropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
13
|
+
import type { ChunkType } from './ChunkType';
|
|
14
|
+
/**
|
|
15
|
+
* Chunk response model.
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ChunkResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface ChunkResponse {
|
|
20
|
+
/**
|
|
21
|
+
* Chunk ID
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof ChunkResponse
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* PathPart ID
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof ChunkResponse
|
|
30
|
+
*/
|
|
31
|
+
pathPartId: string;
|
|
32
|
+
/**
|
|
33
|
+
* ChunkContent ID
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof ChunkResponse
|
|
36
|
+
*/
|
|
37
|
+
contentId: string;
|
|
38
|
+
/**
|
|
39
|
+
* Chunk text content
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof ChunkResponse
|
|
42
|
+
*/
|
|
43
|
+
content: string;
|
|
44
|
+
/**
|
|
45
|
+
* Type of chunk content
|
|
46
|
+
* @type {ChunkType}
|
|
47
|
+
* @memberof ChunkResponse
|
|
48
|
+
*/
|
|
49
|
+
chunkType: ChunkType;
|
|
50
|
+
/**
|
|
51
|
+
* Chunk metadata
|
|
52
|
+
* @type {ChunkMetadataOutput}
|
|
53
|
+
* @memberof ChunkResponse
|
|
54
|
+
*/
|
|
55
|
+
chunkMetadata: ChunkMetadataOutput;
|
|
56
|
+
/**
|
|
57
|
+
* Parent PathPart ID
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof ChunkResponse
|
|
60
|
+
*/
|
|
61
|
+
parentId: string;
|
|
62
|
+
/**
|
|
63
|
+
* Previous sibling PathPart ID
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof ChunkResponse
|
|
66
|
+
*/
|
|
67
|
+
prevSiblingPathId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Next sibling PathPart ID
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof ChunkResponse
|
|
72
|
+
*/
|
|
73
|
+
nextSiblingId?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Tenant ID
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof ChunkResponse
|
|
78
|
+
*/
|
|
79
|
+
tenantId: string;
|
|
80
|
+
/**
|
|
81
|
+
* Creation timestamp
|
|
82
|
+
* @type {Date}
|
|
83
|
+
* @memberof ChunkResponse
|
|
84
|
+
*/
|
|
85
|
+
createdAt: Date;
|
|
86
|
+
/**
|
|
87
|
+
* Last update timestamp
|
|
88
|
+
* @type {Date}
|
|
89
|
+
* @memberof ChunkResponse
|
|
90
|
+
*/
|
|
91
|
+
updatedAt: Date;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the ChunkResponse interface.
|
|
95
|
+
*/
|
|
96
|
+
export declare function instanceOfChunkResponse(value: object): value is ChunkResponse;
|
|
97
|
+
export declare function ChunkResponseFromJSON(json: any): ChunkResponse;
|
|
98
|
+
export declare function ChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkResponse;
|
|
99
|
+
export declare function ChunkResponseToJSON(json: any): ChunkResponse;
|
|
100
|
+
export declare function ChunkResponseToJSONTyped(value?: ChunkResponse | null, ignoreDiscriminator?: boolean): any;
|
|
101
|
+
export declare const ChunkResponsePropertyValidationAttributesMap: {
|
|
102
|
+
[property: string]: {
|
|
103
|
+
maxLength?: number;
|
|
104
|
+
minLength?: number;
|
|
105
|
+
pattern?: string;
|
|
106
|
+
maximum?: number;
|
|
107
|
+
exclusiveMaximum?: boolean;
|
|
108
|
+
minimum?: number;
|
|
109
|
+
exclusiveMinimum?: boolean;
|
|
110
|
+
multipleOf?: number;
|
|
111
|
+
maxItems?: number;
|
|
112
|
+
minItems?: number;
|
|
113
|
+
uniqueItems?: boolean;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { ChunkMetadataOutputFromJSON, ChunkMetadataOutputToJSON, } from './ChunkMetadataOutput';
|
|
15
|
+
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the ChunkResponse interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfChunkResponse(value) {
|
|
20
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('contentId' in value) || value['contentId'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('chunkType' in value) || value['chunkType'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('parentId' in value) || value['parentId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
export function ChunkResponseFromJSON(json) {
|
|
43
|
+
return ChunkResponseFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'id': json['id'],
|
|
51
|
+
'pathPartId': json['path_part_id'],
|
|
52
|
+
'contentId': json['content_id'],
|
|
53
|
+
'content': json['content'],
|
|
54
|
+
'chunkType': ChunkTypeFromJSON(json['chunk_type']),
|
|
55
|
+
'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
56
|
+
'parentId': json['parent_id'],
|
|
57
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
58
|
+
'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
|
|
59
|
+
'tenantId': json['tenant_id'],
|
|
60
|
+
'createdAt': (new Date(json['created_at'])),
|
|
61
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function ChunkResponseToJSON(json) {
|
|
65
|
+
return ChunkResponseToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
export function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'id': value['id'],
|
|
73
|
+
'path_part_id': value['pathPartId'],
|
|
74
|
+
'content_id': value['contentId'],
|
|
75
|
+
'content': value['content'],
|
|
76
|
+
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
77
|
+
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
78
|
+
'parent_id': value['parentId'],
|
|
79
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
80
|
+
'next_sibling_id': value['nextSiblingId'],
|
|
81
|
+
'tenant_id': value['tenantId'],
|
|
82
|
+
'created_at': value['createdAt'].toISOString(),
|
|
83
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export const ChunkResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Type of chunk content.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const ChunkType: {
|
|
17
|
+
readonly Text: "TEXT";
|
|
18
|
+
readonly Table: "TABLE";
|
|
19
|
+
readonly Image: "IMAGE";
|
|
20
|
+
readonly Unknown: "UNKNOWN";
|
|
21
|
+
};
|
|
22
|
+
export type ChunkType = typeof ChunkType[keyof typeof ChunkType];
|
|
23
|
+
export declare function instanceOfChunkType(value: any): boolean;
|
|
24
|
+
export declare function ChunkTypeFromJSON(json: any): ChunkType;
|
|
25
|
+
export declare function ChunkTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkType;
|
|
26
|
+
export declare function ChunkTypeToJSON(value?: ChunkType | null): any;
|
|
27
|
+
export declare function ChunkTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ChunkType;
|