attlaz-client 1.9.1 → 1.9.2
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/dist/Model/Result/CollectionResult.d.ts +1 -1
- package/dist/Service/AdapterEndpoint.d.ts +1 -2
- package/dist/Service/AdapterEndpoint.js +5 -1
- package/dist/Service/ChannelEndpoint.d.ts +1 -1
- package/dist/Service/ChannelEndpoint.js +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import { Endpoint } from './Endpoint';
|
|
|
2
2
|
import { Adapter } from '../Model/Adapter/Adapter';
|
|
3
3
|
import { AdapterConnection } from '../Model/Adapter/AdapterConnection';
|
|
4
4
|
import { AdapterConfiguration } from '../Model/Adapter/AdapterConfiguration';
|
|
5
|
-
import { ObjectResult } from '../Model/Result/ObjectResult';
|
|
6
5
|
import { CollectionResult } from '../Model/Result/CollectionResult';
|
|
7
6
|
export declare class AdapterEndpoint extends Endpoint {
|
|
8
7
|
getAdapters(): Promise<CollectionResult<Adapter>>;
|
|
@@ -10,5 +9,5 @@ export declare class AdapterEndpoint extends Endpoint {
|
|
|
10
9
|
getAdapterConfiguration(adapterId: string): Promise<CollectionResult<AdapterConfiguration>>;
|
|
11
10
|
getConnections(projectId: string): Promise<CollectionResult<AdapterConnection>>;
|
|
12
11
|
getConnectionByKey(connectionKey: string): Promise<AdapterConnection | null>;
|
|
13
|
-
saveConnection(projectId: string, adapter: AdapterConnection): Promise<
|
|
12
|
+
saveConnection(projectId: string, adapter: AdapterConnection): Promise<AdapterConnection>;
|
|
14
13
|
}
|
|
@@ -75,7 +75,11 @@ class AdapterEndpoint extends Endpoint_1.Endpoint {
|
|
|
75
75
|
try {
|
|
76
76
|
let url = '/projects/' + projectId + '/connections';
|
|
77
77
|
const result = await this.requestObject(url, adapter, AdapterConnection_1.AdapterConnection.parse, 'POST');
|
|
78
|
-
|
|
78
|
+
const updatedAdapterConnection = result.getData();
|
|
79
|
+
if (updatedAdapterConnection === null) {
|
|
80
|
+
throw new Error('AdapterConnection not updated');
|
|
81
|
+
}
|
|
82
|
+
return updatedAdapterConnection;
|
|
79
83
|
}
|
|
80
84
|
catch (error) {
|
|
81
85
|
if (this.httpClient.isDebugEnabled()) {
|
|
@@ -7,6 +7,6 @@ export declare class ChannelEndpoint extends Endpoint {
|
|
|
7
7
|
getByWorkspace(workspaceId: string): Promise<CollectionResult<Channel>>;
|
|
8
8
|
getByOwner(): Promise<CollectionResult<Channel>>;
|
|
9
9
|
getMessages(channelId: string): Promise<CollectionResult<ChannelHistory>>;
|
|
10
|
-
save(subscriberChannel: Channel): Promise<Channel
|
|
10
|
+
save(subscriberChannel: Channel): Promise<Channel>;
|
|
11
11
|
testChannel(subscriberChannel: Channel): Promise<any>;
|
|
12
12
|
}
|
|
@@ -81,7 +81,11 @@ class ChannelEndpoint extends Endpoint_1.Endpoint {
|
|
|
81
81
|
try {
|
|
82
82
|
let url = '/channels/';
|
|
83
83
|
const result = await this.requestObject(url, subscriberChannel, Channel_1.Channel.parse, 'POST');
|
|
84
|
-
|
|
84
|
+
const updatedChannel = result.getData();
|
|
85
|
+
if (updatedChannel === null) {
|
|
86
|
+
throw new Error('Channel not updated');
|
|
87
|
+
}
|
|
88
|
+
return updatedChannel;
|
|
85
89
|
}
|
|
86
90
|
catch (ex) {
|
|
87
91
|
if (this.httpClient.isDebugEnabled()) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.9.
|
|
1
|
+
export declare const VERSION = "1.9.2";
|
package/dist/version.js
CHANGED