@evergis/api 4.1.47 → 4.1.48
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/LICENSE +21 -21
- package/README.md +12 -12
- package/dist/api.esm.js +15 -13
- package/dist/api.esm.js.map +1 -1
- package/dist/index.js +15 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/__generated__/CamerasService.d.ts +0 -105
- package/dist/services/Cameras.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -2745,9 +2745,9 @@ exports.UrlPath = void 0;
|
|
|
2745
2745
|
UrlPath["Presentation"] = "/presentation";
|
|
2746
2746
|
UrlPath["Portal"] = "/portal";
|
|
2747
2747
|
})(exports.UrlPath || (exports.UrlPath = {}));
|
|
2748
|
-
const apiEventsByResponseStatus = {
|
|
2749
|
-
|
|
2750
|
-
};
|
|
2748
|
+
/* const apiEventsByResponseStatus: Record<number, ApiEvent> = {
|
|
2749
|
+
401: ApiEvent.Unauthorized,
|
|
2750
|
+
}; */
|
|
2751
2751
|
const SHARED_PORT = "8082";
|
|
2752
2752
|
const URL_PATHS = Object.values(exports.UrlPath);
|
|
2753
2753
|
const DEFAULT_URL_PATH = URL_PATHS[0];
|
|
@@ -2839,16 +2839,18 @@ class Api extends EventEmitter {
|
|
|
2839
2839
|
}
|
|
2840
2840
|
},
|
|
2841
2841
|
],
|
|
2842
|
-
afterResponse: [
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2842
|
+
/* afterResponse: [
|
|
2843
|
+
(request, options, response) => {
|
|
2844
|
+
const apiEvent = apiEventsByResponseStatus[response?.status];
|
|
2845
|
+
|
|
2846
|
+
if (apiEvent) {
|
|
2847
|
+
this.emit(apiEvent, errorHandler(new HTTPError(response, request, options)));
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2850
|
+
return response;
|
|
2851
|
+
},
|
|
2852
|
+
...(hooks?.afterResponse || []),
|
|
2853
|
+
], */
|
|
2852
2854
|
},
|
|
2853
2855
|
});
|
|
2854
2856
|
this.url = url;
|