@knowledge-stack/ksapi 1.29.0 → 1.31.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 +2 -2
- package/README.md +3 -3
- package/dist/apis/ChunksApi.d.ts +4 -4
- package/dist/apis/ChunksApi.js +2 -2
- package/dist/apis/FoldersApi.d.ts +3 -0
- package/dist/apis/FoldersApi.js +3 -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 +3 -0
- package/dist/esm/apis/FoldersApi.js +3 -0
- package/dist/esm/models/ChunkSearchRequest.d.ts +4 -4
- package/dist/esm/models/ChunkSearchRequest.js +3 -3
- package/dist/esm/models/SearchType.d.ts +25 -0
- package/dist/esm/models/SearchType.js +43 -0
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/models/ChunkSearchRequest.d.ts +4 -4
- package/dist/models/ChunkSearchRequest.js +3 -3
- package/dist/models/SearchType.d.ts +25 -0
- package/dist/models/SearchType.js +51 -0
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/docs/ChunkSearchRequest.md +3 -3
- package/docs/ChunksApi.md +1 -1
- package/docs/FoldersApi.md +4 -1
- package/docs/{EmbeddingModel.md → SearchType.md} +5 -5
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +4 -4
- package/src/apis/FoldersApi.ts +7 -0
- package/src/models/ChunkSearchRequest.ts +12 -12
- package/src/models/SearchType.ts +53 -0
- package/src/models/index.ts +1 -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,6 @@ docs/DocumentVersionsApi.md
|
|
|
38
38
|
docs/DocumentsApi.md
|
|
39
39
|
docs/EmailSentResponse.md
|
|
40
40
|
docs/EmailVerificationRequest.md
|
|
41
|
-
docs/EmbeddingModel.md
|
|
42
41
|
docs/FolderResponse.md
|
|
43
42
|
docs/FolderResponseOrDocumentResponse.md
|
|
44
43
|
docs/FoldersApi.md
|
|
@@ -86,6 +85,7 @@ docs/PolygonReference.md
|
|
|
86
85
|
docs/RootResponse.md
|
|
87
86
|
docs/SSOInitiateResponse.md
|
|
88
87
|
docs/ScoredChunkResponse.md
|
|
88
|
+
docs/SearchType.md
|
|
89
89
|
docs/SectionContentItem.md
|
|
90
90
|
docs/SectionContentItemOrChunkContentItem.md
|
|
91
91
|
docs/SectionResponse.md
|
|
@@ -176,7 +176,6 @@ src/models/DocumentVersionMetadataUpdate.ts
|
|
|
176
176
|
src/models/DocumentVersionResponse.ts
|
|
177
177
|
src/models/EmailSentResponse.ts
|
|
178
178
|
src/models/EmailVerificationRequest.ts
|
|
179
|
-
src/models/EmbeddingModel.ts
|
|
180
179
|
src/models/FolderResponse.ts
|
|
181
180
|
src/models/FolderResponseOrDocumentResponse.ts
|
|
182
181
|
src/models/HTTPValidationError.ts
|
|
@@ -221,6 +220,7 @@ src/models/PolygonReference.ts
|
|
|
221
220
|
src/models/RootResponse.ts
|
|
222
221
|
src/models/SSOInitiateResponse.ts
|
|
223
222
|
src/models/ScoredChunkResponse.ts
|
|
223
|
+
src/models/SearchType.ts
|
|
224
224
|
src/models/SectionContentItem.ts
|
|
225
225
|
src/models/SectionContentItemOrChunkContentItem.ts
|
|
226
226
|
src/models/SectionResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.31.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -172,7 +172,6 @@ All URIs are relative to *http://localhost:8000*
|
|
|
172
172
|
- [DocumentVersionResponse](docs/DocumentVersionResponse.md)
|
|
173
173
|
- [EmailSentResponse](docs/EmailSentResponse.md)
|
|
174
174
|
- [EmailVerificationRequest](docs/EmailVerificationRequest.md)
|
|
175
|
-
- [EmbeddingModel](docs/EmbeddingModel.md)
|
|
176
175
|
- [FolderResponse](docs/FolderResponse.md)
|
|
177
176
|
- [FolderResponseOrDocumentResponse](docs/FolderResponseOrDocumentResponse.md)
|
|
178
177
|
- [HTTPValidationError](docs/HTTPValidationError.md)
|
|
@@ -217,6 +216,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
217
216
|
- [RootResponse](docs/RootResponse.md)
|
|
218
217
|
- [SSOInitiateResponse](docs/SSOInitiateResponse.md)
|
|
219
218
|
- [ScoredChunkResponse](docs/ScoredChunkResponse.md)
|
|
219
|
+
- [SearchType](docs/SearchType.md)
|
|
220
220
|
- [SectionContentItem](docs/SectionContentItem.md)
|
|
221
221
|
- [SectionContentItemOrChunkContentItem](docs/SectionContentItemOrChunkContentItem.md)
|
|
222
222
|
- [SectionResponse](docs/SectionResponse.md)
|
|
@@ -262,7 +262,7 @@ and is automatically generated by the
|
|
|
262
262
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
263
263
|
|
|
264
264
|
- API version: `0.1.0`
|
|
265
|
-
- Package version: `1.
|
|
265
|
+
- Package version: `1.31.0`
|
|
266
266
|
- Generator version: `7.20.0`
|
|
267
267
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
268
268
|
|
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) {
|
|
@@ -29,6 +29,7 @@ export interface ListFolderContentsRequest {
|
|
|
29
29
|
maxDepth?: number;
|
|
30
30
|
sortOrder?: PathOrder;
|
|
31
31
|
withTags?: boolean;
|
|
32
|
+
nameLike?: string | null;
|
|
32
33
|
limit?: number;
|
|
33
34
|
offset?: number;
|
|
34
35
|
ksUat?: string | null;
|
|
@@ -130,6 +131,7 @@ export interface FoldersApiInterface {
|
|
|
130
131
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
131
132
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
132
133
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
134
|
+
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
133
135
|
* @param {number} [limit] Number of items per page
|
|
134
136
|
* @param {number} [offset] Number of items to skip
|
|
135
137
|
* @param {string} [ksUat]
|
|
@@ -144,6 +146,7 @@ export interface FoldersApiInterface {
|
|
|
144
146
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
145
147
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
146
148
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
149
|
+
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
147
150
|
* @param {number} [limit] Number of items per page
|
|
148
151
|
* @param {number} [offset] Number of items to skip
|
|
149
152
|
* @param {string} [ksUat]
|
package/dist/apis/FoldersApi.js
CHANGED
|
@@ -173,6 +173,9 @@ class FoldersApi extends runtime.BaseAPI {
|
|
|
173
173
|
if (requestParameters['withTags'] != null) {
|
|
174
174
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
175
175
|
}
|
|
176
|
+
if (requestParameters['nameLike'] != null) {
|
|
177
|
+
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
178
|
+
}
|
|
176
179
|
if (requestParameters['limit'] != null) {
|
|
177
180
|
queryParameters['limit'] = requestParameters['limit'];
|
|
178
181
|
}
|
|
@@ -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) {
|
|
@@ -29,6 +29,7 @@ export interface ListFolderContentsRequest {
|
|
|
29
29
|
maxDepth?: number;
|
|
30
30
|
sortOrder?: PathOrder;
|
|
31
31
|
withTags?: boolean;
|
|
32
|
+
nameLike?: string | null;
|
|
32
33
|
limit?: number;
|
|
33
34
|
offset?: number;
|
|
34
35
|
ksUat?: string | null;
|
|
@@ -130,6 +131,7 @@ export interface FoldersApiInterface {
|
|
|
130
131
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
131
132
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
132
133
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
134
|
+
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
133
135
|
* @param {number} [limit] Number of items per page
|
|
134
136
|
* @param {number} [offset] Number of items to skip
|
|
135
137
|
* @param {string} [ksUat]
|
|
@@ -144,6 +146,7 @@ export interface FoldersApiInterface {
|
|
|
144
146
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
145
147
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
146
148
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
149
|
+
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
147
150
|
* @param {number} [limit] Number of items per page
|
|
148
151
|
* @param {number} [offset] Number of items to skip
|
|
149
152
|
* @param {string} [ksUat]
|
|
@@ -170,6 +170,9 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
170
170
|
if (requestParameters['withTags'] != null) {
|
|
171
171
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
172
172
|
}
|
|
173
|
+
if (requestParameters['nameLike'] != null) {
|
|
174
|
+
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
175
|
+
}
|
|
173
176
|
if (requestParameters['limit'] != null) {
|
|
174
177
|
queryParameters['limit'] = requestParameters['limit'];
|
|
175
178
|
}
|
|
@@ -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,25 @@
|
|
|
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
|
+
* Search type for chunk search.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const SearchType: {
|
|
17
|
+
readonly DenseOnly: "dense_only";
|
|
18
|
+
readonly FullText: "full_text";
|
|
19
|
+
};
|
|
20
|
+
export type SearchType = typeof SearchType[keyof typeof SearchType];
|
|
21
|
+
export declare function instanceOfSearchType(value: any): boolean;
|
|
22
|
+
export declare function SearchTypeFromJSON(json: any): SearchType;
|
|
23
|
+
export declare function SearchTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchType;
|
|
24
|
+
export declare function SearchTypeToJSON(value?: SearchType | null): any;
|
|
25
|
+
export declare function SearchTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SearchType;
|
|
@@ -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
|
+
/**
|
|
15
|
+
* Search type for chunk search.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const SearchType = {
|
|
19
|
+
DenseOnly: 'dense_only',
|
|
20
|
+
FullText: 'full_text'
|
|
21
|
+
};
|
|
22
|
+
export function instanceOfSearchType(value) {
|
|
23
|
+
for (const key in SearchType) {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(SearchType, key)) {
|
|
25
|
+
if (SearchType[key] === value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
export function SearchTypeFromJSON(json) {
|
|
33
|
+
return SearchTypeFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function SearchTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
export function SearchTypeToJSON(value) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
export function SearchTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
@@ -28,7 +28,6 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
28
28
|
export * from './DocumentVersionResponse';
|
|
29
29
|
export * from './EmailSentResponse';
|
|
30
30
|
export * from './EmailVerificationRequest';
|
|
31
|
-
export * from './EmbeddingModel';
|
|
32
31
|
export * from './FolderResponse';
|
|
33
32
|
export * from './FolderResponseOrDocumentResponse';
|
|
34
33
|
export * from './HTTPValidationError';
|
|
@@ -73,6 +72,7 @@ export * from './PolygonReference';
|
|
|
73
72
|
export * from './RootResponse';
|
|
74
73
|
export * from './SSOInitiateResponse';
|
|
75
74
|
export * from './ScoredChunkResponse';
|
|
75
|
+
export * from './SearchType';
|
|
76
76
|
export * from './SectionContentItem';
|
|
77
77
|
export * from './SectionContentItemOrChunkContentItem';
|
|
78
78
|
export * from './SectionResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -30,7 +30,6 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
30
30
|
export * from './DocumentVersionResponse';
|
|
31
31
|
export * from './EmailSentResponse';
|
|
32
32
|
export * from './EmailVerificationRequest';
|
|
33
|
-
export * from './EmbeddingModel';
|
|
34
33
|
export * from './FolderResponse';
|
|
35
34
|
export * from './FolderResponseOrDocumentResponse';
|
|
36
35
|
export * from './HTTPValidationError';
|
|
@@ -75,6 +74,7 @@ export * from './PolygonReference';
|
|
|
75
74
|
export * from './RootResponse';
|
|
76
75
|
export * from './SSOInitiateResponse';
|
|
77
76
|
export * from './ScoredChunkResponse';
|
|
77
|
+
export * from './SearchType';
|
|
78
78
|
export * from './SectionContentItem';
|
|
79
79
|
export * from './SectionContentItemOrChunkContentItem';
|
|
80
80
|
export * from './SectionResponse';
|
|
@@ -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>}
|
|
@@ -19,8 +19,8 @@ exports.ChunkSearchRequestFromJSON = ChunkSearchRequestFromJSON;
|
|
|
19
19
|
exports.ChunkSearchRequestFromJSONTyped = ChunkSearchRequestFromJSONTyped;
|
|
20
20
|
exports.ChunkSearchRequestToJSON = ChunkSearchRequestToJSON;
|
|
21
21
|
exports.ChunkSearchRequestToJSONTyped = ChunkSearchRequestToJSONTyped;
|
|
22
|
-
const EmbeddingModel_1 = require("./EmbeddingModel");
|
|
23
22
|
const ChunkType_1 = require("./ChunkType");
|
|
23
|
+
const SearchType_1 = require("./SearchType");
|
|
24
24
|
/**
|
|
25
25
|
* Check if a given object implements the ChunkSearchRequest interface.
|
|
26
26
|
*/
|
|
@@ -38,7 +38,7 @@ function ChunkSearchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
38
|
}
|
|
39
39
|
return {
|
|
40
40
|
'query': json['query'],
|
|
41
|
-
'
|
|
41
|
+
'searchType': json['search_type'] == null ? undefined : (0, SearchType_1.SearchTypeFromJSON)(json['search_type']),
|
|
42
42
|
'parentPathIds': json['parent_path_ids'] == null ? undefined : json['parent_path_ids'],
|
|
43
43
|
'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
|
|
44
44
|
'chunkTypes': json['chunk_types'] == null ? undefined : (json['chunk_types'].map(ChunkType_1.ChunkTypeFromJSON)),
|
|
@@ -57,7 +57,7 @@ function ChunkSearchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
57
57
|
}
|
|
58
58
|
return {
|
|
59
59
|
'query': value['query'],
|
|
60
|
-
'
|
|
60
|
+
'search_type': (0, SearchType_1.SearchTypeToJSON)(value['searchType']),
|
|
61
61
|
'parent_path_ids': value['parentPathIds'],
|
|
62
62
|
'tag_ids': value['tagIds'],
|
|
63
63
|
'chunk_types': value['chunkTypes'] == null ? undefined : (value['chunkTypes'].map(ChunkType_1.ChunkTypeToJSON)),
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
* Search type for chunk search.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const SearchType: {
|
|
17
|
+
readonly DenseOnly: "dense_only";
|
|
18
|
+
readonly FullText: "full_text";
|
|
19
|
+
};
|
|
20
|
+
export type SearchType = typeof SearchType[keyof typeof SearchType];
|
|
21
|
+
export declare function instanceOfSearchType(value: any): boolean;
|
|
22
|
+
export declare function SearchTypeFromJSON(json: any): SearchType;
|
|
23
|
+
export declare function SearchTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchType;
|
|
24
|
+
export declare function SearchTypeToJSON(value?: SearchType | null): any;
|
|
25
|
+
export declare function SearchTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SearchType;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SearchType = void 0;
|
|
17
|
+
exports.instanceOfSearchType = instanceOfSearchType;
|
|
18
|
+
exports.SearchTypeFromJSON = SearchTypeFromJSON;
|
|
19
|
+
exports.SearchTypeFromJSONTyped = SearchTypeFromJSONTyped;
|
|
20
|
+
exports.SearchTypeToJSON = SearchTypeToJSON;
|
|
21
|
+
exports.SearchTypeToJSONTyped = SearchTypeToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Search type for chunk search.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.SearchType = {
|
|
27
|
+
DenseOnly: 'dense_only',
|
|
28
|
+
FullText: 'full_text'
|
|
29
|
+
};
|
|
30
|
+
function instanceOfSearchType(value) {
|
|
31
|
+
for (const key in exports.SearchType) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(exports.SearchType, key)) {
|
|
33
|
+
if (exports.SearchType[key] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function SearchTypeFromJSON(json) {
|
|
41
|
+
return SearchTypeFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function SearchTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
function SearchTypeToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function SearchTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -28,7 +28,6 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
28
28
|
export * from './DocumentVersionResponse';
|
|
29
29
|
export * from './EmailSentResponse';
|
|
30
30
|
export * from './EmailVerificationRequest';
|
|
31
|
-
export * from './EmbeddingModel';
|
|
32
31
|
export * from './FolderResponse';
|
|
33
32
|
export * from './FolderResponseOrDocumentResponse';
|
|
34
33
|
export * from './HTTPValidationError';
|
|
@@ -73,6 +72,7 @@ export * from './PolygonReference';
|
|
|
73
72
|
export * from './RootResponse';
|
|
74
73
|
export * from './SSOInitiateResponse';
|
|
75
74
|
export * from './ScoredChunkResponse';
|
|
75
|
+
export * from './SearchType';
|
|
76
76
|
export * from './SectionContentItem';
|
|
77
77
|
export * from './SectionContentItemOrChunkContentItem';
|
|
78
78
|
export * from './SectionResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -46,7 +46,6 @@ __exportStar(require("./DocumentVersionMetadataUpdate"), exports);
|
|
|
46
46
|
__exportStar(require("./DocumentVersionResponse"), exports);
|
|
47
47
|
__exportStar(require("./EmailSentResponse"), exports);
|
|
48
48
|
__exportStar(require("./EmailVerificationRequest"), exports);
|
|
49
|
-
__exportStar(require("./EmbeddingModel"), exports);
|
|
50
49
|
__exportStar(require("./FolderResponse"), exports);
|
|
51
50
|
__exportStar(require("./FolderResponseOrDocumentResponse"), exports);
|
|
52
51
|
__exportStar(require("./HTTPValidationError"), exports);
|
|
@@ -91,6 +90,7 @@ __exportStar(require("./PolygonReference"), exports);
|
|
|
91
90
|
__exportStar(require("./RootResponse"), exports);
|
|
92
91
|
__exportStar(require("./SSOInitiateResponse"), exports);
|
|
93
92
|
__exportStar(require("./ScoredChunkResponse"), exports);
|
|
93
|
+
__exportStar(require("./SearchType"), exports);
|
|
94
94
|
__exportStar(require("./SectionContentItem"), exports);
|
|
95
95
|
__exportStar(require("./SectionContentItemOrChunkContentItem"), exports);
|
|
96
96
|
__exportStar(require("./SectionResponse"), exports);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
# ChunkSearchRequest
|
|
3
3
|
|
|
4
|
-
Request body for
|
|
4
|
+
Request body for chunk search (dense vector or full-text BM25).
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`query` | string
|
|
11
|
-
`
|
|
11
|
+
`searchType` | [SearchType](SearchType.md)
|
|
12
12
|
`parentPathIds` | Array<string>
|
|
13
13
|
`tagIds` | Array<string>
|
|
14
14
|
`chunkTypes` | [Array<ChunkType>](ChunkType.md)
|
|
@@ -25,7 +25,7 @@ import type { ChunkSearchRequest } from '@knowledge-stack/ksapi'
|
|
|
25
25
|
// TODO: Update the object below with actual values
|
|
26
26
|
const example = {
|
|
27
27
|
"query": null,
|
|
28
|
-
"
|
|
28
|
+
"searchType": null,
|
|
29
29
|
"parentPathIds": null,
|
|
30
30
|
"tagIds": null,
|
|
31
31
|
"chunkTypes": null,
|
package/docs/ChunksApi.md
CHANGED
|
@@ -376,7 +376,7 @@ No authorization required
|
|
|
376
376
|
|
|
377
377
|
Search Chunks Handler
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
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.
|
|
380
380
|
|
|
381
381
|
### Example
|
|
382
382
|
|
package/docs/FoldersApi.md
CHANGED
|
@@ -231,7 +231,7 @@ No authorization required
|
|
|
231
231
|
|
|
232
232
|
## listFolderContents
|
|
233
233
|
|
|
234
|
-
> PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator listFolderContents(folderId, maxDepth, sortOrder, withTags, limit, offset, ksUat)
|
|
234
|
+
> PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator listFolderContents(folderId, maxDepth, sortOrder, withTags, nameLike, limit, offset, ksUat)
|
|
235
235
|
|
|
236
236
|
List Folder Contents Handler
|
|
237
237
|
|
|
@@ -259,6 +259,8 @@ async function example() {
|
|
|
259
259
|
sortOrder: ...,
|
|
260
260
|
// boolean | Include tag IDs for each item (default: false) (optional)
|
|
261
261
|
withTags: true,
|
|
262
|
+
// string | Case-insensitive partial name search filter (optional)
|
|
263
|
+
nameLike: nameLike_example,
|
|
262
264
|
// number | Number of items per page (optional)
|
|
263
265
|
limit: 56,
|
|
264
266
|
// number | Number of items to skip (optional)
|
|
@@ -288,6 +290,7 @@ example().catch(console.error);
|
|
|
288
290
|
| **maxDepth** | `number` | Maximum depth to traverse (1=direct children, default: 1) | [Optional] [Defaults to `1`] |
|
|
289
291
|
| **sortOrder** | `PathOrder` | Sort order for results (default: LOGICAL) | [Optional] [Defaults to `undefined`] [Enum: LOGICAL, NAME, UPDATED_AT, CREATED_AT] |
|
|
290
292
|
| **withTags** | `boolean` | Include tag IDs for each item (default: false) | [Optional] [Defaults to `false`] |
|
|
293
|
+
| **nameLike** | `string` | Case-insensitive partial name search filter | [Optional] [Defaults to `undefined`] |
|
|
291
294
|
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
292
295
|
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
293
296
|
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# SearchType
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Search type for chunk search.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
@@ -11,11 +11,11 @@ Name | Type
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type {
|
|
14
|
+
import type { SearchType } from '@knowledge-stack/ksapi'
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
|
-
} satisfies
|
|
18
|
+
} satisfies SearchType
|
|
19
19
|
|
|
20
20
|
console.log(example)
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
24
24
|
console.log(exampleJSON)
|
|
25
25
|
|
|
26
26
|
// Parse the JSON string back to an object
|
|
27
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as SearchType
|
|
28
28
|
console.log(exampleParsed)
|
|
29
29
|
```
|
|
30
30
|
|
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
|
@@ -61,6 +61,7 @@ export interface ListFolderContentsRequest {
|
|
|
61
61
|
maxDepth?: number;
|
|
62
62
|
sortOrder?: PathOrder;
|
|
63
63
|
withTags?: boolean;
|
|
64
|
+
nameLike?: string | null;
|
|
64
65
|
limit?: number;
|
|
65
66
|
offset?: number;
|
|
66
67
|
ksUat?: string | null;
|
|
@@ -174,6 +175,7 @@ export interface FoldersApiInterface {
|
|
|
174
175
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
175
176
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
176
177
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
178
|
+
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
177
179
|
* @param {number} [limit] Number of items per page
|
|
178
180
|
* @param {number} [offset] Number of items to skip
|
|
179
181
|
* @param {string} [ksUat]
|
|
@@ -189,6 +191,7 @@ export interface FoldersApiInterface {
|
|
|
189
191
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
190
192
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
191
193
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
194
|
+
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
192
195
|
* @param {number} [limit] Number of items per page
|
|
193
196
|
* @param {number} [offset] Number of items to skip
|
|
194
197
|
* @param {string} [ksUat]
|
|
@@ -444,6 +447,10 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
444
447
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
445
448
|
}
|
|
446
449
|
|
|
450
|
+
if (requestParameters['nameLike'] != null) {
|
|
451
|
+
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
452
|
+
}
|
|
453
|
+
|
|
447
454
|
if (requestParameters['limit'] != null) {
|
|
448
455
|
queryParameters['limit'] = requestParameters['limit'];
|
|
449
456
|
}
|
|
@@ -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,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,6 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
30
30
|
export * from './DocumentVersionResponse';
|
|
31
31
|
export * from './EmailSentResponse';
|
|
32
32
|
export * from './EmailVerificationRequest';
|
|
33
|
-
export * from './EmbeddingModel';
|
|
34
33
|
export * from './FolderResponse';
|
|
35
34
|
export * from './FolderResponseOrDocumentResponse';
|
|
36
35
|
export * from './HTTPValidationError';
|
|
@@ -75,6 +74,7 @@ export * from './PolygonReference';
|
|
|
75
74
|
export * from './RootResponse';
|
|
76
75
|
export * from './SSOInitiateResponse';
|
|
77
76
|
export * from './ScoredChunkResponse';
|
|
77
|
+
export * from './SearchType';
|
|
78
78
|
export * from './SectionContentItem';
|
|
79
79
|
export * from './SectionContentItemOrChunkContentItem';
|
|
80
80
|
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
|
-
}
|
|
@@ -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,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Knowledge Stack API
|
|
6
|
-
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.0
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.EmbeddingModel = void 0;
|
|
17
|
-
exports.instanceOfEmbeddingModel = instanceOfEmbeddingModel;
|
|
18
|
-
exports.EmbeddingModelFromJSON = EmbeddingModelFromJSON;
|
|
19
|
-
exports.EmbeddingModelFromJSONTyped = EmbeddingModelFromJSONTyped;
|
|
20
|
-
exports.EmbeddingModelToJSON = EmbeddingModelToJSON;
|
|
21
|
-
exports.EmbeddingModelToJSONTyped = EmbeddingModelToJSONTyped;
|
|
22
|
-
/**
|
|
23
|
-
* Supported embedding models.
|
|
24
|
-
* @export
|
|
25
|
-
*/
|
|
26
|
-
exports.EmbeddingModel = {
|
|
27
|
-
TextEmbedding3Small: 'text-embedding-3-small'
|
|
28
|
-
};
|
|
29
|
-
function instanceOfEmbeddingModel(value) {
|
|
30
|
-
for (const key in exports.EmbeddingModel) {
|
|
31
|
-
if (Object.prototype.hasOwnProperty.call(exports.EmbeddingModel, key)) {
|
|
32
|
-
if (exports.EmbeddingModel[key] === value) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
function EmbeddingModelFromJSON(json) {
|
|
40
|
-
return EmbeddingModelFromJSONTyped(json, false);
|
|
41
|
-
}
|
|
42
|
-
function EmbeddingModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
-
return json;
|
|
44
|
-
}
|
|
45
|
-
function EmbeddingModelToJSON(value) {
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
function EmbeddingModelToJSONTyped(value, ignoreDiscriminator) {
|
|
49
|
-
return value;
|
|
50
|
-
}
|
|
@@ -1,52 +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
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Supported embedding models.
|
|
18
|
-
* @export
|
|
19
|
-
*/
|
|
20
|
-
export const EmbeddingModel = {
|
|
21
|
-
TextEmbedding3Small: 'text-embedding-3-small'
|
|
22
|
-
} as const;
|
|
23
|
-
export type EmbeddingModel = typeof EmbeddingModel[keyof typeof EmbeddingModel];
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export function instanceOfEmbeddingModel(value: any): boolean {
|
|
27
|
-
for (const key in EmbeddingModel) {
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(EmbeddingModel, key)) {
|
|
29
|
-
if (EmbeddingModel[key as keyof typeof EmbeddingModel] === value) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function EmbeddingModelFromJSON(json: any): EmbeddingModel {
|
|
38
|
-
return EmbeddingModelFromJSONTyped(json, false);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function EmbeddingModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmbeddingModel {
|
|
42
|
-
return json as EmbeddingModel;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function EmbeddingModelToJSON(value?: EmbeddingModel | null): any {
|
|
46
|
-
return value as any;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function EmbeddingModelToJSONTyped(value: any, ignoreDiscriminator: boolean): EmbeddingModel {
|
|
50
|
-
return value as EmbeddingModel;
|
|
51
|
-
}
|
|
52
|
-
|