@knowledge-stack/ksapi 1.103.3 → 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/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/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/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/models/DataSourceResponse.ts +16 -0
- package/src/models/DataSourceTableResponse.ts +16 -0
- package/src/models/SearchablePartType.ts +2 -1
|
@@ -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/package.json
CHANGED
|
@@ -52,6 +52,10 @@ export interface CreateApiConnectionOperationRequest {
|
|
|
52
52
|
createApiConnectionRequest: CreateApiConnectionRequest;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export interface DeleteApiConnectionRequest {
|
|
56
|
+
connectionId: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
55
59
|
export interface ExecuteApiConnectionRequestRequest {
|
|
56
60
|
connectionId: string;
|
|
57
61
|
apiConnectionRequestRequest: ApiConnectionRequestRequest;
|
|
@@ -123,6 +127,30 @@ export interface ApiConnectionsApiInterface {
|
|
|
123
127
|
*/
|
|
124
128
|
createApiConnection(requestParameters: CreateApiConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiConnectionResponse>;
|
|
125
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Creates request options for deleteApiConnection without sending the request
|
|
132
|
+
* @param {string} connectionId
|
|
133
|
+
* @throws {RequiredError}
|
|
134
|
+
* @memberof ApiConnectionsApiInterface
|
|
135
|
+
*/
|
|
136
|
+
deleteApiConnectionRequestOpts(requestParameters: DeleteApiConnectionRequest): Promise<runtime.RequestOpts>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* 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.
|
|
140
|
+
* @summary Delete Api Connection Handler
|
|
141
|
+
* @param {string} connectionId
|
|
142
|
+
* @param {*} [options] Override http request option.
|
|
143
|
+
* @throws {RequiredError}
|
|
144
|
+
* @memberof ApiConnectionsApiInterface
|
|
145
|
+
*/
|
|
146
|
+
deleteApiConnectionRaw(requestParameters: DeleteApiConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 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.
|
|
150
|
+
* Delete Api Connection Handler
|
|
151
|
+
*/
|
|
152
|
+
deleteApiConnection(requestParameters: DeleteApiConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
153
|
+
|
|
126
154
|
/**
|
|
127
155
|
* Creates request options for executeApiConnectionRequest without sending the request
|
|
128
156
|
* @param {string} connectionId
|
|
@@ -328,6 +356,60 @@ export class ApiConnectionsApi extends runtime.BaseAPI implements ApiConnections
|
|
|
328
356
|
return await response.value();
|
|
329
357
|
}
|
|
330
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Creates request options for deleteApiConnection without sending the request
|
|
361
|
+
*/
|
|
362
|
+
async deleteApiConnectionRequestOpts(requestParameters: DeleteApiConnectionRequest): Promise<runtime.RequestOpts> {
|
|
363
|
+
if (requestParameters['connectionId'] == null) {
|
|
364
|
+
throw new runtime.RequiredError(
|
|
365
|
+
'connectionId',
|
|
366
|
+
'Required parameter "connectionId" was null or undefined when calling deleteApiConnection().'
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const queryParameters: any = {};
|
|
371
|
+
|
|
372
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
373
|
+
|
|
374
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
375
|
+
const token = this.configuration.accessToken;
|
|
376
|
+
const tokenString = await token("bearerAuth", []);
|
|
377
|
+
|
|
378
|
+
if (tokenString) {
|
|
379
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
let urlPath = `/v1/api-connections/{connection_id}`;
|
|
384
|
+
urlPath = urlPath.replace(`{${"connection_id"}}`, encodeURIComponent(String(requestParameters['connectionId'])));
|
|
385
|
+
|
|
386
|
+
return {
|
|
387
|
+
path: urlPath,
|
|
388
|
+
method: 'DELETE',
|
|
389
|
+
headers: headerParameters,
|
|
390
|
+
query: queryParameters,
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* 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.
|
|
396
|
+
* Delete Api Connection Handler
|
|
397
|
+
*/
|
|
398
|
+
async deleteApiConnectionRaw(requestParameters: DeleteApiConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
399
|
+
const requestOptions = await this.deleteApiConnectionRequestOpts(requestParameters);
|
|
400
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
401
|
+
|
|
402
|
+
return new runtime.VoidApiResponse(response);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* 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.
|
|
407
|
+
* Delete Api Connection Handler
|
|
408
|
+
*/
|
|
409
|
+
async deleteApiConnection(requestParameters: DeleteApiConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
410
|
+
await this.deleteApiConnectionRaw(requestParameters, initOverrides);
|
|
411
|
+
}
|
|
412
|
+
|
|
331
413
|
/**
|
|
332
414
|
* Creates request options for executeApiConnectionRequest without sending the request
|
|
333
415
|
*/
|