camstreamerlib 4.0.0-beta.7 → 4.0.0-beta.71
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/README.md +143 -38
- package/cjs/CamOverlayAPI.d.ts +863 -27
- package/cjs/CamOverlayAPI.js +135 -92
- package/cjs/CamScripterAPI.d.ts +44 -17
- package/cjs/CamScripterAPI.js +52 -42
- package/cjs/CamStreamerAPI.d.ts +62 -14
- package/cjs/CamStreamerAPI.js +82 -39
- package/cjs/CamSwitcherAPI.d.ts +158 -43
- package/cjs/CamSwitcherAPI.js +138 -122
- package/cjs/PlaneTrackerAPI.d.ts +233 -0
- package/cjs/PlaneTrackerAPI.js +247 -0
- package/cjs/VapixAPI.d.ts +94 -42
- package/cjs/VapixAPI.js +323 -233
- package/cjs/{CreatePackage.js → bin/CreatePackage.js} +44 -18
- package/cjs/errors/errors.d.ts +61 -4
- package/cjs/errors/errors.js +134 -7
- package/cjs/index.d.ts +20 -4
- package/cjs/index.js +28 -5
- package/cjs/internal/ProxyClient.d.ts +8 -9
- package/cjs/internal/ProxyClient.js +28 -32
- package/cjs/internal/WsEvents.d.ts +37 -0
- package/cjs/{CamSwitcherEvents.js → internal/WsEvents.js} +28 -22
- package/cjs/internal/types.d.ts +47 -0
- package/cjs/internal/types.js +2 -0
- package/cjs/internal/utils.d.ts +3 -1
- package/cjs/internal/utils.js +15 -3
- package/cjs/internal/versionCompare.d.ts +2 -2
- package/cjs/node/CamOverlayDrawingAPI.d.ts +41 -0
- package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +28 -20
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.d.ts +8 -37
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +5 -21
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +5 -17
- package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +15 -0
- package/cjs/node/CamOverlayPainter/ResourceManager.js +72 -0
- package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
- package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +13 -13
- package/cjs/node/DefaultClient.d.ts +6 -5
- package/cjs/node/DefaultClient.js +10 -12
- package/cjs/{internal → node}/Digest.js +24 -1
- package/cjs/node/Digest.test.js +13 -0
- package/cjs/node/HttpRequestSender.d.ts +1 -0
- package/cjs/node/HttpRequestSender.js +14 -4
- package/cjs/node/HttpServer.d.ts +1 -1
- package/cjs/node/HttpServer.js +29 -6
- package/cjs/node/TimeZoneDaemon.d.ts +6 -0
- package/cjs/node/TimeZoneDaemon.js +29 -0
- package/cjs/node/VapixEvents.d.ts +16 -0
- package/cjs/{VapixEvents.js → node/VapixEvents.js} +10 -10
- package/cjs/node/WsClient.d.ts +9 -18
- package/cjs/node/WsClient.js +27 -20
- package/cjs/node/events/AxisCameraStationEvents.d.ts +12 -0
- package/cjs/node/events/AxisCameraStationEvents.js +53 -0
- package/cjs/node/events/GenetecAgent.d.ts +16 -0
- package/cjs/node/events/GenetecAgent.js +124 -0
- package/cjs/node/index.d.ts +18 -2
- package/cjs/node/index.js +39 -5
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +4330 -0
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +92 -0
- package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
- package/cjs/types/CamOverlayAPI/accuweatherSchema.js +47 -0
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +700 -0
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.js +72 -0
- package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +95 -0
- package/cjs/types/CamOverlayAPI/imagesSchema.js +9 -0
- package/cjs/types/CamOverlayAPI/index.d.ts +11 -0
- package/cjs/types/CamOverlayAPI/index.js +27 -0
- package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +96 -0
- package/cjs/types/CamOverlayAPI/infotickerSchema.js +26 -0
- package/cjs/types/CamOverlayAPI/pipSchema.d.ts +125 -0
- package/cjs/types/CamOverlayAPI/pipSchema.js +39 -0
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +96 -0
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +26 -0
- package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +118 -0
- package/cjs/types/CamOverlayAPI/ptzSchema.js +12 -0
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +132 -0
- package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
- package/cjs/types/CamOverlayAPI/screenSharingSchema.js +8 -0
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +145 -0
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.js +91 -0
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.js +8 -0
- package/cjs/types/CamOverlayDrawingAPI.d.ts +48 -0
- package/cjs/types/CamOverlayDrawingAPI.js +2 -0
- package/cjs/types/CamOverlayPainter.d.ts +76 -0
- package/cjs/types/CamOverlayPainter.js +14 -0
- package/cjs/types/CamScripterAPI.d.ts +86 -23
- package/cjs/types/CamScripterAPI.js +24 -8
- package/cjs/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
- package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
- package/cjs/types/CamStreamerAPI.d.ts +180 -47
- package/cjs/types/CamStreamerAPI.js +34 -3
- package/cjs/types/CamSwitcherAPI.d.ts +145 -66
- package/cjs/types/CamSwitcherAPI.js +38 -1
- package/cjs/{events → types}/GenetecAgent.d.ts +47 -47
- package/cjs/types/GenetecAgent.js +31 -0
- package/cjs/types/PlaneTrackerAPI.d.ts +952 -0
- package/cjs/types/PlaneTrackerAPI.js +320 -0
- package/cjs/types/VapixAPI.d.ts +254 -164
- package/cjs/types/VapixAPI.js +66 -11
- package/cjs/types/VapixEvents.d.ts +15 -0
- package/cjs/types/VapixEvents.js +2 -0
- package/cjs/types/common.d.ts +17 -5
- package/cjs/types/common.js +4 -2
- package/cjs/types/ws/CamOverlayEvents.d.ts +88 -0
- package/cjs/types/ws/CamOverlayEvents.js +19 -0
- package/cjs/types/ws/CamStreamerEvents.d.ts +249 -0
- package/cjs/types/ws/CamStreamerEvents.js +32 -0
- package/cjs/types/ws/PlaneTrackerEvents.d.ts +1637 -0
- package/cjs/types/ws/PlaneTrackerEvents.js +196 -0
- package/cjs/web/DefaultClient.d.ts +7 -5
- package/cjs/web/DefaultClient.js +26 -10
- package/cjs/web/WsClient.d.ts +9 -5
- package/cjs/web/WsClient.js +16 -18
- package/cjs/ws/CamOverlayEvents.d.ts +8 -0
- package/cjs/ws/CamOverlayEvents.js +24 -0
- package/cjs/ws/CamStreamerEvents.d.ts +8 -0
- package/cjs/ws/CamStreamerEvents.js +24 -0
- package/cjs/ws/CamSwitcherEvents.d.ts +8 -0
- package/cjs/ws/CamSwitcherEvents.js +24 -0
- package/cjs/ws/PlaneTrackerEvents.d.ts +9 -0
- package/cjs/ws/PlaneTrackerEvents.js +30 -0
- package/esm/CamOverlayAPI.js +135 -92
- package/esm/CamScripterAPI.js +50 -40
- package/esm/CamStreamerAPI.js +81 -39
- package/esm/CamSwitcherAPI.js +136 -120
- package/esm/PlaneTrackerAPI.js +243 -0
- package/esm/VapixAPI.js +323 -233
- package/esm/{CreatePackage.js → bin/CreatePackage.js} +16 -16
- package/esm/errors/errors.js +116 -6
- package/esm/index.js +20 -4
- package/esm/internal/ProxyClient.js +28 -32
- package/esm/{CamSwitcherEvents.js → internal/WsEvents.js} +26 -20
- package/esm/internal/types.js +1 -0
- package/esm/internal/utils.js +11 -1
- package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +26 -18
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +2 -13
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +7 -5
- package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +11 -11
- package/esm/node/DefaultClient.js +10 -12
- package/esm/node/Digest.test.js +11 -0
- package/esm/node/HttpRequestSender.js +14 -4
- package/esm/node/HttpServer.js +1 -1
- package/esm/node/TimeZoneDaemon.js +25 -0
- package/esm/{VapixEvents.js → node/VapixEvents.js} +10 -10
- package/esm/node/WsClient.js +22 -15
- package/esm/{events → node/events}/AxisCameraStationEvents.js +18 -13
- package/esm/node/events/GenetecAgent.js +120 -0
- package/esm/node/index.js +18 -2
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +76 -0
- package/esm/types/CamOverlayAPI/accuweatherSchema.js +44 -0
- package/esm/types/CamOverlayAPI/customGraphicsSchema.js +69 -0
- package/esm/types/CamOverlayAPI/imagesSchema.js +6 -0
- package/esm/types/CamOverlayAPI/index.js +11 -0
- package/esm/types/CamOverlayAPI/infotickerSchema.js +23 -0
- package/esm/types/CamOverlayAPI/pipSchema.js +36 -0
- package/esm/types/CamOverlayAPI/ptzCompassSchema.js +23 -0
- package/esm/types/CamOverlayAPI/ptzSchema.js +9 -0
- package/esm/types/CamOverlayAPI/scoreBoardSchema.js +129 -0
- package/esm/types/CamOverlayAPI/screenSharingSchema.js +5 -0
- package/esm/types/CamOverlayAPI/serviceCommonTypes.js +88 -0
- package/esm/types/CamOverlayAPI/webCameraSharingSchema.js +5 -0
- package/esm/types/CamOverlayDrawingAPI.js +1 -0
- package/esm/types/CamOverlayPainter.js +11 -0
- package/esm/types/CamScripterAPI.js +23 -7
- package/esm/types/CamScripterAPICameraEventsGenerator.js +1 -0
- package/esm/types/CamStreamerAPI.js +33 -2
- package/esm/types/CamSwitcherAPI.js +38 -1
- package/esm/types/GenetecAgent.js +28 -0
- package/esm/types/PlaneTrackerAPI.js +317 -0
- package/esm/types/VapixAPI.js +65 -10
- package/esm/types/VapixEvents.js +1 -0
- package/esm/types/common.js +3 -1
- package/esm/types/ws/CamOverlayEvents.js +16 -0
- package/esm/types/ws/CamStreamerEvents.js +29 -0
- package/esm/types/ws/PlaneTrackerEvents.js +193 -0
- package/esm/web/DefaultClient.js +26 -10
- package/esm/web/WsClient.js +16 -18
- package/esm/ws/CamOverlayEvents.js +20 -0
- package/esm/ws/CamStreamerEvents.js +20 -0
- package/esm/ws/CamSwitcherEvents.js +20 -0
- package/esm/ws/PlaneTrackerEvents.js +26 -0
- package/package.json +44 -11
- package/types/CamOverlayAPI.d.ts +867 -0
- package/types/CamScripterAPI.d.ts +46 -0
- package/types/CamStreamerAPI.d.ts +64 -0
- package/types/CamSwitcherAPI.d.ts +167 -0
- package/types/PlaneTrackerAPI.d.ts +233 -0
- package/types/VapixAPI.d.ts +118 -0
- package/types/bin/CreatePackage.d.ts +1 -0
- package/types/errors/errors.d.ts +91 -0
- package/types/index.d.ts +27 -0
- package/types/internal/ProxyClient.d.ts +10 -0
- package/types/internal/WsEvents.d.ts +37 -0
- package/types/internal/types.d.ts +47 -0
- package/{esm → types}/internal/utils.d.ts +3 -1
- package/{esm → types}/internal/versionCompare.d.ts +2 -2
- package/types/node/CamOverlayDrawingAPI.d.ts +41 -0
- package/{esm → types/node}/CamOverlayPainter/Frame.d.ts +8 -37
- package/{esm → types/node}/CamOverlayPainter/Painter.d.ts +5 -21
- package/types/node/CamOverlayPainter/ResourceManager.d.ts +15 -0
- package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
- package/types/node/DefaultClient.d.ts +16 -0
- package/types/node/Digest.test.d.ts +1 -0
- package/{esm → types}/node/HttpRequestSender.d.ts +1 -0
- package/{esm → types}/node/HttpServer.d.ts +1 -1
- package/types/node/TimeZoneDaemon.d.ts +6 -0
- package/types/node/VapixEvents.d.ts +16 -0
- package/types/node/WsClient.d.ts +30 -0
- package/types/node/events/AxisCameraStationEvents.d.ts +12 -0
- package/types/node/events/GenetecAgent.d.ts +16 -0
- package/types/node/index.d.ts +18 -0
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +4330 -0
- package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
- package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +700 -0
- package/types/types/CamOverlayAPI/imagesSchema.d.ts +95 -0
- package/types/types/CamOverlayAPI/index.d.ts +11 -0
- package/types/types/CamOverlayAPI/infotickerSchema.d.ts +96 -0
- package/types/types/CamOverlayAPI/pipSchema.d.ts +125 -0
- package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +96 -0
- package/types/types/CamOverlayAPI/ptzSchema.d.ts +118 -0
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
- package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
- package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +145 -0
- package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
- package/types/types/CamOverlayDrawingAPI.d.ts +48 -0
- package/types/types/CamOverlayPainter.d.ts +76 -0
- package/types/types/CamScripterAPI.d.ts +130 -0
- package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
- package/types/types/CamStreamerAPI.d.ts +272 -0
- package/{esm → types}/types/CamSwitcherAPI.d.ts +145 -66
- package/{esm/events → types/types}/GenetecAgent.d.ts +47 -47
- package/types/types/PlaneTrackerAPI.d.ts +952 -0
- package/{esm → types}/types/VapixAPI.d.ts +254 -164
- package/types/types/VapixEvents.d.ts +15 -0
- package/{esm → types}/types/common.d.ts +17 -5
- package/types/types/ws/CamOverlayEvents.d.ts +88 -0
- package/types/types/ws/CamStreamerEvents.d.ts +249 -0
- package/types/types/ws/PlaneTrackerEvents.d.ts +1637 -0
- package/types/web/DefaultClient.d.ts +8 -0
- package/types/web/WsClient.d.ts +17 -0
- package/types/ws/CamOverlayEvents.d.ts +8 -0
- package/types/ws/CamStreamerEvents.d.ts +8 -0
- package/types/ws/CamSwitcherEvents.d.ts +8 -0
- package/types/ws/PlaneTrackerEvents.d.ts +9 -0
- package/cjs/CamOverlayDrawingAPI.d.ts +0 -86
- package/cjs/CamOverlayPainter/ResourceManager.d.ts +0 -14
- package/cjs/CamOverlayPainter/ResourceManager.js +0 -46
- package/cjs/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/cjs/CamSwitcherEvents.d.ts +0 -18
- package/cjs/VapixEvents.d.ts +0 -43
- package/cjs/events/AxisCameraStationEvents.d.ts +0 -9
- package/cjs/events/AxisCameraStationEvents.js +0 -48
- package/cjs/events/GenetecAgent.js +0 -123
- package/cjs/internal/common.d.ts +0 -39
- package/cjs/internal/common.js +0 -27
- package/cjs/node/WsEventClient.d.ts +0 -13
- package/cjs/node/WsEventClient.js +0 -22
- package/cjs/types/CamOverlayAPI.d.ts +0 -188
- package/cjs/types/CamOverlayAPI.js +0 -47
- package/esm/CamOverlayAPI.d.ts +0 -31
- package/esm/CamOverlayDrawingAPI.d.ts +0 -86
- package/esm/CamOverlayPainter/ResourceManager.d.ts +0 -14
- package/esm/CamScripterAPI.d.ts +0 -19
- package/esm/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/esm/CamStreamerAPI.d.ts +0 -16
- package/esm/CamSwitcherAPI.d.ts +0 -52
- package/esm/CamSwitcherEvents.d.ts +0 -18
- package/esm/VapixAPI.d.ts +0 -66
- package/esm/VapixEvents.d.ts +0 -43
- package/esm/errors/errors.d.ts +0 -34
- package/esm/events/AxisCameraStationEvents.d.ts +0 -9
- package/esm/events/GenetecAgent.js +0 -119
- package/esm/index.d.ts +0 -11
- package/esm/internal/ProxyClient.d.ts +0 -11
- package/esm/internal/common.d.ts +0 -39
- package/esm/internal/common.js +0 -20
- package/esm/node/DefaultClient.d.ts +0 -15
- package/esm/node/WsClient.d.ts +0 -39
- package/esm/node/WsEventClient.d.ts +0 -13
- package/esm/node/WsEventClient.js +0 -18
- package/esm/types/CamOverlayAPI.d.ts +0 -188
- package/esm/types/CamOverlayAPI.js +0 -44
- package/esm/types/CamScripterAPI.d.ts +0 -67
- package/esm/types/CamStreamerAPI.d.ts +0 -139
- package/esm/web/DefaultClient.d.ts +0 -6
- package/esm/web/WsClient.d.ts +0 -13
- package/esm/web/index.d.ts +0 -2
- /package/cjs/{CreatePackage.d.ts → bin/CreatePackage.d.ts} +0 -0
- /package/cjs/{internal → node}/Digest.d.ts +0 -0
- /package/{esm/CreatePackage.d.ts → cjs/node/Digest.test.d.ts} +0 -0
- /package/cjs/types/{CamSwitcherEvents.d.ts → ws/CamSwitcherEvents.d.ts} +0 -0
- /package/cjs/types/{CamSwitcherEvents.js → ws/CamSwitcherEvents.js} +0 -0
- /package/esm/{internal → node}/Digest.js +0 -0
- /package/esm/types/{CamSwitcherEvents.js → ws/CamSwitcherEvents.js} +0 -0
- /package/{esm → types}/internal/constants.d.ts +0 -0
- /package/{esm → types}/internal/transformers.d.ts +0 -0
- /package/{esm/internal → types/node}/Digest.d.ts +0 -0
- /package/{esm/types → types/types/ws}/CamSwitcherEvents.d.ts +0 -0
- /package/{esm/node → types/web}/index.d.ts +0 -0
package/cjs/CamSwitcherAPI.js
CHANGED
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CamSwitcherAPI = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const errors_1 = require("./errors/errors");
|
|
6
|
-
const
|
|
6
|
+
const utils_1 = require("./internal/utils");
|
|
7
7
|
const CamSwitcherAPI_1 = require("./types/CamSwitcherAPI");
|
|
8
|
-
const
|
|
8
|
+
const common_1 = require("./types/common");
|
|
9
9
|
const VapixAPI_1 = require("./VapixAPI");
|
|
10
10
|
const versionCompare_1 = require("./internal/versionCompare");
|
|
11
|
-
const utils_1 = require("./internal/utils");
|
|
12
11
|
const constants_1 = require("./internal/constants");
|
|
13
|
-
const
|
|
12
|
+
const ProxyClient_1 = require("./internal/ProxyClient");
|
|
13
|
+
const BASE_PATH = '/local/camswitcher/api';
|
|
14
14
|
class CamSwitcherAPI {
|
|
15
15
|
client;
|
|
16
16
|
CustomFormData;
|
|
@@ -18,111 +18,127 @@ class CamSwitcherAPI {
|
|
|
18
18
|
constructor(client, CustomFormData = FormData) {
|
|
19
19
|
this.client = client;
|
|
20
20
|
this.CustomFormData = CustomFormData;
|
|
21
|
-
this.vapixAgent = new VapixAPI_1.VapixAPI(client
|
|
22
|
-
}
|
|
23
|
-
static
|
|
24
|
-
static
|
|
25
|
-
static
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
this.vapixAgent = new VapixAPI_1.VapixAPI(client);
|
|
22
|
+
}
|
|
23
|
+
static getProxyPath = () => `${BASE_PATH}/proxy.cgi`;
|
|
24
|
+
static getWsEventsPath = () => `/local/camswitcher/events`;
|
|
25
|
+
static getClipPreviewPath = (clipId, storage) => `${BASE_PATH}/clip_preview.cgi?clip_name=${clipId}&storage=${storage}`;
|
|
26
|
+
getClient(proxyParams) {
|
|
27
|
+
return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
|
|
28
|
+
}
|
|
29
|
+
async checkCameraTime(options) {
|
|
30
|
+
const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
|
|
31
|
+
return zod_1.z.boolean().parse(res.data);
|
|
32
|
+
}
|
|
33
|
+
async getNetworkCameraList(options) {
|
|
34
|
+
const res = await this._getJson(`${BASE_PATH}/network_camera_list.cgi`, undefined, options);
|
|
35
|
+
return common_1.networkCameraListSchema.parse(res.data);
|
|
36
|
+
}
|
|
37
|
+
async generateSilence(sampleRate, channels, options) {
|
|
38
|
+
const agent = this.getClient(options?.proxyParams);
|
|
39
|
+
await agent.get({
|
|
40
|
+
path: `${BASE_PATH}/generate_silence.cgi`,
|
|
41
|
+
parameters: {
|
|
42
|
+
sample_rate: sampleRate.toString(),
|
|
43
|
+
channels,
|
|
44
|
+
},
|
|
45
|
+
timeout: options?.timeout,
|
|
30
46
|
});
|
|
31
47
|
}
|
|
32
|
-
async
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const data = await this.get(`${baseUrl}/network_camera_list.cgi`);
|
|
38
|
-
return common_2.networkCameraListSchema.parse(data);
|
|
48
|
+
async getMaxFps(source, options) {
|
|
49
|
+
const res = await this._getJson(`${BASE_PATH}/get_max_framerate.cgi`, {
|
|
50
|
+
video_source: source,
|
|
51
|
+
}, options);
|
|
52
|
+
return zod_1.z.number().parse(res.data);
|
|
39
53
|
}
|
|
40
|
-
async
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
});
|
|
44
|
-
return zod_1.z.number().parse(data);
|
|
45
|
-
}
|
|
46
|
-
async getStorageInfo() {
|
|
47
|
-
const data = await this.get(`${baseUrl}/get_storage.cgi`);
|
|
48
|
-
return CamSwitcherAPI_1.storageInfoListSchema.parse(data);
|
|
54
|
+
async getStorageInfo(options) {
|
|
55
|
+
const res = await this._getJson(`${BASE_PATH}/get_storage.cgi`, undefined, options);
|
|
56
|
+
return CamSwitcherAPI_1.storageInfoListSchema.parse(res.data);
|
|
49
57
|
}
|
|
50
|
-
async wsAuthorization() {
|
|
51
|
-
const
|
|
52
|
-
return zod_1.z.string().parse(data);
|
|
58
|
+
async wsAuthorization(options) {
|
|
59
|
+
const res = await this._getJson(`${BASE_PATH}/ws_authorization.cgi`, undefined, options);
|
|
60
|
+
return zod_1.z.string().parse(res.data);
|
|
53
61
|
}
|
|
54
|
-
async getOutputInfo() {
|
|
55
|
-
const
|
|
56
|
-
return CamSwitcherAPI_1.outputInfoSchema.parse(data);
|
|
62
|
+
async getOutputInfo(options) {
|
|
63
|
+
const res = await this._getJson(`${BASE_PATH}/output_info.cgi`, undefined, options);
|
|
64
|
+
return CamSwitcherAPI_1.outputInfoSchema.parse(res.data);
|
|
57
65
|
}
|
|
58
|
-
async getAudioPushInfo() {
|
|
59
|
-
const
|
|
60
|
-
return CamSwitcherAPI_1.audioPushInfoSchema.parse(data);
|
|
66
|
+
async getAudioPushInfo(options) {
|
|
67
|
+
const res = await this._getJson(`${BASE_PATH}/audio_push_info.cgi`, undefined, options);
|
|
68
|
+
return CamSwitcherAPI_1.audioPushInfoSchema.parse(res.data);
|
|
61
69
|
}
|
|
62
|
-
async getStreamSaveList() {
|
|
63
|
-
const
|
|
64
|
-
return CamSwitcherAPI_1.streamSaveLoadSchema.parse(data);
|
|
70
|
+
async getStreamSaveList(options) {
|
|
71
|
+
const res = await this._getJson(`${BASE_PATH}/streams.cgi`, { action: 'get' }, options);
|
|
72
|
+
return CamSwitcherAPI_1.streamSaveLoadSchema.parse(res.data);
|
|
65
73
|
}
|
|
66
|
-
async getClipSaveList() {
|
|
67
|
-
const
|
|
68
|
-
return CamSwitcherAPI_1.clipSaveLoadSchema.parse(data);
|
|
74
|
+
async getClipSaveList(options) {
|
|
75
|
+
const res = await this._getJson(`${BASE_PATH}/clips.cgi`, { action: 'get' }, options);
|
|
76
|
+
return CamSwitcherAPI_1.clipSaveLoadSchema.parse(res.data);
|
|
69
77
|
}
|
|
70
|
-
async getPlaylistSaveList() {
|
|
71
|
-
const
|
|
72
|
-
return CamSwitcherAPI_1.playlistSaveLoadSchema.parse(data);
|
|
78
|
+
async getPlaylistSaveList(options) {
|
|
79
|
+
const res = await this._getJson(`${BASE_PATH}/playlists.cgi`, { action: 'get' }, options);
|
|
80
|
+
return CamSwitcherAPI_1.playlistSaveLoadSchema.parse(res.data);
|
|
73
81
|
}
|
|
74
|
-
async getTrackerSaveList() {
|
|
75
|
-
const
|
|
76
|
-
return CamSwitcherAPI_1.trackerSaveLoadSchema.parse(data);
|
|
82
|
+
async getTrackerSaveList(options) {
|
|
83
|
+
const res = await this._getJson(`${BASE_PATH}/trackers.cgi`, { action: 'get' }, options);
|
|
84
|
+
return CamSwitcherAPI_1.trackerSaveLoadSchema.parse(res.data);
|
|
77
85
|
}
|
|
78
|
-
async setStreamSaveList(data) {
|
|
79
|
-
|
|
86
|
+
async setStreamSaveList(data, options) {
|
|
87
|
+
await this._post(`${BASE_PATH}/streams.cgi`, JSON.stringify(data), { action: 'set' }, options);
|
|
80
88
|
}
|
|
81
|
-
async setClipSaveList(data) {
|
|
82
|
-
|
|
89
|
+
async setClipSaveList(data, options) {
|
|
90
|
+
await this._post(`${BASE_PATH}/clips.cgi`, JSON.stringify(data), { action: 'set' }, options);
|
|
83
91
|
}
|
|
84
|
-
async setPlaylistSaveList(data) {
|
|
85
|
-
|
|
92
|
+
async setPlaylistSaveList(data, options) {
|
|
93
|
+
await this._post(`${BASE_PATH}/playlists.cgi`, JSON.stringify(data), { action: 'set' }, options);
|
|
86
94
|
}
|
|
87
|
-
async setTrackerSaveList(data) {
|
|
88
|
-
|
|
95
|
+
async setTrackerSaveList(data, options) {
|
|
96
|
+
await this._post(`${BASE_PATH}/trackers.cgi`, JSON.stringify(data), { action: 'set' }, options);
|
|
89
97
|
}
|
|
90
|
-
async playlistSwitch(playlistName) {
|
|
91
|
-
await this.
|
|
98
|
+
async playlistSwitch(playlistName, options) {
|
|
99
|
+
await this._getJson(`${BASE_PATH}/playlist_switch.cgi`, { playlist_name: playlistName }, options);
|
|
92
100
|
}
|
|
93
|
-
async playlistQueuePush(playlistName) {
|
|
94
|
-
await this.
|
|
101
|
+
async playlistQueuePush(playlistName, options) {
|
|
102
|
+
await this._getJson(`${BASE_PATH}/playlist_queue_push.cgi`, { playlist_name: playlistName }, options);
|
|
95
103
|
}
|
|
96
|
-
async playlistQueueClear() {
|
|
97
|
-
await this.
|
|
104
|
+
async playlistQueueClear(options) {
|
|
105
|
+
await this._getJson(`${BASE_PATH}/playlist_queue_clear.cgi`, undefined, options);
|
|
98
106
|
}
|
|
99
|
-
async playlistQueueList() {
|
|
100
|
-
const
|
|
101
|
-
return CamSwitcherAPI_1.playlistQueueSchema.parse(data).playlistQueueList;
|
|
107
|
+
async playlistQueueList(options) {
|
|
108
|
+
const res = await this._getJson(`${BASE_PATH}/playlist_queue_list.cgi`, undefined, options);
|
|
109
|
+
return CamSwitcherAPI_1.playlistQueueSchema.parse(res.data).playlistQueueList;
|
|
102
110
|
}
|
|
103
|
-
async playlistQueuePlayNext() {
|
|
104
|
-
await this.
|
|
111
|
+
async playlistQueuePlayNext(options) {
|
|
112
|
+
await this._getJson(`${BASE_PATH}/playlist_queue_play_next.cgi`, undefined, options);
|
|
105
113
|
}
|
|
106
|
-
async addNewClip(file, clipType, storage,
|
|
114
|
+
async addNewClip(file, clipType, storage, clipId, fileName, options) {
|
|
115
|
+
const path = `${BASE_PATH}/clip_upload.cgi`;
|
|
107
116
|
const formData = new this.CustomFormData();
|
|
108
|
-
formData.append('clip_name',
|
|
117
|
+
formData.append('clip_name', clipId);
|
|
109
118
|
formData.append('clip_type', clipType);
|
|
110
119
|
formData.append('file', file, fileName);
|
|
111
|
-
const
|
|
112
|
-
const res = await
|
|
120
|
+
const agent = this.getClient(options?.proxyParams);
|
|
121
|
+
const res = await agent.post({
|
|
122
|
+
path,
|
|
123
|
+
data: formData,
|
|
124
|
+
parameters: {
|
|
125
|
+
storage: storage,
|
|
126
|
+
},
|
|
127
|
+
timeout: options?.timeout,
|
|
128
|
+
});
|
|
113
129
|
const output = (await res.json());
|
|
114
130
|
if (output.status !== 200) {
|
|
115
131
|
throw new errors_1.AddNewClipError(output.message);
|
|
116
132
|
}
|
|
117
133
|
}
|
|
118
|
-
removeClip(
|
|
119
|
-
|
|
134
|
+
async removeClip(clipId, storage, options) {
|
|
135
|
+
await this._getJson(`${BASE_PATH}/clip_remove.cgi`, { clip_name: clipId, storage }, options);
|
|
120
136
|
}
|
|
121
|
-
async getClipList() {
|
|
122
|
-
const
|
|
123
|
-
return CamSwitcherAPI_1.clipListSchema.parse(data).clip_list;
|
|
137
|
+
async getClipList(options) {
|
|
138
|
+
const res = await this._getJson(`${BASE_PATH}/clip_list.cgi`, undefined, options);
|
|
139
|
+
return CamSwitcherAPI_1.clipListSchema.parse(res.data).clip_list;
|
|
124
140
|
}
|
|
125
|
-
setCamSwitchOptions(data, cameraFWVersion) {
|
|
141
|
+
setCamSwitchOptions(data, cameraFWVersion, options) {
|
|
126
142
|
const bitrateVapixParams = parseBitrateOptionsToBitrateVapixParams(cameraFWVersion, data.bitrateMode, data);
|
|
127
143
|
const saveData = {
|
|
128
144
|
video: {
|
|
@@ -140,9 +156,9 @@ class CamSwitcherAPI {
|
|
|
140
156
|
},
|
|
141
157
|
keyboard: data.keyboard,
|
|
142
158
|
};
|
|
143
|
-
return this.setParamFromCameraJSON(CSW_PARAM_NAMES.SETTINGS, saveData);
|
|
159
|
+
return this.setParamFromCameraJSON(CSW_PARAM_NAMES.SETTINGS, saveData, options);
|
|
144
160
|
}
|
|
145
|
-
setGlobalAudioSettings(settings) {
|
|
161
|
+
setGlobalAudioSettings(settings, options) {
|
|
146
162
|
let acceptedType = 'NONE';
|
|
147
163
|
if (settings.type === 'source' && settings.source) {
|
|
148
164
|
if ((0, utils_1.isClip)(settings.source)) {
|
|
@@ -158,9 +174,9 @@ class CamSwitcherAPI {
|
|
|
158
174
|
clip_name: settings.source,
|
|
159
175
|
storage: settings.storage,
|
|
160
176
|
};
|
|
161
|
-
return this.setParamFromCameraJSON(CSW_PARAM_NAMES.MASTER_AUDIO, data);
|
|
177
|
+
return this.setParamFromCameraJSON(CSW_PARAM_NAMES.MASTER_AUDIO, data, options);
|
|
162
178
|
}
|
|
163
|
-
setSecondaryAudioSettings(settings) {
|
|
179
|
+
setSecondaryAudioSettings(settings, options) {
|
|
164
180
|
const data = {
|
|
165
181
|
type: settings.type,
|
|
166
182
|
stream_name: settings.streamName ?? '',
|
|
@@ -169,34 +185,34 @@ class CamSwitcherAPI {
|
|
|
169
185
|
secondary_audio_level: settings.secondaryAudioLevel,
|
|
170
186
|
master_audio_level: settings.masterAudioLevel,
|
|
171
187
|
};
|
|
172
|
-
return this.setParamFromCameraJSON(CSW_PARAM_NAMES.SECONDARY_AUDIO, data);
|
|
188
|
+
return this.setParamFromCameraJSON(CSW_PARAM_NAMES.SECONDARY_AUDIO, data, options);
|
|
173
189
|
}
|
|
174
|
-
setDefaultPlaylist(
|
|
175
|
-
const value = JSON.stringify({ default_playlist_id:
|
|
190
|
+
setDefaultPlaylist(playlistId, options) {
|
|
191
|
+
const value = JSON.stringify({ default_playlist_id: playlistId });
|
|
176
192
|
return this.vapixAgent.setParameter({
|
|
177
193
|
[CSW_PARAM_NAMES.DEFAULT_PLAYLIST]: value,
|
|
178
|
-
},
|
|
194
|
+
}, options);
|
|
179
195
|
}
|
|
180
|
-
setPermanentRtspUrlToken(token) {
|
|
181
|
-
return this.vapixAgent.setParameter({ [CSW_PARAM_NAMES.RTSP_TOKEN]: token },
|
|
196
|
+
setPermanentRtspUrlToken(token, options) {
|
|
197
|
+
return this.vapixAgent.setParameter({ [CSW_PARAM_NAMES.RTSP_TOKEN]: token }, options);
|
|
182
198
|
}
|
|
183
|
-
async getCamSwitchOptions() {
|
|
184
|
-
const saveData = await this.getParamFromCameraAndJSONParse(CSW_PARAM_NAMES.SETTINGS);
|
|
185
|
-
if ((0,
|
|
199
|
+
async getCamSwitchOptions(options) {
|
|
200
|
+
const saveData = await this.getParamFromCameraAndJSONParse(CSW_PARAM_NAMES.SETTINGS, options);
|
|
201
|
+
if ((0, utils_1.isNullish)(saveData.video)) {
|
|
186
202
|
return saveData;
|
|
187
203
|
}
|
|
188
|
-
if (!(0,
|
|
204
|
+
if (!(0, utils_1.isNullish)(saveData.video?.bitrateVapixParams)) {
|
|
189
205
|
const bitrateOptions = parseVapixParamsToBitrateOptions(saveData.video.bitrateVapixParams);
|
|
190
206
|
saveData.video.bitrateMode = bitrateOptions.bitrateMode;
|
|
191
207
|
saveData.video.maximumBitRate = bitrateOptions.maximumBitRate;
|
|
192
208
|
saveData.video.retentionTime = bitrateOptions.retentionTime;
|
|
193
209
|
saveData.video.bitRateLimit = bitrateOptions.bitRateLimit;
|
|
194
210
|
}
|
|
195
|
-
if (!(0,
|
|
211
|
+
if (!(0, utils_1.isNullish)(saveData.video?.bitrateLimit)) {
|
|
196
212
|
saveData.video.maximumBitRate = saveData.video.bitrateLimit;
|
|
197
213
|
saveData.video.bitrateMode = 'MBR';
|
|
198
214
|
}
|
|
199
|
-
if (!(0,
|
|
215
|
+
if (!(0, utils_1.isNullish)(saveData.video?.videoClipQuality)) {
|
|
200
216
|
saveData.video.maximumBitRate = saveData.video.videoClipQuality;
|
|
201
217
|
}
|
|
202
218
|
return {
|
|
@@ -206,12 +222,12 @@ class CamSwitcherAPI {
|
|
|
206
222
|
keyboard: saveData.keyboard,
|
|
207
223
|
};
|
|
208
224
|
}
|
|
209
|
-
async getGlobalAudioSettings() {
|
|
225
|
+
async getGlobalAudioSettings(options) {
|
|
210
226
|
const settings = {
|
|
211
227
|
type: 'fromSource',
|
|
212
228
|
source: 'fromSource',
|
|
213
229
|
};
|
|
214
|
-
const res = await this.getParamFromCameraAndJSONParse(CSW_PARAM_NAMES.MASTER_AUDIO);
|
|
230
|
+
const res = await this.getParamFromCameraAndJSONParse(CSW_PARAM_NAMES.MASTER_AUDIO, options);
|
|
215
231
|
if (res.type === 'STREAM') {
|
|
216
232
|
settings.type = 'source';
|
|
217
233
|
settings.source = res.stream_name;
|
|
@@ -221,52 +237,52 @@ class CamSwitcherAPI {
|
|
|
221
237
|
settings.source = res.clip_name;
|
|
222
238
|
settings.storage = res.storage;
|
|
223
239
|
}
|
|
224
|
-
return settings;
|
|
240
|
+
return CamSwitcherAPI_1.globalAudioSettingsSchema.parse(settings);
|
|
225
241
|
}
|
|
226
|
-
async getSecondaryAudioSettings() {
|
|
227
|
-
const res = await this.getParamFromCameraAndJSONParse(CSW_PARAM_NAMES.SECONDARY_AUDIO);
|
|
242
|
+
async getSecondaryAudioSettings(options) {
|
|
243
|
+
const res = await this.getParamFromCameraAndJSONParse(CSW_PARAM_NAMES.SECONDARY_AUDIO, options);
|
|
228
244
|
const settings = {
|
|
229
245
|
type: res.type ?? 'NONE',
|
|
230
246
|
streamName: res.stream_name,
|
|
231
247
|
clipName: res.clip_name,
|
|
232
|
-
storage: res.storage,
|
|
248
|
+
storage: res.storage ?? 'SD_DISK',
|
|
233
249
|
secondaryAudioLevel: res.secondary_audio_level ?? 1,
|
|
234
250
|
masterAudioLevel: res.master_audio_level ?? 1,
|
|
235
251
|
};
|
|
236
|
-
return settings;
|
|
252
|
+
return CamSwitcherAPI_1.secondaryAudioSettingsSchema.parse(settings);
|
|
237
253
|
}
|
|
238
|
-
async getPermanentRtspUrlToken() {
|
|
254
|
+
async getPermanentRtspUrlToken(options) {
|
|
239
255
|
const paramName = CSW_PARAM_NAMES.RTSP_TOKEN;
|
|
240
|
-
const res = await this.vapixAgent.getParameter([paramName],
|
|
241
|
-
return res[paramName] ?? '';
|
|
256
|
+
const res = await this.vapixAgent.getParameter([paramName], options);
|
|
257
|
+
return zod_1.z.string().parse(res[paramName] ?? '');
|
|
242
258
|
}
|
|
243
|
-
async
|
|
244
|
-
const
|
|
259
|
+
async _getJson(path, parameters, options) {
|
|
260
|
+
const agent = this.getClient(options?.proxyParams);
|
|
261
|
+
const res = await agent.get({ path, parameters, timeout: options?.timeout });
|
|
245
262
|
if (res.ok) {
|
|
246
|
-
|
|
247
|
-
return d.data;
|
|
263
|
+
return await res.json();
|
|
248
264
|
}
|
|
249
265
|
else {
|
|
250
|
-
throw new
|
|
266
|
+
throw new errors_1.ErrorWithResponse(res);
|
|
251
267
|
}
|
|
252
268
|
}
|
|
253
|
-
async
|
|
254
|
-
const
|
|
269
|
+
async _post(path, data, parameters, options, headers) {
|
|
270
|
+
const agent = this.getClient(options?.proxyParams);
|
|
271
|
+
const res = await agent.post({ path, data, parameters, timeout: options?.timeout, headers });
|
|
255
272
|
if (res.ok) {
|
|
256
|
-
|
|
257
|
-
return parsed.message === 'OK';
|
|
273
|
+
return await res.json();
|
|
258
274
|
}
|
|
259
275
|
else {
|
|
260
|
-
throw new
|
|
276
|
+
throw new errors_1.ErrorWithResponse(res);
|
|
261
277
|
}
|
|
262
278
|
}
|
|
263
|
-
setParamFromCameraJSON(paramName, data) {
|
|
279
|
+
setParamFromCameraJSON(paramName, data, options) {
|
|
264
280
|
const params = {};
|
|
265
281
|
params[paramName] = JSON.stringify(data);
|
|
266
|
-
return this.vapixAgent.setParameter(params,
|
|
282
|
+
return this.vapixAgent.setParameter(params, options);
|
|
267
283
|
}
|
|
268
|
-
async getParamFromCameraAndJSONParse(paramName) {
|
|
269
|
-
const data = await this.vapixAgent.getParameter([paramName],
|
|
284
|
+
async getParamFromCameraAndJSONParse(paramName, options) {
|
|
285
|
+
const data = await this.vapixAgent.getParameter([paramName], options);
|
|
270
286
|
if (data[paramName] !== undefined) {
|
|
271
287
|
try {
|
|
272
288
|
if (data[paramName] === '') {
|
|
@@ -277,10 +293,10 @@ class CamSwitcherAPI {
|
|
|
277
293
|
}
|
|
278
294
|
}
|
|
279
295
|
catch {
|
|
280
|
-
throw new
|
|
296
|
+
throw new errors_1.JsonParseError(paramName, data[paramName]);
|
|
281
297
|
}
|
|
282
298
|
}
|
|
283
|
-
throw new
|
|
299
|
+
throw new errors_1.ParameterNotFoundError(paramName);
|
|
284
300
|
}
|
|
285
301
|
}
|
|
286
302
|
exports.CamSwitcherAPI = CamSwitcherAPI;
|
|
@@ -295,7 +311,7 @@ const parseBitrateOptionsToBitrateVapixParams = (firmWareVersion, bitrateMode, c
|
|
|
295
311
|
if (!(0, versionCompare_1.isFirmwareVersionAtLeast)(firmWareVersion, constants_1.FIRMWARE_WITH_BITRATE_MODES_SUPPORT)) {
|
|
296
312
|
return `videomaxbitrate=${cameraOptions.maximumBitRate}`;
|
|
297
313
|
}
|
|
298
|
-
if (bitrateMode ===
|
|
314
|
+
if (bitrateMode === undefined) {
|
|
299
315
|
return '';
|
|
300
316
|
}
|
|
301
317
|
const data = {
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { IClient, TBlobResponse, TParameters, TResponse } from './internal/types';
|
|
2
|
+
import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
|
|
3
|
+
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
4
|
+
import { ProxyClient } from './internal/ProxyClient';
|
|
5
|
+
export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
|
|
6
|
+
private client;
|
|
7
|
+
private apiUser;
|
|
8
|
+
constructor(client: Client, apiUser: TApiUser);
|
|
9
|
+
static getProxyPath: () => string;
|
|
10
|
+
static getWsEventsPath: () => string;
|
|
11
|
+
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
12
|
+
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
13
|
+
serverRunCheck(options?: THttpRequestOptions): Promise<TResponse>;
|
|
14
|
+
getLiveViewAlias(rtspUrl: string, options?: THttpRequestOptions): Promise<{
|
|
15
|
+
ws: string;
|
|
16
|
+
ws_initial_message: string;
|
|
17
|
+
alias: string;
|
|
18
|
+
}>;
|
|
19
|
+
resetPtzCalibration(options?: THttpRequestOptions): Promise<void>;
|
|
20
|
+
resetFocusCalibration(options?: THttpRequestOptions): Promise<void>;
|
|
21
|
+
fetchCameraSettings(options?: THttpRequestOptions): Promise<{
|
|
22
|
+
camera: {
|
|
23
|
+
ip: string;
|
|
24
|
+
port: number;
|
|
25
|
+
protocol: "https" | "http" | "https_insecure";
|
|
26
|
+
user: string;
|
|
27
|
+
pass: string;
|
|
28
|
+
};
|
|
29
|
+
units: "metric" | "imperial";
|
|
30
|
+
adsbSource: {
|
|
31
|
+
ip: string;
|
|
32
|
+
port: number;
|
|
33
|
+
};
|
|
34
|
+
cameraCalibrationProcessConfig: {
|
|
35
|
+
nightSkyCalibrationEnabled: boolean;
|
|
36
|
+
scheduleNightSkyCalibrationTimestamp: number;
|
|
37
|
+
focusCalibrationPoints: string;
|
|
38
|
+
};
|
|
39
|
+
cameraConfig: {
|
|
40
|
+
defaultCaptureSizeMeters: number;
|
|
41
|
+
captureSizeExtensionMeters: number;
|
|
42
|
+
maxZoomLevel?: number | undefined;
|
|
43
|
+
};
|
|
44
|
+
stream: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
imageConfig: {
|
|
49
|
+
dayAperture: number;
|
|
50
|
+
nightAperture: number;
|
|
51
|
+
maxGain: number;
|
|
52
|
+
};
|
|
53
|
+
airportConfig: {
|
|
54
|
+
icao: string;
|
|
55
|
+
centerLat: number;
|
|
56
|
+
centerLon: number;
|
|
57
|
+
radius: number;
|
|
58
|
+
};
|
|
59
|
+
trackingConfig: {
|
|
60
|
+
prioritizeEmergency: boolean;
|
|
61
|
+
trackingZoneWeightIncrease: number;
|
|
62
|
+
guardTourEnabled: boolean;
|
|
63
|
+
guardTourId: number;
|
|
64
|
+
};
|
|
65
|
+
widget: {
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
scale: number;
|
|
68
|
+
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
69
|
+
posX: number;
|
|
70
|
+
posY: number;
|
|
71
|
+
};
|
|
72
|
+
airportWidget: {
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
scale: number;
|
|
75
|
+
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
76
|
+
posX: number;
|
|
77
|
+
posY: number;
|
|
78
|
+
};
|
|
79
|
+
fr24FlightInfoSource: {
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
priority: number;
|
|
82
|
+
apiToken: string;
|
|
83
|
+
validateFlights: boolean;
|
|
84
|
+
};
|
|
85
|
+
radarcapeFlightInfoSource: {
|
|
86
|
+
ip: string;
|
|
87
|
+
port: number;
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
priority: number;
|
|
90
|
+
};
|
|
91
|
+
identificationLabel: {
|
|
92
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
93
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
94
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
95
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
96
|
+
opacity: number;
|
|
97
|
+
};
|
|
98
|
+
acs: {
|
|
99
|
+
ip: string;
|
|
100
|
+
port: number;
|
|
101
|
+
enabled: boolean;
|
|
102
|
+
protocol: "https" | "http" | "https_insecure";
|
|
103
|
+
user: string;
|
|
104
|
+
pass: string;
|
|
105
|
+
sourceKey: string;
|
|
106
|
+
};
|
|
107
|
+
genetec: {
|
|
108
|
+
ip: string;
|
|
109
|
+
port: number;
|
|
110
|
+
enabled: boolean;
|
|
111
|
+
cameraList: string[];
|
|
112
|
+
appId: string;
|
|
113
|
+
protocol: "https" | "http" | "https_insecure";
|
|
114
|
+
user: string;
|
|
115
|
+
pass: string;
|
|
116
|
+
baseUri: string;
|
|
117
|
+
};
|
|
118
|
+
overlayText?: {
|
|
119
|
+
displayIcao?: boolean | undefined;
|
|
120
|
+
displayRegistration?: boolean | undefined;
|
|
121
|
+
displayFlightNumber?: boolean | undefined;
|
|
122
|
+
displayAltitude?: boolean | undefined;
|
|
123
|
+
displayVelocity?: boolean | undefined;
|
|
124
|
+
displayDistance?: boolean | undefined;
|
|
125
|
+
displayFOV?: boolean | undefined;
|
|
126
|
+
displayPTError?: boolean | undefined;
|
|
127
|
+
displayPTZSpeed?: boolean | undefined;
|
|
128
|
+
displayVelocityData?: boolean | undefined;
|
|
129
|
+
displaySignalQuality?: boolean | undefined;
|
|
130
|
+
displayAutoTrackingInfo?: boolean | undefined;
|
|
131
|
+
displayGPSCoords?: boolean | undefined;
|
|
132
|
+
displayVapixQuery?: boolean | undefined;
|
|
133
|
+
displayFocus?: boolean | undefined;
|
|
134
|
+
displayAperture?: boolean | undefined;
|
|
135
|
+
displaySunDistance?: boolean | undefined;
|
|
136
|
+
displayTickTime?: boolean | undefined;
|
|
137
|
+
displayAircraftInfo?: boolean | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
setCameraSettings(settings: TCameraSettings, options?: THttpRequestOptions): Promise<TResponse>;
|
|
141
|
+
fetchServerSettings(options?: THttpRequestOptions): Promise<{
|
|
142
|
+
cameraCalibration: {
|
|
143
|
+
posLat: number;
|
|
144
|
+
posLon: number;
|
|
145
|
+
geoidHN: number;
|
|
146
|
+
altitudeAmsl: number;
|
|
147
|
+
rotationEast: number;
|
|
148
|
+
rotationNorth: number;
|
|
149
|
+
rotationUp: number;
|
|
150
|
+
tiltTransformationCoefA: number;
|
|
151
|
+
tiltCameraKnownPoint: number;
|
|
152
|
+
tiltRealKnownPoint: number;
|
|
153
|
+
panErrorCorrection: {
|
|
154
|
+
cameraPan: number;
|
|
155
|
+
realPan: number;
|
|
156
|
+
}[];
|
|
157
|
+
};
|
|
158
|
+
}>;
|
|
159
|
+
exportAppSettings(dataType: TExportDataType, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
160
|
+
importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<void>;
|
|
161
|
+
fetchFlightInfo(icao: ICAO, options?: THttpRequestOptions): Promise<{
|
|
162
|
+
destinationAirport: {
|
|
163
|
+
icao?: string | undefined;
|
|
164
|
+
iata?: string | undefined;
|
|
165
|
+
city?: string | undefined;
|
|
166
|
+
};
|
|
167
|
+
registration?: string | undefined;
|
|
168
|
+
callsign?: string | undefined;
|
|
169
|
+
flightNumber?: string | undefined;
|
|
170
|
+
aircraftType?: string | undefined;
|
|
171
|
+
airlines?: string | undefined;
|
|
172
|
+
originAirport?: {
|
|
173
|
+
icao?: string | undefined;
|
|
174
|
+
iata?: string | undefined;
|
|
175
|
+
city?: string | undefined;
|
|
176
|
+
} | undefined;
|
|
177
|
+
flightImages?: {
|
|
178
|
+
src?: string | undefined;
|
|
179
|
+
photographer?: string | undefined;
|
|
180
|
+
}[] | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
getTrackingMode(options?: THttpRequestOptions): Promise<{
|
|
183
|
+
mode: "MANUAL" | "AUTOMATIC";
|
|
184
|
+
}>;
|
|
185
|
+
setTrackingMode(mode: TTrackingMode['mode'], options?: THttpRequestOptions): Promise<void>;
|
|
186
|
+
startTrackingPlane(icao: ICAO, options?: THttpRequestOptions): Promise<void>;
|
|
187
|
+
stopTrackingPlane(options?: THttpRequestOptions): Promise<void>;
|
|
188
|
+
getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
|
|
189
|
+
getPriorityList(options?: THttpRequestOptions): Promise<string[]>;
|
|
190
|
+
setPriorityList(priorityList: TPriorityList['priorityList'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
191
|
+
getWhiteList(options?: THttpRequestOptions): Promise<string[]>;
|
|
192
|
+
setWhiteList(whiteList: TWhiteList['whiteList'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
193
|
+
getBlackList(options?: THttpRequestOptions): Promise<string[]>;
|
|
194
|
+
setBlackList(blackList: TBlackList['blackList'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
195
|
+
fetchMapInfo(options?: THttpRequestOptions): Promise<{
|
|
196
|
+
minZoom: number;
|
|
197
|
+
maxZoom: number;
|
|
198
|
+
mapTypes: ("roadmap" | "satellite")[];
|
|
199
|
+
tileSize: number;
|
|
200
|
+
}>;
|
|
201
|
+
getZones(options?: THttpRequestOptions): Promise<{
|
|
202
|
+
zones: {
|
|
203
|
+
enabled: boolean;
|
|
204
|
+
area: [{
|
|
205
|
+
lat: number;
|
|
206
|
+
lon: number;
|
|
207
|
+
}, ...{
|
|
208
|
+
lat: number;
|
|
209
|
+
lon: number;
|
|
210
|
+
}[]];
|
|
211
|
+
flightDirection: "all" | "arrival" | "departure";
|
|
212
|
+
weight: number;
|
|
213
|
+
name?: string | undefined;
|
|
214
|
+
minAltitudeAmsl?: number | undefined;
|
|
215
|
+
maxAltitudeAmsl?: number | undefined;
|
|
216
|
+
minSpeedKmph?: number | undefined;
|
|
217
|
+
maxSpeedKmph?: number | undefined;
|
|
218
|
+
}[];
|
|
219
|
+
}>;
|
|
220
|
+
setZones(zones: TZones, options?: THttpRequestOptions): Promise<void>;
|
|
221
|
+
goToCoordinates(lat: number, lon: number, alt?: number, options?: THttpRequestOptions): Promise<void>;
|
|
222
|
+
checkGenetecConnection(params: TParameters, options?: THttpRequestOptions): Promise<TResponse>;
|
|
223
|
+
getGenetecCameraList(params: TParameters, options?: THttpRequestOptions): Promise<{
|
|
224
|
+
value: string;
|
|
225
|
+
index: number;
|
|
226
|
+
label: string;
|
|
227
|
+
}[]>;
|
|
228
|
+
private _getJson;
|
|
229
|
+
private _getBlob;
|
|
230
|
+
private parseBlobResponse;
|
|
231
|
+
private _postJsonEncoded;
|
|
232
|
+
private _postUrlEncoded;
|
|
233
|
+
}
|