@knowledge-stack/ksapi 1.111.1 → 1.112.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 (93) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +6 -2
  3. package/dist/apis/DataSourcesApi.d.ts +46 -5
  4. package/dist/apis/DataSourcesApi.js +53 -2
  5. package/dist/apis/DocumentVersionsApi.d.ts +4 -4
  6. package/dist/apis/DocumentVersionsApi.js +2 -2
  7. package/dist/apis/WorkflowDefinitionsApi.d.ts +6 -0
  8. package/dist/apis/WorkflowDefinitionsApi.js +6 -0
  9. package/dist/apis/WorkflowRunsApi.d.ts +4 -4
  10. package/dist/apis/WorkflowRunsApi.js +2 -2
  11. package/dist/esm/apis/DataSourcesApi.d.ts +46 -5
  12. package/dist/esm/apis/DataSourcesApi.js +54 -3
  13. package/dist/esm/apis/DocumentVersionsApi.d.ts +4 -4
  14. package/dist/esm/apis/DocumentVersionsApi.js +2 -2
  15. package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +6 -0
  16. package/dist/esm/apis/WorkflowDefinitionsApi.js +6 -0
  17. package/dist/esm/apis/WorkflowRunsApi.d.ts +4 -4
  18. package/dist/esm/apis/WorkflowRunsApi.js +2 -2
  19. package/dist/esm/models/CatalogColumnResponse.d.ts +7 -0
  20. package/dist/esm/models/CatalogColumnResponse.js +3 -0
  21. package/dist/esm/models/CatalogTableResponse.d.ts +6 -0
  22. package/dist/esm/models/CatalogTableResponse.js +4 -0
  23. package/dist/esm/models/ColumnConfig.d.ts +7 -0
  24. package/dist/esm/models/ColumnConfig.js +3 -0
  25. package/dist/esm/models/ColumnReference.d.ts +59 -0
  26. package/dist/esm/models/ColumnReference.js +50 -0
  27. package/dist/esm/models/DataSourceSchemaListResponse.d.ts +48 -0
  28. package/dist/esm/models/DataSourceSchemaListResponse.js +45 -0
  29. package/dist/esm/models/DataSourceSchemaResponse.d.ts +53 -0
  30. package/dist/esm/models/DataSourceSchemaResponse.js +48 -0
  31. package/dist/esm/models/DataSourceTableResponse.d.ts +6 -0
  32. package/dist/esm/models/DataSourceTableResponse.js +2 -0
  33. package/dist/esm/models/ModelTableRequest.d.ts +6 -0
  34. package/dist/esm/models/ModelTableRequest.js +2 -0
  35. package/dist/esm/models/UpdateWorkflowRunRequest.d.ts +12 -0
  36. package/dist/esm/models/UpdateWorkflowRunRequest.js +7 -0
  37. package/dist/esm/models/WorkflowRunResponse.d.ts +12 -0
  38. package/dist/esm/models/WorkflowRunResponse.js +6 -0
  39. package/dist/esm/models/index.d.ts +3 -0
  40. package/dist/esm/models/index.js +3 -0
  41. package/dist/models/CatalogColumnResponse.d.ts +7 -0
  42. package/dist/models/CatalogColumnResponse.js +3 -0
  43. package/dist/models/CatalogTableResponse.d.ts +6 -0
  44. package/dist/models/CatalogTableResponse.js +4 -0
  45. package/dist/models/ColumnConfig.d.ts +7 -0
  46. package/dist/models/ColumnConfig.js +3 -0
  47. package/dist/models/ColumnReference.d.ts +59 -0
  48. package/dist/models/ColumnReference.js +58 -0
  49. package/dist/models/DataSourceSchemaListResponse.d.ts +48 -0
  50. package/dist/models/DataSourceSchemaListResponse.js +53 -0
  51. package/dist/models/DataSourceSchemaResponse.d.ts +53 -0
  52. package/dist/models/DataSourceSchemaResponse.js +56 -0
  53. package/dist/models/DataSourceTableResponse.d.ts +6 -0
  54. package/dist/models/DataSourceTableResponse.js +2 -0
  55. package/dist/models/ModelTableRequest.d.ts +6 -0
  56. package/dist/models/ModelTableRequest.js +2 -0
  57. package/dist/models/UpdateWorkflowRunRequest.d.ts +12 -0
  58. package/dist/models/UpdateWorkflowRunRequest.js +7 -0
  59. package/dist/models/WorkflowRunResponse.d.ts +12 -0
  60. package/dist/models/WorkflowRunResponse.js +6 -0
  61. package/dist/models/index.d.ts +3 -0
  62. package/dist/models/index.js +3 -0
  63. package/docs/CatalogColumnResponse.md +2 -0
  64. package/docs/CatalogTableResponse.md +2 -0
  65. package/docs/ColumnConfig.md +2 -0
  66. package/docs/ColumnReference.md +39 -0
  67. package/docs/DataSourceSchemaListResponse.md +35 -0
  68. package/docs/DataSourceSchemaResponse.md +36 -0
  69. package/docs/DataSourceTableResponse.md +2 -0
  70. package/docs/DataSourcesApi.md +81 -2
  71. package/docs/DocumentVersionsApi.md +1 -1
  72. package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceTableResponseOrApiConnectionResponse.md +6 -0
  73. package/docs/ModelTableRequest.md +2 -0
  74. package/docs/UpdateWorkflowRunRequest.md +4 -0
  75. package/docs/WorkflowDefinitionsApi.md +7 -1
  76. package/docs/WorkflowRunResponse.md +4 -0
  77. package/docs/WorkflowRunsApi.md +1 -1
  78. package/package.json +1 -1
  79. package/src/apis/DataSourcesApi.ts +97 -4
  80. package/src/apis/DocumentVersionsApi.ts +4 -4
  81. package/src/apis/WorkflowDefinitionsApi.ts +14 -0
  82. package/src/apis/WorkflowRunsApi.ts +4 -4
  83. package/src/models/CatalogColumnResponse.ts +16 -0
  84. package/src/models/CatalogTableResponse.ts +9 -0
  85. package/src/models/ColumnConfig.ts +16 -0
  86. package/src/models/ColumnReference.ts +100 -0
  87. package/src/models/DataSourceSchemaListResponse.ts +91 -0
  88. package/src/models/DataSourceSchemaResponse.ts +92 -0
  89. package/src/models/DataSourceTableResponse.ts +8 -0
  90. package/src/models/ModelTableRequest.ts +8 -0
  91. package/src/models/UpdateWorkflowRunRequest.ts +19 -0
  92. package/src/models/WorkflowRunResponse.ts +17 -0
  93. package/src/models/index.ts +3 -0
@@ -21,6 +21,7 @@ import type {
21
21
  DataSourceQueryRequest,
22
22
  DataSourceQueryResponse,
23
23
  DataSourceResponse,
24
+ DataSourceSchemaListResponse,
24
25
  DataSourceTableResponse,
25
26
  ErrorResponse,
26
27
  HTTPValidationError,
@@ -40,6 +41,8 @@ import {
40
41
  DataSourceQueryResponseToJSON,
41
42
  DataSourceResponseFromJSON,
42
43
  DataSourceResponseToJSON,
44
+ DataSourceSchemaListResponseFromJSON,
45
+ DataSourceSchemaListResponseToJSON,
43
46
  DataSourceTableResponseFromJSON,
44
47
  DataSourceTableResponseToJSON,
45
48
  ErrorResponseFromJSON,
@@ -66,6 +69,11 @@ export interface GetDataSourceRequest {
66
69
 
67
70
  export interface GetDataSourceCatalogRequest {
68
71
  dataSourceId: string;
72
+ schema?: string | null;
73
+ }
74
+
75
+ export interface ListDataSourceSchemasRequest {
76
+ dataSourceId: string;
69
77
  }
70
78
 
71
79
  export interface ModelDataSourceTableRequest {
@@ -170,15 +178,17 @@ export interface DataSourcesApiInterface {
170
178
  /**
171
179
  * Creates request options for getDataSourceCatalog without sending the request
172
180
  * @param {string} dataSourceId
181
+ * @param {string} [schema] Schema/namespace to introspect (default: connection default)
173
182
  * @throws {RequiredError}
174
183
  * @memberof DataSourcesApiInterface
175
184
  */
176
185
  getDataSourceCatalogRequestOpts(requestParameters: GetDataSourceCatalogRequest): Promise<runtime.RequestOpts>;
177
186
 
178
187
  /**
179
- * Live-introspect the external DB so an admin can pick tables to model.
188
+ * Live-introspect a schema of the external DB so an admin can pick tables.
180
189
  * @summary Get Data Source Catalog Handler
181
190
  * @param {string} dataSourceId
191
+ * @param {string} [schema] Schema/namespace to introspect (default: connection default)
182
192
  * @param {*} [options] Override http request option.
183
193
  * @throws {RequiredError}
184
194
  * @memberof DataSourcesApiInterface
@@ -186,11 +196,35 @@ export interface DataSourcesApiInterface {
186
196
  getDataSourceCatalogRaw(requestParameters: GetDataSourceCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataSourceCatalogResponse>>;
187
197
 
188
198
  /**
189
- * Live-introspect the external DB so an admin can pick tables to model.
199
+ * Live-introspect a schema of the external DB so an admin can pick tables.
190
200
  * Get Data Source Catalog Handler
191
201
  */
192
202
  getDataSourceCatalog(requestParameters: GetDataSourceCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceCatalogResponse>;
193
203
 
204
+ /**
205
+ * Creates request options for listDataSourceSchemas without sending the request
206
+ * @param {string} dataSourceId
207
+ * @throws {RequiredError}
208
+ * @memberof DataSourcesApiInterface
209
+ */
210
+ listDataSourceSchemasRequestOpts(requestParameters: ListDataSourceSchemasRequest): Promise<runtime.RequestOpts>;
211
+
212
+ /**
213
+ * List the source\'s user namespaces (PG schemas / MySQL databases).
214
+ * @summary List Data Source Schemas Handler
215
+ * @param {string} dataSourceId
216
+ * @param {*} [options] Override http request option.
217
+ * @throws {RequiredError}
218
+ * @memberof DataSourcesApiInterface
219
+ */
220
+ listDataSourceSchemasRaw(requestParameters: ListDataSourceSchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataSourceSchemaListResponse>>;
221
+
222
+ /**
223
+ * List the source\'s user namespaces (PG schemas / MySQL databases).
224
+ * List Data Source Schemas Handler
225
+ */
226
+ listDataSourceSchemas(requestParameters: ListDataSourceSchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceSchemaListResponse>;
227
+
194
228
  /**
195
229
  * Creates request options for modelDataSourceTable without sending the request
196
230
  * @param {string} dataSourceId
@@ -481,6 +515,10 @@ export class DataSourcesApi extends runtime.BaseAPI implements DataSourcesApiInt
481
515
 
482
516
  const queryParameters: any = {};
483
517
 
518
+ if (requestParameters['schema'] != null) {
519
+ queryParameters['schema'] = requestParameters['schema'];
520
+ }
521
+
484
522
  const headerParameters: runtime.HTTPHeaders = {};
485
523
 
486
524
  if (this.configuration && this.configuration.accessToken) {
@@ -504,7 +542,7 @@ export class DataSourcesApi extends runtime.BaseAPI implements DataSourcesApiInt
504
542
  }
505
543
 
506
544
  /**
507
- * Live-introspect the external DB so an admin can pick tables to model.
545
+ * Live-introspect a schema of the external DB so an admin can pick tables.
508
546
  * Get Data Source Catalog Handler
509
547
  */
510
548
  async getDataSourceCatalogRaw(requestParameters: GetDataSourceCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataSourceCatalogResponse>> {
@@ -515,7 +553,7 @@ export class DataSourcesApi extends runtime.BaseAPI implements DataSourcesApiInt
515
553
  }
516
554
 
517
555
  /**
518
- * Live-introspect the external DB so an admin can pick tables to model.
556
+ * Live-introspect a schema of the external DB so an admin can pick tables.
519
557
  * Get Data Source Catalog Handler
520
558
  */
521
559
  async getDataSourceCatalog(requestParameters: GetDataSourceCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceCatalogResponse> {
@@ -523,6 +561,61 @@ export class DataSourcesApi extends runtime.BaseAPI implements DataSourcesApiInt
523
561
  return await response.value();
524
562
  }
525
563
 
564
+ /**
565
+ * Creates request options for listDataSourceSchemas without sending the request
566
+ */
567
+ async listDataSourceSchemasRequestOpts(requestParameters: ListDataSourceSchemasRequest): Promise<runtime.RequestOpts> {
568
+ if (requestParameters['dataSourceId'] == null) {
569
+ throw new runtime.RequiredError(
570
+ 'dataSourceId',
571
+ 'Required parameter "dataSourceId" was null or undefined when calling listDataSourceSchemas().'
572
+ );
573
+ }
574
+
575
+ const queryParameters: any = {};
576
+
577
+ const headerParameters: runtime.HTTPHeaders = {};
578
+
579
+ if (this.configuration && this.configuration.accessToken) {
580
+ const token = this.configuration.accessToken;
581
+ const tokenString = await token("bearerAuth", []);
582
+
583
+ if (tokenString) {
584
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
585
+ }
586
+ }
587
+
588
+ let urlPath = `/v1/data-sources/{data_source_id}/schemas`;
589
+ urlPath = urlPath.replace(`{${"data_source_id"}}`, encodeURIComponent(String(requestParameters['dataSourceId'])));
590
+
591
+ return {
592
+ path: urlPath,
593
+ method: 'GET',
594
+ headers: headerParameters,
595
+ query: queryParameters,
596
+ };
597
+ }
598
+
599
+ /**
600
+ * List the source\'s user namespaces (PG schemas / MySQL databases).
601
+ * List Data Source Schemas Handler
602
+ */
603
+ async listDataSourceSchemasRaw(requestParameters: ListDataSourceSchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataSourceSchemaListResponse>> {
604
+ const requestOptions = await this.listDataSourceSchemasRequestOpts(requestParameters);
605
+ const response = await this.request(requestOptions, initOverrides);
606
+
607
+ return new runtime.JSONApiResponse(response, (jsonValue) => DataSourceSchemaListResponseFromJSON(jsonValue));
608
+ }
609
+
610
+ /**
611
+ * List the source\'s user namespaces (PG schemas / MySQL databases).
612
+ * List Data Source Schemas Handler
613
+ */
614
+ async listDataSourceSchemas(requestParameters: ListDataSourceSchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceSchemaListResponse> {
615
+ const response = await this.listDataSourceSchemasRaw(requestParameters, initOverrides);
616
+ return await response.value();
617
+ }
618
+
526
619
  /**
527
620
  * Creates request options for modelDataSourceTable without sending the request
528
621
  */
@@ -388,7 +388,7 @@ export interface DocumentVersionsApiInterface {
388
388
  updateDocumentVersionMetadataRequestOpts(requestParameters: UpdateDocumentVersionMetadataRequest): Promise<runtime.RequestOpts>;
389
389
 
390
390
  /**
391
- * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
391
+ * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved. When this PATCH settles an ``inputs/`` upload\'s ingestion (an in-progress pipeline reaching a terminal state), it drives the parent workflow run forward: the two-step ``PENDING <-> NOT_STARTED`` toggle, plus auto-start / auto-fail for an ``auto_start`` run (see ``WorkflowRunStartService.auto_advance_on_input_settled``).
392
392
  * @summary Update Document Version Metadata Handler
393
393
  * @param {string} versionId DocumentVersion ID
394
394
  * @param {DocumentVersionMetadataUpdate} documentVersionMetadataUpdate
@@ -399,7 +399,7 @@ export interface DocumentVersionsApiInterface {
399
399
  updateDocumentVersionMetadataRaw(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionResponse>>;
400
400
 
401
401
  /**
402
- * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
402
+ * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved. When this PATCH settles an ``inputs/`` upload\'s ingestion (an in-progress pipeline reaching a terminal state), it drives the parent workflow run forward: the two-step ``PENDING <-> NOT_STARTED`` toggle, plus auto-start / auto-fail for an ``auto_start`` run (see ``WorkflowRunStartService.auto_advance_on_input_settled``).
403
403
  * Update Document Version Metadata Handler
404
404
  */
405
405
  updateDocumentVersionMetadata(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
@@ -1027,7 +1027,7 @@ export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVers
1027
1027
  }
1028
1028
 
1029
1029
  /**
1030
- * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
1030
+ * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved. When this PATCH settles an ``inputs/`` upload\'s ingestion (an in-progress pipeline reaching a terminal state), it drives the parent workflow run forward: the two-step ``PENDING <-> NOT_STARTED`` toggle, plus auto-start / auto-fail for an ``auto_start`` run (see ``WorkflowRunStartService.auto_advance_on_input_settled``).
1031
1031
  * Update Document Version Metadata Handler
1032
1032
  */
1033
1033
  async updateDocumentVersionMetadataRaw(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionResponse>> {
@@ -1038,7 +1038,7 @@ export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVers
1038
1038
  }
1039
1039
 
1040
1040
  /**
1041
- * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
1041
+ * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved. When this PATCH settles an ``inputs/`` upload\'s ingestion (an in-progress pipeline reaching a terminal state), it drives the parent workflow run forward: the two-step ``PENDING <-> NOT_STARTED`` toggle, plus auto-start / auto-fail for an ``auto_start`` run (see ``WorkflowRunStartService.auto_advance_on_input_settled``).
1042
1042
  * Update Document Version Metadata Handler
1043
1043
  */
1044
1044
  async updateDocumentVersionMetadata(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse> {
@@ -64,6 +64,8 @@ export interface CreateWorkflowRunRequest {
64
64
  files?: Array<Blob>;
65
65
  inputScope?: string | null;
66
66
  idempotencyKey?: string | null;
67
+ autoStart?: boolean;
68
+ userMessage?: string | null;
67
69
  }
68
70
 
69
71
  export interface DeleteWorkflowDefinitionRequest {
@@ -145,6 +147,8 @@ export interface WorkflowDefinitionsApiInterface {
145
147
  * @param {Array<Blob>} [files] DEPRECATED — do not send files here. Carrying file bytes on run creation makes the call block on synchronous S3 upload (the ~30s \\\&#39;Create run\\\&#39; wait). Instead create an empty draft (omit this field), then upload each file to the run\\\&#39;s &#x60;&#x60;inputs/&#x60;&#x60; folder via &#x60;&#x60;POST /v1/documents/ingest&#x60;&#x60; with &#x60;&#x60;path_part_id&#x60;&#x60; set to the run\\\&#39;s &#x60;&#x60;inputs_path_part_id&#x60;&#x60;; that path ingests asynchronously and auto-syncs the run\\\&#39;s state. This field will be removed once the FE has migrated.
146
148
  * @param {string} [inputScope] JSON array of &#x60;&#x60;DOCUMENT&#x60;&#x60; or &#x60;&#x60;FOLDER&#x60;&#x60; path_part UUIDs referenced from the existing knowledge base, pinned onto the new draft\\\&#39;s input scope. Optional — omit for an empty draft and add references later via PATCH.
147
149
  * @param {string} [idempotencyKey] Optional key to prevent duplicate runs from retries.
150
+ * @param {boolean} [autoStart] When true, the run starts itself once its &#x60;&#x60;inputs/&#x60;&#x60; uploads finish ingesting — eliminating the separate Start call. If an upload\\\&#39;s ingestion fails, the run is marked FAILED. Default false (two-step flow). Arm only after all uploads are queued; a synchronously-completing first upload would otherwise start the run before later uploads are added.
151
+ * @param {string} [userMessage] Optional note carried to the auto-start dispatch (the equivalent of the Start endpoint\\\&#39;s &#x60;&#x60;user_message&#x60;&#x60; for a self-starting run). Applied only when &#x60;&#x60;auto_start&#x60;&#x60; fires.
148
152
  * @throws {RequiredError}
149
153
  * @memberof WorkflowDefinitionsApiInterface
150
154
  */
@@ -157,6 +161,8 @@ export interface WorkflowDefinitionsApiInterface {
157
161
  * @param {Array<Blob>} [files] DEPRECATED — do not send files here. Carrying file bytes on run creation makes the call block on synchronous S3 upload (the ~30s \\\&#39;Create run\\\&#39; wait). Instead create an empty draft (omit this field), then upload each file to the run\\\&#39;s &#x60;&#x60;inputs/&#x60;&#x60; folder via &#x60;&#x60;POST /v1/documents/ingest&#x60;&#x60; with &#x60;&#x60;path_part_id&#x60;&#x60; set to the run\\\&#39;s &#x60;&#x60;inputs_path_part_id&#x60;&#x60;; that path ingests asynchronously and auto-syncs the run\\\&#39;s state. This field will be removed once the FE has migrated.
158
162
  * @param {string} [inputScope] JSON array of &#x60;&#x60;DOCUMENT&#x60;&#x60; or &#x60;&#x60;FOLDER&#x60;&#x60; path_part UUIDs referenced from the existing knowledge base, pinned onto the new draft\\\&#39;s input scope. Optional — omit for an empty draft and add references later via PATCH.
159
163
  * @param {string} [idempotencyKey] Optional key to prevent duplicate runs from retries.
164
+ * @param {boolean} [autoStart] When true, the run starts itself once its &#x60;&#x60;inputs/&#x60;&#x60; uploads finish ingesting — eliminating the separate Start call. If an upload\\\&#39;s ingestion fails, the run is marked FAILED. Default false (two-step flow). Arm only after all uploads are queued; a synchronously-completing first upload would otherwise start the run before later uploads are added.
165
+ * @param {string} [userMessage] Optional note carried to the auto-start dispatch (the equivalent of the Start endpoint\\\&#39;s &#x60;&#x60;user_message&#x60;&#x60; for a self-starting run). Applied only when &#x60;&#x60;auto_start&#x60;&#x60; fires.
160
166
  * @param {*} [options] Override http request option.
161
167
  * @throws {RequiredError}
162
168
  * @memberof WorkflowDefinitionsApiInterface
@@ -461,6 +467,14 @@ export class WorkflowDefinitionsApi extends runtime.BaseAPI implements WorkflowD
461
467
  formParams.append('idempotency_key', requestParameters['idempotencyKey'] as any);
462
468
  }
463
469
 
470
+ if (requestParameters['autoStart'] != null) {
471
+ formParams.append('auto_start', requestParameters['autoStart'] as any);
472
+ }
473
+
474
+ if (requestParameters['userMessage'] != null) {
475
+ formParams.append('user_message', requestParameters['userMessage'] as any);
476
+ }
477
+
464
478
 
465
479
  let urlPath = `/v1/workflow-definitions/{definition_id}/runs`;
466
480
  urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
@@ -389,7 +389,7 @@ export interface WorkflowRunsApiInterface {
389
389
  updateWorkflowRunRequestOpts(requestParameters: UpdateWorkflowRunOperationRequest): Promise<runtime.RequestOpts>;
390
390
 
391
391
  /**
392
- * Edit a NOT_STARTED run\'s KB scope and / or display name. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation.
392
+ * Edit a NOT_STARTED run\'s KB scope, name, and / or auto_start. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` or ``PENDING`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation. Arming ``auto_start`` on a run that is already ``NOT_STARTED`` (its inputs have settled) dispatches it immediately — the run would otherwise never receive an ingestion-completion hook to start it. A ``PENDING`` run is left to auto-advance when its uploads finish.
393
393
  * @summary Update Workflow Run Handler
394
394
  * @param {string} runId
395
395
  * @param {UpdateWorkflowRunRequest} updateWorkflowRunRequest
@@ -400,7 +400,7 @@ export interface WorkflowRunsApiInterface {
400
400
  updateWorkflowRunRaw(requestParameters: UpdateWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
401
401
 
402
402
  /**
403
- * Edit a NOT_STARTED run\'s KB scope and / or display name. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation.
403
+ * Edit a NOT_STARTED run\'s KB scope, name, and / or auto_start. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` or ``PENDING`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation. Arming ``auto_start`` on a run that is already ``NOT_STARTED`` (its inputs have settled) dispatches it immediately — the run would otherwise never receive an ingestion-completion hook to start it. A ``PENDING`` run is left to auto-advance when its uploads finish.
404
404
  * Update Workflow Run Handler
405
405
  */
406
406
  updateWorkflowRun(requestParameters: UpdateWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -1045,7 +1045,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
1045
1045
  }
1046
1046
 
1047
1047
  /**
1048
- * Edit a NOT_STARTED run\'s KB scope and / or display name. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation.
1048
+ * Edit a NOT_STARTED run\'s KB scope, name, and / or auto_start. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` or ``PENDING`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation. Arming ``auto_start`` on a run that is already ``NOT_STARTED`` (its inputs have settled) dispatches it immediately — the run would otherwise never receive an ingestion-completion hook to start it. A ``PENDING`` run is left to auto-advance when its uploads finish.
1049
1049
  * Update Workflow Run Handler
1050
1050
  */
1051
1051
  async updateWorkflowRunRaw(requestParameters: UpdateWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>> {
@@ -1056,7 +1056,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
1056
1056
  }
1057
1057
 
1058
1058
  /**
1059
- * Edit a NOT_STARTED run\'s KB scope and / or display name. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation.
1059
+ * Edit a NOT_STARTED run\'s KB scope, name, and / or auto_start. Both body fields are optional but at least one must be present. The run must be ``NOT_STARTED`` or ``PENDING`` (409 otherwise). Caller must be the triggerer or OWNER/ADMIN (403 otherwise). A name collision with a sibling run under the same definition\'s ``runs/`` folder maps to a 409 via ``IntegrityError`` translation. Arming ``auto_start`` on a run that is already ``NOT_STARTED`` (its inputs have settled) dispatches it immediately — the run would otherwise never receive an ingestion-completion hook to start it. A ``PENDING`` run is left to auto-advance when its uploads finish.
1060
1060
  * Update Workflow Run Handler
1061
1061
  */
1062
1062
  async updateWorkflowRun(requestParameters: UpdateWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse> {
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ColumnReference } from './ColumnReference';
17
+ import {
18
+ ColumnReferenceFromJSON,
19
+ ColumnReferenceFromJSONTyped,
20
+ ColumnReferenceToJSON,
21
+ ColumnReferenceToJSONTyped,
22
+ } from './ColumnReference';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -37,6 +45,12 @@ export interface CatalogColumnResponse {
37
45
  * @memberof CatalogColumnResponse
38
46
  */
39
47
  isPk: boolean;
48
+ /**
49
+ *
50
+ * @type {ColumnReference}
51
+ * @memberof CatalogColumnResponse
52
+ */
53
+ references?: ColumnReference | null;
40
54
  }
41
55
  export const CatalogColumnResponsePropertyValidationAttributesMap: {
42
56
  [property: string]: {
@@ -79,6 +93,7 @@ export function CatalogColumnResponseFromJSONTyped(json: any, ignoreDiscriminato
79
93
  'name': json['name'],
80
94
  'dataType': json['data_type'],
81
95
  'isPk': json['is_pk'],
96
+ 'references': json['references'] == null ? undefined : ColumnReferenceFromJSON(json['references']),
82
97
  };
83
98
  }
84
99
 
@@ -96,6 +111,7 @@ export function CatalogColumnResponseToJSONTyped(value?: CatalogColumnResponse |
96
111
  'name': value['name'],
97
112
  'data_type': value['dataType'],
98
113
  'is_pk': value['isPk'],
114
+ 'references': ColumnReferenceToJSON(value['references']),
99
115
  };
100
116
  }
101
117
 
@@ -33,6 +33,12 @@ export interface CatalogTableResponse {
33
33
  * @memberof CatalogTableResponse
34
34
  */
35
35
  name: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof CatalogTableResponse
40
+ */
41
+ schemaName: string;
36
42
  /**
37
43
  *
38
44
  * @type {Array<CatalogColumnResponse>}
@@ -63,6 +69,7 @@ export const CatalogTableResponsePropertyValidationAttributesMap: {
63
69
  */
64
70
  export function instanceOfCatalogTableResponse(value: object): value is CatalogTableResponse {
65
71
  if (!('name' in value) || value['name'] === undefined) return false;
72
+ if (!('schemaName' in value) || value['schemaName'] === undefined) return false;
66
73
  if (!('columns' in value) || value['columns'] === undefined) return false;
67
74
  return true;
68
75
  }
@@ -78,6 +85,7 @@ export function CatalogTableResponseFromJSONTyped(json: any, ignoreDiscriminator
78
85
  return {
79
86
 
80
87
  'name': json['name'],
88
+ 'schemaName': json['schema_name'],
81
89
  'columns': ((json['columns'] as Array<any>).map(CatalogColumnResponseFromJSON)),
82
90
  };
83
91
  }
@@ -94,6 +102,7 @@ export function CatalogTableResponseToJSONTyped(value?: CatalogTableResponse | n
94
102
  return {
95
103
 
96
104
  'name': value['name'],
105
+ 'schema_name': value['schemaName'],
97
106
  'columns': ((value['columns'] as Array<any>).map(CatalogColumnResponseToJSON)),
98
107
  };
99
108
  }
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ColumnReference } from './ColumnReference';
17
+ import {
18
+ ColumnReferenceFromJSON,
19
+ ColumnReferenceFromJSONTyped,
20
+ ColumnReferenceToJSON,
21
+ ColumnReferenceToJSONTyped,
22
+ } from './ColumnReference';
23
+
16
24
  /**
17
25
  * A modeled column. Only ``exposed`` columns are surfaced to the agent.
18
26
  * @export
@@ -49,6 +57,12 @@ export interface ColumnConfig {
49
57
  * @memberof ColumnConfig
50
58
  */
51
59
  exposed?: boolean;
60
+ /**
61
+ *
62
+ * @type {ColumnReference}
63
+ * @memberof ColumnConfig
64
+ */
65
+ references?: ColumnReference | null;
52
66
  }
53
67
  export const ColumnConfigPropertyValidationAttributesMap: {
54
68
  [property: string]: {
@@ -91,6 +105,7 @@ export function ColumnConfigFromJSONTyped(json: any, ignoreDiscriminator: boolea
91
105
  'comment': json['comment'] == null ? undefined : json['comment'],
92
106
  'isPk': json['is_pk'] == null ? undefined : json['is_pk'],
93
107
  'exposed': json['exposed'] == null ? undefined : json['exposed'],
108
+ 'references': json['references'] == null ? undefined : ColumnReferenceFromJSON(json['references']),
94
109
  };
95
110
  }
96
111
 
@@ -110,6 +125,7 @@ export function ColumnConfigToJSONTyped(value?: ColumnConfig | null, ignoreDiscr
110
125
  'comment': value['comment'],
111
126
  'is_pk': value['isPk'],
112
127
  'exposed': value['exposed'],
128
+ 'references': ColumnReferenceToJSON(value['references']),
113
129
  };
114
130
  }
115
131
 
@@ -0,0 +1,100 @@
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
+ * The table+column a foreign-key column points at.
18
+ * @export
19
+ * @interface ColumnReference
20
+ */
21
+ export interface ColumnReference {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ColumnReference
26
+ */
27
+ schemaName?: string | null;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ColumnReference
32
+ */
33
+ table: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ColumnReference
38
+ */
39
+ column: string;
40
+ }
41
+ export const ColumnReferencePropertyValidationAttributesMap: {
42
+ [property: string]: {
43
+ maxLength?: number,
44
+ minLength?: number,
45
+ pattern?: string,
46
+ maximum?: number,
47
+ exclusiveMaximum?: boolean,
48
+ minimum?: number,
49
+ exclusiveMinimum?: boolean,
50
+ multipleOf?: number,
51
+ maxItems?: number,
52
+ minItems?: number,
53
+ uniqueItems?: boolean
54
+ }
55
+ } = {
56
+ }
57
+
58
+
59
+ /**
60
+ * Check if a given object implements the ColumnReference interface.
61
+ */
62
+ export function instanceOfColumnReference(value: object): value is ColumnReference {
63
+ if (!('table' in value) || value['table'] === undefined) return false;
64
+ if (!('column' in value) || value['column'] === undefined) return false;
65
+ return true;
66
+ }
67
+
68
+ export function ColumnReferenceFromJSON(json: any): ColumnReference {
69
+ return ColumnReferenceFromJSONTyped(json, false);
70
+ }
71
+
72
+ export function ColumnReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ColumnReference {
73
+ if (json == null) {
74
+ return json;
75
+ }
76
+ return {
77
+
78
+ 'schemaName': json['schema_name'] == null ? undefined : json['schema_name'],
79
+ 'table': json['table'],
80
+ 'column': json['column'],
81
+ };
82
+ }
83
+
84
+ export function ColumnReferenceToJSON(json: any): ColumnReference {
85
+ return ColumnReferenceToJSONTyped(json, false);
86
+ }
87
+
88
+ export function ColumnReferenceToJSONTyped(value?: ColumnReference | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'schema_name': value['schemaName'],
96
+ 'table': value['table'],
97
+ 'column': value['column'],
98
+ };
99
+ }
100
+
@@ -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
+ import type { DataSourceSchemaResponse } from './DataSourceSchemaResponse';
17
+ import {
18
+ DataSourceSchemaResponseFromJSON,
19
+ DataSourceSchemaResponseFromJSONTyped,
20
+ DataSourceSchemaResponseToJSON,
21
+ DataSourceSchemaResponseToJSONTyped,
22
+ } from './DataSourceSchemaResponse';
23
+
24
+ /**
25
+ * The source's user namespaces (PG schemas / MySQL databases).
26
+ * @export
27
+ * @interface DataSourceSchemaListResponse
28
+ */
29
+ export interface DataSourceSchemaListResponse {
30
+ /**
31
+ *
32
+ * @type {Array<DataSourceSchemaResponse>}
33
+ * @memberof DataSourceSchemaListResponse
34
+ */
35
+ schemas: Array<DataSourceSchemaResponse>;
36
+ }
37
+ export const DataSourceSchemaListResponsePropertyValidationAttributesMap: {
38
+ [property: string]: {
39
+ maxLength?: number,
40
+ minLength?: number,
41
+ pattern?: string,
42
+ maximum?: number,
43
+ exclusiveMaximum?: boolean,
44
+ minimum?: number,
45
+ exclusiveMinimum?: boolean,
46
+ multipleOf?: number,
47
+ maxItems?: number,
48
+ minItems?: number,
49
+ uniqueItems?: boolean
50
+ }
51
+ } = {
52
+ }
53
+
54
+
55
+ /**
56
+ * Check if a given object implements the DataSourceSchemaListResponse interface.
57
+ */
58
+ export function instanceOfDataSourceSchemaListResponse(value: object): value is DataSourceSchemaListResponse {
59
+ if (!('schemas' in value) || value['schemas'] === undefined) return false;
60
+ return true;
61
+ }
62
+
63
+ export function DataSourceSchemaListResponseFromJSON(json: any): DataSourceSchemaListResponse {
64
+ return DataSourceSchemaListResponseFromJSONTyped(json, false);
65
+ }
66
+
67
+ export function DataSourceSchemaListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataSourceSchemaListResponse {
68
+ if (json == null) {
69
+ return json;
70
+ }
71
+ return {
72
+
73
+ 'schemas': ((json['schemas'] as Array<any>).map(DataSourceSchemaResponseFromJSON)),
74
+ };
75
+ }
76
+
77
+ export function DataSourceSchemaListResponseToJSON(json: any): DataSourceSchemaListResponse {
78
+ return DataSourceSchemaListResponseToJSONTyped(json, false);
79
+ }
80
+
81
+ export function DataSourceSchemaListResponseToJSONTyped(value?: DataSourceSchemaListResponse | null, ignoreDiscriminator: boolean = false): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+
86
+ return {
87
+
88
+ 'schemas': ((value['schemas'] as Array<any>).map(DataSourceSchemaResponseToJSON)),
89
+ };
90
+ }
91
+