@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/docs/FoldersApi.md
CHANGED
|
@@ -6,6 +6,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**createFolder**](FoldersApi.md#createfolderoperation) | **POST** /v1/folders | Create Folder Handler |
|
|
8
8
|
| [**deleteFolder**](FoldersApi.md#deletefolder) | **DELETE** /v1/folders/{folder_id} | Delete Folder Handler |
|
|
9
|
+
| [**folderAction**](FoldersApi.md#folderaction) | **POST** /v1/folders/{folder_id} | Folder Action Handler |
|
|
9
10
|
| [**getFolder**](FoldersApi.md#getfolder) | **GET** /v1/folders/{folder_id} | Get Folder Handler |
|
|
10
11
|
| [**listFolderContents**](FoldersApi.md#listfoldercontents) | **GET** /v1/folders/{folder_id}/contents | List Folder Contents Handler |
|
|
11
12
|
| [**listFolders**](FoldersApi.md#listfolders) | **GET** /v1/folders | List Folders Handler |
|
|
@@ -155,6 +156,80 @@ No authorization required
|
|
|
155
156
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
156
157
|
|
|
157
158
|
|
|
159
|
+
## folderAction
|
|
160
|
+
|
|
161
|
+
> FolderActionResponse folderAction(folderId, action, ksUat)
|
|
162
|
+
|
|
163
|
+
Folder Action Handler
|
|
164
|
+
|
|
165
|
+
Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
166
|
+
|
|
167
|
+
### Example
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
import {
|
|
171
|
+
Configuration,
|
|
172
|
+
FoldersApi,
|
|
173
|
+
} from '@knowledge-stack/ksapi';
|
|
174
|
+
import type { FolderActionRequest } from '@knowledge-stack/ksapi';
|
|
175
|
+
|
|
176
|
+
async function example() {
|
|
177
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
178
|
+
const api = new FoldersApi();
|
|
179
|
+
|
|
180
|
+
const body = {
|
|
181
|
+
// string
|
|
182
|
+
folderId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
183
|
+
// FolderAction | Action to perform
|
|
184
|
+
action: ...,
|
|
185
|
+
// string (optional)
|
|
186
|
+
ksUat: ksUat_example,
|
|
187
|
+
} satisfies FolderActionRequest;
|
|
188
|
+
|
|
189
|
+
try {
|
|
190
|
+
const data = await api.folderAction(body);
|
|
191
|
+
console.log(data);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(error);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Run the test
|
|
198
|
+
example().catch(console.error);
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
| Name | Type | Description | Notes |
|
|
205
|
+
|------------- | ------------- | ------------- | -------------|
|
|
206
|
+
| **folderId** | `string` | | [Defaults to `undefined`] |
|
|
207
|
+
| **action** | `FolderAction` | Action to perform | [Defaults to `undefined`] [Enum: reembed] |
|
|
208
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
209
|
+
|
|
210
|
+
### Return type
|
|
211
|
+
|
|
212
|
+
[**FolderActionResponse**](FolderActionResponse.md)
|
|
213
|
+
|
|
214
|
+
### Authorization
|
|
215
|
+
|
|
216
|
+
No authorization required
|
|
217
|
+
|
|
218
|
+
### HTTP request headers
|
|
219
|
+
|
|
220
|
+
- **Content-Type**: Not defined
|
|
221
|
+
- **Accept**: `application/json`
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### HTTP response details
|
|
225
|
+
| Status code | Description | Response headers |
|
|
226
|
+
|-------------|-------------|------------------|
|
|
227
|
+
| **200** | Successful Response | - |
|
|
228
|
+
| **422** | Validation Error | - |
|
|
229
|
+
|
|
230
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
231
|
+
|
|
232
|
+
|
|
158
233
|
## getFolder
|
|
159
234
|
|
|
160
235
|
> FolderResponse getFolder(folderId, withTags, ksUat)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# SearchType
|
|
3
|
+
|
|
4
|
+
Search type for chunk search.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { SearchType } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies SearchType
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as SearchType
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
package/package.json
CHANGED
package/src/apis/ChunksApi.ts
CHANGED
|
@@ -235,7 +235,7 @@ export interface ChunksApiInterface {
|
|
|
235
235
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
236
236
|
|
|
237
237
|
/**
|
|
238
|
-
*
|
|
238
|
+
* 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.
|
|
239
239
|
* @summary Search Chunks Handler
|
|
240
240
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
241
241
|
* @param {string} [ksUat]
|
|
@@ -246,7 +246,7 @@ export interface ChunksApiInterface {
|
|
|
246
246
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
|
-
*
|
|
249
|
+
* 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.
|
|
250
250
|
* Search Chunks Handler
|
|
251
251
|
*/
|
|
252
252
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -579,7 +579,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
/**
|
|
582
|
-
*
|
|
582
|
+
* 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.
|
|
583
583
|
* Search Chunks Handler
|
|
584
584
|
*/
|
|
585
585
|
async searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>> {
|
|
@@ -590,7 +590,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
/**
|
|
593
|
-
*
|
|
593
|
+
* 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.
|
|
594
594
|
* Search Chunks Handler
|
|
595
595
|
*/
|
|
596
596
|
async searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>> {
|
package/src/apis/FoldersApi.ts
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
CreateFolderRequest,
|
|
19
|
+
FolderAction,
|
|
20
|
+
FolderActionResponse,
|
|
19
21
|
FolderResponse,
|
|
20
22
|
HTTPValidationError,
|
|
21
23
|
PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator,
|
|
@@ -26,6 +28,10 @@ import type {
|
|
|
26
28
|
import {
|
|
27
29
|
CreateFolderRequestFromJSON,
|
|
28
30
|
CreateFolderRequestToJSON,
|
|
31
|
+
FolderActionFromJSON,
|
|
32
|
+
FolderActionToJSON,
|
|
33
|
+
FolderActionResponseFromJSON,
|
|
34
|
+
FolderActionResponseToJSON,
|
|
29
35
|
FolderResponseFromJSON,
|
|
30
36
|
FolderResponseToJSON,
|
|
31
37
|
HTTPValidationErrorFromJSON,
|
|
@@ -50,6 +56,12 @@ export interface DeleteFolderRequest {
|
|
|
50
56
|
ksUat?: string | null;
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
export interface FolderActionRequest {
|
|
60
|
+
folderId: string;
|
|
61
|
+
action: FolderAction;
|
|
62
|
+
ksUat?: string | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
53
65
|
export interface GetFolderRequest {
|
|
54
66
|
folderId: string;
|
|
55
67
|
withTags?: boolean;
|
|
@@ -141,6 +153,34 @@ export interface FoldersApiInterface {
|
|
|
141
153
|
*/
|
|
142
154
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
143
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for folderAction without sending the request
|
|
158
|
+
* @param {string} folderId
|
|
159
|
+
* @param {FolderAction} action Action to perform
|
|
160
|
+
* @param {string} [ksUat]
|
|
161
|
+
* @throws {RequiredError}
|
|
162
|
+
* @memberof FoldersApiInterface
|
|
163
|
+
*/
|
|
164
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
168
|
+
* @summary Folder Action Handler
|
|
169
|
+
* @param {string} folderId
|
|
170
|
+
* @param {FolderAction} action Action to perform
|
|
171
|
+
* @param {string} [ksUat]
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
* @memberof FoldersApiInterface
|
|
175
|
+
*/
|
|
176
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
180
|
+
* Folder Action Handler
|
|
181
|
+
*/
|
|
182
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
183
|
+
|
|
144
184
|
/**
|
|
145
185
|
* Creates request options for getFolder without sending the request
|
|
146
186
|
* @param {string} folderId
|
|
@@ -371,6 +411,64 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
371
411
|
await this.deleteFolderRaw(requestParameters, initOverrides);
|
|
372
412
|
}
|
|
373
413
|
|
|
414
|
+
/**
|
|
415
|
+
* Creates request options for folderAction without sending the request
|
|
416
|
+
*/
|
|
417
|
+
async folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts> {
|
|
418
|
+
if (requestParameters['folderId'] == null) {
|
|
419
|
+
throw new runtime.RequiredError(
|
|
420
|
+
'folderId',
|
|
421
|
+
'Required parameter "folderId" was null or undefined when calling folderAction().'
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if (requestParameters['action'] == null) {
|
|
426
|
+
throw new runtime.RequiredError(
|
|
427
|
+
'action',
|
|
428
|
+
'Required parameter "action" was null or undefined when calling folderAction().'
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const queryParameters: any = {};
|
|
433
|
+
|
|
434
|
+
if (requestParameters['action'] != null) {
|
|
435
|
+
queryParameters['action'] = requestParameters['action'];
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
let urlPath = `/v1/folders/{folder_id}`;
|
|
442
|
+
urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
|
|
443
|
+
|
|
444
|
+
return {
|
|
445
|
+
path: urlPath,
|
|
446
|
+
method: 'POST',
|
|
447
|
+
headers: headerParameters,
|
|
448
|
+
query: queryParameters,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
454
|
+
* Folder Action Handler
|
|
455
|
+
*/
|
|
456
|
+
async folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>> {
|
|
457
|
+
const requestOptions = await this.folderActionRequestOpts(requestParameters);
|
|
458
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
459
|
+
|
|
460
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FolderActionResponseFromJSON(jsonValue));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
465
|
+
* Folder Action Handler
|
|
466
|
+
*/
|
|
467
|
+
async folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse> {
|
|
468
|
+
const response = await this.folderActionRaw(requestParameters, initOverrides);
|
|
469
|
+
return await response.value();
|
|
470
|
+
}
|
|
471
|
+
|
|
374
472
|
/**
|
|
375
473
|
* Creates request options for getFolder without sending the request
|
|
376
474
|
*/
|
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type { EmbeddingModel } from './EmbeddingModel';
|
|
17
|
-
import {
|
|
18
|
-
EmbeddingModelFromJSON,
|
|
19
|
-
EmbeddingModelFromJSONTyped,
|
|
20
|
-
EmbeddingModelToJSON,
|
|
21
|
-
EmbeddingModelToJSONTyped,
|
|
22
|
-
} from './EmbeddingModel';
|
|
23
16
|
import type { ChunkType } from './ChunkType';
|
|
24
17
|
import {
|
|
25
18
|
ChunkTypeFromJSON,
|
|
@@ -27,9 +20,16 @@ import {
|
|
|
27
20
|
ChunkTypeToJSON,
|
|
28
21
|
ChunkTypeToJSONTyped,
|
|
29
22
|
} from './ChunkType';
|
|
23
|
+
import type { SearchType } from './SearchType';
|
|
24
|
+
import {
|
|
25
|
+
SearchTypeFromJSON,
|
|
26
|
+
SearchTypeFromJSONTyped,
|
|
27
|
+
SearchTypeToJSON,
|
|
28
|
+
SearchTypeToJSONTyped,
|
|
29
|
+
} from './SearchType';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Request body for
|
|
32
|
+
* Request body for chunk search (dense vector or full-text BM25).
|
|
33
33
|
* @export
|
|
34
34
|
* @interface ChunkSearchRequest
|
|
35
35
|
*/
|
|
@@ -42,10 +42,10 @@ export interface ChunkSearchRequest {
|
|
|
42
42
|
query: string;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
|
-
* @type {
|
|
45
|
+
* @type {SearchType}
|
|
46
46
|
* @memberof ChunkSearchRequest
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
searchType?: SearchType;
|
|
49
49
|
/**
|
|
50
50
|
* Path part IDs to search within (non-CHUNK types). Defaults to tenant's /shared.
|
|
51
51
|
* @type {Array<string>}
|
|
@@ -111,7 +111,7 @@ export function ChunkSearchRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
111
111
|
return {
|
|
112
112
|
|
|
113
113
|
'query': json['query'],
|
|
114
|
-
'
|
|
114
|
+
'searchType': json['search_type'] == null ? undefined : SearchTypeFromJSON(json['search_type']),
|
|
115
115
|
'parentPathIds': json['parent_path_ids'] == null ? undefined : json['parent_path_ids'],
|
|
116
116
|
'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
|
|
117
117
|
'chunkTypes': json['chunk_types'] == null ? undefined : ((json['chunk_types'] as Array<any>).map(ChunkTypeFromJSON)),
|
|
@@ -134,7 +134,7 @@ export function ChunkSearchRequestToJSONTyped(value?: ChunkSearchRequest | null,
|
|
|
134
134
|
return {
|
|
135
135
|
|
|
136
136
|
'query': value['query'],
|
|
137
|
-
'
|
|
137
|
+
'search_type': SearchTypeToJSON(value['searchType']),
|
|
138
138
|
'parent_path_ids': value['parentPathIds'],
|
|
139
139
|
'tag_ids': value['tagIds'],
|
|
140
140
|
'chunk_types': value['chunkTypes'] == null ? undefined : ((value['chunkTypes'] as Array<any>).map(ChunkTypeToJSON)),
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Supported folder actions.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const FolderAction = {
|
|
21
|
+
Reembed: 'reembed'
|
|
22
|
+
} as const;
|
|
23
|
+
export type FolderAction = typeof FolderAction[keyof typeof FolderAction];
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export function instanceOfFolderAction(value: any): boolean {
|
|
27
|
+
for (const key in FolderAction) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(FolderAction, key)) {
|
|
29
|
+
if (FolderAction[key as keyof typeof FolderAction] === value) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function FolderActionFromJSON(json: any): FolderAction {
|
|
38
|
+
return FolderActionFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function FolderActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderAction {
|
|
42
|
+
return json as FolderAction;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function FolderActionToJSON(value?: FolderAction | null): any {
|
|
46
|
+
return value as any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function FolderActionToJSONTyped(value: any, ignoreDiscriminator: boolean): FolderAction {
|
|
50
|
+
return value as FolderAction;
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
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 { FolderAction } from './FolderAction';
|
|
17
|
+
import {
|
|
18
|
+
FolderActionFromJSON,
|
|
19
|
+
FolderActionFromJSONTyped,
|
|
20
|
+
FolderActionToJSON,
|
|
21
|
+
FolderActionToJSONTyped,
|
|
22
|
+
} from './FolderAction';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Response for folder action endpoints.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface FolderActionResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface FolderActionResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof FolderActionResponse
|
|
34
|
+
*/
|
|
35
|
+
folderId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {FolderAction}
|
|
39
|
+
* @memberof FolderActionResponse
|
|
40
|
+
*/
|
|
41
|
+
action: FolderAction;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof FolderActionResponse
|
|
46
|
+
*/
|
|
47
|
+
workflowId: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfFolderActionResponse(value: object): value is FolderActionResponse {
|
|
56
|
+
if (!('folderId' in value) || value['folderId'] === undefined) return false;
|
|
57
|
+
if (!('action' in value) || value['action'] === undefined) return false;
|
|
58
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function FolderActionResponseFromJSON(json: any): FolderActionResponse {
|
|
63
|
+
return FolderActionResponseFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function FolderActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderActionResponse {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'folderId': json['folder_id'],
|
|
73
|
+
'action': FolderActionFromJSON(json['action']),
|
|
74
|
+
'workflowId': json['workflow_id'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function FolderActionResponseToJSON(json: any): FolderActionResponse {
|
|
79
|
+
return FolderActionResponseToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function FolderActionResponseToJSONTyped(value?: FolderActionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'folder_id': value['folderId'],
|
|
90
|
+
'action': FolderActionToJSON(value['action']),
|
|
91
|
+
'workflow_id': value['workflowId'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const FolderActionResponsePropertyValidationAttributesMap: {
|
|
96
|
+
[property: string]: {
|
|
97
|
+
maxLength?: number,
|
|
98
|
+
minLength?: number,
|
|
99
|
+
pattern?: string,
|
|
100
|
+
maximum?: number,
|
|
101
|
+
exclusiveMaximum?: boolean,
|
|
102
|
+
minimum?: number,
|
|
103
|
+
exclusiveMinimum?: boolean,
|
|
104
|
+
multipleOf?: number,
|
|
105
|
+
maxItems?: number,
|
|
106
|
+
minItems?: number,
|
|
107
|
+
uniqueItems?: boolean
|
|
108
|
+
}
|
|
109
|
+
} = {
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* Search type for chunk search.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const SearchType = {
|
|
21
|
+
DenseOnly: 'dense_only',
|
|
22
|
+
FullText: 'full_text'
|
|
23
|
+
} as const;
|
|
24
|
+
export type SearchType = typeof SearchType[keyof typeof SearchType];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfSearchType(value: any): boolean {
|
|
28
|
+
for (const key in SearchType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(SearchType, key)) {
|
|
30
|
+
if (SearchType[key as keyof typeof SearchType] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function SearchTypeFromJSON(json: any): SearchType {
|
|
39
|
+
return SearchTypeFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function SearchTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchType {
|
|
43
|
+
return json as SearchType;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function SearchTypeToJSON(value?: SearchType | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function SearchTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SearchType {
|
|
51
|
+
return value as SearchType;
|
|
52
|
+
}
|
|
53
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -30,7 +30,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
30
30
|
export * from './DocumentVersionResponse';
|
|
31
31
|
export * from './EmailSentResponse';
|
|
32
32
|
export * from './EmailVerificationRequest';
|
|
33
|
-
export * from './
|
|
33
|
+
export * from './FolderAction';
|
|
34
|
+
export * from './FolderActionResponse';
|
|
34
35
|
export * from './FolderResponse';
|
|
35
36
|
export * from './FolderResponseOrDocumentResponse';
|
|
36
37
|
export * from './HTTPValidationError';
|
|
@@ -75,6 +76,7 @@ export * from './PolygonReference';
|
|
|
75
76
|
export * from './RootResponse';
|
|
76
77
|
export * from './SSOInitiateResponse';
|
|
77
78
|
export * from './ScoredChunkResponse';
|
|
79
|
+
export * from './SearchType';
|
|
78
80
|
export * from './SectionContentItem';
|
|
79
81
|
export * from './SectionContentItemOrChunkContentItem';
|
|
80
82
|
export * from './SectionResponse';
|
|
@@ -1,24 +0,0 @@
|
|
|
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 embedding models.
|
|
14
|
-
* @export
|
|
15
|
-
*/
|
|
16
|
-
export declare const EmbeddingModel: {
|
|
17
|
-
readonly TextEmbedding3Small: "text-embedding-3-small";
|
|
18
|
-
};
|
|
19
|
-
export type EmbeddingModel = typeof EmbeddingModel[keyof typeof EmbeddingModel];
|
|
20
|
-
export declare function instanceOfEmbeddingModel(value: any): boolean;
|
|
21
|
-
export declare function EmbeddingModelFromJSON(json: any): EmbeddingModel;
|
|
22
|
-
export declare function EmbeddingModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingModel;
|
|
23
|
-
export declare function EmbeddingModelToJSON(value?: EmbeddingModel | null): any;
|
|
24
|
-
export declare function EmbeddingModelToJSONTyped(value: any, ignoreDiscriminator: boolean): EmbeddingModel;
|
|
@@ -1,42 +0,0 @@
|
|
|
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 embedding models.
|
|
16
|
-
* @export
|
|
17
|
-
*/
|
|
18
|
-
export const EmbeddingModel = {
|
|
19
|
-
TextEmbedding3Small: 'text-embedding-3-small'
|
|
20
|
-
};
|
|
21
|
-
export function instanceOfEmbeddingModel(value) {
|
|
22
|
-
for (const key in EmbeddingModel) {
|
|
23
|
-
if (Object.prototype.hasOwnProperty.call(EmbeddingModel, key)) {
|
|
24
|
-
if (EmbeddingModel[key] === value) {
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
export function EmbeddingModelFromJSON(json) {
|
|
32
|
-
return EmbeddingModelFromJSONTyped(json, false);
|
|
33
|
-
}
|
|
34
|
-
export function EmbeddingModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
-
return json;
|
|
36
|
-
}
|
|
37
|
-
export function EmbeddingModelToJSON(value) {
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
40
|
-
export function EmbeddingModelToJSONTyped(value, ignoreDiscriminator) {
|
|
41
|
-
return value;
|
|
42
|
-
}
|