@knowledge-stack/ksapi 1.116.0 → 1.118.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 +4 -2
- package/dist/apis/DataSourcesApi.d.ts +42 -1
- package/dist/apis/DataSourcesApi.js +53 -0
- package/dist/esm/apis/DataSourcesApi.d.ts +42 -1
- package/dist/esm/apis/DataSourcesApi.js +54 -1
- package/dist/esm/models/CloneWorkflowRunRequest.d.ts +1 -1
- package/dist/esm/models/InputSnapshot.d.ts +10 -3
- package/dist/esm/models/InputSnapshot.js +3 -1
- package/dist/esm/models/UpdateApiConnectionRequest.d.ts +16 -0
- package/dist/esm/models/UpdateApiConnectionRequest.js +8 -0
- package/dist/esm/models/UpdateDataSourceRequest.d.ts +58 -0
- package/dist/esm/models/UpdateDataSourceRequest.js +49 -0
- package/dist/esm/models/UpdateWorkflowRunRequest.d.ts +1 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/CloneWorkflowRunRequest.d.ts +1 -1
- package/dist/models/InputSnapshot.d.ts +10 -3
- package/dist/models/InputSnapshot.js +3 -1
- package/dist/models/UpdateApiConnectionRequest.d.ts +16 -0
- package/dist/models/UpdateApiConnectionRequest.js +8 -0
- package/dist/models/UpdateDataSourceRequest.d.ts +58 -0
- package/dist/models/UpdateDataSourceRequest.js +57 -0
- package/dist/models/UpdateWorkflowRunRequest.d.ts +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/DataSourcesApi.md +79 -0
- package/docs/InputSnapshot.md +1 -1
- package/docs/UpdateApiConnectionRequest.md +5 -1
- package/docs/UpdateDataSourceRequest.md +37 -0
- package/package.json +1 -1
- package/src/apis/DataSourcesApi.ts +99 -0
- package/src/models/CloneWorkflowRunRequest.ts +1 -1
- package/src/models/InputSnapshot.ts +11 -4
- package/src/models/UpdateApiConnectionRequest.ts +24 -0
- package/src/models/UpdateDataSourceRequest.ts +99 -0
- package/src/models/UpdateWorkflowRunRequest.ts +1 -1
- package/src/models/index.ts +1 -0
|
@@ -22,6 +22,10 @@ exports.UpdateApiConnectionRequestToJSONTyped = UpdateApiConnectionRequestToJSON
|
|
|
22
22
|
const NetworkClass_1 = require("./NetworkClass");
|
|
23
23
|
const ApiAuthConfig_1 = require("./ApiAuthConfig");
|
|
24
24
|
exports.UpdateApiConnectionRequestPropertyValidationAttributesMap = {
|
|
25
|
+
name: {
|
|
26
|
+
maxLength: 255,
|
|
27
|
+
minLength: 1,
|
|
28
|
+
},
|
|
25
29
|
baseUrl: {
|
|
26
30
|
maxLength: 2048,
|
|
27
31
|
},
|
|
@@ -43,6 +47,8 @@ function UpdateApiConnectionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
47
|
return json;
|
|
44
48
|
}
|
|
45
49
|
return {
|
|
50
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
51
|
+
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
46
52
|
'baseUrl': json['base_url'] == null ? undefined : json['base_url'],
|
|
47
53
|
'networkClass': json['network_class'] == null ? undefined : (0, NetworkClass_1.NetworkClassFromJSON)(json['network_class']),
|
|
48
54
|
'verifyTls': json['verify_tls'] == null ? undefined : json['verify_tls'],
|
|
@@ -58,6 +64,8 @@ function UpdateApiConnectionRequestToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
58
64
|
return value;
|
|
59
65
|
}
|
|
60
66
|
return {
|
|
67
|
+
'name': value['name'],
|
|
68
|
+
'parent_path_part_id': value['parentPathPartId'],
|
|
61
69
|
'base_url': value['baseUrl'],
|
|
62
70
|
'network_class': (0, NetworkClass_1.NetworkClassToJSON)(value['networkClass']),
|
|
63
71
|
'verify_tls': value['verifyTls'],
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
* Rename and/or move a connector (PATCH). Both fields optional.
|
|
14
|
+
*
|
|
15
|
+
* A body with both ``None`` is rejected as a no-op 400. ``name`` renames
|
|
16
|
+
* the connector path_part; ``parent_path_part_id`` moves it under a new
|
|
17
|
+
* FOLDER (the move cascades ``materialized_path`` to the modeled-table
|
|
18
|
+
* children). Connection credentials and engine are not editable here.
|
|
19
|
+
* @export
|
|
20
|
+
* @interface UpdateDataSourceRequest
|
|
21
|
+
*/
|
|
22
|
+
export interface UpdateDataSourceRequest {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof UpdateDataSourceRequest
|
|
27
|
+
*/
|
|
28
|
+
name?: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* New parent FOLDER path_part to move the connector under.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof UpdateDataSourceRequest
|
|
33
|
+
*/
|
|
34
|
+
parentPathPartId?: string | null;
|
|
35
|
+
}
|
|
36
|
+
export declare const UpdateDataSourceRequestPropertyValidationAttributesMap: {
|
|
37
|
+
[property: string]: {
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
minLength?: number;
|
|
40
|
+
pattern?: string;
|
|
41
|
+
maximum?: number;
|
|
42
|
+
exclusiveMaximum?: boolean;
|
|
43
|
+
minimum?: number;
|
|
44
|
+
exclusiveMinimum?: boolean;
|
|
45
|
+
multipleOf?: number;
|
|
46
|
+
maxItems?: number;
|
|
47
|
+
minItems?: number;
|
|
48
|
+
uniqueItems?: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the UpdateDataSourceRequest interface.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instanceOfUpdateDataSourceRequest(value: object): value is UpdateDataSourceRequest;
|
|
55
|
+
export declare function UpdateDataSourceRequestFromJSON(json: any): UpdateDataSourceRequest;
|
|
56
|
+
export declare function UpdateDataSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateDataSourceRequest;
|
|
57
|
+
export declare function UpdateDataSourceRequestToJSON(json: any): UpdateDataSourceRequest;
|
|
58
|
+
export declare function UpdateDataSourceRequestToJSONTyped(value?: UpdateDataSourceRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateDataSourceRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfUpdateDataSourceRequest = instanceOfUpdateDataSourceRequest;
|
|
18
|
+
exports.UpdateDataSourceRequestFromJSON = UpdateDataSourceRequestFromJSON;
|
|
19
|
+
exports.UpdateDataSourceRequestFromJSONTyped = UpdateDataSourceRequestFromJSONTyped;
|
|
20
|
+
exports.UpdateDataSourceRequestToJSON = UpdateDataSourceRequestToJSON;
|
|
21
|
+
exports.UpdateDataSourceRequestToJSONTyped = UpdateDataSourceRequestToJSONTyped;
|
|
22
|
+
exports.UpdateDataSourceRequestPropertyValidationAttributesMap = {
|
|
23
|
+
name: {
|
|
24
|
+
maxLength: 255,
|
|
25
|
+
minLength: 1,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the UpdateDataSourceRequest interface.
|
|
30
|
+
*/
|
|
31
|
+
function instanceOfUpdateDataSourceRequest(value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function UpdateDataSourceRequestFromJSON(json) {
|
|
35
|
+
return UpdateDataSourceRequestFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function UpdateDataSourceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
43
|
+
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function UpdateDataSourceRequestToJSON(json) {
|
|
47
|
+
return UpdateDataSourceRequestToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function UpdateDataSourceRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'name': value['name'],
|
|
55
|
+
'parent_path_part_id': value['parentPathPartId'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
export interface UpdateWorkflowRunRequest {
|
|
23
23
|
/**
|
|
24
|
-
* New KB-reference scope (DOCUMENT + FOLDER pp_ids). Replaces the row's ``input_path_part_ids`` wholesale. Uploaded files live in ``inputs/`` and are walked at Start; they are not part of this list.
|
|
24
|
+
* New KB-reference scope (DOCUMENT + FOLDER + DATA_SOURCE + API_CONNECTION pp_ids). Replaces the row's ``input_path_part_ids`` wholesale. Uploaded files live in ``inputs/`` and are walked at Start; they are not part of this list.
|
|
25
25
|
* @type {Array<string>}
|
|
26
26
|
* @memberof UpdateWorkflowRunRequest
|
|
27
27
|
*/
|
package/dist/models/index.d.ts
CHANGED
|
@@ -252,6 +252,7 @@ export * from './TrashItemResponse';
|
|
|
252
252
|
export * from './UpdateApiConnectionRequest';
|
|
253
253
|
export * from './UpdateChunkContentRequest';
|
|
254
254
|
export * from './UpdateChunkMetadataRequest';
|
|
255
|
+
export * from './UpdateDataSourceRequest';
|
|
255
256
|
export * from './UpdateDocumentRequest';
|
|
256
257
|
export * from './UpdateFolderRequest';
|
|
257
258
|
export * from './UpdateGroupPermissionRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -270,6 +270,7 @@ __exportStar(require("./TrashItemResponse"), exports);
|
|
|
270
270
|
__exportStar(require("./UpdateApiConnectionRequest"), exports);
|
|
271
271
|
__exportStar(require("./UpdateChunkContentRequest"), exports);
|
|
272
272
|
__exportStar(require("./UpdateChunkMetadataRequest"), exports);
|
|
273
|
+
__exportStar(require("./UpdateDataSourceRequest"), exports);
|
|
273
274
|
__exportStar(require("./UpdateDocumentRequest"), exports);
|
|
274
275
|
__exportStar(require("./UpdateFolderRequest"), exports);
|
|
275
276
|
__exportStar(require("./UpdateGroupPermissionRequest"), exports);
|
package/docs/DataSourcesApi.md
CHANGED
|
@@ -12,6 +12,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
12
12
|
| [**modelDataSourceTable**](DataSourcesApi.md#modeldatasourcetable) | **POST** /v1/data-sources/{data_source_id}/tables | Model Data Source Table Handler |
|
|
13
13
|
| [**queryDataSource**](DataSourcesApi.md#querydatasource) | **POST** /v1/data-sources/{data_source_id}/query | Query Data Source Handler |
|
|
14
14
|
| [**testDataSourceConnection**](DataSourcesApi.md#testdatasourceconnection) | **POST** /v1/data-sources/{data_source_id}/test | Test Data Source Connection Handler |
|
|
15
|
+
| [**updateDataSource**](DataSourcesApi.md#updatedatasourceoperation) | **PATCH** /v1/data-sources/{data_source_id} | Update Data Source Handler |
|
|
15
16
|
| [**updateDataSourceTable**](DataSourcesApi.md#updatedatasourcetable) | **PATCH** /v1/data-sources/{data_source_id}/tables/{table_id} | Update Data Source Table Handler |
|
|
16
17
|
|
|
17
18
|
|
|
@@ -625,6 +626,84 @@ example().catch(console.error);
|
|
|
625
626
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
626
627
|
|
|
627
628
|
|
|
629
|
+
## updateDataSource
|
|
630
|
+
|
|
631
|
+
> DataSourceResponse updateDataSource(dataSourceId, updateDataSourceRequest)
|
|
632
|
+
|
|
633
|
+
Update Data Source Handler
|
|
634
|
+
|
|
635
|
+
Rename and/or move a connector. Requires ``can_write`` on the connector (and on the destination folder for a move).
|
|
636
|
+
|
|
637
|
+
### Example
|
|
638
|
+
|
|
639
|
+
```ts
|
|
640
|
+
import {
|
|
641
|
+
Configuration,
|
|
642
|
+
DataSourcesApi,
|
|
643
|
+
} from '@knowledge-stack/ksapi';
|
|
644
|
+
import type { UpdateDataSourceOperationRequest } from '@knowledge-stack/ksapi';
|
|
645
|
+
|
|
646
|
+
async function example() {
|
|
647
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
648
|
+
const config = new Configuration({
|
|
649
|
+
// To configure API key authorization: cookieAuth
|
|
650
|
+
apiKey: "YOUR API KEY",
|
|
651
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
652
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
653
|
+
});
|
|
654
|
+
const api = new DataSourcesApi(config);
|
|
655
|
+
|
|
656
|
+
const body = {
|
|
657
|
+
// string
|
|
658
|
+
dataSourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
659
|
+
// UpdateDataSourceRequest
|
|
660
|
+
updateDataSourceRequest: ...,
|
|
661
|
+
} satisfies UpdateDataSourceOperationRequest;
|
|
662
|
+
|
|
663
|
+
try {
|
|
664
|
+
const data = await api.updateDataSource(body);
|
|
665
|
+
console.log(data);
|
|
666
|
+
} catch (error) {
|
|
667
|
+
console.error(error);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// Run the test
|
|
672
|
+
example().catch(console.error);
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
### Parameters
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
| Name | Type | Description | Notes |
|
|
679
|
+
|------------- | ------------- | ------------- | -------------|
|
|
680
|
+
| **dataSourceId** | `string` | | [Defaults to `undefined`] |
|
|
681
|
+
| **updateDataSourceRequest** | [UpdateDataSourceRequest](UpdateDataSourceRequest.md) | | |
|
|
682
|
+
|
|
683
|
+
### Return type
|
|
684
|
+
|
|
685
|
+
[**DataSourceResponse**](DataSourceResponse.md)
|
|
686
|
+
|
|
687
|
+
### Authorization
|
|
688
|
+
|
|
689
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
690
|
+
|
|
691
|
+
### HTTP request headers
|
|
692
|
+
|
|
693
|
+
- **Content-Type**: `application/json`
|
|
694
|
+
- **Accept**: `application/json`
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
### HTTP response details
|
|
698
|
+
| Status code | Description | Response headers |
|
|
699
|
+
|-------------|-------------|------------------|
|
|
700
|
+
| **200** | Successful Response | - |
|
|
701
|
+
| **422** | Validation Error | - |
|
|
702
|
+
| **0** | Error response. | - |
|
|
703
|
+
|
|
704
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
705
|
+
|
|
706
|
+
|
|
628
707
|
## updateDataSourceTable
|
|
629
708
|
|
|
630
709
|
> DataSourceTableResponse updateDataSourceTable(dataSourceId, tableId, updateTableRequest)
|
package/docs/InputSnapshot.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# InputSnapshot
|
|
3
3
|
|
|
4
|
-
One entry of a run\'s input scope, self-describing its pin semantics. ``part_type`` is the kind discriminator: * ``DOCUMENT_VERSION`` — a pinned document version. The DOCUMENT in the request scope was resolved to its active version at trigger time; ``path_part_id`` is that DOCUMENT_VERSION path_part and the entry does not float. * ``FOLDER`` — a live folder reference. ``path_part_id`` is the FOLDER path_part itself; its contents are NOT captured here and are enumerated live by the runner (see ``materialized_path`` for subtree scoping). The underlying PDO id (DocumentVersion
|
|
4
|
+
One entry of a run\'s input scope, self-describing its pin semantics. ``part_type`` is the kind discriminator: * ``DOCUMENT_VERSION`` — a pinned document version. The DOCUMENT in the request scope was resolved to its active version at trigger time; ``path_part_id`` is that DOCUMENT_VERSION path_part and the entry does not float. * ``FOLDER`` — a live folder reference. ``path_part_id`` is the FOLDER path_part itself; its contents are NOT captured here and are enumerated live by the runner (see ``materialized_path`` for subtree scoping). * ``DATA_SOURCE`` / ``API_CONNECTION`` — a live connector reference (DB / API). ``path_part_id`` is the connector path_part itself; the runner queries it live via its connector tools, nothing is captured here. The underlying PDO id (DocumentVersion / Folder / connector) is resolved live at run time from ``path_part.metadata_obj_id``, not stored here.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
# UpdateApiConnectionRequest
|
|
3
3
|
|
|
4
|
-
Partial update (PATCH). A risk-increasing change re-arms the disclaimer.
|
|
4
|
+
Partial update (PATCH). A risk-increasing change re-arms the disclaimer. ``name`` renames the connection and ``parent_path_part_id`` moves it under a new FOLDER; neither is a risk-increasing change, so a rename/move alone leaves the disclaimer intact.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
|
+
`name` | string
|
|
11
|
+
`parentPathPartId` | string
|
|
10
12
|
`baseUrl` | string
|
|
11
13
|
`networkClass` | [NetworkClass](NetworkClass.md)
|
|
12
14
|
`verifyTls` | boolean
|
|
@@ -20,6 +22,8 @@ import type { UpdateApiConnectionRequest } from '@knowledge-stack/ksapi'
|
|
|
20
22
|
|
|
21
23
|
// TODO: Update the object below with actual values
|
|
22
24
|
const example = {
|
|
25
|
+
"name": null,
|
|
26
|
+
"parentPathPartId": null,
|
|
23
27
|
"baseUrl": null,
|
|
24
28
|
"networkClass": null,
|
|
25
29
|
"verifyTls": null,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateDataSourceRequest
|
|
3
|
+
|
|
4
|
+
Rename and/or move a connector (PATCH). Both fields optional. A body with both ``None`` is rejected as a no-op 400. ``name`` renames the connector path_part; ``parent_path_part_id`` moves it under a new FOLDER (the move cascades ``materialized_path`` to the modeled-table children). Connection credentials and engine are not editable here.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`name` | string
|
|
11
|
+
`parentPathPartId` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { UpdateDataSourceRequest } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"name": null,
|
|
21
|
+
"parentPathPartId": null,
|
|
22
|
+
} satisfies UpdateDataSourceRequest
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateDataSourceRequest
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ import type {
|
|
|
26
26
|
ErrorResponse,
|
|
27
27
|
HTTPValidationError,
|
|
28
28
|
ModelTableRequest,
|
|
29
|
+
UpdateDataSourceRequest,
|
|
29
30
|
UpdateTableRequest,
|
|
30
31
|
} from '../models/index';
|
|
31
32
|
import {
|
|
@@ -51,6 +52,8 @@ import {
|
|
|
51
52
|
HTTPValidationErrorToJSON,
|
|
52
53
|
ModelTableRequestFromJSON,
|
|
53
54
|
ModelTableRequestToJSON,
|
|
55
|
+
UpdateDataSourceRequestFromJSON,
|
|
56
|
+
UpdateDataSourceRequestToJSON,
|
|
54
57
|
UpdateTableRequestFromJSON,
|
|
55
58
|
UpdateTableRequestToJSON,
|
|
56
59
|
} from '../models/index';
|
|
@@ -90,6 +93,11 @@ export interface TestDataSourceConnectionRequest {
|
|
|
90
93
|
dataSourceId: string;
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
export interface UpdateDataSourceOperationRequest {
|
|
97
|
+
dataSourceId: string;
|
|
98
|
+
updateDataSourceRequest: UpdateDataSourceRequest;
|
|
99
|
+
}
|
|
100
|
+
|
|
93
101
|
export interface UpdateDataSourceTableRequest {
|
|
94
102
|
dataSourceId: string;
|
|
95
103
|
tableId: string;
|
|
@@ -301,6 +309,32 @@ export interface DataSourcesApiInterface {
|
|
|
301
309
|
*/
|
|
302
310
|
testDataSourceConnection(requestParameters: TestDataSourceConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
303
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Creates request options for updateDataSource without sending the request
|
|
314
|
+
* @param {string} dataSourceId
|
|
315
|
+
* @param {UpdateDataSourceRequest} updateDataSourceRequest
|
|
316
|
+
* @throws {RequiredError}
|
|
317
|
+
* @memberof DataSourcesApiInterface
|
|
318
|
+
*/
|
|
319
|
+
updateDataSourceRequestOpts(requestParameters: UpdateDataSourceOperationRequest): Promise<runtime.RequestOpts>;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Rename and/or move a connector. Requires ``can_write`` on the connector (and on the destination folder for a move).
|
|
323
|
+
* @summary Update Data Source Handler
|
|
324
|
+
* @param {string} dataSourceId
|
|
325
|
+
* @param {UpdateDataSourceRequest} updateDataSourceRequest
|
|
326
|
+
* @param {*} [options] Override http request option.
|
|
327
|
+
* @throws {RequiredError}
|
|
328
|
+
* @memberof DataSourcesApiInterface
|
|
329
|
+
*/
|
|
330
|
+
updateDataSourceRaw(requestParameters: UpdateDataSourceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataSourceResponse>>;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Rename and/or move a connector. Requires ``can_write`` on the connector (and on the destination folder for a move).
|
|
334
|
+
* Update Data Source Handler
|
|
335
|
+
*/
|
|
336
|
+
updateDataSource(requestParameters: UpdateDataSourceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceResponse>;
|
|
337
|
+
|
|
304
338
|
/**
|
|
305
339
|
* Creates request options for updateDataSourceTable without sending the request
|
|
306
340
|
* @param {string} dataSourceId
|
|
@@ -800,6 +834,71 @@ export class DataSourcesApi extends runtime.BaseAPI implements DataSourcesApiInt
|
|
|
800
834
|
await this.testDataSourceConnectionRaw(requestParameters, initOverrides);
|
|
801
835
|
}
|
|
802
836
|
|
|
837
|
+
/**
|
|
838
|
+
* Creates request options for updateDataSource without sending the request
|
|
839
|
+
*/
|
|
840
|
+
async updateDataSourceRequestOpts(requestParameters: UpdateDataSourceOperationRequest): Promise<runtime.RequestOpts> {
|
|
841
|
+
if (requestParameters['dataSourceId'] == null) {
|
|
842
|
+
throw new runtime.RequiredError(
|
|
843
|
+
'dataSourceId',
|
|
844
|
+
'Required parameter "dataSourceId" was null or undefined when calling updateDataSource().'
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
if (requestParameters['updateDataSourceRequest'] == null) {
|
|
849
|
+
throw new runtime.RequiredError(
|
|
850
|
+
'updateDataSourceRequest',
|
|
851
|
+
'Required parameter "updateDataSourceRequest" was null or undefined when calling updateDataSource().'
|
|
852
|
+
);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
const queryParameters: any = {};
|
|
856
|
+
|
|
857
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
858
|
+
|
|
859
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
860
|
+
|
|
861
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
862
|
+
const token = this.configuration.accessToken;
|
|
863
|
+
const tokenString = await token("bearerAuth", []);
|
|
864
|
+
|
|
865
|
+
if (tokenString) {
|
|
866
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
let urlPath = `/v1/data-sources/{data_source_id}`;
|
|
871
|
+
urlPath = urlPath.replace(`{${"data_source_id"}}`, encodeURIComponent(String(requestParameters['dataSourceId'])));
|
|
872
|
+
|
|
873
|
+
return {
|
|
874
|
+
path: urlPath,
|
|
875
|
+
method: 'PATCH',
|
|
876
|
+
headers: headerParameters,
|
|
877
|
+
query: queryParameters,
|
|
878
|
+
body: UpdateDataSourceRequestToJSON(requestParameters['updateDataSourceRequest']),
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Rename and/or move a connector. Requires ``can_write`` on the connector (and on the destination folder for a move).
|
|
884
|
+
* Update Data Source Handler
|
|
885
|
+
*/
|
|
886
|
+
async updateDataSourceRaw(requestParameters: UpdateDataSourceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataSourceResponse>> {
|
|
887
|
+
const requestOptions = await this.updateDataSourceRequestOpts(requestParameters);
|
|
888
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
889
|
+
|
|
890
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataSourceResponseFromJSON(jsonValue));
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Rename and/or move a connector. Requires ``can_write`` on the connector (and on the destination folder for a move).
|
|
895
|
+
* Update Data Source Handler
|
|
896
|
+
*/
|
|
897
|
+
async updateDataSource(requestParameters: UpdateDataSourceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceResponse> {
|
|
898
|
+
const response = await this.updateDataSourceRaw(requestParameters, initOverrides);
|
|
899
|
+
return await response.value();
|
|
900
|
+
}
|
|
901
|
+
|
|
803
902
|
/**
|
|
804
903
|
* Creates request options for updateDataSourceTable without sending the request
|
|
805
904
|
*/
|
|
@@ -27,7 +27,7 @@ import { mapValues } from '../runtime';
|
|
|
27
27
|
*/
|
|
28
28
|
export interface CloneWorkflowRunRequest {
|
|
29
29
|
/**
|
|
30
|
-
* When True, the new run's input_path_part_ids are pinned from the source run's snapshotted inputs (DOCUMENT_VERSION
|
|
30
|
+
* When True, the new run's input_path_part_ids are pinned from the source run's snapshotted inputs (DOCUMENT_VERSION, FOLDER, DATA_SOURCE, API_CONNECTION path_parts). When False, the new run is created with an empty input scope.
|
|
31
31
|
* @type {boolean}
|
|
32
32
|
* @memberof CloneWorkflowRunRequest
|
|
33
33
|
*/
|
|
@@ -26,15 +26,20 @@ import { mapValues } from '../runtime';
|
|
|
26
26
|
* FOLDER path_part itself; its contents are NOT captured here and
|
|
27
27
|
* are enumerated live by the runner (see ``materialized_path`` for
|
|
28
28
|
* subtree scoping).
|
|
29
|
+
* * ``DATA_SOURCE`` / ``API_CONNECTION`` — a live connector reference
|
|
30
|
+
* (DB / API). ``path_part_id`` is the connector path_part itself; the
|
|
31
|
+
* runner queries it live via its connector tools, nothing is captured
|
|
32
|
+
* here.
|
|
29
33
|
*
|
|
30
|
-
* The underlying PDO id (DocumentVersion
|
|
31
|
-
* run time from ``path_part.metadata_obj_id``, not
|
|
34
|
+
* The underlying PDO id (DocumentVersion / Folder / connector) is
|
|
35
|
+
* resolved live at run time from ``path_part.metadata_obj_id``, not
|
|
36
|
+
* stored here.
|
|
32
37
|
* @export
|
|
33
38
|
* @interface InputSnapshot
|
|
34
39
|
*/
|
|
35
40
|
export interface InputSnapshot {
|
|
36
41
|
/**
|
|
37
|
-
* DOCUMENT_VERSION path_part of the pinned input version, or the
|
|
42
|
+
* DOCUMENT_VERSION path_part of the pinned input version, or the path_part of a live FOLDER / DATA_SOURCE / API_CONNECTION reference — see ``part_type``.
|
|
38
43
|
* @type {string}
|
|
39
44
|
* @memberof InputSnapshot
|
|
40
45
|
*/
|
|
@@ -59,7 +64,9 @@ export interface InputSnapshot {
|
|
|
59
64
|
*/
|
|
60
65
|
export const InputSnapshotPartTypeEnum = {
|
|
61
66
|
DocumentVersion: 'DOCUMENT_VERSION',
|
|
62
|
-
Folder: 'FOLDER'
|
|
67
|
+
Folder: 'FOLDER',
|
|
68
|
+
DataSource: 'DATA_SOURCE',
|
|
69
|
+
ApiConnection: 'API_CONNECTION'
|
|
63
70
|
} as const;
|
|
64
71
|
export type InputSnapshotPartTypeEnum = typeof InputSnapshotPartTypeEnum[keyof typeof InputSnapshotPartTypeEnum];
|
|
65
72
|
|
|
@@ -30,10 +30,26 @@ import {
|
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Partial update (PATCH). A risk-increasing change re-arms the disclaimer.
|
|
33
|
+
*
|
|
34
|
+
* ``name`` renames the connection and ``parent_path_part_id`` moves it under
|
|
35
|
+
* a new FOLDER; neither is a risk-increasing change, so a rename/move alone
|
|
36
|
+
* leaves the disclaimer intact.
|
|
33
37
|
* @export
|
|
34
38
|
* @interface UpdateApiConnectionRequest
|
|
35
39
|
*/
|
|
36
40
|
export interface UpdateApiConnectionRequest {
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof UpdateApiConnectionRequest
|
|
45
|
+
*/
|
|
46
|
+
name?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* New parent FOLDER path_part to move the connection under.
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof UpdateApiConnectionRequest
|
|
51
|
+
*/
|
|
52
|
+
parentPathPartId?: string | null;
|
|
37
53
|
/**
|
|
38
54
|
*
|
|
39
55
|
* @type {string}
|
|
@@ -82,6 +98,10 @@ export const UpdateApiConnectionRequestPropertyValidationAttributesMap: {
|
|
|
82
98
|
uniqueItems?: boolean
|
|
83
99
|
}
|
|
84
100
|
} = {
|
|
101
|
+
name: {
|
|
102
|
+
maxLength: 255,
|
|
103
|
+
minLength: 1,
|
|
104
|
+
},
|
|
85
105
|
baseUrl: {
|
|
86
106
|
maxLength: 2048,
|
|
87
107
|
},
|
|
@@ -108,6 +128,8 @@ export function UpdateApiConnectionRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
108
128
|
}
|
|
109
129
|
return {
|
|
110
130
|
|
|
131
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
132
|
+
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
111
133
|
'baseUrl': json['base_url'] == null ? undefined : json['base_url'],
|
|
112
134
|
'networkClass': json['network_class'] == null ? undefined : NetworkClassFromJSON(json['network_class']),
|
|
113
135
|
'verifyTls': json['verify_tls'] == null ? undefined : json['verify_tls'],
|
|
@@ -127,6 +149,8 @@ export function UpdateApiConnectionRequestToJSONTyped(value?: UpdateApiConnectio
|
|
|
127
149
|
|
|
128
150
|
return {
|
|
129
151
|
|
|
152
|
+
'name': value['name'],
|
|
153
|
+
'parent_path_part_id': value['parentPathPartId'],
|
|
130
154
|
'base_url': value['baseUrl'],
|
|
131
155
|
'network_class': NetworkClassToJSON(value['networkClass']),
|
|
132
156
|
'verify_tls': value['verifyTls'],
|