attlaz-client 1.15.2 → 1.15.4

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,7 +2,7 @@ import { HealthTestType } from './HealthTestType.js';
2
2
  import { HealthAlertStatus } from './HealthAlertStatus.js';
3
3
  import { DataValueCollection } from '../DataValueCollection.js';
4
4
  export declare class HealthAlert {
5
- id: number;
5
+ id: string;
6
6
  scopeId: string;
7
7
  healthTestType: HealthTestType;
8
8
  status: HealthAlertStatus;
@@ -3,5 +3,5 @@ import { HealthAlert } from '../Model/HealthAlert/HealthAlert.js';
3
3
  import { CollectionResult } from '../Model/Result/CollectionResult.js';
4
4
  import { EntityType } from '../Model/EntityType.js';
5
5
  export declare class HealthAlertEndpoint extends Endpoint {
6
- getLatestByScope(scopeType: EntityType, scopeId: string): Promise<CollectionResult<HealthAlert>>;
6
+ getLatestByScope(scopeType: EntityType, scopeId: string, parentScopeId: string | null): Promise<CollectionResult<HealthAlert>>;
7
7
  }
@@ -1,10 +1,14 @@
1
1
  import { Endpoint } from './Endpoint.js';
2
2
  import { HealthAlert } from '../Model/HealthAlert/HealthAlert.js';
3
+ import { QueryString } from '../Http/Data/QueryString.js';
3
4
  export class HealthAlertEndpoint extends Endpoint {
4
- async getLatestByScope(scopeType, scopeId) {
5
+ async getLatestByScope(scopeType, scopeId, parentScopeId) {
5
6
  try {
6
- const url = '/health/' + scopeType + '/' + scopeId + '';
7
- const result = await this.requestCollection(url, HealthAlert.parse);
7
+ const q = new QueryString('/health/' + scopeType + '/' + scopeId + '');
8
+ if (parentScopeId !== null) {
9
+ q.set('parentScopeId', parentScopeId);
10
+ }
11
+ const result = await this.requestCollection(q, HealthAlert.parse);
8
12
  return result;
9
13
  }
10
14
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.15.2",
3
+ "version": "1.15.4",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",