camstreamerlib 4.0.0-beta.16 → 4.0.0-beta.161

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 (361) hide show
  1. package/README.md +143 -38
  2. package/cjs/CamOverlayAPI.d.ts +603 -327
  3. package/cjs/CamOverlayAPI.js +99 -184
  4. package/cjs/CamScripterAPI.d.ts +41 -17
  5. package/cjs/CamScripterAPI.js +54 -56
  6. package/cjs/CamStreamerAPI.d.ts +3557 -14
  7. package/cjs/CamStreamerAPI.js +174 -52
  8. package/cjs/CamSwitcherAPI.d.ts +158 -42
  9. package/cjs/CamSwitcherAPI.js +148 -189
  10. package/cjs/PlaneTrackerAPI.d.ts +238 -29
  11. package/cjs/PlaneTrackerAPI.js +187 -101
  12. package/cjs/VapixAPI.d.ts +97 -44
  13. package/cjs/VapixAPI.js +400 -207
  14. package/cjs/{CreatePackage.js → bin/CreatePackage.js} +44 -18
  15. package/cjs/errors/errors.d.ts +75 -4
  16. package/cjs/errors/errors.js +142 -7
  17. package/cjs/index.d.ts +20 -9
  18. package/cjs/index.js +28 -14
  19. package/cjs/internal/BasicAPI.d.ts +15 -0
  20. package/cjs/internal/BasicAPI.js +93 -0
  21. package/cjs/internal/ProxyClient.d.ts +8 -9
  22. package/cjs/internal/ProxyClient.js +28 -34
  23. package/cjs/internal/WsEvents.d.ts +38 -0
  24. package/cjs/{CamSwitcherEvents.js → internal/WsEvents.js} +33 -22
  25. package/cjs/internal/constants.d.ts +1 -0
  26. package/cjs/internal/constants.js +2 -1
  27. package/cjs/internal/convertors.d.ts +6 -0
  28. package/cjs/internal/convertors.js +115 -0
  29. package/cjs/internal/transformers.js +8 -8
  30. package/cjs/internal/types.d.ts +32 -20
  31. package/cjs/internal/utils.d.ts +1 -3
  32. package/cjs/internal/utils.js +1 -12
  33. package/cjs/internal/versionCompare.d.ts +2 -2
  34. package/cjs/node/CamOverlayDrawingAPI.d.ts +41 -0
  35. package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +28 -20
  36. package/{esm → cjs/node}/CamOverlayPainter/Frame.d.ts +8 -37
  37. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
  38. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +5 -21
  39. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +5 -17
  40. package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +15 -0
  41. package/cjs/node/CamOverlayPainter/ResourceManager.js +72 -0
  42. package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
  43. package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +13 -13
  44. package/cjs/node/DefaultClient.d.ts +6 -6
  45. package/cjs/node/DefaultClient.js +12 -16
  46. package/cjs/{internal → node}/Digest.js +24 -1
  47. package/cjs/node/Digest.test.js +13 -0
  48. package/cjs/node/HttpRequestSender.d.ts +1 -0
  49. package/cjs/node/HttpRequestSender.js +14 -4
  50. package/cjs/node/HttpServer.d.ts +1 -1
  51. package/cjs/node/HttpServer.js +29 -6
  52. package/cjs/node/TimeZoneDaemon.d.ts +6 -0
  53. package/cjs/node/TimeZoneDaemon.js +29 -0
  54. package/cjs/node/VapixEvents.d.ts +16 -0
  55. package/cjs/{VapixEvents.js → node/VapixEvents.js} +10 -10
  56. package/cjs/node/WsClient.d.ts +9 -18
  57. package/cjs/node/WsClient.js +27 -20
  58. package/cjs/node/events/AxisCameraStationEvents.d.ts +12 -0
  59. package/cjs/{events → node/events}/AxisCameraStationEvents.js +18 -13
  60. package/cjs/node/events/GenetecAgent.d.ts +16 -0
  61. package/cjs/node/events/GenetecAgent.js +124 -0
  62. package/cjs/node/index.d.ts +18 -2
  63. package/cjs/node/index.js +39 -5
  64. package/cjs/{models/CamOverlayAPI/widgetsSchema.d.ts → types/CamOverlayAPI/CamOverlayAPI.d.ts} +2794 -767
  65. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +135 -0
  66. package/cjs/{models → types}/CamOverlayAPI/accuweatherSchema.d.ts +19 -19
  67. package/cjs/{models → types}/CamOverlayAPI/accuweatherSchema.js +7 -8
  68. package/cjs/{models → types}/CamOverlayAPI/customGraphicsSchema.d.ts +108 -107
  69. package/cjs/{models → types}/CamOverlayAPI/customGraphicsSchema.js +5 -6
  70. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.d.ts +81 -0
  71. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.js +21 -0
  72. package/{esm/models → cjs/types}/CamOverlayAPI/imagesSchema.d.ts +19 -19
  73. package/cjs/types/CamOverlayAPI/imagesSchema.js +9 -0
  74. package/cjs/{models → types}/CamOverlayAPI/index.d.ts +3 -4
  75. package/cjs/{models → types}/CamOverlayAPI/index.js +3 -4
  76. package/cjs/{models → types}/CamOverlayAPI/infotickerSchema.d.ts +27 -27
  77. package/cjs/{models → types}/CamOverlayAPI/infotickerSchema.js +6 -7
  78. package/{esm/models → cjs/types}/CamOverlayAPI/pipSchema.d.ts +21 -21
  79. package/cjs/{models → types}/CamOverlayAPI/pipSchema.js +5 -6
  80. package/{esm/models → cjs/types}/CamOverlayAPI/ptzCompassSchema.d.ts +18 -15
  81. package/cjs/{models → types}/CamOverlayAPI/ptzCompassSchema.js +5 -5
  82. package/cjs/{models → types}/CamOverlayAPI/ptzSchema.d.ts +28 -28
  83. package/cjs/types/CamOverlayAPI/ptzSchema.js +12 -0
  84. package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
  85. package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +132 -0
  86. package/{esm/models → cjs/types}/CamOverlayAPI/screenSharingSchema.d.ts +15 -15
  87. package/cjs/types/CamOverlayAPI/screenSharingSchema.js +8 -0
  88. package/{esm/models/CamOverlayAPI/widgetCommonSchema.d.ts → cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts} +80 -60
  89. package/cjs/{models/CamOverlayAPI/widgetCommonSchema.js → types/CamOverlayAPI/serviceCommonTypes.js} +39 -21
  90. package/{esm/models → cjs/types}/CamOverlayAPI/webCameraSharingSchema.d.ts +15 -15
  91. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.js +8 -0
  92. package/cjs/types/CamOverlayDrawingAPI.d.ts +48 -0
  93. package/cjs/types/CamOverlayDrawingAPI.js +2 -0
  94. package/cjs/types/CamOverlayPainter.d.ts +76 -0
  95. package/cjs/types/CamOverlayPainter.js +14 -0
  96. package/cjs/types/CamScripterAPI.d.ts +75 -23
  97. package/cjs/types/CamScripterAPI.js +20 -8
  98. package/cjs/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
  99. package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
  100. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +26085 -0
  101. package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +222 -0
  102. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +574 -0
  103. package/cjs/types/CamStreamerAPI/facebookSchema.js +23 -0
  104. package/cjs/types/CamStreamerAPI/index.d.ts +6 -0
  105. package/cjs/types/CamStreamerAPI/index.js +22 -0
  106. package/cjs/types/{CamStreamerAPI.d.ts → CamStreamerAPI/oldStreamSchema.d.ts} +104 -35
  107. package/cjs/types/CamStreamerAPI/oldStreamSchema.js +53 -0
  108. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +570 -0
  109. package/cjs/types/CamStreamerAPI/streamCommonTypes.js +123 -0
  110. package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +8642 -0
  111. package/cjs/types/CamStreamerAPI/streamsSchema.js +81 -0
  112. package/cjs/types/CamStreamerAPI/windySchema.d.ts +534 -0
  113. package/cjs/types/CamStreamerAPI/windySchema.js +19 -0
  114. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +542 -0
  115. package/cjs/types/CamStreamerAPI/youtubeSchema.js +22 -0
  116. package/cjs/types/CamSwitcherAPI.d.ts +205 -121
  117. package/cjs/types/CamSwitcherAPI.js +38 -1
  118. package/cjs/{events → types}/GenetecAgent.d.ts +47 -47
  119. package/cjs/types/GenetecAgent.js +31 -0
  120. package/cjs/types/PlaneTrackerAPI.d.ts +993 -0
  121. package/cjs/types/PlaneTrackerAPI.js +336 -0
  122. package/cjs/types/VapixAPI.d.ts +281 -22
  123. package/cjs/types/VapixAPI.js +74 -4
  124. package/cjs/types/VapixEvents.d.ts +15 -0
  125. package/cjs/types/VapixEvents.js +2 -0
  126. package/cjs/types/common.d.ts +43 -3
  127. package/cjs/types/common.js +17 -2
  128. package/cjs/types/ws/CamOverlayEvents.d.ts +88 -0
  129. package/cjs/types/ws/CamOverlayEvents.js +19 -0
  130. package/cjs/types/ws/CamStreamerEvents.d.ts +282 -0
  131. package/cjs/types/ws/CamStreamerEvents.js +36 -0
  132. package/cjs/types/ws/PlaneTrackerEvents.d.ts +1703 -0
  133. package/cjs/types/ws/PlaneTrackerEvents.js +207 -0
  134. package/cjs/web/DefaultClient.d.ts +7 -5
  135. package/cjs/web/DefaultClient.js +25 -11
  136. package/cjs/web/WsClient.d.ts +9 -5
  137. package/cjs/web/WsClient.js +16 -18
  138. package/cjs/ws/CamOverlayEvents.d.ts +8 -0
  139. package/cjs/ws/CamOverlayEvents.js +24 -0
  140. package/cjs/ws/CamStreamerEvents.d.ts +8 -0
  141. package/cjs/ws/CamStreamerEvents.js +24 -0
  142. package/cjs/ws/CamSwitcherEvents.d.ts +8 -0
  143. package/cjs/ws/CamSwitcherEvents.js +24 -0
  144. package/cjs/ws/PlaneTrackerEvents.d.ts +9 -0
  145. package/cjs/ws/PlaneTrackerEvents.js +30 -0
  146. package/esm/CamOverlayAPI.js +99 -184
  147. package/esm/CamScripterAPI.js +52 -57
  148. package/esm/CamStreamerAPI.js +172 -51
  149. package/esm/CamSwitcherAPI.js +151 -192
  150. package/esm/PlaneTrackerAPI.js +186 -100
  151. package/esm/VapixAPI.js +402 -209
  152. package/esm/{CreatePackage.js → bin/CreatePackage.js} +16 -16
  153. package/esm/errors/errors.js +124 -6
  154. package/esm/index.js +20 -9
  155. package/esm/internal/BasicAPI.js +89 -0
  156. package/esm/internal/ProxyClient.js +28 -34
  157. package/esm/{CamSwitcherEvents.js → internal/WsEvents.js} +31 -20
  158. package/esm/internal/constants.js +1 -0
  159. package/esm/internal/convertors.js +108 -0
  160. package/esm/internal/transformers.js +1 -1
  161. package/esm/internal/utils.js +0 -9
  162. package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +26 -18
  163. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
  164. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +2 -13
  165. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +7 -5
  166. package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +11 -11
  167. package/esm/node/DefaultClient.js +12 -16
  168. package/esm/node/Digest.test.js +11 -0
  169. package/esm/node/HttpRequestSender.js +14 -4
  170. package/esm/node/HttpServer.js +1 -1
  171. package/esm/node/TimeZoneDaemon.js +25 -0
  172. package/esm/{VapixEvents.js → node/VapixEvents.js} +10 -10
  173. package/esm/node/WsClient.js +22 -15
  174. package/esm/{events → node/events}/AxisCameraStationEvents.js +18 -13
  175. package/esm/node/events/GenetecAgent.js +120 -0
  176. package/esm/node/index.js +18 -2
  177. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +113 -0
  178. package/esm/{models → types}/CamOverlayAPI/accuweatherSchema.js +3 -4
  179. package/esm/{models → types}/CamOverlayAPI/customGraphicsSchema.js +3 -4
  180. package/esm/types/CamOverlayAPI/htmlOverlaySchema.js +18 -0
  181. package/esm/types/CamOverlayAPI/imagesSchema.js +6 -0
  182. package/esm/{models → types}/CamOverlayAPI/index.js +3 -4
  183. package/esm/{models → types}/CamOverlayAPI/infotickerSchema.js +3 -4
  184. package/esm/{models → types}/CamOverlayAPI/pipSchema.js +4 -5
  185. package/esm/{models → types}/CamOverlayAPI/ptzCompassSchema.js +4 -4
  186. package/esm/types/CamOverlayAPI/ptzSchema.js +9 -0
  187. package/esm/types/CamOverlayAPI/scoreBoardSchema.js +129 -0
  188. package/esm/types/CamOverlayAPI/screenSharingSchema.js +5 -0
  189. package/esm/{models/CamOverlayAPI/widgetCommonSchema.js → types/CamOverlayAPI/serviceCommonTypes.js} +38 -20
  190. package/esm/types/CamOverlayAPI/webCameraSharingSchema.js +5 -0
  191. package/esm/types/CamOverlayDrawingAPI.js +1 -0
  192. package/esm/types/CamOverlayPainter.js +11 -0
  193. package/esm/types/CamScripterAPI.js +19 -7
  194. package/esm/types/CamScripterAPICameraEventsGenerator.js +1 -0
  195. package/esm/types/CamStreamerAPI/CamStreamerAPI.js +199 -0
  196. package/esm/types/CamStreamerAPI/facebookSchema.js +17 -0
  197. package/esm/types/CamStreamerAPI/index.js +6 -0
  198. package/esm/types/CamStreamerAPI/oldStreamSchema.js +50 -0
  199. package/esm/types/CamStreamerAPI/streamCommonTypes.js +120 -0
  200. package/esm/types/CamStreamerAPI/streamsSchema.js +75 -0
  201. package/esm/types/CamStreamerAPI/windySchema.js +13 -0
  202. package/esm/types/CamStreamerAPI/youtubeSchema.js +16 -0
  203. package/esm/types/CamSwitcherAPI.js +38 -1
  204. package/esm/types/GenetecAgent.js +28 -0
  205. package/esm/types/PlaneTrackerAPI.js +333 -0
  206. package/esm/types/VapixAPI.js +73 -3
  207. package/esm/types/VapixEvents.js +1 -0
  208. package/esm/types/common.js +16 -1
  209. package/esm/types/ws/CamOverlayEvents.js +16 -0
  210. package/esm/types/ws/CamStreamerEvents.js +33 -0
  211. package/esm/types/ws/PlaneTrackerEvents.js +204 -0
  212. package/esm/web/DefaultClient.js +25 -11
  213. package/esm/web/WsClient.js +16 -18
  214. package/esm/ws/CamOverlayEvents.js +20 -0
  215. package/esm/ws/CamStreamerEvents.js +20 -0
  216. package/esm/ws/CamSwitcherEvents.js +20 -0
  217. package/esm/ws/PlaneTrackerEvents.js +26 -0
  218. package/package.json +46 -12
  219. package/{esm → types}/CamOverlayAPI.d.ts +603 -327
  220. package/types/CamScripterAPI.d.ts +43 -0
  221. package/types/CamStreamerAPI.d.ts +3559 -0
  222. package/types/CamSwitcherAPI.d.ts +168 -0
  223. package/types/PlaneTrackerAPI.d.ts +239 -0
  224. package/types/VapixAPI.d.ts +131 -0
  225. package/types/bin/CreatePackage.d.ts +1 -0
  226. package/types/errors/errors.d.ts +108 -0
  227. package/types/index.d.ts +28 -0
  228. package/types/internal/BasicAPI.d.ts +15 -0
  229. package/types/internal/ProxyClient.d.ts +10 -0
  230. package/types/internal/WsEvents.d.ts +38 -0
  231. package/{esm → types}/internal/constants.d.ts +1 -0
  232. package/types/internal/convertors.d.ts +6 -0
  233. package/types/internal/types.d.ts +47 -0
  234. package/{esm → types}/internal/utils.d.ts +1 -3
  235. package/{esm → types}/internal/versionCompare.d.ts +2 -2
  236. package/types/node/CamOverlayDrawingAPI.d.ts +41 -0
  237. package/{cjs → types/node}/CamOverlayPainter/Frame.d.ts +8 -37
  238. package/{esm → types/node}/CamOverlayPainter/Painter.d.ts +5 -21
  239. package/types/node/CamOverlayPainter/ResourceManager.d.ts +15 -0
  240. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
  241. package/types/node/DefaultClient.d.ts +16 -0
  242. package/types/node/Digest.test.d.ts +1 -0
  243. package/{esm → types}/node/HttpRequestSender.d.ts +1 -0
  244. package/{esm → types}/node/HttpServer.d.ts +1 -1
  245. package/types/node/TimeZoneDaemon.d.ts +6 -0
  246. package/types/node/VapixEvents.d.ts +16 -0
  247. package/types/node/WsClient.d.ts +30 -0
  248. package/types/node/events/AxisCameraStationEvents.d.ts +12 -0
  249. package/types/node/events/GenetecAgent.d.ts +16 -0
  250. package/types/node/index.d.ts +18 -0
  251. package/{esm/models/CamOverlayAPI/widgetsSchema.d.ts → types/types/CamOverlayAPI/CamOverlayAPI.d.ts} +2794 -767
  252. package/{esm/models → types/types}/CamOverlayAPI/accuweatherSchema.d.ts +19 -19
  253. package/{esm/models → types/types}/CamOverlayAPI/customGraphicsSchema.d.ts +108 -107
  254. package/types/types/CamOverlayAPI/htmlOverlaySchema.d.ts +81 -0
  255. package/{cjs/models → types/types}/CamOverlayAPI/imagesSchema.d.ts +19 -19
  256. package/{esm/models → types/types}/CamOverlayAPI/index.d.ts +3 -4
  257. package/{esm/models → types/types}/CamOverlayAPI/infotickerSchema.d.ts +27 -27
  258. package/{cjs/models → types/types}/CamOverlayAPI/pipSchema.d.ts +21 -21
  259. package/{cjs/models → types/types}/CamOverlayAPI/ptzCompassSchema.d.ts +18 -15
  260. package/{esm/models → types/types}/CamOverlayAPI/ptzSchema.d.ts +28 -28
  261. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
  262. package/{cjs/models → types/types}/CamOverlayAPI/screenSharingSchema.d.ts +15 -15
  263. package/{cjs/models/CamOverlayAPI/widgetCommonSchema.d.ts → types/types/CamOverlayAPI/serviceCommonTypes.d.ts} +80 -60
  264. package/{cjs/models → types/types}/CamOverlayAPI/webCameraSharingSchema.d.ts +15 -15
  265. package/types/types/CamOverlayDrawingAPI.d.ts +48 -0
  266. package/types/types/CamOverlayPainter.d.ts +76 -0
  267. package/types/types/CamScripterAPI.d.ts +119 -0
  268. package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
  269. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +26085 -0
  270. package/types/types/CamStreamerAPI/facebookSchema.d.ts +574 -0
  271. package/types/types/CamStreamerAPI/index.d.ts +6 -0
  272. package/{esm/types/CamStreamerAPI.d.ts → types/types/CamStreamerAPI/oldStreamSchema.d.ts} +104 -35
  273. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +570 -0
  274. package/types/types/CamStreamerAPI/streamsSchema.d.ts +8642 -0
  275. package/types/types/CamStreamerAPI/windySchema.d.ts +534 -0
  276. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +542 -0
  277. package/{esm → types}/types/CamSwitcherAPI.d.ts +205 -121
  278. package/{esm/events → types/types}/GenetecAgent.d.ts +47 -47
  279. package/types/types/PlaneTrackerAPI.d.ts +993 -0
  280. package/{esm → types}/types/VapixAPI.d.ts +281 -22
  281. package/types/types/VapixEvents.d.ts +15 -0
  282. package/types/types/common.d.ts +77 -0
  283. package/types/types/ws/CamOverlayEvents.d.ts +88 -0
  284. package/types/types/ws/CamStreamerEvents.d.ts +282 -0
  285. package/types/types/ws/PlaneTrackerEvents.d.ts +1703 -0
  286. package/types/web/DefaultClient.d.ts +8 -0
  287. package/types/web/WsClient.d.ts +17 -0
  288. package/types/ws/CamOverlayEvents.d.ts +8 -0
  289. package/types/ws/CamStreamerEvents.d.ts +8 -0
  290. package/types/ws/CamSwitcherEvents.d.ts +8 -0
  291. package/types/ws/PlaneTrackerEvents.d.ts +9 -0
  292. package/cjs/CamOverlayDrawingAPI.d.ts +0 -86
  293. package/cjs/CamOverlayPainter/ResourceManager.d.ts +0 -14
  294. package/cjs/CamOverlayPainter/ResourceManager.js +0 -46
  295. package/cjs/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  296. package/cjs/CamSwitcherEvents.d.ts +0 -18
  297. package/cjs/VapixEvents.d.ts +0 -43
  298. package/cjs/events/AxisCameraStationEvents.d.ts +0 -10
  299. package/cjs/events/GenetecAgent.js +0 -123
  300. package/cjs/models/CamOverlayAPI/constants.d.ts +0 -11
  301. package/cjs/models/CamOverlayAPI/constants.js +0 -14
  302. package/cjs/models/CamOverlayAPI/fileSchema.d.ts +0 -28
  303. package/cjs/models/CamOverlayAPI/fileSchema.js +0 -17
  304. package/cjs/models/CamOverlayAPI/imagesSchema.js +0 -10
  305. package/cjs/models/CamOverlayAPI/ptzSchema.js +0 -13
  306. package/cjs/models/CamOverlayAPI/screenSharingSchema.js +0 -9
  307. package/cjs/models/CamOverlayAPI/webCameraSharingSchema.js +0 -9
  308. package/cjs/models/CamOverlayAPI/widgetsSchema.js +0 -27
  309. package/cjs/node/WsEventClient.d.ts +0 -13
  310. package/cjs/node/WsEventClient.js +0 -22
  311. package/cjs/types/CamOverlayAPI.d.ts +0 -328
  312. package/cjs/types/CamOverlayAPI.js +0 -26
  313. package/cjs/types/CamStreamerAPI.js +0 -28
  314. package/esm/CamOverlayDrawingAPI.d.ts +0 -86
  315. package/esm/CamOverlayPainter/ResourceManager.d.ts +0 -14
  316. package/esm/CamScripterAPI.d.ts +0 -19
  317. package/esm/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  318. package/esm/CamStreamerAPI.d.ts +0 -16
  319. package/esm/CamSwitcherAPI.d.ts +0 -52
  320. package/esm/CamSwitcherEvents.d.ts +0 -18
  321. package/esm/PlaneTrackerAPI.d.ts +0 -30
  322. package/esm/VapixAPI.d.ts +0 -78
  323. package/esm/VapixEvents.d.ts +0 -43
  324. package/esm/errors/errors.d.ts +0 -37
  325. package/esm/events/AxisCameraStationEvents.d.ts +0 -10
  326. package/esm/events/GenetecAgent.js +0 -119
  327. package/esm/index.d.ts +0 -17
  328. package/esm/internal/ProxyClient.d.ts +0 -11
  329. package/esm/internal/types.d.ts +0 -35
  330. package/esm/models/CamOverlayAPI/constants.d.ts +0 -11
  331. package/esm/models/CamOverlayAPI/constants.js +0 -11
  332. package/esm/models/CamOverlayAPI/fileSchema.d.ts +0 -28
  333. package/esm/models/CamOverlayAPI/fileSchema.js +0 -14
  334. package/esm/models/CamOverlayAPI/imagesSchema.js +0 -7
  335. package/esm/models/CamOverlayAPI/ptzSchema.js +0 -10
  336. package/esm/models/CamOverlayAPI/screenSharingSchema.js +0 -6
  337. package/esm/models/CamOverlayAPI/webCameraSharingSchema.js +0 -6
  338. package/esm/models/CamOverlayAPI/widgetsSchema.js +0 -24
  339. package/esm/node/DefaultClient.d.ts +0 -16
  340. package/esm/node/WsClient.d.ts +0 -39
  341. package/esm/node/WsEventClient.d.ts +0 -13
  342. package/esm/node/WsEventClient.js +0 -18
  343. package/esm/types/CamOverlayAPI.d.ts +0 -328
  344. package/esm/types/CamOverlayAPI.js +0 -14
  345. package/esm/types/CamScripterAPI.d.ts +0 -67
  346. package/esm/types/CamStreamerAPI.js +0 -25
  347. package/esm/types/common.d.ts +0 -37
  348. package/esm/web/DefaultClient.d.ts +0 -6
  349. package/esm/web/WsClient.d.ts +0 -13
  350. package/esm/web/index.d.ts +0 -2
  351. package/cjs/{CreatePackage.d.ts → bin/CreatePackage.d.ts} +0 -0
  352. package/cjs/{internal → node}/Digest.d.ts +0 -0
  353. package/{esm/CreatePackage.d.ts → cjs/node/Digest.test.d.ts} +0 -0
  354. package/{esm/types → cjs/types/ws}/CamSwitcherEvents.d.ts +8 -8
  355. package/cjs/types/{CamSwitcherEvents.js → ws/CamSwitcherEvents.js} +0 -0
  356. package/esm/{internal → node}/Digest.js +0 -0
  357. package/esm/types/{CamSwitcherEvents.js → ws/CamSwitcherEvents.js} +0 -0
  358. package/{esm → types}/internal/transformers.d.ts +0 -0
  359. package/{esm/internal → types/node}/Digest.d.ts +0 -0
  360. package/{cjs/types → types/types/ws}/CamSwitcherEvents.d.ts +8 -8
  361. /package/{esm/node → types/web}/index.d.ts +0 -0
@@ -0,0 +1,333 @@
1
+ import { z } from 'zod';
2
+ export const wsAliasResponseSchema = z.object({
3
+ alias: z.string(),
4
+ ws: z.string(),
5
+ ws_initial_message: z.string(),
6
+ });
7
+ export const connectionSchema = z.object({
8
+ protocol: z.union([z.literal('http'), z.literal('https'), z.literal('https_insecure')]),
9
+ ip: z.union([z.string().ip(), z.literal('')]),
10
+ port: z.number().positive().lt(65535),
11
+ user: z.string(),
12
+ pass: z.string(),
13
+ });
14
+ export const widgetSchema = z.object({
15
+ enabled: z.boolean().default(true),
16
+ coord: z.union([
17
+ z.literal('top_left'),
18
+ z.literal('top_right'),
19
+ z.literal('bottom_left'),
20
+ z.literal('bottom_right'),
21
+ ]),
22
+ posX: z.number().nonnegative(),
23
+ posY: z.number().nonnegative(),
24
+ scale: z.number().positive(),
25
+ });
26
+ const labelOptionsSchema = z.union([
27
+ z.literal('blank'),
28
+ z.literal('registration'),
29
+ z.literal('call_sign'),
30
+ z.literal('flight_number'),
31
+ z.literal('icao'),
32
+ ]);
33
+ const identificationLabelSchema = z.object({
34
+ firstRow: labelOptionsSchema,
35
+ secondRow: labelOptionsSchema,
36
+ thirdRow: labelOptionsSchema,
37
+ fourthRow: labelOptionsSchema,
38
+ opacity: z.number().positive(),
39
+ });
40
+ export const cameraSettingsSchema = z.object({
41
+ trackingDomain: z.union([z.literal('adsb'), z.literal('dronetag')]).default('adsb'),
42
+ units: z.union([z.literal('metric'), z.literal('imperial')]).default('imperial'),
43
+ adsbSource: z
44
+ .object({
45
+ ip: z.union([z.string().ip(), z.literal('')]),
46
+ port: z.number().positive().lt(65535),
47
+ })
48
+ .default({ ip: '', port: 30334 }),
49
+ camera: connectionSchema.default({
50
+ protocol: 'http',
51
+ ip: '127.0.0.1',
52
+ port: 80,
53
+ user: 'root',
54
+ pass: '',
55
+ }),
56
+ cameraCalibrationProcessConfig: z
57
+ .object({
58
+ nightSkyCalibrationEnabled: z.boolean(),
59
+ scheduleNightSkyCalibrationTimestamp: z.number(),
60
+ focusCalibrationPoints: z.string().default(''),
61
+ })
62
+ .default({
63
+ nightSkyCalibrationEnabled: false,
64
+ scheduleNightSkyCalibrationTimestamp: 0,
65
+ focusCalibrationPoints: '',
66
+ }),
67
+ cameraConfig: z
68
+ .object({
69
+ maxZoomLevel: z.number().optional(),
70
+ defaultCaptureSizeMeters: z.number().positive().default(120),
71
+ captureSizeExtensionMeters: z.number().positive().default(80),
72
+ })
73
+ .default({
74
+ maxZoomLevel: 30,
75
+ defaultCaptureSizeMeters: 120,
76
+ captureSizeExtensionMeters: 80,
77
+ }),
78
+ stream: z
79
+ .object({
80
+ width: z.number().positive(),
81
+ height: z.number().positive(),
82
+ })
83
+ .default({ width: 1920, height: 1080 }),
84
+ imageConfig: z
85
+ .object({
86
+ dayAperture: z.number().nonnegative().min(0).max(100),
87
+ nightAperture: z.number().nonnegative().min(0).max(100),
88
+ maxGain: z.number().nonnegative().min(0).max(100).default(100),
89
+ })
90
+ .default({ dayAperture: 50, nightAperture: 0, maxGain: 100 }),
91
+ airportConfig: z
92
+ .object({
93
+ icao: z.string().default(''),
94
+ centerLat: z.number(),
95
+ centerLon: z.number(),
96
+ radius: z.number().nonnegative().default(10000),
97
+ })
98
+ .default({
99
+ icao: '',
100
+ centerLat: 0,
101
+ centerLon: 0,
102
+ radius: 10000,
103
+ }),
104
+ trackingConfig: z
105
+ .object({
106
+ prioritizeEmergency: z.boolean(),
107
+ trackingZoneWeightIncrease: z.number().int().nonnegative().default(0),
108
+ guardTourEnabled: z.boolean().default(false),
109
+ guardTourId: z.number().int().nonnegative().default(0),
110
+ })
111
+ .default({ prioritizeEmergency: true, guardTourEnabled: false, guardTourId: 0 }),
112
+ overlayText: z
113
+ .object({
114
+ displayIcao: z.boolean().optional(),
115
+ displayRegistration: z.boolean().optional(),
116
+ displayFlightNumber: z.boolean().optional(),
117
+ displayAltitude: z.boolean().optional(),
118
+ displayVelocity: z.boolean().optional(),
119
+ displayDistance: z.boolean().optional(),
120
+ displayFOV: z.boolean().optional(),
121
+ displayPTError: z.boolean().optional(),
122
+ displayPTZSpeed: z.boolean().optional(),
123
+ displayVelocityData: z.boolean().optional(),
124
+ displayAdsbVelocityData: z.boolean().optional(),
125
+ displaySignalQuality: z.boolean().optional(),
126
+ displayAutoTrackingInfo: z.boolean().optional(),
127
+ displayGPSCoords: z.boolean().optional(),
128
+ displayVapixQuery: z.boolean().optional(),
129
+ displayFocus: z.boolean().optional(),
130
+ displayAperture: z.boolean().optional(),
131
+ displayAircraftInfo: z.boolean().optional(),
132
+ displaySunDistance: z.boolean().optional(),
133
+ displayTickTime: z.boolean().optional(),
134
+ displaySystemInfo: z.boolean().optional(),
135
+ })
136
+ .optional(),
137
+ widget: widgetSchema.default({
138
+ enabled: true,
139
+ coord: 'top_right',
140
+ posX: 10,
141
+ posY: 10,
142
+ scale: 100,
143
+ }),
144
+ airportWidget: widgetSchema.default({
145
+ enabled: true,
146
+ coord: 'top_left',
147
+ posX: 10,
148
+ posY: 10,
149
+ scale: 100,
150
+ }),
151
+ fr24FlightInfoSource: z
152
+ .object({
153
+ enabled: z.boolean().default(false),
154
+ priority: z.number().int().positive().default(1),
155
+ apiToken: z.string().default(''),
156
+ validateFlights: z.boolean().default(true),
157
+ })
158
+ .default({
159
+ enabled: false,
160
+ priority: 1,
161
+ apiToken: '',
162
+ validateFlights: true,
163
+ }),
164
+ radarcapeFlightInfoSource: z
165
+ .object({
166
+ enabled: z.boolean().default(false),
167
+ priority: z.number().int().positive().default(2),
168
+ ip: z.union([z.string().ip(), z.literal('')]).default(''),
169
+ port: z.number().positive().lt(65535).default(80),
170
+ })
171
+ .default({
172
+ enabled: false,
173
+ priority: 2,
174
+ ip: '',
175
+ port: 80,
176
+ }),
177
+ identificationLabel: identificationLabelSchema.default({
178
+ firstRow: 'registration',
179
+ secondRow: 'blank',
180
+ thirdRow: 'blank',
181
+ fourthRow: 'blank',
182
+ opacity: 30,
183
+ }),
184
+ acs: connectionSchema
185
+ .extend({
186
+ enabled: z.boolean(),
187
+ sourceKey: z.string(),
188
+ })
189
+ .default({
190
+ enabled: false,
191
+ protocol: 'https_insecure',
192
+ ip: '',
193
+ port: 29204,
194
+ user: '',
195
+ pass: '',
196
+ sourceKey: '',
197
+ }),
198
+ genetec: connectionSchema
199
+ .extend({
200
+ enabled: z.boolean(),
201
+ baseUri: z.string().default(''),
202
+ appId: z.string().default(''),
203
+ cameraList: z.string().array().default([]),
204
+ })
205
+ .default({
206
+ enabled: false,
207
+ protocol: 'http',
208
+ ip: '',
209
+ port: 4590,
210
+ user: '',
211
+ pass: '',
212
+ baseUri: 'WebSdk',
213
+ appId: '',
214
+ cameraList: [],
215
+ }),
216
+ camstreamerIntegration: z
217
+ .object({
218
+ adPlacementEnabled: z.boolean(),
219
+ adMinIntervalSec: z.number().int().nonnegative(),
220
+ adShortDurationSec: z.number().int().nonnegative(),
221
+ adLongDurationSec: z.number().int().nonnegative(),
222
+ })
223
+ .default({
224
+ adPlacementEnabled: false,
225
+ adMinIntervalSec: 1800,
226
+ adShortDurationSec: 10,
227
+ adLongDurationSec: 30,
228
+ }),
229
+ });
230
+ export const serverSettingsSchema = z.object({
231
+ cameraCalibration: z
232
+ .object({
233
+ posLat: z.number(),
234
+ posLon: z.number(),
235
+ geoidHN: z.number(),
236
+ altitudeAmsl: z.number(),
237
+ rotationEast: z.number(),
238
+ rotationNorth: z.number(),
239
+ rotationUp: z.number(),
240
+ tiltTransformationCoefA: z.number(),
241
+ tiltCameraKnownPoint: z.number(),
242
+ tiltRealKnownPoint: z.number(),
243
+ panErrorCorrection: z
244
+ .array(z.object({
245
+ cameraPan: z.number(),
246
+ realPan: z.number(),
247
+ }))
248
+ .default([]),
249
+ })
250
+ .default({
251
+ posLat: 50,
252
+ posLon: 14,
253
+ geoidHN: 45,
254
+ altitudeAmsl: 372,
255
+ rotationEast: 0,
256
+ rotationNorth: 0,
257
+ rotationUp: 0,
258
+ tiltTransformationCoefA: 1.0,
259
+ tiltCameraKnownPoint: 90,
260
+ tiltRealKnownPoint: 90,
261
+ panErrorCorrection: [],
262
+ }),
263
+ });
264
+ export const getIcaoSchema = z.object({
265
+ icao: z.string(),
266
+ });
267
+ export const trackingModeSchema = z.object({
268
+ mode: z.union([z.literal('MANUAL'), z.literal('AUTOMATIC')]).default('AUTOMATIC'),
269
+ });
270
+ export const flightInfoSchema = z.object({
271
+ callsign: z.string().optional(),
272
+ flightNumber: z.string().optional(),
273
+ registration: z.string().optional(),
274
+ aircraftType: z.string().optional(),
275
+ airlines: z.string().optional(),
276
+ originAirport: z
277
+ .object({
278
+ icao: z.string().optional(),
279
+ iata: z.string().optional(),
280
+ city: z.string().optional(),
281
+ })
282
+ .optional(),
283
+ destinationAirport: z.object({
284
+ icao: z.string().optional(),
285
+ iata: z.string().optional(),
286
+ city: z.string().optional(),
287
+ }),
288
+ flightImages: z
289
+ .array(z.object({
290
+ src: z.string().optional(),
291
+ photographer: z.string().optional(),
292
+ }))
293
+ .optional(),
294
+ });
295
+ export const typePriorityListSchema = z.object({
296
+ typePriorityList: z.array(z.string()).default([]),
297
+ });
298
+ export const priorityListSchema = z.object({
299
+ priorityList: z.array(z.string()).default([]),
300
+ });
301
+ export const whiteListSchema = z.object({
302
+ whiteList: z.array(z.string()).default([]),
303
+ });
304
+ export const blackListSchema = z.object({
305
+ blackList: z.array(z.string()).default([]),
306
+ });
307
+ export const mapTypeSchema = z.enum(['roadmap', 'satellite']);
308
+ export const mapInfoSchema = z.object({
309
+ minZoom: z.number().nonnegative(),
310
+ maxZoom: z.number().nonnegative(),
311
+ mapTypes: z.array(mapTypeSchema),
312
+ tileSize: z.number().nonnegative(),
313
+ });
314
+ export const zonesSchema = z.object({
315
+ zones: z
316
+ .array(z.object({
317
+ enabled: z.boolean().default(true),
318
+ name: z.string().optional(),
319
+ area: z
320
+ .array(z.object({
321
+ lat: z.number(),
322
+ lon: z.number(),
323
+ }))
324
+ .nonempty(),
325
+ minAltitudeAmsl: z.number().optional(),
326
+ maxAltitudeAmsl: z.number().optional(),
327
+ minSpeedKmph: z.number().optional(),
328
+ maxSpeedKmph: z.number().optional(),
329
+ flightDirection: z.enum(['all', 'arrival', 'departure']).default('all'),
330
+ weight: z.number(),
331
+ }))
332
+ .default([]),
333
+ });
@@ -12,6 +12,20 @@ export const applicationSchema = z.object({
12
12
  VendorHomePage: z.string().optional(),
13
13
  LicenseName: z.string().optional(),
14
14
  });
15
+ export const applicationListSchema = z.array(applicationSchema.extend({
16
+ appId: z
17
+ .union([
18
+ z.literal('CamStreamer'),
19
+ z.literal('CamSwitcher'),
20
+ z.literal('CamOverlay'),
21
+ z.literal('CamScripter'),
22
+ z.literal('PlaneTracker'),
23
+ z.literal('Ndihxplugin'),
24
+ z.literal('SportTracker'),
25
+ z.literal('CamOverlayHtmlplugin'),
26
+ ])
27
+ .nullable(),
28
+ }));
15
29
  export const APP_IDS = [
16
30
  'CamStreamer',
17
31
  'CamSwitcher',
@@ -19,8 +33,8 @@ export const APP_IDS = [
19
33
  'CamScripter',
20
34
  'PlaneTracker',
21
35
  'Ndihxplugin',
22
- 'SportTracker',
23
36
  ];
37
+ export const ALL_APP_IDS = [...APP_IDS, 'SportTracker', 'CamOverlayHtmlplugin'];
24
38
  export const guardTourSchema = z.object({
25
39
  id: z.string(),
26
40
  camNbr: z.unknown(),
@@ -42,7 +56,12 @@ const audioSampleRatesSchema = z.object({
42
56
  });
43
57
  const audioSampleRatesOutSchema = audioSampleRatesSchema.transform(toCamelCaseDeep);
44
58
  export const sdCardWatchedStatuses = ['OK', 'connected', 'disconnected'];
45
- export const PtzOverviewSchema = z.record(z.number(), z.array(z.object({ id: z.number(), name: z.string() })));
59
+ export const sdCardInfoSchema = z.object({
60
+ status: z.enum(sdCardWatchedStatuses),
61
+ totalSize: z.number(),
62
+ freeSize: z.number(),
63
+ });
64
+ export const ptzOverviewSchema = z.record(z.number(), z.array(z.object({ id: z.number(), name: z.string() })));
46
65
  export const cameraPTZItemDataSchema = z.object({
47
66
  pan: z.number().optional(),
48
67
  tilt: z.number().optional(),
@@ -107,9 +126,23 @@ export const dateTimeinfoSchema = z.object({
107
126
  dstEnabled: z.boolean(),
108
127
  localDateTime: z.string(),
109
128
  posixTimeZone: z.string(),
110
- timeZone: z.string(),
129
+ timeZone: z.string().optional(),
111
130
  }),
112
131
  });
132
+ export const timeZoneSchema = z.discriminatedUnion('status', [
133
+ z.object({
134
+ status: z.literal('success'),
135
+ data: z.object({
136
+ activeTimeZone: z.string(),
137
+ }),
138
+ }),
139
+ z.object({
140
+ status: z.literal('error'),
141
+ error: z.object({
142
+ message: z.string(),
143
+ }),
144
+ }),
145
+ ]);
113
146
  export const audioSampleRatesResponseSchema = z.object({
114
147
  data: z.object({
115
148
  encoders: z
@@ -120,3 +153,40 @@ export const audioSampleRatesResponseSchema = z.object({
120
153
  .partial(),
121
154
  }),
122
155
  });
156
+ export const portStatusSchema = z.object({
157
+ port: z.string(),
158
+ state: z.enum(['open', 'closed']),
159
+ configurable: z.boolean(),
160
+ readonly: z.boolean().optional(),
161
+ usage: z.string(),
162
+ direction: z.enum(['input', 'output']),
163
+ name: z.string(),
164
+ normalState: z.enum(['open', 'closed']),
165
+ });
166
+ export const getPortsResponseSchema = z.object({
167
+ apiVersion: z.string(),
168
+ context: z.string(),
169
+ method: z.literal('getPorts'),
170
+ data: z.object({
171
+ numberOfPorts: z.number(),
172
+ items: z.array(portStatusSchema).optional(),
173
+ }),
174
+ });
175
+ export const portSetSchema = z.object({
176
+ port: z.string(),
177
+ state: z.enum(['open', 'closed']),
178
+ usage: z.string().optional(),
179
+ direction: z.enum(['input', 'output']).optional(),
180
+ name: z.string().optional(),
181
+ normalState: z.enum(['open', 'closed']).optional(),
182
+ });
183
+ export const portSequenceStateSchema = z.object({
184
+ state: z.enum(['open', 'closed']),
185
+ time: z.number().min(0).max(65535),
186
+ });
187
+ export const recordingConfigItemSchema = z.object({
188
+ diskid: z.string(),
189
+ eventid: z.string(),
190
+ options: z.record(z.string()),
191
+ profile: z.string(),
192
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -1,11 +1,26 @@
1
1
  import { z } from 'zod';
2
+ export const booleanSchema = z.union([z.literal(0), z.literal(1)]);
2
3
  export const audioChannelSchema = z.union([z.literal('mono'), z.literal('stereo')]);
3
4
  export const audioChannelCountSchema = z.union([z.literal(1), z.literal(2)]);
4
5
  export const h264ProfileSchema = z.union([z.literal('high'), z.literal('main'), z.literal('baseline')]);
5
- export const storageTypeSchema = z.union([z.literal('SD_DISK'), z.literal('FLASH')]);
6
+ export const flashStorageTypeSchema = z.literal('FLASH');
7
+ export const sdCardStorageTypeSchema = z.literal('SD_DISK');
8
+ export const storageTypeSchema = z.union([sdCardStorageTypeSchema, flashStorageTypeSchema]);
6
9
  export const networkCameraListSchema = z.array(z.object({
7
10
  name: z.string(),
8
11
  ip: z.string(),
9
12
  }));
10
13
  export const keyboardShortcutSchema = z.string().nullable();
11
14
  export const keyboardShortcutsSchema = z.record(keyboardShortcutSchema);
15
+ export const bitrateModeSchema = z.union([z.literal('VBR'), z.literal('MBR'), z.literal('ABR')]);
16
+ export const bitrateVapixParamsSchema = z.object({
17
+ bitrateMode: bitrateModeSchema,
18
+ maximumBitRate: z.number(),
19
+ retentionTime: z.number(),
20
+ bitRateLimit: z.number(),
21
+ });
22
+ export const fileSchema = typeof File !== 'undefined'
23
+ ? z.instanceof(File)
24
+ : z.custom((val) => {
25
+ return val !== null && typeof val === 'object' && 'name' in val && 'size' in val && 'type' in val;
26
+ });
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ const coEventsDataSchema = z.discriminatedUnion('type', [
3
+ z.object({ type: z.literal('authorization'), state: z.string() }),
4
+ z.object({
5
+ type: z.literal('ServiceStart'),
6
+ serviceId: z.number(),
7
+ }),
8
+ z.object({
9
+ type: z.literal('ServiceStop'),
10
+ serviceId: z.number(),
11
+ }),
12
+ ]);
13
+ export const coEventsSchema = z.discriminatedUnion('type', [
14
+ z.object({ type: z.literal('init'), data: coEventsDataSchema }),
15
+ ...coEventsDataSchema.options,
16
+ ]);
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ const csEventsDataSchema = z.discriminatedUnion('type', [
3
+ z.object({ type: z.literal('authorization'), state: z.string() }),
4
+ z.object({
5
+ type: z.literal('StreamState'),
6
+ streamId: z.string(),
7
+ isStreaming: z.boolean(),
8
+ active: z.boolean(),
9
+ enabled: z.boolean(),
10
+ }),
11
+ z.object({
12
+ type: z.literal('CS_API_SUCCESS'),
13
+ apiCall: z.string(),
14
+ message: z.string(),
15
+ streamId: z.string(),
16
+ }),
17
+ z.object({
18
+ type: z.literal('CS_API_ERROR'),
19
+ apiCall: z.string(),
20
+ message: z.string(),
21
+ streamId: z.string(),
22
+ code: z.string(),
23
+ }),
24
+ z.object({
25
+ type: z.literal('PortChanged'),
26
+ port: z.number(),
27
+ value: z.boolean(),
28
+ }),
29
+ ]);
30
+ export const csEventsSchema = z.discriminatedUnion('type', [
31
+ z.object({ type: z.literal('init'), data: csEventsDataSchema }),
32
+ ...csEventsDataSchema.options,
33
+ ]);