attlaz-client 1.19.6 → 1.19.8
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/Client.d.ts +1 -0
- package/dist/Client.js +7 -0
- package/package.json +1 -1
package/dist/Client.d.ts
CHANGED
package/dist/Client.js
CHANGED
|
@@ -32,6 +32,7 @@ import { SearchEndpoint } from './Service/SearchEndpoint.js';
|
|
|
32
32
|
import { UserActionEndpoint } from './Service/UserActionEndpoint.js';
|
|
33
33
|
import { AccessTokenEndpoint } from './Service/AccessTokenEndpoint.js';
|
|
34
34
|
import { AdapterConnectionEndpoint } from './Service/AdapterConnectionEndpoint.js';
|
|
35
|
+
import { VERSION } from 'version.js';
|
|
35
36
|
export class Client {
|
|
36
37
|
endpoints;
|
|
37
38
|
httpClient;
|
|
@@ -116,6 +117,9 @@ export class Client {
|
|
|
116
117
|
}
|
|
117
118
|
async getApiInformation() {
|
|
118
119
|
const result = await this.httpClient.request('/system/health', null, 'GET', false);
|
|
120
|
+
if (result.version === undefined) {
|
|
121
|
+
throw new Error('Unable to get API information: invalid response');
|
|
122
|
+
}
|
|
119
123
|
return { version: result.version };
|
|
120
124
|
}
|
|
121
125
|
/* Endpoints */
|
|
@@ -229,4 +233,7 @@ export class Client {
|
|
|
229
233
|
}
|
|
230
234
|
return this.endpoints.get(key);
|
|
231
235
|
}
|
|
236
|
+
getVersion() {
|
|
237
|
+
return VERSION;
|
|
238
|
+
}
|
|
232
239
|
}
|