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 CHANGED
@@ -83,4 +83,5 @@ export declare class Client {
83
83
  getAccessTokenEndpoint(): AccessTokenEndpoint;
84
84
  getFirewallEndpoint(): FirewallEndpoint;
85
85
  private getEndpoint;
86
+ getVersion(): string;
86
87
  }
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.19.6",
3
+ "version": "1.19.8",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",