@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
|
@@ -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
|
*/
|
|
@@ -56,6 +56,10 @@ export interface CreateDataSourceOperationRequest {
|
|
|
56
56
|
createDataSourceRequest: CreateDataSourceRequest;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
export interface DeleteDataSourceRequest {
|
|
60
|
+
dataSourceId: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
export interface GetDataSourceRequest {
|
|
60
64
|
dataSourceId: string;
|
|
61
65
|
}
|
|
@@ -115,6 +119,30 @@ export interface DataSourcesApiInterface {
|
|
|
115
119
|
*/
|
|
116
120
|
createDataSource(requestParameters: CreateDataSourceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceResponse>;
|
|
117
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Creates request options for deleteDataSource without sending the request
|
|
124
|
+
* @param {string} dataSourceId
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
* @memberof DataSourcesApiInterface
|
|
127
|
+
*/
|
|
128
|
+
deleteDataSourceRequestOpts(requestParameters: DeleteDataSourceRequest): Promise<runtime.RequestOpts>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 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.
|
|
132
|
+
* @summary Delete Data Source Handler
|
|
133
|
+
* @param {string} dataSourceId
|
|
134
|
+
* @param {*} [options] Override http request option.
|
|
135
|
+
* @throws {RequiredError}
|
|
136
|
+
* @memberof DataSourcesApiInterface
|
|
137
|
+
*/
|
|
138
|
+
deleteDataSourceRaw(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 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.
|
|
142
|
+
* Delete Data Source Handler
|
|
143
|
+
*/
|
|
144
|
+
deleteDataSource(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
145
|
+
|
|
118
146
|
/**
|
|
119
147
|
* Creates request options for getDataSource without sending the request
|
|
120
148
|
* @param {string} dataSourceId
|
|
@@ -331,6 +359,60 @@ export class DataSourcesApi extends runtime.BaseAPI implements DataSourcesApiInt
|
|
|
331
359
|
return await response.value();
|
|
332
360
|
}
|
|
333
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Creates request options for deleteDataSource without sending the request
|
|
364
|
+
*/
|
|
365
|
+
async deleteDataSourceRequestOpts(requestParameters: DeleteDataSourceRequest): Promise<runtime.RequestOpts> {
|
|
366
|
+
if (requestParameters['dataSourceId'] == null) {
|
|
367
|
+
throw new runtime.RequiredError(
|
|
368
|
+
'dataSourceId',
|
|
369
|
+
'Required parameter "dataSourceId" was null or undefined when calling deleteDataSource().'
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const queryParameters: any = {};
|
|
374
|
+
|
|
375
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
376
|
+
|
|
377
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
378
|
+
const token = this.configuration.accessToken;
|
|
379
|
+
const tokenString = await token("bearerAuth", []);
|
|
380
|
+
|
|
381
|
+
if (tokenString) {
|
|
382
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
let urlPath = `/v1/data-sources/{data_source_id}`;
|
|
387
|
+
urlPath = urlPath.replace(`{${"data_source_id"}}`, encodeURIComponent(String(requestParameters['dataSourceId'])));
|
|
388
|
+
|
|
389
|
+
return {
|
|
390
|
+
path: urlPath,
|
|
391
|
+
method: 'DELETE',
|
|
392
|
+
headers: headerParameters,
|
|
393
|
+
query: queryParameters,
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* 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.
|
|
399
|
+
* Delete Data Source Handler
|
|
400
|
+
*/
|
|
401
|
+
async deleteDataSourceRaw(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
402
|
+
const requestOptions = await this.deleteDataSourceRequestOpts(requestParameters);
|
|
403
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
404
|
+
|
|
405
|
+
return new runtime.VoidApiResponse(response);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* 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.
|
|
410
|
+
* Delete Data Source Handler
|
|
411
|
+
*/
|
|
412
|
+
async deleteDataSource(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
413
|
+
await this.deleteDataSourceRaw(requestParameters, initOverrides);
|
|
414
|
+
}
|
|
415
|
+
|
|
334
416
|
/**
|
|
335
417
|
* Creates request options for getDataSource without sending the request
|
|
336
418
|
*/
|
package/src/apis/FoldersApi.ts
CHANGED
|
@@ -302,7 +302,7 @@ export interface FoldersApiInterface {
|
|
|
302
302
|
* Creates request options for searchItems without sending the request
|
|
303
303
|
* @param {string} nameLike Case-insensitive partial name search
|
|
304
304
|
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
305
|
-
* @param {SearchablePartType} [partType] Filter by item type (default:
|
|
305
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: all searchable types)
|
|
306
306
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
307
307
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
308
308
|
* @param {number} [limit] Number of items per page
|
|
@@ -313,11 +313,11 @@ export interface FoldersApiInterface {
|
|
|
313
313
|
searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
|
|
314
314
|
|
|
315
315
|
/**
|
|
316
|
-
* Search for folders, documents, and
|
|
316
|
+
* 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.
|
|
317
317
|
* @summary Search Items Handler
|
|
318
318
|
* @param {string} nameLike Case-insensitive partial name search
|
|
319
319
|
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
320
|
-
* @param {SearchablePartType} [partType] Filter by item type (default:
|
|
320
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: all searchable types)
|
|
321
321
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
322
322
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
323
323
|
* @param {number} [limit] Number of items per page
|
|
@@ -329,7 +329,7 @@ export interface FoldersApiInterface {
|
|
|
329
329
|
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>>;
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
|
-
* Search for folders, documents, and
|
|
332
|
+
* 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.
|
|
333
333
|
* Search Items Handler
|
|
334
334
|
*/
|
|
335
335
|
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>;
|
|
@@ -830,7 +830,7 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
830
830
|
}
|
|
831
831
|
|
|
832
832
|
/**
|
|
833
|
-
* Search for folders, documents, and
|
|
833
|
+
* 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.
|
|
834
834
|
* Search Items Handler
|
|
835
835
|
*/
|
|
836
836
|
async searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>> {
|
|
@@ -841,7 +841,7 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
841
841
|
}
|
|
842
842
|
|
|
843
843
|
/**
|
|
844
|
-
* Search for folders, documents, and
|
|
844
|
+
* 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.
|
|
845
845
|
* Search Items Handler
|
|
846
846
|
*/
|
|
847
847
|
async searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator> {
|
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
PaginatedResponseWorkflowRunResponse,
|
|
22
22
|
SetWorkflowRunApprovalRequest,
|
|
23
23
|
SortDirection,
|
|
24
|
+
StartWorkflowRunRequest,
|
|
24
25
|
UpdateWorkflowRunRequest,
|
|
25
26
|
WorkflowCallbackResponse,
|
|
26
27
|
WorkflowExecutionState,
|
|
@@ -42,6 +43,8 @@ import {
|
|
|
42
43
|
SetWorkflowRunApprovalRequestToJSON,
|
|
43
44
|
SortDirectionFromJSON,
|
|
44
45
|
SortDirectionToJSON,
|
|
46
|
+
StartWorkflowRunRequestFromJSON,
|
|
47
|
+
StartWorkflowRunRequestToJSON,
|
|
45
48
|
UpdateWorkflowRunRequestFromJSON,
|
|
46
49
|
UpdateWorkflowRunRequestToJSON,
|
|
47
50
|
WorkflowCallbackResponseFromJSON,
|
|
@@ -102,8 +105,9 @@ export interface SetWorkflowRunApprovalOperationRequest {
|
|
|
102
105
|
setWorkflowRunApprovalRequest: SetWorkflowRunApprovalRequest;
|
|
103
106
|
}
|
|
104
107
|
|
|
105
|
-
export interface
|
|
108
|
+
export interface StartWorkflowRunOperationRequest {
|
|
106
109
|
runId: string;
|
|
110
|
+
startWorkflowRunRequest?: StartWorkflowRunRequest | null;
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
export interface StopWorkflowRunRequest {
|
|
@@ -328,26 +332,28 @@ export interface WorkflowRunsApiInterface {
|
|
|
328
332
|
/**
|
|
329
333
|
* Creates request options for startWorkflowRun without sending the request
|
|
330
334
|
* @param {string} runId
|
|
335
|
+
* @param {StartWorkflowRunRequest} [startWorkflowRunRequest]
|
|
331
336
|
* @throws {RequiredError}
|
|
332
337
|
* @memberof WorkflowRunsApiInterface
|
|
333
338
|
*/
|
|
334
|
-
startWorkflowRunRequestOpts(requestParameters:
|
|
339
|
+
startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunOperationRequest): Promise<runtime.RequestOpts>;
|
|
335
340
|
|
|
336
341
|
/**
|
|
337
|
-
* 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).
|
|
342
|
+
* 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``).
|
|
338
343
|
* @summary Start Workflow Run Handler
|
|
339
344
|
* @param {string} runId
|
|
345
|
+
* @param {StartWorkflowRunRequest} [startWorkflowRunRequest]
|
|
340
346
|
* @param {*} [options] Override http request option.
|
|
341
347
|
* @throws {RequiredError}
|
|
342
348
|
* @memberof WorkflowRunsApiInterface
|
|
343
349
|
*/
|
|
344
|
-
startWorkflowRunRaw(requestParameters:
|
|
350
|
+
startWorkflowRunRaw(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
|
|
345
351
|
|
|
346
352
|
/**
|
|
347
|
-
* 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).
|
|
353
|
+
* 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``).
|
|
348
354
|
* Start Workflow Run Handler
|
|
349
355
|
*/
|
|
350
|
-
startWorkflowRun(requestParameters:
|
|
356
|
+
startWorkflowRun(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
|
|
351
357
|
|
|
352
358
|
/**
|
|
353
359
|
* Creates request options for stopWorkflowRun without sending the request
|
|
@@ -883,7 +889,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
883
889
|
/**
|
|
884
890
|
* Creates request options for startWorkflowRun without sending the request
|
|
885
891
|
*/
|
|
886
|
-
async startWorkflowRunRequestOpts(requestParameters:
|
|
892
|
+
async startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunOperationRequest): Promise<runtime.RequestOpts> {
|
|
887
893
|
if (requestParameters['runId'] == null) {
|
|
888
894
|
throw new runtime.RequiredError(
|
|
889
895
|
'runId',
|
|
@@ -895,6 +901,8 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
895
901
|
|
|
896
902
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
897
903
|
|
|
904
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
905
|
+
|
|
898
906
|
if (this.configuration && this.configuration.accessToken) {
|
|
899
907
|
const token = this.configuration.accessToken;
|
|
900
908
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -912,14 +920,15 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
912
920
|
method: 'POST',
|
|
913
921
|
headers: headerParameters,
|
|
914
922
|
query: queryParameters,
|
|
923
|
+
body: StartWorkflowRunRequestToJSON(requestParameters['startWorkflowRunRequest']),
|
|
915
924
|
};
|
|
916
925
|
}
|
|
917
926
|
|
|
918
927
|
/**
|
|
919
|
-
* 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).
|
|
928
|
+
* 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``).
|
|
920
929
|
* Start Workflow Run Handler
|
|
921
930
|
*/
|
|
922
|
-
async startWorkflowRunRaw(requestParameters:
|
|
931
|
+
async startWorkflowRunRaw(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>> {
|
|
923
932
|
const requestOptions = await this.startWorkflowRunRequestOpts(requestParameters);
|
|
924
933
|
const response = await this.request(requestOptions, initOverrides);
|
|
925
934
|
|
|
@@ -927,10 +936,10 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
927
936
|
}
|
|
928
937
|
|
|
929
938
|
/**
|
|
930
|
-
* 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).
|
|
939
|
+
* 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``).
|
|
931
940
|
* Start Workflow Run Handler
|
|
932
941
|
*/
|
|
933
|
-
async startWorkflowRun(requestParameters:
|
|
942
|
+
async startWorkflowRun(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse> {
|
|
934
943
|
const response = await this.startWorkflowRunRaw(requestParameters, initOverrides);
|
|
935
944
|
return await response.value();
|
|
936
945
|
}
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ItemPermissions } from './ItemPermissions';
|
|
17
|
+
import {
|
|
18
|
+
ItemPermissionsFromJSON,
|
|
19
|
+
ItemPermissionsFromJSONTyped,
|
|
20
|
+
ItemPermissionsToJSON,
|
|
21
|
+
ItemPermissionsToJSONTyped,
|
|
22
|
+
} from './ItemPermissions';
|
|
16
23
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
17
24
|
import {
|
|
18
25
|
PathPartApprovalStateFromJSON,
|
|
@@ -104,6 +111,12 @@ export interface DataSourceResponse {
|
|
|
104
111
|
* @memberof DataSourceResponse
|
|
105
112
|
*/
|
|
106
113
|
owner?: UserInfo | null;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {ItemPermissions}
|
|
117
|
+
* @memberof DataSourceResponse
|
|
118
|
+
*/
|
|
119
|
+
permissions: ItemPermissions;
|
|
107
120
|
/**
|
|
108
121
|
*
|
|
109
122
|
* @type {Date}
|
|
@@ -157,6 +170,7 @@ export function instanceOfDataSourceResponse(value: object): value is DataSource
|
|
|
157
170
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
158
171
|
if (!('engine' in value) || value['engine'] === undefined) return false;
|
|
159
172
|
if (!('approvalState' in value) || value['approvalState'] === undefined) return false;
|
|
173
|
+
if (!('permissions' in value) || value['permissions'] === undefined) return false;
|
|
160
174
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
161
175
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
162
176
|
return true;
|
|
@@ -182,6 +196,7 @@ export function DataSourceResponseFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
182
196
|
'engine': DataSourceEngineFromJSON(json['engine']),
|
|
183
197
|
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
184
198
|
'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
|
|
199
|
+
'permissions': ItemPermissionsFromJSON(json['permissions']),
|
|
185
200
|
'createdAt': (new Date(json['created_at'])),
|
|
186
201
|
'updatedAt': (new Date(json['updated_at'])),
|
|
187
202
|
};
|
|
@@ -208,6 +223,7 @@ export function DataSourceResponseToJSONTyped(value?: DataSourceResponse | null,
|
|
|
208
223
|
'engine': DataSourceEngineToJSON(value['engine']),
|
|
209
224
|
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
210
225
|
'owner': UserInfoToJSON(value['owner']),
|
|
226
|
+
'permissions': ItemPermissionsToJSON(value['permissions']),
|
|
211
227
|
'created_at': value['createdAt'].toISOString(),
|
|
212
228
|
'updated_at': value['updatedAt'].toISOString(),
|
|
213
229
|
};
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ItemPermissions } from './ItemPermissions';
|
|
17
|
+
import {
|
|
18
|
+
ItemPermissionsFromJSON,
|
|
19
|
+
ItemPermissionsFromJSONTyped,
|
|
20
|
+
ItemPermissionsToJSON,
|
|
21
|
+
ItemPermissionsToJSONTyped,
|
|
22
|
+
} from './ItemPermissions';
|
|
16
23
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
17
24
|
import {
|
|
18
25
|
PathPartApprovalStateFromJSON,
|
|
@@ -99,6 +106,12 @@ export interface DataSourceTableResponse {
|
|
|
99
106
|
* @memberof DataSourceTableResponse
|
|
100
107
|
*/
|
|
101
108
|
approvalState: PathPartApprovalState;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {ItemPermissions}
|
|
112
|
+
* @memberof DataSourceTableResponse
|
|
113
|
+
*/
|
|
114
|
+
permissions: ItemPermissions;
|
|
102
115
|
/**
|
|
103
116
|
*
|
|
104
117
|
* @type {Date}
|
|
@@ -155,6 +168,7 @@ export function instanceOfDataSourceTableResponse(value: object): value is DataS
|
|
|
155
168
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
156
169
|
if (!('columnConfig' in value) || value['columnConfig'] === undefined) return false;
|
|
157
170
|
if (!('approvalState' in value) || value['approvalState'] === undefined) return false;
|
|
171
|
+
if (!('permissions' in value) || value['permissions'] === undefined) return false;
|
|
158
172
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
159
173
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
160
174
|
return true;
|
|
@@ -182,6 +196,7 @@ export function DataSourceTableResponseFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
182
196
|
'description': json['description'],
|
|
183
197
|
'columnConfig': json['column_config'],
|
|
184
198
|
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
199
|
+
'permissions': ItemPermissionsFromJSON(json['permissions']),
|
|
185
200
|
'createdAt': (new Date(json['created_at'])),
|
|
186
201
|
'updatedAt': (new Date(json['updated_at'])),
|
|
187
202
|
};
|
|
@@ -210,6 +225,7 @@ export function DataSourceTableResponseToJSONTyped(value?: DataSourceTableRespon
|
|
|
210
225
|
'description': value['description'],
|
|
211
226
|
'column_config': value['columnConfig'],
|
|
212
227
|
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
228
|
+
'permissions': ItemPermissionsToJSON(value['permissions']),
|
|
213
229
|
'created_at': value['createdAt'].toISOString(),
|
|
214
230
|
'updated_at': value['updatedAt'].toISOString(),
|
|
215
231
|
};
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
export const SearchablePartType = {
|
|
21
21
|
Folder: 'FOLDER',
|
|
22
22
|
Document: 'DOCUMENT',
|
|
23
|
-
DataSource: 'DATA_SOURCE'
|
|
23
|
+
DataSource: 'DATA_SOURCE',
|
|
24
|
+
ApiConnection: 'API_CONNECTION'
|
|
24
25
|
} as const;
|
|
25
26
|
export type SearchablePartType = typeof SearchablePartType[keyof typeof SearchablePartType];
|
|
26
27
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Optional JSON body for ``POST /v1/workflow-runs/{id}/start``.
|
|
18
|
+
*
|
|
19
|
+
* The whole body is optional: an absent body starts the run with just
|
|
20
|
+
* the localized "Started workflow: X" opening message, exactly as
|
|
21
|
+
* before. When ``user_message`` is set it is appended to that opening
|
|
22
|
+
* thread message AND injected into the runner's first user turn, so the
|
|
23
|
+
* agent acts on it as guidance layered on the workflow instruction.
|
|
24
|
+
* @export
|
|
25
|
+
* @interface StartWorkflowRunRequest
|
|
26
|
+
*/
|
|
27
|
+
export interface StartWorkflowRunRequest {
|
|
28
|
+
/**
|
|
29
|
+
* Free-text instruction shown in the run thread and passed to the agent as additional guidance on top of the workflow instruction. Optional.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof StartWorkflowRunRequest
|
|
32
|
+
*/
|
|
33
|
+
userMessage?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export const StartWorkflowRunRequestPropertyValidationAttributesMap: {
|
|
36
|
+
[property: string]: {
|
|
37
|
+
maxLength?: number,
|
|
38
|
+
minLength?: number,
|
|
39
|
+
pattern?: string,
|
|
40
|
+
maximum?: number,
|
|
41
|
+
exclusiveMaximum?: boolean,
|
|
42
|
+
minimum?: number,
|
|
43
|
+
exclusiveMinimum?: boolean,
|
|
44
|
+
multipleOf?: number,
|
|
45
|
+
maxItems?: number,
|
|
46
|
+
minItems?: number,
|
|
47
|
+
uniqueItems?: boolean
|
|
48
|
+
}
|
|
49
|
+
} = {
|
|
50
|
+
userMessage: {
|
|
51
|
+
maxLength: 4000,
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the StartWorkflowRunRequest interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfStartWorkflowRunRequest(value: object): value is StartWorkflowRunRequest {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function StartWorkflowRunRequestFromJSON(json: any): StartWorkflowRunRequest {
|
|
64
|
+
return StartWorkflowRunRequestFromJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function StartWorkflowRunRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StartWorkflowRunRequest {
|
|
68
|
+
if (json == null) {
|
|
69
|
+
return json;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'userMessage': json['user_message'] == null ? undefined : json['user_message'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function StartWorkflowRunRequestToJSON(json: any): StartWorkflowRunRequest {
|
|
78
|
+
return StartWorkflowRunRequestToJSONTyped(json, false);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function StartWorkflowRunRequestToJSONTyped(value?: StartWorkflowRunRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'user_message': value['userMessage'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -66,6 +66,12 @@ export interface WorkflowRunSnapshot {
|
|
|
66
66
|
* @memberof WorkflowRunSnapshot
|
|
67
67
|
*/
|
|
68
68
|
inputs: Array<InputSnapshot>;
|
|
69
|
+
/**
|
|
70
|
+
* 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).
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof WorkflowRunSnapshot
|
|
73
|
+
*/
|
|
74
|
+
userMessage?: string | null;
|
|
69
75
|
}
|
|
70
76
|
export const WorkflowRunSnapshotPropertyValidationAttributesMap: {
|
|
71
77
|
[property: string]: {
|
|
@@ -82,6 +88,9 @@ export const WorkflowRunSnapshotPropertyValidationAttributesMap: {
|
|
|
82
88
|
uniqueItems?: boolean
|
|
83
89
|
}
|
|
84
90
|
} = {
|
|
91
|
+
userMessage: {
|
|
92
|
+
maxLength: 4000,
|
|
93
|
+
},
|
|
85
94
|
}
|
|
86
95
|
|
|
87
96
|
|
|
@@ -110,6 +119,7 @@ export function WorkflowRunSnapshotFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
110
119
|
'maxRunDurationSeconds': json['max_run_duration_seconds'],
|
|
111
120
|
'instruction': InstructionSnapshotFromJSON(json['instruction']),
|
|
112
121
|
'inputs': ((json['inputs'] as Array<any>).map(InputSnapshotFromJSON)),
|
|
122
|
+
'userMessage': json['user_message'] == null ? undefined : json['user_message'],
|
|
113
123
|
};
|
|
114
124
|
}
|
|
115
125
|
|
|
@@ -128,6 +138,7 @@ export function WorkflowRunSnapshotToJSONTyped(value?: WorkflowRunSnapshot | nul
|
|
|
128
138
|
'max_run_duration_seconds': value['maxRunDurationSeconds'],
|
|
129
139
|
'instruction': InstructionSnapshotToJSON(value['instruction']),
|
|
130
140
|
'inputs': ((value['inputs'] as Array<any>).map(InputSnapshotToJSON)),
|
|
141
|
+
'user_message': value['userMessage'],
|
|
131
142
|
};
|
|
132
143
|
}
|
|
133
144
|
|
package/src/models/index.ts
CHANGED
|
@@ -213,6 +213,7 @@ export * from './SetApprovalStateRequest';
|
|
|
213
213
|
export * from './SetWorkflowRunApprovalRequest';
|
|
214
214
|
export * from './SignInRequest';
|
|
215
215
|
export * from './SortDirection';
|
|
216
|
+
export * from './StartWorkflowRunRequest';
|
|
216
217
|
export * from './StepInput';
|
|
217
218
|
export * from './StepKind';
|
|
218
219
|
export * from './StepOutput';
|