@knowledge-stack/ksapi 1.103.2 → 1.104.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/README.md +4 -2
- package/dist/apis/ApiConnectionsApi.d.ts +38 -0
- package/dist/apis/ApiConnectionsApi.js +47 -0
- package/dist/apis/DataSourcesApi.d.ts +38 -0
- package/dist/apis/DataSourcesApi.js +47 -0
- package/dist/apis/FoldersApi.d.ts +6 -6
- package/dist/apis/FoldersApi.js +2 -2
- package/dist/apis/ThreadsApi.d.ts +4 -4
- package/dist/apis/ThreadsApi.js +2 -2
- package/dist/esm/apis/ApiConnectionsApi.d.ts +38 -0
- package/dist/esm/apis/ApiConnectionsApi.js +47 -0
- package/dist/esm/apis/DataSourcesApi.d.ts +38 -0
- package/dist/esm/apis/DataSourcesApi.js +47 -0
- package/dist/esm/apis/FoldersApi.d.ts +6 -6
- package/dist/esm/apis/FoldersApi.js +2 -2
- package/dist/esm/apis/ThreadsApi.d.ts +4 -4
- package/dist/esm/apis/ThreadsApi.js +2 -2
- package/dist/esm/models/DataSourceResponse.d.ts +7 -0
- package/dist/esm/models/DataSourceResponse.js +5 -0
- package/dist/esm/models/DataSourceTableResponse.d.ts +7 -0
- package/dist/esm/models/DataSourceTableResponse.js +5 -0
- package/dist/esm/models/SearchablePartType.d.ts +1 -0
- package/dist/esm/models/SearchablePartType.js +2 -1
- package/dist/models/DataSourceResponse.d.ts +7 -0
- package/dist/models/DataSourceResponse.js +5 -0
- package/dist/models/DataSourceTableResponse.d.ts +7 -0
- package/dist/models/DataSourceTableResponse.js +5 -0
- package/dist/models/SearchablePartType.d.ts +1 -0
- package/dist/models/SearchablePartType.js +2 -1
- package/docs/ApiConnectionsApi.md +76 -0
- package/docs/DataSourceResponse.md +2 -0
- package/docs/DataSourceTableResponse.md +2 -0
- package/docs/DataSourcesApi.md +76 -0
- package/docs/FoldersApi.md +3 -3
- package/docs/ThreadsApi.md +1 -1
- package/package.json +1 -1
- package/src/apis/ApiConnectionsApi.ts +82 -0
- package/src/apis/DataSourcesApi.ts +82 -0
- package/src/apis/FoldersApi.ts +6 -6
- package/src/apis/ThreadsApi.ts +4 -4
- package/src/models/DataSourceResponse.ts +16 -0
- package/src/models/DataSourceTableResponse.ts +16 -0
- package/src/models/SearchablePartType.ts +2 -1
|
@@ -229,7 +229,7 @@ export interface FoldersApiInterface {
|
|
|
229
229
|
* Creates request options for searchItems without sending the request
|
|
230
230
|
* @param {string} nameLike Case-insensitive partial name search
|
|
231
231
|
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
232
|
-
* @param {SearchablePartType} [partType] Filter by item type (default:
|
|
232
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: all searchable types)
|
|
233
233
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
234
234
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
235
235
|
* @param {number} [limit] Number of items per page
|
|
@@ -239,11 +239,11 @@ export interface FoldersApiInterface {
|
|
|
239
239
|
*/
|
|
240
240
|
searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
|
|
241
241
|
/**
|
|
242
|
-
* Search for folders, documents, and
|
|
242
|
+
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
243
243
|
* @summary Search Items Handler
|
|
244
244
|
* @param {string} nameLike Case-insensitive partial name search
|
|
245
245
|
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
246
|
-
* @param {SearchablePartType} [partType] Filter by item type (default:
|
|
246
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: all searchable types)
|
|
247
247
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
248
248
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
249
249
|
* @param {number} [limit] Number of items per page
|
|
@@ -254,7 +254,7 @@ export interface FoldersApiInterface {
|
|
|
254
254
|
*/
|
|
255
255
|
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>>;
|
|
256
256
|
/**
|
|
257
|
-
* Search for folders, documents, and
|
|
257
|
+
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
258
258
|
* Search Items Handler
|
|
259
259
|
*/
|
|
260
260
|
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>;
|
|
@@ -373,12 +373,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
373
373
|
*/
|
|
374
374
|
searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
|
|
375
375
|
/**
|
|
376
|
-
* Search for folders, documents, and
|
|
376
|
+
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
377
377
|
* Search Items Handler
|
|
378
378
|
*/
|
|
379
379
|
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>>;
|
|
380
380
|
/**
|
|
381
|
-
* Search for folders, documents, and
|
|
381
|
+
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
382
382
|
* Search Items Handler
|
|
383
383
|
*/
|
|
384
384
|
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>;
|
|
@@ -413,7 +413,7 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
416
|
-
* Search for folders, documents, and
|
|
416
|
+
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
417
417
|
* Search Items Handler
|
|
418
418
|
*/
|
|
419
419
|
searchItemsRaw(requestParameters, initOverrides) {
|
|
@@ -424,7 +424,7 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
|
-
* Search for folders, documents, and
|
|
427
|
+
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
428
428
|
* Search Items Handler
|
|
429
429
|
*/
|
|
430
430
|
searchItems(requestParameters, initOverrides) {
|
|
@@ -60,7 +60,7 @@ export interface ThreadsApiInterface {
|
|
|
60
60
|
*/
|
|
61
61
|
createThreadRequestOpts(requestParameters: CreateThreadOperationRequest): Promise<runtime.RequestOpts>;
|
|
62
62
|
/**
|
|
63
|
-
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
63
|
+
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed). With ``message_for_title``, the thread is created as \"New Thread\" and its title is summarized in a background task; the FE learns the final title via a ``THREAD_TITLE_CHANGED`` WebSocket event.
|
|
64
64
|
* @summary Create Thread Handler
|
|
65
65
|
* @param {CreateThreadRequest} createThreadRequest
|
|
66
66
|
* @param {*} [options] Override http request option.
|
|
@@ -69,7 +69,7 @@ export interface ThreadsApiInterface {
|
|
|
69
69
|
*/
|
|
70
70
|
createThreadRaw(requestParameters: CreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ThreadResponse>>;
|
|
71
71
|
/**
|
|
72
|
-
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
72
|
+
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed). With ``message_for_title``, the thread is created as \"New Thread\" and its title is summarized in a background task; the FE learns the final title via a ``THREAD_TITLE_CHANGED`` WebSocket event.
|
|
73
73
|
* Create Thread Handler
|
|
74
74
|
*/
|
|
75
75
|
createThread(requestParameters: CreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ThreadResponse>;
|
|
@@ -235,12 +235,12 @@ export declare class ThreadsApi extends runtime.BaseAPI implements ThreadsApiInt
|
|
|
235
235
|
*/
|
|
236
236
|
createThreadRequestOpts(requestParameters: CreateThreadOperationRequest): Promise<runtime.RequestOpts>;
|
|
237
237
|
/**
|
|
238
|
-
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
238
|
+
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed). With ``message_for_title``, the thread is created as \"New Thread\" and its title is summarized in a background task; the FE learns the final title via a ``THREAD_TITLE_CHANGED`` WebSocket event.
|
|
239
239
|
* Create Thread Handler
|
|
240
240
|
*/
|
|
241
241
|
createThreadRaw(requestParameters: CreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ThreadResponse>>;
|
|
242
242
|
/**
|
|
243
|
-
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
243
|
+
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed). With ``message_for_title``, the thread is created as \"New Thread\" and its title is summarized in a background task; the FE learns the final title via a ``THREAD_TITLE_CHANGED`` WebSocket event.
|
|
244
244
|
* Create Thread Handler
|
|
245
245
|
*/
|
|
246
246
|
createThread(requestParameters: CreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ThreadResponse>;
|
|
@@ -55,7 +55,7 @@ export class ThreadsApi extends runtime.BaseAPI {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
58
|
+
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed). With ``message_for_title``, the thread is created as \"New Thread\" and its title is summarized in a background task; the FE learns the final title via a ``THREAD_TITLE_CHANGED`` WebSocket event.
|
|
59
59
|
* Create Thread Handler
|
|
60
60
|
*/
|
|
61
61
|
createThreadRaw(requestParameters, initOverrides) {
|
|
@@ -66,7 +66,7 @@ export class ThreadsApi extends runtime.BaseAPI {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
69
|
+
* Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed). With ``message_for_title``, the thread is created as \"New Thread\" and its title is summarized in a background task; the FE learns the final title via a ``THREAD_TITLE_CHANGED`` WebSocket event.
|
|
70
70
|
* Create Thread Handler
|
|
71
71
|
*/
|
|
72
72
|
createThread(requestParameters, initOverrides) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ItemPermissions } from './ItemPermissions';
|
|
12
13
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
13
14
|
import type { UserInfo } from './UserInfo';
|
|
14
15
|
import type { DataSourceEngine } from './DataSourceEngine';
|
|
@@ -81,6 +82,12 @@ export interface DataSourceResponse {
|
|
|
81
82
|
* @memberof DataSourceResponse
|
|
82
83
|
*/
|
|
83
84
|
owner?: UserInfo | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {ItemPermissions}
|
|
88
|
+
* @memberof DataSourceResponse
|
|
89
|
+
*/
|
|
90
|
+
permissions: ItemPermissions;
|
|
84
91
|
/**
|
|
85
92
|
*
|
|
86
93
|
* @type {Date}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
|
|
14
15
|
import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
|
|
15
16
|
import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
|
|
16
17
|
import { DataSourceEngineFromJSON, DataSourceEngineToJSON, } from './DataSourceEngine';
|
|
@@ -41,6 +42,8 @@ export function instanceOfDataSourceResponse(value) {
|
|
|
41
42
|
return false;
|
|
42
43
|
if (!('approvalState' in value) || value['approvalState'] === undefined)
|
|
43
44
|
return false;
|
|
45
|
+
if (!('permissions' in value) || value['permissions'] === undefined)
|
|
46
|
+
return false;
|
|
44
47
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
45
48
|
return false;
|
|
46
49
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
@@ -65,6 +68,7 @@ export function DataSourceResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
65
68
|
'engine': DataSourceEngineFromJSON(json['engine']),
|
|
66
69
|
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
67
70
|
'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
|
|
71
|
+
'permissions': ItemPermissionsFromJSON(json['permissions']),
|
|
68
72
|
'createdAt': (new Date(json['created_at'])),
|
|
69
73
|
'updatedAt': (new Date(json['updated_at'])),
|
|
70
74
|
};
|
|
@@ -87,6 +91,7 @@ export function DataSourceResponseToJSONTyped(value, ignoreDiscriminator = false
|
|
|
87
91
|
'engine': DataSourceEngineToJSON(value['engine']),
|
|
88
92
|
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
89
93
|
'owner': UserInfoToJSON(value['owner']),
|
|
94
|
+
'permissions': ItemPermissionsToJSON(value['permissions']),
|
|
90
95
|
'created_at': value['createdAt'].toISOString(),
|
|
91
96
|
'updated_at': value['updatedAt'].toISOString(),
|
|
92
97
|
};
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ItemPermissions } from './ItemPermissions';
|
|
12
13
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
13
14
|
/**
|
|
14
15
|
* Modeled-table response; a discriminated-union variant for listings.
|
|
@@ -90,6 +91,12 @@ export interface DataSourceTableResponse {
|
|
|
90
91
|
* @memberof DataSourceTableResponse
|
|
91
92
|
*/
|
|
92
93
|
approvalState: PathPartApprovalState;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {ItemPermissions}
|
|
97
|
+
* @memberof DataSourceTableResponse
|
|
98
|
+
*/
|
|
99
|
+
permissions: ItemPermissions;
|
|
93
100
|
/**
|
|
94
101
|
*
|
|
95
102
|
* @type {Date}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
|
|
14
15
|
import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
|
|
15
16
|
/**
|
|
16
17
|
* @export
|
|
@@ -45,6 +46,8 @@ export function instanceOfDataSourceTableResponse(value) {
|
|
|
45
46
|
return false;
|
|
46
47
|
if (!('approvalState' in value) || value['approvalState'] === undefined)
|
|
47
48
|
return false;
|
|
49
|
+
if (!('permissions' in value) || value['permissions'] === undefined)
|
|
50
|
+
return false;
|
|
48
51
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
49
52
|
return false;
|
|
50
53
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
@@ -71,6 +74,7 @@ export function DataSourceTableResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
71
74
|
'description': json['description'],
|
|
72
75
|
'columnConfig': json['column_config'],
|
|
73
76
|
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
77
|
+
'permissions': ItemPermissionsFromJSON(json['permissions']),
|
|
74
78
|
'createdAt': (new Date(json['created_at'])),
|
|
75
79
|
'updatedAt': (new Date(json['updated_at'])),
|
|
76
80
|
};
|
|
@@ -95,6 +99,7 @@ export function DataSourceTableResponseToJSONTyped(value, ignoreDiscriminator =
|
|
|
95
99
|
'description': value['description'],
|
|
96
100
|
'column_config': value['columnConfig'],
|
|
97
101
|
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
102
|
+
'permissions': ItemPermissionsToJSON(value['permissions']),
|
|
98
103
|
'created_at': value['createdAt'].toISOString(),
|
|
99
104
|
'updated_at': value['updatedAt'].toISOString(),
|
|
100
105
|
};
|
|
@@ -17,6 +17,7 @@ export declare const SearchablePartType: {
|
|
|
17
17
|
readonly Folder: "FOLDER";
|
|
18
18
|
readonly Document: "DOCUMENT";
|
|
19
19
|
readonly DataSource: "DATA_SOURCE";
|
|
20
|
+
readonly ApiConnection: "API_CONNECTION";
|
|
20
21
|
};
|
|
21
22
|
export type SearchablePartType = typeof SearchablePartType[keyof typeof SearchablePartType];
|
|
22
23
|
export declare function instanceOfSearchablePartType(value: any): boolean;
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
export const SearchablePartType = {
|
|
19
19
|
Folder: 'FOLDER',
|
|
20
20
|
Document: 'DOCUMENT',
|
|
21
|
-
DataSource: 'DATA_SOURCE'
|
|
21
|
+
DataSource: 'DATA_SOURCE',
|
|
22
|
+
ApiConnection: 'API_CONNECTION'
|
|
22
23
|
};
|
|
23
24
|
export function instanceOfSearchablePartType(value) {
|
|
24
25
|
for (const key in SearchablePartType) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ItemPermissions } from './ItemPermissions';
|
|
12
13
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
13
14
|
import type { UserInfo } from './UserInfo';
|
|
14
15
|
import type { DataSourceEngine } from './DataSourceEngine';
|
|
@@ -81,6 +82,12 @@ export interface DataSourceResponse {
|
|
|
81
82
|
* @memberof DataSourceResponse
|
|
82
83
|
*/
|
|
83
84
|
owner?: UserInfo | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {ItemPermissions}
|
|
88
|
+
* @memberof DataSourceResponse
|
|
89
|
+
*/
|
|
90
|
+
permissions: ItemPermissions;
|
|
84
91
|
/**
|
|
85
92
|
*
|
|
86
93
|
* @type {Date}
|
|
@@ -19,6 +19,7 @@ exports.DataSourceResponseFromJSON = DataSourceResponseFromJSON;
|
|
|
19
19
|
exports.DataSourceResponseFromJSONTyped = DataSourceResponseFromJSONTyped;
|
|
20
20
|
exports.DataSourceResponseToJSON = DataSourceResponseToJSON;
|
|
21
21
|
exports.DataSourceResponseToJSONTyped = DataSourceResponseToJSONTyped;
|
|
22
|
+
const ItemPermissions_1 = require("./ItemPermissions");
|
|
22
23
|
const PathPartApprovalState_1 = require("./PathPartApprovalState");
|
|
23
24
|
const UserInfo_1 = require("./UserInfo");
|
|
24
25
|
const DataSourceEngine_1 = require("./DataSourceEngine");
|
|
@@ -49,6 +50,8 @@ function instanceOfDataSourceResponse(value) {
|
|
|
49
50
|
return false;
|
|
50
51
|
if (!('approvalState' in value) || value['approvalState'] === undefined)
|
|
51
52
|
return false;
|
|
53
|
+
if (!('permissions' in value) || value['permissions'] === undefined)
|
|
54
|
+
return false;
|
|
52
55
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
53
56
|
return false;
|
|
54
57
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
@@ -73,6 +76,7 @@ function DataSourceResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
73
76
|
'engine': (0, DataSourceEngine_1.DataSourceEngineFromJSON)(json['engine']),
|
|
74
77
|
'approvalState': (0, PathPartApprovalState_1.PathPartApprovalStateFromJSON)(json['approval_state']),
|
|
75
78
|
'owner': json['owner'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
|
|
79
|
+
'permissions': (0, ItemPermissions_1.ItemPermissionsFromJSON)(json['permissions']),
|
|
76
80
|
'createdAt': (new Date(json['created_at'])),
|
|
77
81
|
'updatedAt': (new Date(json['updated_at'])),
|
|
78
82
|
};
|
|
@@ -95,6 +99,7 @@ function DataSourceResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
95
99
|
'engine': (0, DataSourceEngine_1.DataSourceEngineToJSON)(value['engine']),
|
|
96
100
|
'approval_state': (0, PathPartApprovalState_1.PathPartApprovalStateToJSON)(value['approvalState']),
|
|
97
101
|
'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
|
|
102
|
+
'permissions': (0, ItemPermissions_1.ItemPermissionsToJSON)(value['permissions']),
|
|
98
103
|
'created_at': value['createdAt'].toISOString(),
|
|
99
104
|
'updated_at': value['updatedAt'].toISOString(),
|
|
100
105
|
};
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ItemPermissions } from './ItemPermissions';
|
|
12
13
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
13
14
|
/**
|
|
14
15
|
* Modeled-table response; a discriminated-union variant for listings.
|
|
@@ -90,6 +91,12 @@ export interface DataSourceTableResponse {
|
|
|
90
91
|
* @memberof DataSourceTableResponse
|
|
91
92
|
*/
|
|
92
93
|
approvalState: PathPartApprovalState;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {ItemPermissions}
|
|
97
|
+
* @memberof DataSourceTableResponse
|
|
98
|
+
*/
|
|
99
|
+
permissions: ItemPermissions;
|
|
93
100
|
/**
|
|
94
101
|
*
|
|
95
102
|
* @type {Date}
|
|
@@ -19,6 +19,7 @@ exports.DataSourceTableResponseFromJSON = DataSourceTableResponseFromJSON;
|
|
|
19
19
|
exports.DataSourceTableResponseFromJSONTyped = DataSourceTableResponseFromJSONTyped;
|
|
20
20
|
exports.DataSourceTableResponseToJSON = DataSourceTableResponseToJSON;
|
|
21
21
|
exports.DataSourceTableResponseToJSONTyped = DataSourceTableResponseToJSONTyped;
|
|
22
|
+
const ItemPermissions_1 = require("./ItemPermissions");
|
|
22
23
|
const PathPartApprovalState_1 = require("./PathPartApprovalState");
|
|
23
24
|
/**
|
|
24
25
|
* @export
|
|
@@ -53,6 +54,8 @@ function instanceOfDataSourceTableResponse(value) {
|
|
|
53
54
|
return false;
|
|
54
55
|
if (!('approvalState' in value) || value['approvalState'] === undefined)
|
|
55
56
|
return false;
|
|
57
|
+
if (!('permissions' in value) || value['permissions'] === undefined)
|
|
58
|
+
return false;
|
|
56
59
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
57
60
|
return false;
|
|
58
61
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
@@ -79,6 +82,7 @@ function DataSourceTableResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
79
82
|
'description': json['description'],
|
|
80
83
|
'columnConfig': json['column_config'],
|
|
81
84
|
'approvalState': (0, PathPartApprovalState_1.PathPartApprovalStateFromJSON)(json['approval_state']),
|
|
85
|
+
'permissions': (0, ItemPermissions_1.ItemPermissionsFromJSON)(json['permissions']),
|
|
82
86
|
'createdAt': (new Date(json['created_at'])),
|
|
83
87
|
'updatedAt': (new Date(json['updated_at'])),
|
|
84
88
|
};
|
|
@@ -103,6 +107,7 @@ function DataSourceTableResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
103
107
|
'description': value['description'],
|
|
104
108
|
'column_config': value['columnConfig'],
|
|
105
109
|
'approval_state': (0, PathPartApprovalState_1.PathPartApprovalStateToJSON)(value['approvalState']),
|
|
110
|
+
'permissions': (0, ItemPermissions_1.ItemPermissionsToJSON)(value['permissions']),
|
|
106
111
|
'created_at': value['createdAt'].toISOString(),
|
|
107
112
|
'updated_at': value['updatedAt'].toISOString(),
|
|
108
113
|
};
|
|
@@ -17,6 +17,7 @@ export declare const SearchablePartType: {
|
|
|
17
17
|
readonly Folder: "FOLDER";
|
|
18
18
|
readonly Document: "DOCUMENT";
|
|
19
19
|
readonly DataSource: "DATA_SOURCE";
|
|
20
|
+
readonly ApiConnection: "API_CONNECTION";
|
|
20
21
|
};
|
|
21
22
|
export type SearchablePartType = typeof SearchablePartType[keyof typeof SearchablePartType];
|
|
22
23
|
export declare function instanceOfSearchablePartType(value: any): boolean;
|
|
@@ -26,7 +26,8 @@ exports.SearchablePartTypeToJSONTyped = SearchablePartTypeToJSONTyped;
|
|
|
26
26
|
exports.SearchablePartType = {
|
|
27
27
|
Folder: 'FOLDER',
|
|
28
28
|
Document: 'DOCUMENT',
|
|
29
|
-
DataSource: 'DATA_SOURCE'
|
|
29
|
+
DataSource: 'DATA_SOURCE',
|
|
30
|
+
ApiConnection: 'API_CONNECTION'
|
|
30
31
|
};
|
|
31
32
|
function instanceOfSearchablePartType(value) {
|
|
32
33
|
for (const key in exports.SearchablePartType) {
|
|
@@ -6,6 +6,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**acceptApiConnectionDisclaimer**](ApiConnectionsApi.md#acceptapiconnectiondisclaimer) | **POST** /v1/api-connections/{connection_id}/disclaimer | Accept Api Connection Disclaimer Handler |
|
|
8
8
|
| [**createApiConnection**](ApiConnectionsApi.md#createapiconnectionoperation) | **POST** /v1/api-connections | Create Api Connection Handler |
|
|
9
|
+
| [**deleteApiConnection**](ApiConnectionsApi.md#deleteapiconnection) | **DELETE** /v1/api-connections/{connection_id} | Delete Api Connection Handler |
|
|
9
10
|
| [**executeApiConnectionRequest**](ApiConnectionsApi.md#executeapiconnectionrequest) | **POST** /v1/api-connections/{connection_id}/request | Execute Api Connection Request Handler |
|
|
10
11
|
| [**getApiConnection**](ApiConnectionsApi.md#getapiconnection) | **GET** /v1/api-connections/{connection_id} | Get Api Connection Handler |
|
|
11
12
|
| [**updateApiConnection**](ApiConnectionsApi.md#updateapiconnectionoperation) | **PATCH** /v1/api-connections/{connection_id} | Update Api Connection Handler |
|
|
@@ -165,6 +166,81 @@ example().catch(console.error);
|
|
|
165
166
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
166
167
|
|
|
167
168
|
|
|
169
|
+
## deleteApiConnection
|
|
170
|
+
|
|
171
|
+
> deleteApiConnection(connectionId)
|
|
172
|
+
|
|
173
|
+
Delete Api Connection Handler
|
|
174
|
+
|
|
175
|
+
Move a connection to trash (Admin/Owner). Soft-delete via the path_part subtree, mirroring create/update authz. A connection holds no Qdrant vectors, so there is no trash-sync workflow.
|
|
176
|
+
|
|
177
|
+
### Example
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
import {
|
|
181
|
+
Configuration,
|
|
182
|
+
ApiConnectionsApi,
|
|
183
|
+
} from '@knowledge-stack/ksapi';
|
|
184
|
+
import type { DeleteApiConnectionRequest } from '@knowledge-stack/ksapi';
|
|
185
|
+
|
|
186
|
+
async function example() {
|
|
187
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
188
|
+
const config = new Configuration({
|
|
189
|
+
// To configure API key authorization: cookieAuth
|
|
190
|
+
apiKey: "YOUR API KEY",
|
|
191
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
192
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
193
|
+
});
|
|
194
|
+
const api = new ApiConnectionsApi(config);
|
|
195
|
+
|
|
196
|
+
const body = {
|
|
197
|
+
// string
|
|
198
|
+
connectionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
199
|
+
} satisfies DeleteApiConnectionRequest;
|
|
200
|
+
|
|
201
|
+
try {
|
|
202
|
+
const data = await api.deleteApiConnection(body);
|
|
203
|
+
console.log(data);
|
|
204
|
+
} catch (error) {
|
|
205
|
+
console.error(error);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Run the test
|
|
210
|
+
example().catch(console.error);
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Parameters
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
| Name | Type | Description | Notes |
|
|
217
|
+
|------------- | ------------- | ------------- | -------------|
|
|
218
|
+
| **connectionId** | `string` | | [Defaults to `undefined`] |
|
|
219
|
+
|
|
220
|
+
### Return type
|
|
221
|
+
|
|
222
|
+
`void` (Empty response body)
|
|
223
|
+
|
|
224
|
+
### Authorization
|
|
225
|
+
|
|
226
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
227
|
+
|
|
228
|
+
### HTTP request headers
|
|
229
|
+
|
|
230
|
+
- **Content-Type**: Not defined
|
|
231
|
+
- **Accept**: `application/json`
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### HTTP response details
|
|
235
|
+
| Status code | Description | Response headers |
|
|
236
|
+
|-------------|-------------|------------------|
|
|
237
|
+
| **204** | Successful Response | - |
|
|
238
|
+
| **422** | Validation Error | - |
|
|
239
|
+
| **0** | Error response. | - |
|
|
240
|
+
|
|
241
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
242
|
+
|
|
243
|
+
|
|
168
244
|
## executeApiConnectionRequest
|
|
169
245
|
|
|
170
246
|
> ApiConnectionRequestResponse executeApiConnectionRequest(connectionId, apiConnectionRequestRequest)
|
|
@@ -17,6 +17,7 @@ Name | Type
|
|
|
17
17
|
`engine` | [DataSourceEngine](DataSourceEngine.md)
|
|
18
18
|
`approvalState` | [PathPartApprovalState](PathPartApprovalState.md)
|
|
19
19
|
`owner` | [UserInfo](UserInfo.md)
|
|
20
|
+
`permissions` | [ItemPermissions](ItemPermissions.md)
|
|
20
21
|
`createdAt` | Date
|
|
21
22
|
`updatedAt` | Date
|
|
22
23
|
|
|
@@ -37,6 +38,7 @@ const example = {
|
|
|
37
38
|
"engine": null,
|
|
38
39
|
"approvalState": null,
|
|
39
40
|
"owner": null,
|
|
41
|
+
"permissions": null,
|
|
40
42
|
"createdAt": null,
|
|
41
43
|
"updatedAt": null,
|
|
42
44
|
} satisfies DataSourceResponse
|
|
@@ -19,6 +19,7 @@ Name | Type
|
|
|
19
19
|
`description` | string
|
|
20
20
|
`columnConfig` | Array<{ [key: string]: any; }>
|
|
21
21
|
`approvalState` | [PathPartApprovalState](PathPartApprovalState.md)
|
|
22
|
+
`permissions` | [ItemPermissions](ItemPermissions.md)
|
|
22
23
|
`createdAt` | Date
|
|
23
24
|
`updatedAt` | Date
|
|
24
25
|
|
|
@@ -41,6 +42,7 @@ const example = {
|
|
|
41
42
|
"description": null,
|
|
42
43
|
"columnConfig": null,
|
|
43
44
|
"approvalState": null,
|
|
45
|
+
"permissions": null,
|
|
44
46
|
"createdAt": null,
|
|
45
47
|
"updatedAt": null,
|
|
46
48
|
} satisfies DataSourceTableResponse
|
package/docs/DataSourcesApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**createDataSource**](DataSourcesApi.md#createdatasourceoperation) | **POST** /v1/data-sources | Create Data Source Handler |
|
|
8
|
+
| [**deleteDataSource**](DataSourcesApi.md#deletedatasource) | **DELETE** /v1/data-sources/{data_source_id} | Delete Data Source Handler |
|
|
8
9
|
| [**getDataSource**](DataSourcesApi.md#getdatasource) | **GET** /v1/data-sources/{data_source_id} | Get Data Source Handler |
|
|
9
10
|
| [**getDataSourceCatalog**](DataSourcesApi.md#getdatasourcecatalog) | **GET** /v1/data-sources/{data_source_id}/catalog | Get Data Source Catalog Handler |
|
|
10
11
|
| [**modelDataSourceTable**](DataSourcesApi.md#modeldatasourcetable) | **POST** /v1/data-sources/{data_source_id}/tables | Model Data Source Table Handler |
|
|
@@ -89,6 +90,81 @@ example().catch(console.error);
|
|
|
89
90
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
90
91
|
|
|
91
92
|
|
|
93
|
+
## deleteDataSource
|
|
94
|
+
|
|
95
|
+
> deleteDataSource(dataSourceId)
|
|
96
|
+
|
|
97
|
+
Delete Data Source Handler
|
|
98
|
+
|
|
99
|
+
Move a connector and its modeled tables to trash. Soft-delete via the path_part subtree (the tables are children, so they trash with it). Connectors carry no Qdrant vectors, so there is no trash-sync workflow.
|
|
100
|
+
|
|
101
|
+
### Example
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import {
|
|
105
|
+
Configuration,
|
|
106
|
+
DataSourcesApi,
|
|
107
|
+
} from '@knowledge-stack/ksapi';
|
|
108
|
+
import type { DeleteDataSourceRequest } from '@knowledge-stack/ksapi';
|
|
109
|
+
|
|
110
|
+
async function example() {
|
|
111
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
112
|
+
const config = new Configuration({
|
|
113
|
+
// To configure API key authorization: cookieAuth
|
|
114
|
+
apiKey: "YOUR API KEY",
|
|
115
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
116
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
117
|
+
});
|
|
118
|
+
const api = new DataSourcesApi(config);
|
|
119
|
+
|
|
120
|
+
const body = {
|
|
121
|
+
// string
|
|
122
|
+
dataSourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
123
|
+
} satisfies DeleteDataSourceRequest;
|
|
124
|
+
|
|
125
|
+
try {
|
|
126
|
+
const data = await api.deleteDataSource(body);
|
|
127
|
+
console.log(data);
|
|
128
|
+
} catch (error) {
|
|
129
|
+
console.error(error);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Run the test
|
|
134
|
+
example().catch(console.error);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Parameters
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
| Name | Type | Description | Notes |
|
|
141
|
+
|------------- | ------------- | ------------- | -------------|
|
|
142
|
+
| **dataSourceId** | `string` | | [Defaults to `undefined`] |
|
|
143
|
+
|
|
144
|
+
### Return type
|
|
145
|
+
|
|
146
|
+
`void` (Empty response body)
|
|
147
|
+
|
|
148
|
+
### Authorization
|
|
149
|
+
|
|
150
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
151
|
+
|
|
152
|
+
### HTTP request headers
|
|
153
|
+
|
|
154
|
+
- **Content-Type**: Not defined
|
|
155
|
+
- **Accept**: `application/json`
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### HTTP response details
|
|
159
|
+
| Status code | Description | Response headers |
|
|
160
|
+
|-------------|-------------|------------------|
|
|
161
|
+
| **204** | Successful Response | - |
|
|
162
|
+
| **422** | Validation Error | - |
|
|
163
|
+
| **0** | Error response. | - |
|
|
164
|
+
|
|
165
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
166
|
+
|
|
167
|
+
|
|
92
168
|
## getDataSource
|
|
93
169
|
|
|
94
170
|
> DataSourceDetailResponse getDataSource(dataSourceId)
|
package/docs/FoldersApi.md
CHANGED
|
@@ -520,7 +520,7 @@ example().catch(console.error);
|
|
|
520
520
|
|
|
521
521
|
Search Items Handler
|
|
522
522
|
|
|
523
|
-
Search for folders, documents, and
|
|
523
|
+
Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
524
524
|
|
|
525
525
|
### Example
|
|
526
526
|
|
|
@@ -546,7 +546,7 @@ async function example() {
|
|
|
546
546
|
nameLike: nameLike_example,
|
|
547
547
|
// SearchSortOrder | Sort order for results (default: NAME) (optional)
|
|
548
548
|
sortOrder: ...,
|
|
549
|
-
// SearchablePartType | Filter by item type (default:
|
|
549
|
+
// SearchablePartType | Filter by item type (default: all searchable types) (optional)
|
|
550
550
|
partType: ...,
|
|
551
551
|
// boolean | Include tags in the response (default: false) (optional)
|
|
552
552
|
withTags: true,
|
|
@@ -577,7 +577,7 @@ example().catch(console.error);
|
|
|
577
577
|
|------------- | ------------- | ------------- | -------------|
|
|
578
578
|
| **nameLike** | `string` | Case-insensitive partial name search | [Defaults to `undefined`] |
|
|
579
579
|
| **sortOrder** | `SearchSortOrder` | Sort order for results (default: NAME) | [Optional] [Defaults to `undefined`] [Enum: NAME, UPDATED_AT, CREATED_AT] |
|
|
580
|
-
| **partType** | `SearchablePartType` | Filter by item type (default:
|
|
580
|
+
| **partType** | `SearchablePartType` | Filter by item type (default: all searchable types) | [Optional] [Defaults to `undefined`] [Enum: FOLDER, DOCUMENT, DATA_SOURCE, API_CONNECTION] |
|
|
581
581
|
| **withTags** | `boolean` | Include tags in the response (default: false) | [Optional] [Defaults to `false`] |
|
|
582
582
|
| **parentPathPartId** | `string` | Scope search to descendants of this folder\'s path part | [Optional] [Defaults to `undefined`] |
|
|
583
583
|
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
package/docs/ThreadsApi.md
CHANGED
|
@@ -20,7 +20,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
20
20
|
|
|
21
21
|
Create Thread Handler
|
|
22
22
|
|
|
23
|
-
Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
23
|
+
Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed). With ``message_for_title``, the thread is created as \"New Thread\" and its title is summarized in a background task; the FE learns the final title via a ``THREAD_TITLE_CHANGED`` WebSocket event.
|
|
24
24
|
|
|
25
25
|
### Example
|
|
26
26
|
|