@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.
Files changed (61) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +6 -3
  3. package/dist/apis/ApiConnectionsApi.d.ts +38 -0
  4. package/dist/apis/ApiConnectionsApi.js +47 -0
  5. package/dist/apis/DataSourcesApi.d.ts +38 -0
  6. package/dist/apis/DataSourcesApi.js +47 -0
  7. package/dist/apis/FoldersApi.d.ts +6 -6
  8. package/dist/apis/FoldersApi.js +2 -2
  9. package/dist/apis/WorkflowRunsApi.d.ts +15 -12
  10. package/dist/apis/WorkflowRunsApi.js +4 -2
  11. package/dist/esm/apis/ApiConnectionsApi.d.ts +38 -0
  12. package/dist/esm/apis/ApiConnectionsApi.js +47 -0
  13. package/dist/esm/apis/DataSourcesApi.d.ts +38 -0
  14. package/dist/esm/apis/DataSourcesApi.js +47 -0
  15. package/dist/esm/apis/FoldersApi.d.ts +6 -6
  16. package/dist/esm/apis/FoldersApi.js +2 -2
  17. package/dist/esm/apis/WorkflowRunsApi.d.ts +15 -12
  18. package/dist/esm/apis/WorkflowRunsApi.js +5 -3
  19. package/dist/esm/models/DataSourceResponse.d.ts +7 -0
  20. package/dist/esm/models/DataSourceResponse.js +5 -0
  21. package/dist/esm/models/DataSourceTableResponse.d.ts +7 -0
  22. package/dist/esm/models/DataSourceTableResponse.js +5 -0
  23. package/dist/esm/models/SearchablePartType.d.ts +1 -0
  24. package/dist/esm/models/SearchablePartType.js +2 -1
  25. package/dist/esm/models/StartWorkflowRunRequest.d.ts +53 -0
  26. package/dist/esm/models/StartWorkflowRunRequest.js +46 -0
  27. package/dist/esm/models/WorkflowRunSnapshot.d.ts +6 -0
  28. package/dist/esm/models/WorkflowRunSnapshot.js +7 -1
  29. package/dist/esm/models/index.d.ts +1 -0
  30. package/dist/esm/models/index.js +1 -0
  31. package/dist/models/DataSourceResponse.d.ts +7 -0
  32. package/dist/models/DataSourceResponse.js +5 -0
  33. package/dist/models/DataSourceTableResponse.d.ts +7 -0
  34. package/dist/models/DataSourceTableResponse.js +5 -0
  35. package/dist/models/SearchablePartType.d.ts +1 -0
  36. package/dist/models/SearchablePartType.js +2 -1
  37. package/dist/models/StartWorkflowRunRequest.d.ts +53 -0
  38. package/dist/models/StartWorkflowRunRequest.js +54 -0
  39. package/dist/models/WorkflowRunSnapshot.d.ts +6 -0
  40. package/dist/models/WorkflowRunSnapshot.js +7 -1
  41. package/dist/models/index.d.ts +1 -0
  42. package/dist/models/index.js +1 -0
  43. package/docs/ApiConnectionsApi.md +76 -0
  44. package/docs/DataSourceResponse.md +2 -0
  45. package/docs/DataSourceTableResponse.md +2 -0
  46. package/docs/DataSourcesApi.md +76 -0
  47. package/docs/FoldersApi.md +3 -3
  48. package/docs/StartWorkflowRunRequest.md +35 -0
  49. package/docs/WorkflowRunSnapshot.md +2 -0
  50. package/docs/WorkflowRunsApi.md +9 -6
  51. package/package.json +1 -1
  52. package/src/apis/ApiConnectionsApi.ts +82 -0
  53. package/src/apis/DataSourcesApi.ts +82 -0
  54. package/src/apis/FoldersApi.ts +6 -6
  55. package/src/apis/WorkflowRunsApi.ts +20 -11
  56. package/src/models/DataSourceResponse.ts +16 -0
  57. package/src/models/DataSourceTableResponse.ts +16 -0
  58. package/src/models/SearchablePartType.ts +2 -1
  59. package/src/models/StartWorkflowRunRequest.ts +91 -0
  60. package/src/models/WorkflowRunSnapshot.ts +11 -0
  61. package/src/models/index.ts +1 -0
@@ -14,6 +14,9 @@ import type { CreateDataSourceRequest, DataSourceCatalogResponse, DataSourceDeta
14
14
  export interface CreateDataSourceOperationRequest {
15
15
  createDataSourceRequest: CreateDataSourceRequest;
16
16
  }
17
+ export interface DeleteDataSourceRequest {
18
+ dataSourceId: string;
19
+ }
17
20
  export interface GetDataSourceRequest {
18
21
  dataSourceId: string;
19
22
  }
@@ -64,6 +67,27 @@ export interface DataSourcesApiInterface {
64
67
  * Create Data Source Handler
65
68
  */
66
69
  createDataSource(requestParameters: CreateDataSourceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceResponse>;
70
+ /**
71
+ * Creates request options for deleteDataSource without sending the request
72
+ * @param {string} dataSourceId
73
+ * @throws {RequiredError}
74
+ * @memberof DataSourcesApiInterface
75
+ */
76
+ deleteDataSourceRequestOpts(requestParameters: DeleteDataSourceRequest): Promise<runtime.RequestOpts>;
77
+ /**
78
+ * 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.
79
+ * @summary Delete Data Source Handler
80
+ * @param {string} dataSourceId
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ * @memberof DataSourcesApiInterface
84
+ */
85
+ deleteDataSourceRaw(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
86
+ /**
87
+ * 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.
88
+ * Delete Data Source Handler
89
+ */
90
+ deleteDataSource(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
67
91
  /**
68
92
  * Creates request options for getDataSource without sending the request
69
93
  * @param {string} dataSourceId
@@ -217,6 +241,20 @@ export declare class DataSourcesApi extends runtime.BaseAPI implements DataSourc
217
241
  * Create Data Source Handler
218
242
  */
219
243
  createDataSource(requestParameters: CreateDataSourceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceResponse>;
244
+ /**
245
+ * Creates request options for deleteDataSource without sending the request
246
+ */
247
+ deleteDataSourceRequestOpts(requestParameters: DeleteDataSourceRequest): Promise<runtime.RequestOpts>;
248
+ /**
249
+ * 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.
250
+ * Delete Data Source Handler
251
+ */
252
+ deleteDataSourceRaw(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
253
+ /**
254
+ * 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.
255
+ * Delete Data Source Handler
256
+ */
257
+ deleteDataSource(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
220
258
  /**
221
259
  * Creates request options for getDataSource without sending the request
222
260
  */
@@ -75,6 +75,53 @@ export class DataSourcesApi extends runtime.BaseAPI {
75
75
  return yield response.value();
76
76
  });
77
77
  }
78
+ /**
79
+ * Creates request options for deleteDataSource without sending the request
80
+ */
81
+ deleteDataSourceRequestOpts(requestParameters) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ if (requestParameters['dataSourceId'] == null) {
84
+ throw new runtime.RequiredError('dataSourceId', 'Required parameter "dataSourceId" was null or undefined when calling deleteDataSource().');
85
+ }
86
+ const queryParameters = {};
87
+ const headerParameters = {};
88
+ if (this.configuration && this.configuration.accessToken) {
89
+ const token = this.configuration.accessToken;
90
+ const tokenString = yield token("bearerAuth", []);
91
+ if (tokenString) {
92
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
93
+ }
94
+ }
95
+ let urlPath = `/v1/data-sources/{data_source_id}`;
96
+ urlPath = urlPath.replace(`{${"data_source_id"}}`, encodeURIComponent(String(requestParameters['dataSourceId'])));
97
+ return {
98
+ path: urlPath,
99
+ method: 'DELETE',
100
+ headers: headerParameters,
101
+ query: queryParameters,
102
+ };
103
+ });
104
+ }
105
+ /**
106
+ * 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.
107
+ * Delete Data Source Handler
108
+ */
109
+ deleteDataSourceRaw(requestParameters, initOverrides) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const requestOptions = yield this.deleteDataSourceRequestOpts(requestParameters);
112
+ const response = yield this.request(requestOptions, initOverrides);
113
+ return new runtime.VoidApiResponse(response);
114
+ });
115
+ }
116
+ /**
117
+ * 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.
118
+ * Delete Data Source Handler
119
+ */
120
+ deleteDataSource(requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ yield this.deleteDataSourceRaw(requestParameters, initOverrides);
123
+ });
124
+ }
78
125
  /**
79
126
  * Creates request options for getDataSource without sending the request
80
127
  */
@@ -229,7 +229,7 @@ export interface FoldersApiInterface {
229
229
  * Creates request options for searchItems without sending the request
230
230
  * @param {string} nameLike Case-insensitive partial name search
231
231
  * @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
232
- * @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
232
+ * @param {SearchablePartType} [partType] Filter by item type (default: all searchable types)
233
233
  * @param {boolean} [withTags] Include tags in the response (default: false)
234
234
  * @param {string} [parentPathPartId] Scope search to descendants of this folder\&#39;s path part
235
235
  * @param {number} [limit] Number of items per page
@@ -239,11 +239,11 @@ export interface FoldersApiInterface {
239
239
  */
240
240
  searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
241
241
  /**
242
- * Search for folders, documents, and data-source 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.
242
+ * Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
243
243
  * @summary Search Items Handler
244
244
  * @param {string} nameLike Case-insensitive partial name search
245
245
  * @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
246
- * @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
246
+ * @param {SearchablePartType} [partType] Filter by item type (default: all searchable types)
247
247
  * @param {boolean} [withTags] Include tags in the response (default: false)
248
248
  * @param {string} [parentPathPartId] Scope search to descendants of this folder\&#39;s path part
249
249
  * @param {number} [limit] Number of items per page
@@ -254,7 +254,7 @@ export interface FoldersApiInterface {
254
254
  */
255
255
  searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>>;
256
256
  /**
257
- * Search for folders, documents, and data-source 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.
257
+ * Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
258
258
  * Search Items Handler
259
259
  */
260
260
  searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>;
@@ -373,12 +373,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
373
373
  */
374
374
  searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
375
375
  /**
376
- * Search for folders, documents, and data-source 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.
376
+ * Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
377
377
  * Search Items Handler
378
378
  */
379
379
  searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>>;
380
380
  /**
381
- * Search for folders, documents, and data-source 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.
381
+ * Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
382
382
  * Search Items Handler
383
383
  */
384
384
  searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceTableResponseApiConnectionResponseDiscriminator>;
@@ -413,7 +413,7 @@ export class FoldersApi extends runtime.BaseAPI {
413
413
  });
414
414
  }
415
415
  /**
416
- * Search for folders, documents, and data-source 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.
416
+ * Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
417
417
  * Search Items Handler
418
418
  */
419
419
  searchItemsRaw(requestParameters, initOverrides) {
@@ -424,7 +424,7 @@ export class FoldersApi extends runtime.BaseAPI {
424
424
  });
425
425
  }
426
426
  /**
427
- * Search for folders, documents, and data-source 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.
427
+ * Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
428
428
  * Search Items Handler
429
429
  */
430
430
  searchItems(requestParameters, initOverrides) {
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CloneWorkflowRunRequest, PaginatedResponseWorkflowRunResponse, SetWorkflowRunApprovalRequest, SortDirection, UpdateWorkflowRunRequest, WorkflowCallbackResponse, WorkflowExecutionState, WorkflowRunCallbackRequest, WorkflowRunOrder, WorkflowRunResponse, WorkflowRunSummaryResponse } from '../models/index';
13
+ import type { CloneWorkflowRunRequest, PaginatedResponseWorkflowRunResponse, SetWorkflowRunApprovalRequest, SortDirection, StartWorkflowRunRequest, UpdateWorkflowRunRequest, WorkflowCallbackResponse, WorkflowExecutionState, WorkflowRunCallbackRequest, WorkflowRunOrder, WorkflowRunResponse, WorkflowRunSummaryResponse } from '../models/index';
14
14
  export interface CloneWorkflowRunOperationRequest {
15
15
  runId: string;
16
16
  cloneWorkflowRunRequest: CloneWorkflowRunRequest;
@@ -48,8 +48,9 @@ export interface SetWorkflowRunApprovalOperationRequest {
48
48
  runId: string;
49
49
  setWorkflowRunApprovalRequest: SetWorkflowRunApprovalRequest;
50
50
  }
51
- export interface StartWorkflowRunRequest {
51
+ export interface StartWorkflowRunOperationRequest {
52
52
  runId: string;
53
+ startWorkflowRunRequest?: StartWorkflowRunRequest | null;
53
54
  }
54
55
  export interface StopWorkflowRunRequest {
55
56
  runId: string;
@@ -249,24 +250,26 @@ export interface WorkflowRunsApiInterface {
249
250
  /**
250
251
  * Creates request options for startWorkflowRun without sending the request
251
252
  * @param {string} runId
253
+ * @param {StartWorkflowRunRequest} [startWorkflowRunRequest]
252
254
  * @throws {RequiredError}
253
255
  * @memberof WorkflowRunsApiInterface
254
256
  */
255
- startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunRequest): Promise<runtime.RequestOpts>;
257
+ startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunOperationRequest): Promise<runtime.RequestOpts>;
256
258
  /**
257
- * 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).
259
+ * 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``).
258
260
  * @summary Start Workflow Run Handler
259
261
  * @param {string} runId
262
+ * @param {StartWorkflowRunRequest} [startWorkflowRunRequest]
260
263
  * @param {*} [options] Override http request option.
261
264
  * @throws {RequiredError}
262
265
  * @memberof WorkflowRunsApiInterface
263
266
  */
264
- startWorkflowRunRaw(requestParameters: StartWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
267
+ startWorkflowRunRaw(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
265
268
  /**
266
- * 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).
269
+ * 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``).
267
270
  * Start Workflow Run Handler
268
271
  */
269
- startWorkflowRun(requestParameters: StartWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
272
+ startWorkflowRun(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
270
273
  /**
271
274
  * Creates request options for stopWorkflowRun without sending the request
272
275
  * @param {string} runId
@@ -436,17 +439,17 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
436
439
  /**
437
440
  * Creates request options for startWorkflowRun without sending the request
438
441
  */
439
- startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunRequest): Promise<runtime.RequestOpts>;
442
+ startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunOperationRequest): Promise<runtime.RequestOpts>;
440
443
  /**
441
- * 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).
444
+ * 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``).
442
445
  * Start Workflow Run Handler
443
446
  */
444
- startWorkflowRunRaw(requestParameters: StartWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
447
+ startWorkflowRunRaw(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
445
448
  /**
446
- * 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).
449
+ * 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``).
447
450
  * Start Workflow Run Handler
448
451
  */
449
- startWorkflowRun(requestParameters: StartWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
452
+ startWorkflowRun(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
450
453
  /**
451
454
  * Creates request options for stopWorkflowRun without sending the request
452
455
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { CloneWorkflowRunRequestToJSON, PaginatedResponseWorkflowRunResponseFromJSON, SetWorkflowRunApprovalRequestToJSON, UpdateWorkflowRunRequestToJSON, WorkflowCallbackResponseFromJSON, WorkflowRunCallbackRequestToJSON, WorkflowRunResponseFromJSON, WorkflowRunSummaryResponseFromJSON, } from '../models/index';
24
+ import { CloneWorkflowRunRequestToJSON, PaginatedResponseWorkflowRunResponseFromJSON, SetWorkflowRunApprovalRequestToJSON, StartWorkflowRunRequestToJSON, UpdateWorkflowRunRequestToJSON, WorkflowCallbackResponseFromJSON, WorkflowRunCallbackRequestToJSON, WorkflowRunResponseFromJSON, WorkflowRunSummaryResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -417,6 +417,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
417
417
  }
418
418
  const queryParameters = {};
419
419
  const headerParameters = {};
420
+ headerParameters['Content-Type'] = 'application/json';
420
421
  if (this.configuration && this.configuration.accessToken) {
421
422
  const token = this.configuration.accessToken;
422
423
  const tokenString = yield token("bearerAuth", []);
@@ -431,11 +432,12 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
431
432
  method: 'POST',
432
433
  headers: headerParameters,
433
434
  query: queryParameters,
435
+ body: StartWorkflowRunRequestToJSON(requestParameters['startWorkflowRunRequest']),
434
436
  };
435
437
  });
436
438
  }
437
439
  /**
438
- * 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).
440
+ * 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``).
439
441
  * Start Workflow Run Handler
440
442
  */
441
443
  startWorkflowRunRaw(requestParameters, initOverrides) {
@@ -446,7 +448,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
446
448
  });
447
449
  }
448
450
  /**
449
- * 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).
451
+ * 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``).
450
452
  * Start Workflow Run Handler
451
453
  */
452
454
  startWorkflowRun(requestParameters, initOverrides) {
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ItemPermissions } from './ItemPermissions';
12
13
  import type { PathPartApprovalState } from './PathPartApprovalState';
13
14
  import type { UserInfo } from './UserInfo';
14
15
  import type { DataSourceEngine } from './DataSourceEngine';
@@ -81,6 +82,12 @@ export interface DataSourceResponse {
81
82
  * @memberof DataSourceResponse
82
83
  */
83
84
  owner?: UserInfo | null;
85
+ /**
86
+ *
87
+ * @type {ItemPermissions}
88
+ * @memberof DataSourceResponse
89
+ */
90
+ permissions: ItemPermissions;
84
91
  /**
85
92
  *
86
93
  * @type {Date}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
14
15
  import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
15
16
  import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
16
17
  import { DataSourceEngineFromJSON, DataSourceEngineToJSON, } from './DataSourceEngine';
@@ -41,6 +42,8 @@ export function instanceOfDataSourceResponse(value) {
41
42
  return false;
42
43
  if (!('approvalState' in value) || value['approvalState'] === undefined)
43
44
  return false;
45
+ if (!('permissions' in value) || value['permissions'] === undefined)
46
+ return false;
44
47
  if (!('createdAt' in value) || value['createdAt'] === undefined)
45
48
  return false;
46
49
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
@@ -65,6 +68,7 @@ export function DataSourceResponseFromJSONTyped(json, ignoreDiscriminator) {
65
68
  'engine': DataSourceEngineFromJSON(json['engine']),
66
69
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
67
70
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
71
+ 'permissions': ItemPermissionsFromJSON(json['permissions']),
68
72
  'createdAt': (new Date(json['created_at'])),
69
73
  'updatedAt': (new Date(json['updated_at'])),
70
74
  };
@@ -87,6 +91,7 @@ export function DataSourceResponseToJSONTyped(value, ignoreDiscriminator = false
87
91
  'engine': DataSourceEngineToJSON(value['engine']),
88
92
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
89
93
  'owner': UserInfoToJSON(value['owner']),
94
+ 'permissions': ItemPermissionsToJSON(value['permissions']),
90
95
  'created_at': value['createdAt'].toISOString(),
91
96
  'updated_at': value['updatedAt'].toISOString(),
92
97
  };
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ItemPermissions } from './ItemPermissions';
12
13
  import type { PathPartApprovalState } from './PathPartApprovalState';
13
14
  /**
14
15
  * Modeled-table response; a discriminated-union variant for listings.
@@ -90,6 +91,12 @@ export interface DataSourceTableResponse {
90
91
  * @memberof DataSourceTableResponse
91
92
  */
92
93
  approvalState: PathPartApprovalState;
94
+ /**
95
+ *
96
+ * @type {ItemPermissions}
97
+ * @memberof DataSourceTableResponse
98
+ */
99
+ permissions: ItemPermissions;
93
100
  /**
94
101
  *
95
102
  * @type {Date}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
14
15
  import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
15
16
  /**
16
17
  * @export
@@ -45,6 +46,8 @@ export function instanceOfDataSourceTableResponse(value) {
45
46
  return false;
46
47
  if (!('approvalState' in value) || value['approvalState'] === undefined)
47
48
  return false;
49
+ if (!('permissions' in value) || value['permissions'] === undefined)
50
+ return false;
48
51
  if (!('createdAt' in value) || value['createdAt'] === undefined)
49
52
  return false;
50
53
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
@@ -71,6 +74,7 @@ export function DataSourceTableResponseFromJSONTyped(json, ignoreDiscriminator)
71
74
  'description': json['description'],
72
75
  'columnConfig': json['column_config'],
73
76
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
77
+ 'permissions': ItemPermissionsFromJSON(json['permissions']),
74
78
  'createdAt': (new Date(json['created_at'])),
75
79
  'updatedAt': (new Date(json['updated_at'])),
76
80
  };
@@ -95,6 +99,7 @@ export function DataSourceTableResponseToJSONTyped(value, ignoreDiscriminator =
95
99
  'description': value['description'],
96
100
  'column_config': value['columnConfig'],
97
101
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
102
+ 'permissions': ItemPermissionsToJSON(value['permissions']),
98
103
  'created_at': value['createdAt'].toISOString(),
99
104
  'updated_at': value['updatedAt'].toISOString(),
100
105
  };
@@ -17,6 +17,7 @@ export declare const SearchablePartType: {
17
17
  readonly Folder: "FOLDER";
18
18
  readonly Document: "DOCUMENT";
19
19
  readonly DataSource: "DATA_SOURCE";
20
+ readonly ApiConnection: "API_CONNECTION";
20
21
  };
21
22
  export type SearchablePartType = typeof SearchablePartType[keyof typeof SearchablePartType];
22
23
  export declare function instanceOfSearchablePartType(value: any): boolean;
@@ -18,7 +18,8 @@
18
18
  export const SearchablePartType = {
19
19
  Folder: 'FOLDER',
20
20
  Document: 'DOCUMENT',
21
- DataSource: 'DATA_SOURCE'
21
+ DataSource: 'DATA_SOURCE',
22
+ ApiConnection: 'API_CONNECTION'
22
23
  };
23
24
  export function instanceOfSearchablePartType(value) {
24
25
  for (const key in SearchablePartType) {
@@ -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,46 @@
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
+ export const StartWorkflowRunRequestPropertyValidationAttributesMap = {
15
+ userMessage: {
16
+ maxLength: 4000,
17
+ },
18
+ };
19
+ /**
20
+ * Check if a given object implements the StartWorkflowRunRequest interface.
21
+ */
22
+ export function instanceOfStartWorkflowRunRequest(value) {
23
+ return true;
24
+ }
25
+ export function StartWorkflowRunRequestFromJSON(json) {
26
+ return StartWorkflowRunRequestFromJSONTyped(json, false);
27
+ }
28
+ export function StartWorkflowRunRequestFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'userMessage': json['user_message'] == null ? undefined : json['user_message'],
34
+ };
35
+ }
36
+ export function StartWorkflowRunRequestToJSON(json) {
37
+ return StartWorkflowRunRequestToJSONTyped(json, false);
38
+ }
39
+ export function StartWorkflowRunRequestToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'user_message': value['userMessage'],
45
+ };
46
+ }
@@ -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]: {
@@ -13,7 +13,11 @@
13
13
  */
14
14
  import { InputSnapshotFromJSON, InputSnapshotToJSON, } from './InputSnapshot';
15
15
  import { InstructionSnapshotFromJSON, InstructionSnapshotToJSON, } from './InstructionSnapshot';
16
- export const WorkflowRunSnapshotPropertyValidationAttributesMap = {};
16
+ export const WorkflowRunSnapshotPropertyValidationAttributesMap = {
17
+ userMessage: {
18
+ maxLength: 4000,
19
+ },
20
+ };
17
21
  /**
18
22
  * Check if a given object implements the WorkflowRunSnapshot interface.
19
23
  */
@@ -40,6 +44,7 @@ export function WorkflowRunSnapshotFromJSONTyped(json, ignoreDiscriminator) {
40
44
  'maxRunDurationSeconds': json['max_run_duration_seconds'],
41
45
  'instruction': InstructionSnapshotFromJSON(json['instruction']),
42
46
  'inputs': (json['inputs'].map(InputSnapshotFromJSON)),
47
+ 'userMessage': json['user_message'] == null ? undefined : json['user_message'],
43
48
  };
44
49
  }
45
50
  export function WorkflowRunSnapshotToJSON(json) {
@@ -54,5 +59,6 @@ export function WorkflowRunSnapshotToJSONTyped(value, ignoreDiscriminator = fals
54
59
  'max_run_duration_seconds': value['maxRunDurationSeconds'],
55
60
  'instruction': InstructionSnapshotToJSON(value['instruction']),
56
61
  'inputs': (value['inputs'].map(InputSnapshotToJSON)),
62
+ 'user_message': value['userMessage'],
57
63
  };
58
64
  }
@@ -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';
@@ -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';
@@ -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}