attlaz-client 1.53.0 → 1.55.0

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.
@@ -8,15 +8,9 @@ export var AdapterConnectionStatus;
8
8
  })(AdapterConnectionStatus || (AdapterConnectionStatus = {}));
9
9
  (function (AdapterConnectionStatus) {
10
10
  AdapterConnectionStatus.fromString = (input) => {
11
- if (input === 'pass') {
12
- return AdapterConnectionStatus.Healthy;
13
- }
14
- if (input === null || input === 'skip') {
11
+ if (input === null) {
15
12
  return AdapterConnectionStatus.Unknown;
16
13
  }
17
- if (input === 'fail') {
18
- return AdapterConnectionStatus.Critical;
19
- }
20
14
  const result = Utils.parseEnum(input, AdapterConnectionStatus);
21
15
  if (result === null) {
22
16
  throw new Error('Unable to parse AdapterConnectionStatus from string: Unknown AdapterConnectionStatus "' + input + '"');
@@ -1,12 +1,14 @@
1
1
  import { DataValueCollection } from '../DataValueCollection.js';
2
- import { HealthTestType } from './HealthTestType.js';
2
+ import { HealthAlertSeverity } from './HealthAlertSeverity.js';
3
3
  import { HealthAlertStatus } from './HealthAlertStatus.js';
4
+ import { HealthTestType } from './HealthTestType.js';
4
5
  export declare class HealthAlert {
5
6
  id: string;
6
7
  scopeId: string;
7
8
  parentScopeId: string | null;
8
9
  healthTestType: HealthTestType;
9
10
  status: HealthAlertStatus;
11
+ severity: HealthAlertSeverity;
10
12
  date: Date;
11
13
  updated: Date;
12
14
  data: DataValueCollection;
@@ -1,13 +1,15 @@
1
1
  import { Utils } from '../../Utils.js';
2
2
  import { DataValueCollection } from '../DataValueCollection.js';
3
- import { HealthTestType } from './HealthTestType.js';
3
+ import { HealthAlertSeverity } from './HealthAlertSeverity.js';
4
4
  import { HealthAlertStatus } from './HealthAlertStatus.js';
5
+ import { HealthTestType } from './HealthTestType.js';
5
6
  export class HealthAlert {
6
7
  id;
7
8
  scopeId;
8
9
  parentScopeId;
9
10
  healthTestType;
10
11
  status;
12
+ severity = HealthAlertSeverity.ERROR;
11
13
  date;
12
14
  updated;
13
15
  data;
@@ -22,6 +24,8 @@ export class HealthAlert {
22
24
  healthAlert.id = raw.id;
23
25
  healthAlert.scopeId = raw.scope;
24
26
  healthAlert.parentScopeId = raw.parent_scope;
27
+ // severity defaults to ERROR — defensive for older API responses that don't yet send it.
28
+ healthAlert.severity = raw.severity ? HealthAlertSeverity.fromString(raw.severity) : HealthAlertSeverity.ERROR;
25
29
  healthAlert.date = Utils.parseRawDate(raw.date);
26
30
  healthAlert.updated = Utils.parseRawDate(raw.updated);
27
31
  healthAlert.data = DataValueCollection.fromObject(raw.data);
@@ -0,0 +1,8 @@
1
+ export declare enum HealthAlertSeverity {
2
+ INFO = "info",
3
+ WARNING = "warning",
4
+ ERROR = "error"
5
+ }
6
+ export declare namespace HealthAlertSeverity {
7
+ const fromString: (input: string) => HealthAlertSeverity;
8
+ }
@@ -0,0 +1,16 @@
1
+ import { Utils } from '../../Utils.js';
2
+ export var HealthAlertSeverity;
3
+ (function (HealthAlertSeverity) {
4
+ HealthAlertSeverity["INFO"] = "info";
5
+ HealthAlertSeverity["WARNING"] = "warning";
6
+ HealthAlertSeverity["ERROR"] = "error";
7
+ })(HealthAlertSeverity || (HealthAlertSeverity = {}));
8
+ (function (HealthAlertSeverity) {
9
+ HealthAlertSeverity.fromString = (input) => {
10
+ const result = Utils.parseEnum(input, HealthAlertSeverity);
11
+ if (result === null) {
12
+ throw new Error('Unable to parse HealthAlertSeverity from string: Unknown HealthAlertSeverity "' + input + '"');
13
+ }
14
+ return result;
15
+ };
16
+ })(HealthAlertSeverity || (HealthAlertSeverity = {}));
package/dist/index.d.ts CHANGED
@@ -37,6 +37,7 @@ export { CollectionRecord } from './Model/Collections/CollectionRecord.js';
37
37
  export { Configuration } from './Model/Configuration/Configuration.js';
38
38
  export { EventType } from './Model/Event/EventType.js';
39
39
  export { HealthAlert } from './Model/HealthAlert/HealthAlert.js';
40
+ export { HealthAlertSeverity } from './Model/HealthAlert/HealthAlertSeverity.js';
40
41
  export { HealthAlertStatus } from './Model/HealthAlert/HealthAlertStatus.js';
41
42
  export { HealthTestType } from './Model/HealthAlert/HealthTestType.js';
42
43
  export { Log } from './Model/Log/Log.js';
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ export { CollectionRecord } from './Model/Collections/CollectionRecord.js';
29
29
  export { Configuration } from './Model/Configuration/Configuration.js';
30
30
  export { EventType } from './Model/Event/EventType.js';
31
31
  export { HealthAlert } from './Model/HealthAlert/HealthAlert.js';
32
+ export { HealthAlertSeverity } from './Model/HealthAlert/HealthAlertSeverity.js';
32
33
  export { HealthAlertStatus } from './Model/HealthAlert/HealthAlertStatus.js';
33
34
  export { HealthTestType } from './Model/HealthAlert/HealthTestType.js';
34
35
  export { Log } from './Model/Log/Log.js';
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.52.0";
1
+ export declare const VERSION = "1.54.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.52.0";
1
+ export const VERSION = "1.54.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.53.0",
3
+ "version": "1.55.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",