@knowledge-stack/ksapi 1.103.3 → 1.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +2 -0
- package/README.md +6 -3
- 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/WorkflowRunsApi.d.ts +15 -12
- package/dist/apis/WorkflowRunsApi.js +4 -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/WorkflowRunsApi.d.ts +15 -12
- package/dist/esm/apis/WorkflowRunsApi.js +5 -3
- 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/esm/models/StartWorkflowRunRequest.d.ts +53 -0
- package/dist/esm/models/StartWorkflowRunRequest.js +46 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +6 -0
- package/dist/esm/models/WorkflowRunSnapshot.js +7 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- 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/dist/models/StartWorkflowRunRequest.d.ts +53 -0
- package/dist/models/StartWorkflowRunRequest.js +54 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +6 -0
- package/dist/models/WorkflowRunSnapshot.js +7 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- 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/StartWorkflowRunRequest.md +35 -0
- package/docs/WorkflowRunSnapshot.md +2 -0
- package/docs/WorkflowRunsApi.md +9 -6
- 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/WorkflowRunsApi.ts +20 -11
- package/src/models/DataSourceResponse.ts +16 -0
- package/src/models/DataSourceTableResponse.ts +16 -0
- package/src/models/SearchablePartType.ts +2 -1
- package/src/models/StartWorkflowRunRequest.ts +91 -0
- package/src/models/WorkflowRunSnapshot.ts +11 -0
- package/src/models/index.ts +1 -0
|
@@ -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) {
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* Optional JSON body for ``POST /v1/workflow-runs/{id}/start``.
|
|
14
|
+
*
|
|
15
|
+
* The whole body is optional: an absent body starts the run with just
|
|
16
|
+
* the localized "Started workflow: X" opening message, exactly as
|
|
17
|
+
* before. When ``user_message`` is set it is appended to that opening
|
|
18
|
+
* thread message AND injected into the runner's first user turn, so the
|
|
19
|
+
* agent acts on it as guidance layered on the workflow instruction.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface StartWorkflowRunRequest
|
|
22
|
+
*/
|
|
23
|
+
export interface StartWorkflowRunRequest {
|
|
24
|
+
/**
|
|
25
|
+
* Free-text instruction shown in the run thread and passed to the agent as additional guidance on top of the workflow instruction. Optional.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof StartWorkflowRunRequest
|
|
28
|
+
*/
|
|
29
|
+
userMessage?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare const StartWorkflowRunRequestPropertyValidationAttributesMap: {
|
|
32
|
+
[property: string]: {
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
minLength?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
maximum?: number;
|
|
37
|
+
exclusiveMaximum?: boolean;
|
|
38
|
+
minimum?: number;
|
|
39
|
+
exclusiveMinimum?: boolean;
|
|
40
|
+
multipleOf?: number;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the StartWorkflowRunRequest interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfStartWorkflowRunRequest(value: object): value is StartWorkflowRunRequest;
|
|
50
|
+
export declare function StartWorkflowRunRequestFromJSON(json: any): StartWorkflowRunRequest;
|
|
51
|
+
export declare function StartWorkflowRunRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StartWorkflowRunRequest;
|
|
52
|
+
export declare function StartWorkflowRunRequestToJSON(json: any): StartWorkflowRunRequest;
|
|
53
|
+
export declare function StartWorkflowRunRequestToJSONTyped(value?: StartWorkflowRunRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.StartWorkflowRunRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfStartWorkflowRunRequest = instanceOfStartWorkflowRunRequest;
|
|
18
|
+
exports.StartWorkflowRunRequestFromJSON = StartWorkflowRunRequestFromJSON;
|
|
19
|
+
exports.StartWorkflowRunRequestFromJSONTyped = StartWorkflowRunRequestFromJSONTyped;
|
|
20
|
+
exports.StartWorkflowRunRequestToJSON = StartWorkflowRunRequestToJSON;
|
|
21
|
+
exports.StartWorkflowRunRequestToJSONTyped = StartWorkflowRunRequestToJSONTyped;
|
|
22
|
+
exports.StartWorkflowRunRequestPropertyValidationAttributesMap = {
|
|
23
|
+
userMessage: {
|
|
24
|
+
maxLength: 4000,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the StartWorkflowRunRequest interface.
|
|
29
|
+
*/
|
|
30
|
+
function instanceOfStartWorkflowRunRequest(value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function StartWorkflowRunRequestFromJSON(json) {
|
|
34
|
+
return StartWorkflowRunRequestFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function StartWorkflowRunRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'userMessage': json['user_message'] == null ? undefined : json['user_message'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function StartWorkflowRunRequestToJSON(json) {
|
|
45
|
+
return StartWorkflowRunRequestToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function StartWorkflowRunRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'user_message': value['userMessage'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -49,6 +49,12 @@ export interface WorkflowRunSnapshot {
|
|
|
49
49
|
* @memberof WorkflowRunSnapshot
|
|
50
50
|
*/
|
|
51
51
|
inputs: Array<InputSnapshot>;
|
|
52
|
+
/**
|
|
53
|
+
* Optional free-text message the caller supplied at Start. Pinned here so the runner injects it into the agent's first user turn and it survives retry, redrive, and workflow-thread follow-ups (all of which re-assemble the prompt from this snapshot).
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof WorkflowRunSnapshot
|
|
56
|
+
*/
|
|
57
|
+
userMessage?: string | null;
|
|
52
58
|
}
|
|
53
59
|
export declare const WorkflowRunSnapshotPropertyValidationAttributesMap: {
|
|
54
60
|
[property: string]: {
|
|
@@ -21,7 +21,11 @@ exports.WorkflowRunSnapshotToJSON = WorkflowRunSnapshotToJSON;
|
|
|
21
21
|
exports.WorkflowRunSnapshotToJSONTyped = WorkflowRunSnapshotToJSONTyped;
|
|
22
22
|
const InputSnapshot_1 = require("./InputSnapshot");
|
|
23
23
|
const InstructionSnapshot_1 = require("./InstructionSnapshot");
|
|
24
|
-
exports.WorkflowRunSnapshotPropertyValidationAttributesMap = {
|
|
24
|
+
exports.WorkflowRunSnapshotPropertyValidationAttributesMap = {
|
|
25
|
+
userMessage: {
|
|
26
|
+
maxLength: 4000,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
25
29
|
/**
|
|
26
30
|
* Check if a given object implements the WorkflowRunSnapshot interface.
|
|
27
31
|
*/
|
|
@@ -48,6 +52,7 @@ function WorkflowRunSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
52
|
'maxRunDurationSeconds': json['max_run_duration_seconds'],
|
|
49
53
|
'instruction': (0, InstructionSnapshot_1.InstructionSnapshotFromJSON)(json['instruction']),
|
|
50
54
|
'inputs': (json['inputs'].map(InputSnapshot_1.InputSnapshotFromJSON)),
|
|
55
|
+
'userMessage': json['user_message'] == null ? undefined : json['user_message'],
|
|
51
56
|
};
|
|
52
57
|
}
|
|
53
58
|
function WorkflowRunSnapshotToJSON(json) {
|
|
@@ -62,5 +67,6 @@ function WorkflowRunSnapshotToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
67
|
'max_run_duration_seconds': value['maxRunDurationSeconds'],
|
|
63
68
|
'instruction': (0, InstructionSnapshot_1.InstructionSnapshotToJSON)(value['instruction']),
|
|
64
69
|
'inputs': (value['inputs'].map(InputSnapshot_1.InputSnapshotToJSON)),
|
|
70
|
+
'user_message': value['userMessage'],
|
|
65
71
|
};
|
|
66
72
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -211,6 +211,7 @@ export * from './SetApprovalStateRequest';
|
|
|
211
211
|
export * from './SetWorkflowRunApprovalRequest';
|
|
212
212
|
export * from './SignInRequest';
|
|
213
213
|
export * from './SortDirection';
|
|
214
|
+
export * from './StartWorkflowRunRequest';
|
|
214
215
|
export * from './StepInput';
|
|
215
216
|
export * from './StepKind';
|
|
216
217
|
export * from './StepOutput';
|
package/dist/models/index.js
CHANGED
|
@@ -229,6 +229,7 @@ __exportStar(require("./SetApprovalStateRequest"), exports);
|
|
|
229
229
|
__exportStar(require("./SetWorkflowRunApprovalRequest"), exports);
|
|
230
230
|
__exportStar(require("./SignInRequest"), exports);
|
|
231
231
|
__exportStar(require("./SortDirection"), exports);
|
|
232
|
+
__exportStar(require("./StartWorkflowRunRequest"), exports);
|
|
232
233
|
__exportStar(require("./StepInput"), exports);
|
|
233
234
|
__exportStar(require("./StepKind"), exports);
|
|
234
235
|
__exportStar(require("./StepOutput"), exports);
|
|
@@ -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`] |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# StartWorkflowRunRequest
|
|
3
|
+
|
|
4
|
+
Optional JSON body for ``POST /v1/workflow-runs/{id}/start``. The whole body is optional: an absent body starts the run with just the localized \"Started workflow: X\" opening message, exactly as before. When ``user_message`` is set it is appended to that opening thread message AND injected into the runner\'s first user turn, so the agent acts on it as guidance layered on the workflow instruction.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`userMessage` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { StartWorkflowRunRequest } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"userMessage": null,
|
|
20
|
+
} satisfies StartWorkflowRunRequest
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as StartWorkflowRunRequest
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`maxRunDurationSeconds` | number
|
|
12
12
|
`instruction` | [InstructionSnapshot](InstructionSnapshot.md)
|
|
13
13
|
`inputs` | [Array<InputSnapshot>](InputSnapshot.md)
|
|
14
|
+
`userMessage` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ const example = {
|
|
|
23
24
|
"maxRunDurationSeconds": null,
|
|
24
25
|
"instruction": null,
|
|
25
26
|
"inputs": null,
|
|
27
|
+
"userMessage": null,
|
|
26
28
|
} satisfies WorkflowRunSnapshot
|
|
27
29
|
|
|
28
30
|
console.log(example)
|
package/docs/WorkflowRunsApi.md
CHANGED
|
@@ -11,7 +11,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
11
11
|
| [**listWorkflowRunsForTenant**](WorkflowRunsApi.md#listworkflowrunsfortenant) | **GET** /v1/workflow-runs | List Workflow Runs For Tenant Handler |
|
|
12
12
|
| [**retryWorkflowRun**](WorkflowRunsApi.md#retryworkflowrun) | **POST** /v1/workflow-runs/{run_id}/retry | Retry Workflow Run Handler |
|
|
13
13
|
| [**setWorkflowRunApproval**](WorkflowRunsApi.md#setworkflowrunapprovaloperation) | **POST** /v1/workflow-runs/{run_id}/approval | Set Workflow Run Approval Handler |
|
|
14
|
-
| [**startWorkflowRun**](WorkflowRunsApi.md#
|
|
14
|
+
| [**startWorkflowRun**](WorkflowRunsApi.md#startworkflowrunoperation) | **POST** /v1/workflow-runs/{run_id}/start | Start Workflow Run Handler |
|
|
15
15
|
| [**stopWorkflowRun**](WorkflowRunsApi.md#stopworkflowrun) | **POST** /v1/workflow-runs/{run_id}/stop | Stop Workflow Run Handler |
|
|
16
16
|
| [**updateWorkflowRun**](WorkflowRunsApi.md#updateworkflowrunoperation) | **PATCH** /v1/workflow-runs/{run_id} | Update Workflow Run Handler |
|
|
17
17
|
| [**workflowRunCallback**](WorkflowRunsApi.md#workflowruncallbackoperation) | **POST** /v1/workflow-runs/{run_id}/callback | Workflow Run Callback Handler |
|
|
@@ -589,11 +589,11 @@ example().catch(console.error);
|
|
|
589
589
|
|
|
590
590
|
## startWorkflowRun
|
|
591
591
|
|
|
592
|
-
> WorkflowRunResponse startWorkflowRun(runId)
|
|
592
|
+
> WorkflowRunResponse startWorkflowRun(runId, startWorkflowRunRequest)
|
|
593
593
|
|
|
594
594
|
Start Workflow Run Handler
|
|
595
595
|
|
|
596
|
-
Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live).
|
|
596
|
+
Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live). The body is optional; ``user_message`` (when sent) is pinned into the snapshot and shown in the run thread (see ``StartWorkflowRunRequest``).
|
|
597
597
|
|
|
598
598
|
### Example
|
|
599
599
|
|
|
@@ -602,7 +602,7 @@ import {
|
|
|
602
602
|
Configuration,
|
|
603
603
|
WorkflowRunsApi,
|
|
604
604
|
} from '@knowledge-stack/ksapi';
|
|
605
|
-
import type {
|
|
605
|
+
import type { StartWorkflowRunOperationRequest } from '@knowledge-stack/ksapi';
|
|
606
606
|
|
|
607
607
|
async function example() {
|
|
608
608
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
@@ -617,7 +617,9 @@ async function example() {
|
|
|
617
617
|
const body = {
|
|
618
618
|
// string
|
|
619
619
|
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
620
|
-
|
|
620
|
+
// StartWorkflowRunRequest (optional)
|
|
621
|
+
startWorkflowRunRequest: ...,
|
|
622
|
+
} satisfies StartWorkflowRunOperationRequest;
|
|
621
623
|
|
|
622
624
|
try {
|
|
623
625
|
const data = await api.startWorkflowRun(body);
|
|
@@ -637,6 +639,7 @@ example().catch(console.error);
|
|
|
637
639
|
| Name | Type | Description | Notes |
|
|
638
640
|
|------------- | ------------- | ------------- | -------------|
|
|
639
641
|
| **runId** | `string` | | [Defaults to `undefined`] |
|
|
642
|
+
| **startWorkflowRunRequest** | [StartWorkflowRunRequest](StartWorkflowRunRequest.md) | | [Optional] |
|
|
640
643
|
|
|
641
644
|
### Return type
|
|
642
645
|
|
|
@@ -648,7 +651,7 @@ example().catch(console.error);
|
|
|
648
651
|
|
|
649
652
|
### HTTP request headers
|
|
650
653
|
|
|
651
|
-
- **Content-Type**:
|
|
654
|
+
- **Content-Type**: `application/json`
|
|
652
655
|
- **Accept**: `application/json`
|
|
653
656
|
|
|
654
657
|
|