attlaz-client 1.48.2 → 1.48.3

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.
@@ -14,6 +14,7 @@ export class ClientError extends Error {
14
14
  if (error instanceof AxiosError) {
15
15
  if (error.code === 'ECONNREFUSED' || error.code === 'ERR_NETWORK') {
16
16
  clientError.httpStatus = HttpStatus.HTTP_UNAVAILABLE;
17
+ // clientError.code = 'Service not available';
17
18
  clientError.message = 'Service not available';
18
19
  return clientError;
19
20
  }
@@ -114,6 +114,11 @@ export class Endpoint {
114
114
  }
115
115
  throw this.toApiError(error);
116
116
  }
117
+ // TODO: add errors
118
+ /**
119
+ * Parse errors
120
+ */
121
+ // TODO: temporary check until we know the API is fully upgraded
117
122
  if (requestResponse === null || requestResponse === undefined) {
118
123
  throw new ApiError('Unable to parse object: response is empty for action `[' + method + '] ' + action + '`', HttpStatus.HTTP_INTERNAL_SERVER_ERROR);
119
124
  }
@@ -165,6 +170,7 @@ export class Endpoint {
165
170
  return data;
166
171
  }
167
172
  parseObject(rawObject, parser) {
173
+ // TODO: is it interesting to keep this wrapper, or only in develop mode?
168
174
  const wrappedData = ObjectWrapper.wrap(rawObject);
169
175
  try {
170
176
  return parser(wrappedData);
@@ -1,7 +1,7 @@
1
- import { Endpoint } from './Endpoint.js';
1
+ import { EntityType } from '../Model/EntityType.js';
2
2
  import { HealthAlert } from '../Model/HealthAlert/HealthAlert.js';
3
3
  import { CollectionResult } from '../Model/Result/CollectionResult.js';
4
- import { EntityType } from '../Model/EntityType.js';
4
+ import { Endpoint } from './Endpoint.js';
5
5
  export declare class HealthAlertEndpoint extends Endpoint {
6
- getLatestByScope(scopeType: EntityType, scopeId: string, parentScopeId: string | null): Promise<CollectionResult<HealthAlert>>;
6
+ getCurrentAlertsByScope(scopeType: EntityType, scopeId: string, parentScopeId: string | null): Promise<CollectionResult<HealthAlert>>;
7
7
  }
@@ -1,10 +1,10 @@
1
- import { Endpoint } from './Endpoint.js';
2
- import { HealthAlert } from '../Model/HealthAlert/HealthAlert.js';
3
1
  import { QueryString } from '../Http/Data/QueryString.js';
2
+ import { HealthAlert } from '../Model/HealthAlert/HealthAlert.js';
3
+ import { Endpoint } from './Endpoint.js';
4
4
  export class HealthAlertEndpoint extends Endpoint {
5
- async getLatestByScope(scopeType, scopeId, parentScopeId) {
5
+ async getCurrentAlertsByScope(scopeType, scopeId, parentScopeId) {
6
6
  try {
7
- const q = new QueryString('/health/' + scopeType + '/' + scopeId + '');
7
+ const q = new QueryString('/health/' + scopeType + '/' + scopeId);
8
8
  if (parentScopeId !== null) {
9
9
  q.set('parentScopeId', parentScopeId);
10
10
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.48.1";
1
+ export declare const VERSION = "1.48.3";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.48.1";
1
+ export const VERSION = "1.48.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.48.2",
3
+ "version": "1.48.3",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -54,18 +54,18 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/jest": "^30.0.0",
57
- "@types/node": "^24.10.15",
57
+ "@types/node": "^24.12.0",
58
58
  "@typescript-eslint/eslint-plugin": "^8.1.0",
59
59
  "@typescript-eslint/parser": "^8.1.0",
60
60
  "dotenv": "^17.3.1",
61
- "eslint": "^9.39.3",
61
+ "eslint": "^9.39.4",
62
62
  "eslint-config-attlaz-base": "^1.5.2",
63
63
  "eslint-import-resolver-typescript": "^4.4.4",
64
64
  "eslint-plugin-import": "^2.32.0",
65
65
  "eslint-plugin-jsdoc": "^51.4.1",
66
66
  "eslint-plugin-prefer-arrow": "^1.2.3",
67
67
  "eslint-plugin-promise": "^7.2.1",
68
- "jest": "^30.2.0",
68
+ "jest": "^30.3.0",
69
69
  "rimraf": "^6.1.3",
70
70
  "rollup-plugin-commonjs": "^10.1.0",
71
71
  "rollup-plugin-node-resolve": "^5.2.0",