camstreamerlib 4.0.0-beta.7 → 4.0.0-beta.70

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.
Files changed (302) hide show
  1. package/README.md +143 -38
  2. package/cjs/CamOverlayAPI.d.ts +863 -27
  3. package/cjs/CamOverlayAPI.js +135 -92
  4. package/cjs/CamScripterAPI.d.ts +44 -17
  5. package/cjs/CamScripterAPI.js +52 -42
  6. package/cjs/CamStreamerAPI.d.ts +62 -14
  7. package/cjs/CamStreamerAPI.js +82 -39
  8. package/cjs/CamSwitcherAPI.d.ts +158 -43
  9. package/cjs/CamSwitcherAPI.js +138 -122
  10. package/cjs/PlaneTrackerAPI.d.ts +233 -0
  11. package/cjs/PlaneTrackerAPI.js +247 -0
  12. package/cjs/VapixAPI.d.ts +94 -42
  13. package/cjs/VapixAPI.js +323 -233
  14. package/cjs/{CreatePackage.js → bin/CreatePackage.js} +44 -18
  15. package/cjs/errors/errors.d.ts +61 -4
  16. package/cjs/errors/errors.js +134 -7
  17. package/cjs/index.d.ts +20 -4
  18. package/cjs/index.js +28 -5
  19. package/cjs/internal/ProxyClient.d.ts +8 -9
  20. package/cjs/internal/ProxyClient.js +28 -32
  21. package/cjs/internal/WsEvents.d.ts +37 -0
  22. package/cjs/{CamSwitcherEvents.js → internal/WsEvents.js} +28 -22
  23. package/cjs/internal/types.d.ts +47 -0
  24. package/cjs/internal/types.js +2 -0
  25. package/cjs/internal/utils.d.ts +3 -1
  26. package/cjs/internal/utils.js +15 -3
  27. package/cjs/internal/versionCompare.d.ts +2 -2
  28. package/cjs/node/CamOverlayDrawingAPI.d.ts +41 -0
  29. package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +15 -14
  30. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.d.ts +8 -37
  31. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
  32. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +5 -21
  33. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +5 -17
  34. package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +15 -0
  35. package/cjs/node/CamOverlayPainter/ResourceManager.js +72 -0
  36. package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
  37. package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +13 -13
  38. package/cjs/node/DefaultClient.d.ts +6 -5
  39. package/cjs/node/DefaultClient.js +10 -12
  40. package/cjs/{internal → node}/Digest.js +24 -1
  41. package/cjs/node/Digest.test.js +13 -0
  42. package/cjs/node/HttpRequestSender.d.ts +1 -0
  43. package/cjs/node/HttpRequestSender.js +14 -4
  44. package/cjs/node/HttpServer.d.ts +1 -1
  45. package/cjs/node/HttpServer.js +29 -6
  46. package/cjs/node/TimeZoneDaemon.d.ts +6 -0
  47. package/cjs/node/TimeZoneDaemon.js +29 -0
  48. package/cjs/node/VapixEvents.d.ts +16 -0
  49. package/cjs/{VapixEvents.js → node/VapixEvents.js} +10 -10
  50. package/cjs/node/WsClient.d.ts +9 -18
  51. package/cjs/node/WsClient.js +27 -20
  52. package/cjs/node/events/AxisCameraStationEvents.d.ts +12 -0
  53. package/cjs/node/events/AxisCameraStationEvents.js +53 -0
  54. package/cjs/node/events/GenetecAgent.d.ts +16 -0
  55. package/cjs/node/events/GenetecAgent.js +124 -0
  56. package/cjs/node/index.d.ts +18 -2
  57. package/cjs/node/index.js +39 -5
  58. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +4330 -0
  59. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +92 -0
  60. package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
  61. package/cjs/types/CamOverlayAPI/accuweatherSchema.js +47 -0
  62. package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +700 -0
  63. package/cjs/types/CamOverlayAPI/customGraphicsSchema.js +72 -0
  64. package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +95 -0
  65. package/cjs/types/CamOverlayAPI/imagesSchema.js +9 -0
  66. package/cjs/types/CamOverlayAPI/index.d.ts +11 -0
  67. package/cjs/types/CamOverlayAPI/index.js +27 -0
  68. package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +96 -0
  69. package/cjs/types/CamOverlayAPI/infotickerSchema.js +26 -0
  70. package/cjs/types/CamOverlayAPI/pipSchema.d.ts +125 -0
  71. package/cjs/types/CamOverlayAPI/pipSchema.js +39 -0
  72. package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +96 -0
  73. package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +26 -0
  74. package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +118 -0
  75. package/cjs/types/CamOverlayAPI/ptzSchema.js +12 -0
  76. package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
  77. package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +132 -0
  78. package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
  79. package/cjs/types/CamOverlayAPI/screenSharingSchema.js +8 -0
  80. package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +145 -0
  81. package/cjs/types/CamOverlayAPI/serviceCommonTypes.js +91 -0
  82. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
  83. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.js +8 -0
  84. package/cjs/types/CamOverlayDrawingAPI.d.ts +48 -0
  85. package/cjs/types/CamOverlayDrawingAPI.js +2 -0
  86. package/cjs/types/CamOverlayPainter.d.ts +76 -0
  87. package/cjs/types/CamOverlayPainter.js +14 -0
  88. package/cjs/types/CamScripterAPI.d.ts +86 -23
  89. package/cjs/types/CamScripterAPI.js +24 -8
  90. package/cjs/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
  91. package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
  92. package/cjs/types/CamStreamerAPI.d.ts +180 -47
  93. package/cjs/types/CamStreamerAPI.js +34 -3
  94. package/cjs/types/CamSwitcherAPI.d.ts +145 -66
  95. package/cjs/types/CamSwitcherAPI.js +38 -1
  96. package/cjs/{events → types}/GenetecAgent.d.ts +47 -47
  97. package/cjs/types/GenetecAgent.js +31 -0
  98. package/cjs/types/PlaneTrackerAPI.d.ts +952 -0
  99. package/cjs/types/PlaneTrackerAPI.js +320 -0
  100. package/cjs/types/VapixAPI.d.ts +254 -164
  101. package/cjs/types/VapixAPI.js +66 -11
  102. package/cjs/types/VapixEvents.d.ts +15 -0
  103. package/cjs/types/VapixEvents.js +2 -0
  104. package/cjs/types/common.d.ts +17 -5
  105. package/cjs/types/common.js +4 -2
  106. package/cjs/types/ws/CamOverlayEvents.d.ts +88 -0
  107. package/cjs/types/ws/CamOverlayEvents.js +19 -0
  108. package/cjs/types/ws/CamStreamerEvents.d.ts +249 -0
  109. package/cjs/types/ws/CamStreamerEvents.js +32 -0
  110. package/cjs/types/ws/PlaneTrackerEvents.d.ts +1637 -0
  111. package/cjs/types/ws/PlaneTrackerEvents.js +196 -0
  112. package/cjs/web/DefaultClient.d.ts +7 -5
  113. package/cjs/web/DefaultClient.js +26 -10
  114. package/cjs/web/WsClient.d.ts +9 -5
  115. package/cjs/web/WsClient.js +16 -18
  116. package/cjs/ws/CamOverlayEvents.d.ts +8 -0
  117. package/cjs/ws/CamOverlayEvents.js +24 -0
  118. package/cjs/ws/CamStreamerEvents.d.ts +8 -0
  119. package/cjs/ws/CamStreamerEvents.js +24 -0
  120. package/cjs/ws/CamSwitcherEvents.d.ts +8 -0
  121. package/cjs/ws/CamSwitcherEvents.js +24 -0
  122. package/cjs/ws/PlaneTrackerEvents.d.ts +9 -0
  123. package/cjs/ws/PlaneTrackerEvents.js +30 -0
  124. package/esm/CamOverlayAPI.js +135 -92
  125. package/esm/CamScripterAPI.js +50 -40
  126. package/esm/CamStreamerAPI.js +81 -39
  127. package/esm/CamSwitcherAPI.js +136 -120
  128. package/esm/PlaneTrackerAPI.js +243 -0
  129. package/esm/VapixAPI.js +323 -233
  130. package/esm/{CreatePackage.js → bin/CreatePackage.js} +16 -16
  131. package/esm/errors/errors.js +116 -6
  132. package/esm/index.js +20 -4
  133. package/esm/internal/ProxyClient.js +28 -32
  134. package/esm/{CamSwitcherEvents.js → internal/WsEvents.js} +26 -20
  135. package/esm/internal/types.js +1 -0
  136. package/esm/internal/utils.js +11 -1
  137. package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +13 -12
  138. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
  139. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +2 -13
  140. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +7 -5
  141. package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +11 -11
  142. package/esm/node/DefaultClient.js +10 -12
  143. package/esm/node/Digest.test.js +11 -0
  144. package/esm/node/HttpRequestSender.js +14 -4
  145. package/esm/node/HttpServer.js +1 -1
  146. package/esm/node/TimeZoneDaemon.js +25 -0
  147. package/esm/{VapixEvents.js → node/VapixEvents.js} +10 -10
  148. package/esm/node/WsClient.js +22 -15
  149. package/esm/{events → node/events}/AxisCameraStationEvents.js +18 -13
  150. package/esm/node/events/GenetecAgent.js +120 -0
  151. package/esm/node/index.js +18 -2
  152. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +76 -0
  153. package/esm/types/CamOverlayAPI/accuweatherSchema.js +44 -0
  154. package/esm/types/CamOverlayAPI/customGraphicsSchema.js +69 -0
  155. package/esm/types/CamOverlayAPI/imagesSchema.js +6 -0
  156. package/esm/types/CamOverlayAPI/index.js +11 -0
  157. package/esm/types/CamOverlayAPI/infotickerSchema.js +23 -0
  158. package/esm/types/CamOverlayAPI/pipSchema.js +36 -0
  159. package/esm/types/CamOverlayAPI/ptzCompassSchema.js +23 -0
  160. package/esm/types/CamOverlayAPI/ptzSchema.js +9 -0
  161. package/esm/types/CamOverlayAPI/scoreBoardSchema.js +129 -0
  162. package/esm/types/CamOverlayAPI/screenSharingSchema.js +5 -0
  163. package/esm/types/CamOverlayAPI/serviceCommonTypes.js +88 -0
  164. package/esm/types/CamOverlayAPI/webCameraSharingSchema.js +5 -0
  165. package/esm/types/CamOverlayDrawingAPI.js +1 -0
  166. package/esm/types/CamOverlayPainter.js +11 -0
  167. package/esm/types/CamScripterAPI.js +23 -7
  168. package/esm/types/CamScripterAPICameraEventsGenerator.js +1 -0
  169. package/esm/types/CamStreamerAPI.js +33 -2
  170. package/esm/types/CamSwitcherAPI.js +38 -1
  171. package/esm/types/GenetecAgent.js +28 -0
  172. package/esm/types/PlaneTrackerAPI.js +317 -0
  173. package/esm/types/VapixAPI.js +65 -10
  174. package/esm/types/VapixEvents.js +1 -0
  175. package/esm/types/common.js +3 -1
  176. package/esm/types/ws/CamOverlayEvents.js +16 -0
  177. package/esm/types/ws/CamStreamerEvents.js +29 -0
  178. package/esm/types/ws/PlaneTrackerEvents.js +193 -0
  179. package/esm/web/DefaultClient.js +26 -10
  180. package/esm/web/WsClient.js +16 -18
  181. package/esm/ws/CamOverlayEvents.js +20 -0
  182. package/esm/ws/CamStreamerEvents.js +20 -0
  183. package/esm/ws/CamSwitcherEvents.js +20 -0
  184. package/esm/ws/PlaneTrackerEvents.js +26 -0
  185. package/package.json +44 -11
  186. package/types/CamOverlayAPI.d.ts +867 -0
  187. package/types/CamScripterAPI.d.ts +46 -0
  188. package/types/CamStreamerAPI.d.ts +64 -0
  189. package/types/CamSwitcherAPI.d.ts +167 -0
  190. package/types/PlaneTrackerAPI.d.ts +233 -0
  191. package/types/VapixAPI.d.ts +118 -0
  192. package/types/bin/CreatePackage.d.ts +1 -0
  193. package/types/errors/errors.d.ts +91 -0
  194. package/types/index.d.ts +27 -0
  195. package/types/internal/ProxyClient.d.ts +10 -0
  196. package/types/internal/WsEvents.d.ts +37 -0
  197. package/types/internal/types.d.ts +47 -0
  198. package/{esm → types}/internal/utils.d.ts +3 -1
  199. package/{esm → types}/internal/versionCompare.d.ts +2 -2
  200. package/types/node/CamOverlayDrawingAPI.d.ts +41 -0
  201. package/{esm → types/node}/CamOverlayPainter/Frame.d.ts +8 -37
  202. package/{esm → types/node}/CamOverlayPainter/Painter.d.ts +5 -21
  203. package/types/node/CamOverlayPainter/ResourceManager.d.ts +15 -0
  204. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
  205. package/types/node/DefaultClient.d.ts +16 -0
  206. package/types/node/Digest.test.d.ts +1 -0
  207. package/{esm → types}/node/HttpRequestSender.d.ts +1 -0
  208. package/{esm → types}/node/HttpServer.d.ts +1 -1
  209. package/types/node/TimeZoneDaemon.d.ts +6 -0
  210. package/types/node/VapixEvents.d.ts +16 -0
  211. package/types/node/WsClient.d.ts +30 -0
  212. package/types/node/events/AxisCameraStationEvents.d.ts +12 -0
  213. package/types/node/events/GenetecAgent.d.ts +16 -0
  214. package/types/node/index.d.ts +18 -0
  215. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +4330 -0
  216. package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
  217. package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +700 -0
  218. package/types/types/CamOverlayAPI/imagesSchema.d.ts +95 -0
  219. package/types/types/CamOverlayAPI/index.d.ts +11 -0
  220. package/types/types/CamOverlayAPI/infotickerSchema.d.ts +96 -0
  221. package/types/types/CamOverlayAPI/pipSchema.d.ts +125 -0
  222. package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +96 -0
  223. package/types/types/CamOverlayAPI/ptzSchema.d.ts +118 -0
  224. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
  225. package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
  226. package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +145 -0
  227. package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
  228. package/types/types/CamOverlayDrawingAPI.d.ts +48 -0
  229. package/types/types/CamOverlayPainter.d.ts +76 -0
  230. package/types/types/CamScripterAPI.d.ts +130 -0
  231. package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
  232. package/types/types/CamStreamerAPI.d.ts +272 -0
  233. package/{esm → types}/types/CamSwitcherAPI.d.ts +145 -66
  234. package/{esm/events → types/types}/GenetecAgent.d.ts +47 -47
  235. package/types/types/PlaneTrackerAPI.d.ts +952 -0
  236. package/{esm → types}/types/VapixAPI.d.ts +254 -164
  237. package/types/types/VapixEvents.d.ts +15 -0
  238. package/{esm → types}/types/common.d.ts +17 -5
  239. package/types/types/ws/CamOverlayEvents.d.ts +88 -0
  240. package/types/types/ws/CamStreamerEvents.d.ts +249 -0
  241. package/types/types/ws/PlaneTrackerEvents.d.ts +1637 -0
  242. package/types/web/DefaultClient.d.ts +8 -0
  243. package/types/web/WsClient.d.ts +17 -0
  244. package/types/ws/CamOverlayEvents.d.ts +8 -0
  245. package/types/ws/CamStreamerEvents.d.ts +8 -0
  246. package/types/ws/CamSwitcherEvents.d.ts +8 -0
  247. package/types/ws/PlaneTrackerEvents.d.ts +9 -0
  248. package/cjs/CamOverlayDrawingAPI.d.ts +0 -86
  249. package/cjs/CamOverlayPainter/ResourceManager.d.ts +0 -14
  250. package/cjs/CamOverlayPainter/ResourceManager.js +0 -46
  251. package/cjs/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  252. package/cjs/CamSwitcherEvents.d.ts +0 -18
  253. package/cjs/VapixEvents.d.ts +0 -43
  254. package/cjs/events/AxisCameraStationEvents.d.ts +0 -9
  255. package/cjs/events/AxisCameraStationEvents.js +0 -48
  256. package/cjs/events/GenetecAgent.js +0 -123
  257. package/cjs/internal/common.d.ts +0 -39
  258. package/cjs/internal/common.js +0 -27
  259. package/cjs/node/WsEventClient.d.ts +0 -13
  260. package/cjs/node/WsEventClient.js +0 -22
  261. package/cjs/types/CamOverlayAPI.d.ts +0 -188
  262. package/cjs/types/CamOverlayAPI.js +0 -47
  263. package/esm/CamOverlayAPI.d.ts +0 -31
  264. package/esm/CamOverlayDrawingAPI.d.ts +0 -86
  265. package/esm/CamOverlayPainter/ResourceManager.d.ts +0 -14
  266. package/esm/CamScripterAPI.d.ts +0 -19
  267. package/esm/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  268. package/esm/CamStreamerAPI.d.ts +0 -16
  269. package/esm/CamSwitcherAPI.d.ts +0 -52
  270. package/esm/CamSwitcherEvents.d.ts +0 -18
  271. package/esm/VapixAPI.d.ts +0 -66
  272. package/esm/VapixEvents.d.ts +0 -43
  273. package/esm/errors/errors.d.ts +0 -34
  274. package/esm/events/AxisCameraStationEvents.d.ts +0 -9
  275. package/esm/events/GenetecAgent.js +0 -119
  276. package/esm/index.d.ts +0 -11
  277. package/esm/internal/ProxyClient.d.ts +0 -11
  278. package/esm/internal/common.d.ts +0 -39
  279. package/esm/internal/common.js +0 -20
  280. package/esm/node/DefaultClient.d.ts +0 -15
  281. package/esm/node/WsClient.d.ts +0 -39
  282. package/esm/node/WsEventClient.d.ts +0 -13
  283. package/esm/node/WsEventClient.js +0 -18
  284. package/esm/types/CamOverlayAPI.d.ts +0 -188
  285. package/esm/types/CamOverlayAPI.js +0 -44
  286. package/esm/types/CamScripterAPI.d.ts +0 -67
  287. package/esm/types/CamStreamerAPI.d.ts +0 -139
  288. package/esm/web/DefaultClient.d.ts +0 -6
  289. package/esm/web/WsClient.d.ts +0 -13
  290. package/esm/web/index.d.ts +0 -2
  291. /package/cjs/{CreatePackage.d.ts → bin/CreatePackage.d.ts} +0 -0
  292. /package/cjs/{internal → node}/Digest.d.ts +0 -0
  293. /package/{esm/CreatePackage.d.ts → cjs/node/Digest.test.d.ts} +0 -0
  294. /package/cjs/types/{CamSwitcherEvents.d.ts → ws/CamSwitcherEvents.d.ts} +0 -0
  295. /package/cjs/types/{CamSwitcherEvents.js → ws/CamSwitcherEvents.js} +0 -0
  296. /package/esm/{internal → node}/Digest.js +0 -0
  297. /package/esm/types/{CamSwitcherEvents.js → ws/CamSwitcherEvents.js} +0 -0
  298. /package/{esm → types}/internal/constants.d.ts +0 -0
  299. /package/{esm → types}/internal/transformers.d.ts +0 -0
  300. /package/{esm/internal → types/node}/Digest.d.ts +0 -0
  301. /package/{esm/types → types/types/ws}/CamSwitcherEvents.d.ts +0 -0
  302. /package/{esm/node → types/web}/index.d.ts +0 -0
@@ -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 common_1 = require("./internal/common");
6
+ const utils_1 = require("./internal/utils");
7
7
  const CamSwitcherAPI_1 = require("./types/CamSwitcherAPI");
8
- const common_2 = require("./types/common");
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 baseUrl = '/local/camswitcher/api';
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 getProxyUrlPath = () => `${baseUrl}/proxy.cgi`;
24
- static getWsEventsUrlPath = () => `/local/camswitcher/events`;
25
- static getClipPreviewUrlPath = (id, storage) => `${baseUrl}/clip_preview.cgi?clip_name=${id}&storage=${storage}`;
26
- async generateSilence(sampleRate, channels) {
27
- await this.client.get(`${baseUrl}/generate_silence.cgi`, {
28
- sample_rate: sampleRate.toString(),
29
- channels,
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 checkCameraTime() {
33
- const data = await this.get(`${baseUrl}/camera_time.cgi`);
34
- return zod_1.z.boolean().parse(data);
35
- }
36
- async getIpListFromNetworkCheck() {
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 getMaxFps(source) {
41
- const data = await this.get(`${baseUrl}/get_max_framerate.cgi`, {
42
- video_source: source.toString(),
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 data = await this.get(`${baseUrl}/ws_authorization.cgi`);
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 data = await this.get(`${baseUrl}/output_info.cgi`);
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 data = await this.get(`${baseUrl}/audio_push_info.cgi`);
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 data = await this.get(`${baseUrl}/streams.cgi`, { action: 'get' });
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 data = await this.get(`${baseUrl}/clips.cgi`, { action: 'get' });
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 data = await this.get(`${baseUrl}/playlists.cgi`, { action: 'get' });
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 data = await this.get(`${baseUrl}/trackers.cgi`, { action: 'get' });
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
- return await this.set(`${baseUrl}/streams.cgi`, data, { action: 'set' });
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
- return await this.set(`${baseUrl}/clips.cgi`, data, { action: 'set' });
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
- return await this.set(`${baseUrl}/playlists.cgi`, data, { action: 'set' });
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
- return await this.set(`${baseUrl}/trackers.cgi`, data, { action: 'set' });
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.get(`${baseUrl}/playlist_switch.cgi?playlist_name=${playlistName}`);
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.get(`${baseUrl}/playlist_queue_push.cgi?playlist_name=${playlistName}`);
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.get(`${baseUrl}/playlist_queue_clear.cgi`);
104
+ async playlistQueueClear(options) {
105
+ await this._getJson(`${BASE_PATH}/playlist_queue_clear.cgi`, undefined, options);
98
106
  }
99
- async playlistQueueList() {
100
- const data = await this.get(`${baseUrl}/playlist_queue_list.cgi`);
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.get(`${baseUrl}/playlist_queue_play_next.cgi`);
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, id, fileName) {
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', id);
117
+ formData.append('clip_name', clipId);
109
118
  formData.append('clip_type', clipType);
110
119
  formData.append('file', file, fileName);
111
- const path = `${baseUrl}/clip_upload.cgi?storage=${storage}`;
112
- const res = await this.client.post(path, formData);
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(id, storage) {
119
- return this.get(`${baseUrl}/clip_remove.cgi`, { clip_name: id, storage });
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 data = await this.get(`${baseUrl}/clip_list.cgi`);
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(id) {
175
- const value = JSON.stringify({ default_playlist_id: 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
- }, null);
194
+ }, options);
179
195
  }
180
- setPermanentRtspUrlToken(token) {
181
- return this.vapixAgent.setParameter({ [CSW_PARAM_NAMES.RTSP_TOKEN]: token }, null);
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, common_1.isNullish)(saveData.video)) {
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, common_1.isNullish)(saveData.video?.bitrateVapixParams)) {
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, common_1.isNullish)(saveData.video?.bitrateLimit)) {
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, common_1.isNullish)(saveData.video?.videoClipQuality)) {
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], null);
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 get(path, parameters = {}) {
244
- const res = await this.client.get(path, parameters);
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
- const d = (await res.json());
247
- return d.data;
263
+ return await res.json();
248
264
  }
249
265
  else {
250
- throw new Error(await (0, common_1.responseStringify)(res));
266
+ throw new errors_1.ErrorWithResponse(res);
251
267
  }
252
268
  }
253
- async set(path, data, parameters = {}) {
254
- const res = await this.client.post(path, JSON.stringify(data), parameters);
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
- const parsed = await res.json();
257
- return parsed.message === 'OK';
273
+ return await res.json();
258
274
  }
259
275
  else {
260
- throw new Error(await (0, common_1.responseStringify)(res));
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, null);
282
+ return this.vapixAgent.setParameter(params, options);
267
283
  }
268
- async getParamFromCameraAndJSONParse(paramName) {
269
- const data = await this.vapixAgent.getParameter([paramName], null);
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 Error('Error: in JSON parsing of ' + paramName + '. Cannot parse: ' + data[paramName]);
296
+ throw new errors_1.JsonParseError(paramName, data[paramName]);
281
297
  }
282
298
  }
283
- throw new Error("Error: no parametr '" + paramName + "' was found");
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 === null) {
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
+ }