attlaz-client 1.4.11 → 1.4.12

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.
@@ -2,6 +2,7 @@ import { HealthTestType } from './HealthTestType';
2
2
  import { HealthAlertStatus } from './HealthAlertStatus';
3
3
  import { DataValue, DataValueValue } from '../DataValue';
4
4
  export declare class HealthAlert {
5
+ id: number;
5
6
  healthTestType: HealthTestType;
6
7
  status: HealthAlertStatus;
7
8
  date: Date;
@@ -12,10 +12,11 @@ class HealthAlert {
12
12
  this.data = [];
13
13
  }
14
14
  static parse(raw) {
15
- let log = new HealthAlert(HealthTestType_1.HealthTestType.fromString(raw.healthTestType), HealthAlertStatus_1.HealthAlertStatus.fromString(raw.status));
16
- log.date = new Date(raw.date);
17
- log.data = raw.data;
18
- return log;
15
+ let healthAlert = new HealthAlert(HealthTestType_1.HealthTestType.fromString(raw.healthTestType), HealthAlertStatus_1.HealthAlertStatus.fromString(raw.status));
16
+ healthAlert.id = raw.id;
17
+ healthAlert.date = new Date(raw.date);
18
+ healthAlert.data = raw.data;
19
+ return healthAlert;
19
20
  }
20
21
  getDataValue(key) {
21
22
  for (const tag of this.data) {
package/dist/Utils.js CHANGED
@@ -32,6 +32,9 @@ class Utils {
32
32
  }
33
33
  }
34
34
  static base64encode(input) {
35
+ if (input === null || input === undefined || input === '') {
36
+ return '';
37
+ }
35
38
  return Buffer.from(input).toString('base64');
36
39
  }
37
40
  static base64decode(encodedString) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",