@knowledge-stack/ksapi 1.30.0 → 1.32.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 +6 -2
- package/README.md +6 -3
- package/dist/apis/ChunksApi.d.ts +4 -4
- package/dist/apis/ChunksApi.js +2 -2
- package/dist/apis/FoldersApi.d.ts +45 -1
- package/dist/apis/FoldersApi.js +47 -0
- package/dist/esm/apis/ChunksApi.d.ts +4 -4
- package/dist/esm/apis/ChunksApi.js +2 -2
- package/dist/esm/apis/FoldersApi.d.ts +45 -1
- package/dist/esm/apis/FoldersApi.js +48 -1
- package/dist/esm/models/ChunkSearchRequest.d.ts +4 -4
- package/dist/esm/models/ChunkSearchRequest.js +3 -3
- package/dist/esm/models/FolderAction.d.ts +24 -0
- package/dist/esm/models/FolderAction.js +42 -0
- package/dist/esm/models/FolderActionResponse.d.ts +60 -0
- package/dist/esm/models/FolderActionResponse.js +53 -0
- package/dist/esm/models/SearchType.d.ts +25 -0
- package/dist/esm/models/SearchType.js +43 -0
- package/dist/esm/models/index.d.ts +3 -1
- package/dist/esm/models/index.js +3 -1
- package/dist/models/ChunkSearchRequest.d.ts +4 -4
- package/dist/models/ChunkSearchRequest.js +3 -3
- package/dist/models/FolderAction.d.ts +24 -0
- package/dist/models/FolderAction.js +50 -0
- package/dist/models/FolderActionResponse.d.ts +60 -0
- package/dist/models/FolderActionResponse.js +61 -0
- package/dist/models/SearchType.d.ts +25 -0
- package/dist/models/SearchType.js +51 -0
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.js +3 -1
- package/docs/ChunkSearchRequest.md +3 -3
- package/docs/ChunksApi.md +1 -1
- package/docs/{EmbeddingModel.md → FolderAction.md} +5 -5
- package/docs/FolderActionResponse.md +39 -0
- package/docs/FoldersApi.md +75 -0
- package/docs/SearchType.md +33 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +4 -4
- package/src/apis/FoldersApi.ts +98 -0
- package/src/models/ChunkSearchRequest.ts +12 -12
- package/src/models/FolderAction.ts +52 -0
- package/src/models/FolderActionResponse.ts +111 -0
- package/src/models/SearchType.ts +53 -0
- package/src/models/index.ts +3 -1
- package/dist/esm/models/EmbeddingModel.d.ts +0 -24
- package/dist/esm/models/EmbeddingModel.js +0 -42
- package/dist/models/EmbeddingModel.d.ts +0 -24
- package/dist/models/EmbeddingModel.js +0 -50
- package/src/models/EmbeddingModel.ts +0 -52
package/.openapi-generator/FILES
CHANGED
|
@@ -38,7 +38,8 @@ docs/DocumentVersionsApi.md
|
|
|
38
38
|
docs/DocumentsApi.md
|
|
39
39
|
docs/EmailSentResponse.md
|
|
40
40
|
docs/EmailVerificationRequest.md
|
|
41
|
-
docs/
|
|
41
|
+
docs/FolderAction.md
|
|
42
|
+
docs/FolderActionResponse.md
|
|
42
43
|
docs/FolderResponse.md
|
|
43
44
|
docs/FolderResponseOrDocumentResponse.md
|
|
44
45
|
docs/FoldersApi.md
|
|
@@ -86,6 +87,7 @@ docs/PolygonReference.md
|
|
|
86
87
|
docs/RootResponse.md
|
|
87
88
|
docs/SSOInitiateResponse.md
|
|
88
89
|
docs/ScoredChunkResponse.md
|
|
90
|
+
docs/SearchType.md
|
|
89
91
|
docs/SectionContentItem.md
|
|
90
92
|
docs/SectionContentItemOrChunkContentItem.md
|
|
91
93
|
docs/SectionResponse.md
|
|
@@ -176,7 +178,8 @@ src/models/DocumentVersionMetadataUpdate.ts
|
|
|
176
178
|
src/models/DocumentVersionResponse.ts
|
|
177
179
|
src/models/EmailSentResponse.ts
|
|
178
180
|
src/models/EmailVerificationRequest.ts
|
|
179
|
-
src/models/
|
|
181
|
+
src/models/FolderAction.ts
|
|
182
|
+
src/models/FolderActionResponse.ts
|
|
180
183
|
src/models/FolderResponse.ts
|
|
181
184
|
src/models/FolderResponseOrDocumentResponse.ts
|
|
182
185
|
src/models/HTTPValidationError.ts
|
|
@@ -221,6 +224,7 @@ src/models/PolygonReference.ts
|
|
|
221
224
|
src/models/RootResponse.ts
|
|
222
225
|
src/models/SSOInitiateResponse.ts
|
|
223
226
|
src/models/ScoredChunkResponse.ts
|
|
227
|
+
src/models/SearchType.ts
|
|
224
228
|
src/models/SectionContentItem.ts
|
|
225
229
|
src/models/SectionContentItemOrChunkContentItem.ts
|
|
226
230
|
src/models/SectionResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.32.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -88,6 +88,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
88
88
|
*DocumentsApi* | [**updateDocument**](docs/DocumentsApi.md#updatedocumentoperation) | **PATCH** /v1/documents/{document_id} | Update Document Handler
|
|
89
89
|
*FoldersApi* | [**createFolder**](docs/FoldersApi.md#createfolderoperation) | **POST** /v1/folders | Create Folder Handler
|
|
90
90
|
*FoldersApi* | [**deleteFolder**](docs/FoldersApi.md#deletefolder) | **DELETE** /v1/folders/{folder_id} | Delete Folder Handler
|
|
91
|
+
*FoldersApi* | [**folderAction**](docs/FoldersApi.md#folderaction) | **POST** /v1/folders/{folder_id} | Folder Action Handler
|
|
91
92
|
*FoldersApi* | [**getFolder**](docs/FoldersApi.md#getfolder) | **GET** /v1/folders/{folder_id} | Get Folder Handler
|
|
92
93
|
*FoldersApi* | [**listFolderContents**](docs/FoldersApi.md#listfoldercontents) | **GET** /v1/folders/{folder_id}/contents | List Folder Contents Handler
|
|
93
94
|
*FoldersApi* | [**listFolders**](docs/FoldersApi.md#listfolders) | **GET** /v1/folders | List Folders Handler
|
|
@@ -172,7 +173,8 @@ All URIs are relative to *http://localhost:8000*
|
|
|
172
173
|
- [DocumentVersionResponse](docs/DocumentVersionResponse.md)
|
|
173
174
|
- [EmailSentResponse](docs/EmailSentResponse.md)
|
|
174
175
|
- [EmailVerificationRequest](docs/EmailVerificationRequest.md)
|
|
175
|
-
- [
|
|
176
|
+
- [FolderAction](docs/FolderAction.md)
|
|
177
|
+
- [FolderActionResponse](docs/FolderActionResponse.md)
|
|
176
178
|
- [FolderResponse](docs/FolderResponse.md)
|
|
177
179
|
- [FolderResponseOrDocumentResponse](docs/FolderResponseOrDocumentResponse.md)
|
|
178
180
|
- [HTTPValidationError](docs/HTTPValidationError.md)
|
|
@@ -217,6 +219,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
217
219
|
- [RootResponse](docs/RootResponse.md)
|
|
218
220
|
- [SSOInitiateResponse](docs/SSOInitiateResponse.md)
|
|
219
221
|
- [ScoredChunkResponse](docs/ScoredChunkResponse.md)
|
|
222
|
+
- [SearchType](docs/SearchType.md)
|
|
220
223
|
- [SectionContentItem](docs/SectionContentItem.md)
|
|
221
224
|
- [SectionContentItemOrChunkContentItem](docs/SectionContentItemOrChunkContentItem.md)
|
|
222
225
|
- [SectionResponse](docs/SectionResponse.md)
|
|
@@ -262,7 +265,7 @@ and is automatically generated by the
|
|
|
262
265
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
263
266
|
|
|
264
267
|
- API version: `0.1.0`
|
|
265
|
-
- Package version: `1.
|
|
268
|
+
- Package version: `1.32.0`
|
|
266
269
|
- Generator version: `7.20.0`
|
|
267
270
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
268
271
|
|
package/dist/apis/ChunksApi.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ export interface ChunksApiInterface {
|
|
|
176
176
|
*/
|
|
177
177
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
180
180
|
* @summary Search Chunks Handler
|
|
181
181
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
182
182
|
* @param {string} [ksUat]
|
|
@@ -186,7 +186,7 @@ export interface ChunksApiInterface {
|
|
|
186
186
|
*/
|
|
187
187
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
189
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
190
190
|
* Search Chunks Handler
|
|
191
191
|
*/
|
|
192
192
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -320,12 +320,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
|
|
|
320
320
|
*/
|
|
321
321
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
322
322
|
/**
|
|
323
|
-
*
|
|
323
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
324
324
|
* Search Chunks Handler
|
|
325
325
|
*/
|
|
326
326
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
327
327
|
/**
|
|
328
|
-
*
|
|
328
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
329
329
|
* Search Chunks Handler
|
|
330
330
|
*/
|
|
331
331
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
package/dist/apis/ChunksApi.js
CHANGED
|
@@ -257,7 +257,7 @@ class ChunksApi extends runtime.BaseAPI {
|
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
260
|
-
*
|
|
260
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
261
261
|
* Search Chunks Handler
|
|
262
262
|
*/
|
|
263
263
|
searchChunksRaw(requestParameters, initOverrides) {
|
|
@@ -268,7 +268,7 @@ class ChunksApi extends runtime.BaseAPI {
|
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
/**
|
|
271
|
-
*
|
|
271
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
272
272
|
* Search Chunks Handler
|
|
273
273
|
*/
|
|
274
274
|
searchChunks(requestParameters, initOverrides) {
|
|
@@ -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, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
13
|
+
import type { CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
14
14
|
export interface CreateFolderOperationRequest {
|
|
15
15
|
createFolderRequest: CreateFolderRequest;
|
|
16
16
|
ksUat?: string | null;
|
|
@@ -19,6 +19,11 @@ export interface DeleteFolderRequest {
|
|
|
19
19
|
folderId: string;
|
|
20
20
|
ksUat?: string | null;
|
|
21
21
|
}
|
|
22
|
+
export interface FolderActionRequest {
|
|
23
|
+
folderId: string;
|
|
24
|
+
action: FolderAction;
|
|
25
|
+
ksUat?: string | null;
|
|
26
|
+
}
|
|
22
27
|
export interface GetFolderRequest {
|
|
23
28
|
folderId: string;
|
|
24
29
|
withTags?: boolean;
|
|
@@ -100,6 +105,31 @@ export interface FoldersApiInterface {
|
|
|
100
105
|
* Delete Folder Handler
|
|
101
106
|
*/
|
|
102
107
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates request options for folderAction without sending the request
|
|
110
|
+
* @param {string} folderId
|
|
111
|
+
* @param {FolderAction} action Action to perform
|
|
112
|
+
* @param {string} [ksUat]
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof FoldersApiInterface
|
|
115
|
+
*/
|
|
116
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
117
|
+
/**
|
|
118
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
119
|
+
* @summary Folder Action Handler
|
|
120
|
+
* @param {string} folderId
|
|
121
|
+
* @param {FolderAction} action Action to perform
|
|
122
|
+
* @param {string} [ksUat]
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
* @memberof FoldersApiInterface
|
|
126
|
+
*/
|
|
127
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
128
|
+
/**
|
|
129
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
130
|
+
* Folder Action Handler
|
|
131
|
+
*/
|
|
132
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
103
133
|
/**
|
|
104
134
|
* Creates request options for getFolder without sending the request
|
|
105
135
|
* @param {string} folderId
|
|
@@ -249,6 +279,20 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
249
279
|
* Delete Folder Handler
|
|
250
280
|
*/
|
|
251
281
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
282
|
+
/**
|
|
283
|
+
* Creates request options for folderAction without sending the request
|
|
284
|
+
*/
|
|
285
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
286
|
+
/**
|
|
287
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
288
|
+
* Folder Action Handler
|
|
289
|
+
*/
|
|
290
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
291
|
+
/**
|
|
292
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
293
|
+
* Folder Action Handler
|
|
294
|
+
*/
|
|
295
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
252
296
|
/**
|
|
253
297
|
* Creates request options for getFolder without sending the request
|
|
254
298
|
*/
|
package/dist/apis/FoldersApi.js
CHANGED
|
@@ -111,6 +111,53 @@ class FoldersApi extends runtime.BaseAPI {
|
|
|
111
111
|
yield this.deleteFolderRaw(requestParameters, initOverrides);
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Creates request options for folderAction without sending the request
|
|
116
|
+
*/
|
|
117
|
+
folderActionRequestOpts(requestParameters) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
if (requestParameters['folderId'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling folderAction().');
|
|
121
|
+
}
|
|
122
|
+
if (requestParameters['action'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling folderAction().');
|
|
124
|
+
}
|
|
125
|
+
const queryParameters = {};
|
|
126
|
+
if (requestParameters['action'] != null) {
|
|
127
|
+
queryParameters['action'] = requestParameters['action'];
|
|
128
|
+
}
|
|
129
|
+
const headerParameters = {};
|
|
130
|
+
let urlPath = `/v1/folders/{folder_id}`;
|
|
131
|
+
urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
|
|
132
|
+
return {
|
|
133
|
+
path: urlPath,
|
|
134
|
+
method: 'POST',
|
|
135
|
+
headers: headerParameters,
|
|
136
|
+
query: queryParameters,
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
142
|
+
* Folder Action Handler
|
|
143
|
+
*/
|
|
144
|
+
folderActionRaw(requestParameters, initOverrides) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const requestOptions = yield this.folderActionRequestOpts(requestParameters);
|
|
147
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
148
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FolderActionResponseFromJSON)(jsonValue));
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
153
|
+
* Folder Action Handler
|
|
154
|
+
*/
|
|
155
|
+
folderAction(requestParameters, initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
const response = yield this.folderActionRaw(requestParameters, initOverrides);
|
|
158
|
+
return yield response.value();
|
|
159
|
+
});
|
|
160
|
+
}
|
|
114
161
|
/**
|
|
115
162
|
* Creates request options for getFolder without sending the request
|
|
116
163
|
*/
|
|
@@ -176,7 +176,7 @@ export interface ChunksApiInterface {
|
|
|
176
176
|
*/
|
|
177
177
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
180
180
|
* @summary Search Chunks Handler
|
|
181
181
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
182
182
|
* @param {string} [ksUat]
|
|
@@ -186,7 +186,7 @@ export interface ChunksApiInterface {
|
|
|
186
186
|
*/
|
|
187
187
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
189
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
190
190
|
* Search Chunks Handler
|
|
191
191
|
*/
|
|
192
192
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -320,12 +320,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
|
|
|
320
320
|
*/
|
|
321
321
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
322
322
|
/**
|
|
323
|
-
*
|
|
323
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
324
324
|
* Search Chunks Handler
|
|
325
325
|
*/
|
|
326
326
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
327
327
|
/**
|
|
328
|
-
*
|
|
328
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
329
329
|
* Search Chunks Handler
|
|
330
330
|
*/
|
|
331
331
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -254,7 +254,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
257
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
258
258
|
* Search Chunks Handler
|
|
259
259
|
*/
|
|
260
260
|
searchChunksRaw(requestParameters, initOverrides) {
|
|
@@ -265,7 +265,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
268
|
-
*
|
|
268
|
+
* Search over chunks using dense vector similarity or BM25 full-text. Combines vector/keyword search with path-based authorization and optional metadata filters. Uses Qdrant for search and hydrates results from Postgres.
|
|
269
269
|
* Search Chunks Handler
|
|
270
270
|
*/
|
|
271
271
|
searchChunks(requestParameters, initOverrides) {
|
|
@@ -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, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
13
|
+
import type { CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
14
14
|
export interface CreateFolderOperationRequest {
|
|
15
15
|
createFolderRequest: CreateFolderRequest;
|
|
16
16
|
ksUat?: string | null;
|
|
@@ -19,6 +19,11 @@ export interface DeleteFolderRequest {
|
|
|
19
19
|
folderId: string;
|
|
20
20
|
ksUat?: string | null;
|
|
21
21
|
}
|
|
22
|
+
export interface FolderActionRequest {
|
|
23
|
+
folderId: string;
|
|
24
|
+
action: FolderAction;
|
|
25
|
+
ksUat?: string | null;
|
|
26
|
+
}
|
|
22
27
|
export interface GetFolderRequest {
|
|
23
28
|
folderId: string;
|
|
24
29
|
withTags?: boolean;
|
|
@@ -100,6 +105,31 @@ export interface FoldersApiInterface {
|
|
|
100
105
|
* Delete Folder Handler
|
|
101
106
|
*/
|
|
102
107
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates request options for folderAction without sending the request
|
|
110
|
+
* @param {string} folderId
|
|
111
|
+
* @param {FolderAction} action Action to perform
|
|
112
|
+
* @param {string} [ksUat]
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof FoldersApiInterface
|
|
115
|
+
*/
|
|
116
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
117
|
+
/**
|
|
118
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
119
|
+
* @summary Folder Action Handler
|
|
120
|
+
* @param {string} folderId
|
|
121
|
+
* @param {FolderAction} action Action to perform
|
|
122
|
+
* @param {string} [ksUat]
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
* @memberof FoldersApiInterface
|
|
126
|
+
*/
|
|
127
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
128
|
+
/**
|
|
129
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
130
|
+
* Folder Action Handler
|
|
131
|
+
*/
|
|
132
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
103
133
|
/**
|
|
104
134
|
* Creates request options for getFolder without sending the request
|
|
105
135
|
* @param {string} folderId
|
|
@@ -249,6 +279,20 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
249
279
|
* Delete Folder Handler
|
|
250
280
|
*/
|
|
251
281
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
282
|
+
/**
|
|
283
|
+
* Creates request options for folderAction without sending the request
|
|
284
|
+
*/
|
|
285
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
286
|
+
/**
|
|
287
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
288
|
+
* Folder Action Handler
|
|
289
|
+
*/
|
|
290
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
291
|
+
/**
|
|
292
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
293
|
+
* Folder Action Handler
|
|
294
|
+
*/
|
|
295
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
252
296
|
/**
|
|
253
297
|
* Creates request options for getFolder without sending the request
|
|
254
298
|
*/
|
|
@@ -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, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminatorFromJSON, PaginatedResponseFolderResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
24
|
+
import { CreateFolderRequestToJSON, FolderActionResponseFromJSON, FolderResponseFromJSON, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminatorFromJSON, PaginatedResponseFolderResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -108,6 +108,53 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
108
108
|
yield this.deleteFolderRaw(requestParameters, initOverrides);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Creates request options for folderAction without sending the request
|
|
113
|
+
*/
|
|
114
|
+
folderActionRequestOpts(requestParameters) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
if (requestParameters['folderId'] == null) {
|
|
117
|
+
throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling folderAction().');
|
|
118
|
+
}
|
|
119
|
+
if (requestParameters['action'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling folderAction().');
|
|
121
|
+
}
|
|
122
|
+
const queryParameters = {};
|
|
123
|
+
if (requestParameters['action'] != null) {
|
|
124
|
+
queryParameters['action'] = requestParameters['action'];
|
|
125
|
+
}
|
|
126
|
+
const headerParameters = {};
|
|
127
|
+
let urlPath = `/v1/folders/{folder_id}`;
|
|
128
|
+
urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
|
|
129
|
+
return {
|
|
130
|
+
path: urlPath,
|
|
131
|
+
method: 'POST',
|
|
132
|
+
headers: headerParameters,
|
|
133
|
+
query: queryParameters,
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
139
|
+
* Folder Action Handler
|
|
140
|
+
*/
|
|
141
|
+
folderActionRaw(requestParameters, initOverrides) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const requestOptions = yield this.folderActionRequestOpts(requestParameters);
|
|
144
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FolderActionResponseFromJSON(jsonValue));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
150
|
+
* Folder Action Handler
|
|
151
|
+
*/
|
|
152
|
+
folderAction(requestParameters, initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const response = yield this.folderActionRaw(requestParameters, initOverrides);
|
|
155
|
+
return yield response.value();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
111
158
|
/**
|
|
112
159
|
* Creates request options for getFolder without sending the request
|
|
113
160
|
*/
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type { EmbeddingModel } from './EmbeddingModel';
|
|
13
12
|
import type { ChunkType } from './ChunkType';
|
|
13
|
+
import type { SearchType } from './SearchType';
|
|
14
14
|
/**
|
|
15
|
-
* Request body for
|
|
15
|
+
* Request body for chunk search (dense vector or full-text BM25).
|
|
16
16
|
* @export
|
|
17
17
|
* @interface ChunkSearchRequest
|
|
18
18
|
*/
|
|
@@ -25,10 +25,10 @@ export interface ChunkSearchRequest {
|
|
|
25
25
|
query: string;
|
|
26
26
|
/**
|
|
27
27
|
*
|
|
28
|
-
* @type {
|
|
28
|
+
* @type {SearchType}
|
|
29
29
|
* @memberof ChunkSearchRequest
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
searchType?: SearchType;
|
|
32
32
|
/**
|
|
33
33
|
* Path part IDs to search within (non-CHUNK types). Defaults to tenant's /shared.
|
|
34
34
|
* @type {Array<string>}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import { EmbeddingModelFromJSON, EmbeddingModelToJSON, } from './EmbeddingModel';
|
|
15
14
|
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
15
|
+
import { SearchTypeFromJSON, SearchTypeToJSON, } from './SearchType';
|
|
16
16
|
/**
|
|
17
17
|
* Check if a given object implements the ChunkSearchRequest interface.
|
|
18
18
|
*/
|
|
@@ -30,7 +30,7 @@ export function ChunkSearchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
30
|
}
|
|
31
31
|
return {
|
|
32
32
|
'query': json['query'],
|
|
33
|
-
'
|
|
33
|
+
'searchType': json['search_type'] == null ? undefined : SearchTypeFromJSON(json['search_type']),
|
|
34
34
|
'parentPathIds': json['parent_path_ids'] == null ? undefined : json['parent_path_ids'],
|
|
35
35
|
'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
|
|
36
36
|
'chunkTypes': json['chunk_types'] == null ? undefined : (json['chunk_types'].map(ChunkTypeFromJSON)),
|
|
@@ -49,7 +49,7 @@ export function ChunkSearchRequestToJSONTyped(value, ignoreDiscriminator = false
|
|
|
49
49
|
}
|
|
50
50
|
return {
|
|
51
51
|
'query': value['query'],
|
|
52
|
-
'
|
|
52
|
+
'search_type': SearchTypeToJSON(value['searchType']),
|
|
53
53
|
'parent_path_ids': value['parentPathIds'],
|
|
54
54
|
'tag_ids': value['tagIds'],
|
|
55
55
|
'chunk_types': value['chunkTypes'] == null ? undefined : (value['chunkTypes'].map(ChunkTypeToJSON)),
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Supported folder actions.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const FolderAction: {
|
|
17
|
+
readonly Reembed: "reembed";
|
|
18
|
+
};
|
|
19
|
+
export type FolderAction = typeof FolderAction[keyof typeof FolderAction];
|
|
20
|
+
export declare function instanceOfFolderAction(value: any): boolean;
|
|
21
|
+
export declare function FolderActionFromJSON(json: any): FolderAction;
|
|
22
|
+
export declare function FolderActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderAction;
|
|
23
|
+
export declare function FolderActionToJSON(value?: FolderAction | null): any;
|
|
24
|
+
export declare function FolderActionToJSONTyped(value: any, ignoreDiscriminator: boolean): FolderAction;
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
* Supported folder actions.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const FolderAction = {
|
|
19
|
+
Reembed: 'reembed'
|
|
20
|
+
};
|
|
21
|
+
export function instanceOfFolderAction(value) {
|
|
22
|
+
for (const key in FolderAction) {
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(FolderAction, key)) {
|
|
24
|
+
if (FolderAction[key] === value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
export function FolderActionFromJSON(json) {
|
|
32
|
+
return FolderActionFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function FolderActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
export function FolderActionToJSON(value) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
export function FolderActionToJSONTyped(value, ignoreDiscriminator) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { FolderAction } from './FolderAction';
|
|
13
|
+
/**
|
|
14
|
+
* Response for folder action endpoints.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface FolderActionResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface FolderActionResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof FolderActionResponse
|
|
23
|
+
*/
|
|
24
|
+
folderId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {FolderAction}
|
|
28
|
+
* @memberof FolderActionResponse
|
|
29
|
+
*/
|
|
30
|
+
action: FolderAction;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof FolderActionResponse
|
|
35
|
+
*/
|
|
36
|
+
workflowId: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfFolderActionResponse(value: object): value is FolderActionResponse;
|
|
42
|
+
export declare function FolderActionResponseFromJSON(json: any): FolderActionResponse;
|
|
43
|
+
export declare function FolderActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderActionResponse;
|
|
44
|
+
export declare function FolderActionResponseToJSON(json: any): FolderActionResponse;
|
|
45
|
+
export declare function FolderActionResponseToJSONTyped(value?: FolderActionResponse | null, ignoreDiscriminator?: boolean): any;
|
|
46
|
+
export declare const FolderActionResponsePropertyValidationAttributesMap: {
|
|
47
|
+
[property: string]: {
|
|
48
|
+
maxLength?: number;
|
|
49
|
+
minLength?: number;
|
|
50
|
+
pattern?: string;
|
|
51
|
+
maximum?: number;
|
|
52
|
+
exclusiveMaximum?: boolean;
|
|
53
|
+
minimum?: number;
|
|
54
|
+
exclusiveMinimum?: boolean;
|
|
55
|
+
multipleOf?: number;
|
|
56
|
+
maxItems?: number;
|
|
57
|
+
minItems?: number;
|
|
58
|
+
uniqueItems?: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|