@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
|
@@ -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
|
+
import { FolderActionFromJSON, FolderActionToJSON, } from './FolderAction';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfFolderActionResponse(value) {
|
|
19
|
+
if (!('folderId' in value) || value['folderId'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function FolderActionResponseFromJSON(json) {
|
|
28
|
+
return FolderActionResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function FolderActionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'folderId': json['folder_id'],
|
|
36
|
+
'action': FolderActionFromJSON(json['action']),
|
|
37
|
+
'workflowId': json['workflow_id'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function FolderActionResponseToJSON(json) {
|
|
41
|
+
return FolderActionResponseToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function FolderActionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'folder_id': value['folderId'],
|
|
49
|
+
'action': FolderActionToJSON(value['action']),
|
|
50
|
+
'workflow_id': value['workflowId'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export const FolderActionResponsePropertyValidationAttributesMap = {};
|
|
@@ -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,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
28
28
|
export * from './DocumentVersionResponse';
|
|
29
29
|
export * from './EmailSentResponse';
|
|
30
30
|
export * from './EmailVerificationRequest';
|
|
31
|
-
export * from './
|
|
31
|
+
export * from './FolderAction';
|
|
32
|
+
export * from './FolderActionResponse';
|
|
32
33
|
export * from './FolderResponse';
|
|
33
34
|
export * from './FolderResponseOrDocumentResponse';
|
|
34
35
|
export * from './HTTPValidationError';
|
|
@@ -73,6 +74,7 @@ export * from './PolygonReference';
|
|
|
73
74
|
export * from './RootResponse';
|
|
74
75
|
export * from './SSOInitiateResponse';
|
|
75
76
|
export * from './ScoredChunkResponse';
|
|
77
|
+
export * from './SearchType';
|
|
76
78
|
export * from './SectionContentItem';
|
|
77
79
|
export * from './SectionContentItemOrChunkContentItem';
|
|
78
80
|
export * from './SectionResponse';
|
package/dist/esm/models/index.js
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';
|
|
@@ -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,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,50 @@
|
|
|
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.FolderAction = void 0;
|
|
17
|
+
exports.instanceOfFolderAction = instanceOfFolderAction;
|
|
18
|
+
exports.FolderActionFromJSON = FolderActionFromJSON;
|
|
19
|
+
exports.FolderActionFromJSONTyped = FolderActionFromJSONTyped;
|
|
20
|
+
exports.FolderActionToJSON = FolderActionToJSON;
|
|
21
|
+
exports.FolderActionToJSONTyped = FolderActionToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Supported folder actions.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.FolderAction = {
|
|
27
|
+
Reembed: 'reembed'
|
|
28
|
+
};
|
|
29
|
+
function instanceOfFolderAction(value) {
|
|
30
|
+
for (const key in exports.FolderAction) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(exports.FolderAction, key)) {
|
|
32
|
+
if (exports.FolderAction[key] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
function FolderActionFromJSON(json) {
|
|
40
|
+
return FolderActionFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function FolderActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
function FolderActionToJSON(value) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
function FolderActionToJSONTyped(value, ignoreDiscriminator) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
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.FolderActionResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfFolderActionResponse = instanceOfFolderActionResponse;
|
|
18
|
+
exports.FolderActionResponseFromJSON = FolderActionResponseFromJSON;
|
|
19
|
+
exports.FolderActionResponseFromJSONTyped = FolderActionResponseFromJSONTyped;
|
|
20
|
+
exports.FolderActionResponseToJSON = FolderActionResponseToJSON;
|
|
21
|
+
exports.FolderActionResponseToJSONTyped = FolderActionResponseToJSONTyped;
|
|
22
|
+
const FolderAction_1 = require("./FolderAction");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfFolderActionResponse(value) {
|
|
27
|
+
if (!('folderId' in value) || value['folderId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function FolderActionResponseFromJSON(json) {
|
|
36
|
+
return FolderActionResponseFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function FolderActionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'folderId': json['folder_id'],
|
|
44
|
+
'action': (0, FolderAction_1.FolderActionFromJSON)(json['action']),
|
|
45
|
+
'workflowId': json['workflow_id'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function FolderActionResponseToJSON(json) {
|
|
49
|
+
return FolderActionResponseToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function FolderActionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'folder_id': value['folderId'],
|
|
57
|
+
'action': (0, FolderAction_1.FolderActionToJSON)(value['action']),
|
|
58
|
+
'workflow_id': value['workflowId'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.FolderActionResponsePropertyValidationAttributesMap = {};
|
|
@@ -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,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
28
28
|
export * from './DocumentVersionResponse';
|
|
29
29
|
export * from './EmailSentResponse';
|
|
30
30
|
export * from './EmailVerificationRequest';
|
|
31
|
-
export * from './
|
|
31
|
+
export * from './FolderAction';
|
|
32
|
+
export * from './FolderActionResponse';
|
|
32
33
|
export * from './FolderResponse';
|
|
33
34
|
export * from './FolderResponseOrDocumentResponse';
|
|
34
35
|
export * from './HTTPValidationError';
|
|
@@ -73,6 +74,7 @@ export * from './PolygonReference';
|
|
|
73
74
|
export * from './RootResponse';
|
|
74
75
|
export * from './SSOInitiateResponse';
|
|
75
76
|
export * from './ScoredChunkResponse';
|
|
77
|
+
export * from './SearchType';
|
|
76
78
|
export * from './SectionContentItem';
|
|
77
79
|
export * from './SectionContentItemOrChunkContentItem';
|
|
78
80
|
export * from './SectionResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -46,7 +46,8 @@ __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("./
|
|
49
|
+
__exportStar(require("./FolderAction"), exports);
|
|
50
|
+
__exportStar(require("./FolderActionResponse"), exports);
|
|
50
51
|
__exportStar(require("./FolderResponse"), exports);
|
|
51
52
|
__exportStar(require("./FolderResponseOrDocumentResponse"), exports);
|
|
52
53
|
__exportStar(require("./HTTPValidationError"), exports);
|
|
@@ -91,6 +92,7 @@ __exportStar(require("./PolygonReference"), exports);
|
|
|
91
92
|
__exportStar(require("./RootResponse"), exports);
|
|
92
93
|
__exportStar(require("./SSOInitiateResponse"), exports);
|
|
93
94
|
__exportStar(require("./ScoredChunkResponse"), exports);
|
|
95
|
+
__exportStar(require("./SearchType"), exports);
|
|
94
96
|
__exportStar(require("./SectionContentItem"), exports);
|
|
95
97
|
__exportStar(require("./SectionContentItemOrChunkContentItem"), exports);
|
|
96
98
|
__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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# FolderAction
|
|
3
3
|
|
|
4
|
-
Supported
|
|
4
|
+
Supported folder actions.
|
|
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 { FolderAction } from '@knowledge-stack/ksapi'
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
|
-
} satisfies
|
|
18
|
+
} satisfies FolderAction
|
|
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 FolderAction
|
|
28
28
|
console.log(exampleParsed)
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# FolderActionResponse
|
|
3
|
+
|
|
4
|
+
Response for folder action endpoints.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`folderId` | string
|
|
11
|
+
`action` | [FolderAction](FolderAction.md)
|
|
12
|
+
`workflowId` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { FolderActionResponse } from '@knowledge-stack/ksapi'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"folderId": null,
|
|
22
|
+
"action": null,
|
|
23
|
+
"workflowId": null,
|
|
24
|
+
} satisfies FolderActionResponse
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as FolderActionResponse
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|