attlaz-client 1.10.16 → 1.10.19
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.
|
@@ -3,13 +3,14 @@ import { Adapter } from '../Model/Adapter/Adapter.js';
|
|
|
3
3
|
import { AdapterConnection } from '../Model/Adapter/AdapterConnection.js';
|
|
4
4
|
import { AdapterConfiguration } from '../Model/Adapter/AdapterConfiguration.js';
|
|
5
5
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
6
|
-
import { DataValueCollection } from '../Model/DataValueCollection';
|
|
6
|
+
import { DataValueCollection } from '../Model/DataValueCollection.js';
|
|
7
7
|
export declare class AdapterEndpoint extends Endpoint {
|
|
8
8
|
getAdapters(): Promise<CollectionResult<Adapter>>;
|
|
9
9
|
getAdapter(adapterId: string): Promise<Adapter | null>;
|
|
10
10
|
getAdapterConfiguration(adapterId: string): Promise<CollectionResult<AdapterConfiguration>>;
|
|
11
11
|
getConnections(projectId: string): Promise<CollectionResult<AdapterConnection>>;
|
|
12
|
-
|
|
12
|
+
getConnectionById(connectionId: string): Promise<AdapterConnection | null>;
|
|
13
|
+
getConnectionByKey(projectId: string, connectionKey: string): Promise<AdapterConnection | null>;
|
|
13
14
|
getConnectionConfiguration(connectionId: string): Promise<DataValueCollection | null>;
|
|
14
15
|
saveConnection(projectId: string, connection: AdapterConnection): Promise<AdapterConnection>;
|
|
15
16
|
saveConnectionConfiguration(connectionId: string, configuration: DataValueCollection): Promise<boolean>;
|
|
@@ -2,7 +2,7 @@ import { Endpoint } from './Endpoint.js';
|
|
|
2
2
|
import { Adapter } from '../Model/Adapter/Adapter.js';
|
|
3
3
|
import { AdapterConnection } from '../Model/Adapter/AdapterConnection.js';
|
|
4
4
|
import { AdapterConfiguration } from '../Model/Adapter/AdapterConfiguration.js';
|
|
5
|
-
import { DataValueCollection } from '../Model/DataValueCollection';
|
|
5
|
+
import { DataValueCollection } from '../Model/DataValueCollection.js';
|
|
6
6
|
export class AdapterEndpoint extends Endpoint {
|
|
7
7
|
async getAdapters() {
|
|
8
8
|
try {
|
|
@@ -53,9 +53,22 @@ export class AdapterEndpoint extends Endpoint {
|
|
|
53
53
|
throw error;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
async
|
|
56
|
+
async getConnectionById(connectionId) {
|
|
57
57
|
try {
|
|
58
|
-
const url = '/connections/' +
|
|
58
|
+
const url = '/connections/' + connectionId;
|
|
59
|
+
const result = await this.requestObject(url, null, AdapterConnection.parse);
|
|
60
|
+
return result.getData();
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
64
|
+
console.error('Failed to load connection: ', error);
|
|
65
|
+
}
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async getConnectionByKey(projectId, connectionKey) {
|
|
70
|
+
try {
|
|
71
|
+
const url = '/projects/' + projectId + '/connections/' + connectionKey;
|
|
59
72
|
const result = await this.requestObject(url, null, AdapterConnection.parse);
|
|
60
73
|
return result.getData();
|
|
61
74
|
}
|