camstreamerlib 4.0.0-beta.13 → 4.0.0-beta.130
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 +560 -336
- package/cjs/CamOverlayAPI.js +99 -184
- package/cjs/CamScripterAPI.d.ts +41 -17
- package/cjs/CamScripterAPI.js +50 -56
- package/cjs/CamStreamerAPI.d.ts +3139 -14
- package/cjs/CamStreamerAPI.js +151 -52
- package/cjs/CamSwitcherAPI.d.ts +155 -42
- package/cjs/CamSwitcherAPI.js +134 -189
- package/cjs/PlaneTrackerAPI.d.ts +236 -0
- package/cjs/PlaneTrackerAPI.js +194 -0
- package/cjs/VapixAPI.d.ts +84 -43
- package/cjs/VapixAPI.js +312 -216
- package/cjs/{CreatePackage.js → bin/CreatePackage.js} +44 -18
- package/cjs/errors/errors.d.ts +70 -4
- package/cjs/errors/errors.js +140 -7
- package/cjs/index.d.ts +20 -8
- package/cjs/index.js +28 -12
- package/cjs/internal/BasicAPI.d.ts +15 -0
- package/cjs/internal/BasicAPI.js +93 -0
- package/cjs/internal/ProxyClient.d.ts +8 -9
- package/cjs/internal/ProxyClient.js +28 -34
- package/cjs/internal/WsEvents.d.ts +38 -0
- package/cjs/{CamSwitcherEvents.js → internal/WsEvents.js} +33 -22
- package/cjs/internal/constants.d.ts +1 -0
- package/cjs/internal/constants.js +2 -1
- package/cjs/internal/convertors.d.ts +6 -0
- package/cjs/internal/convertors.js +115 -0
- package/cjs/internal/types.d.ts +32 -20
- package/cjs/internal/utils.d.ts +1 -3
- package/cjs/internal/utils.js +1 -12
- 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/{esm → cjs/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 -6
- package/cjs/node/DefaultClient.js +12 -16
- 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/{events → node/events}/AxisCameraStationEvents.js +18 -13
- 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/{models/CamOverlayAPI/widgetsSchema.d.ts → types/CamOverlayAPI/CamOverlayAPI.d.ts} +2534 -746
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +131 -0
- package/cjs/{models → types}/CamOverlayAPI/accuweatherSchema.d.ts +15 -15
- package/cjs/{models → types}/CamOverlayAPI/accuweatherSchema.js +7 -8
- package/cjs/{models → types}/CamOverlayAPI/customGraphicsSchema.d.ts +106 -105
- package/cjs/{models → types}/CamOverlayAPI/customGraphicsSchema.js +5 -6
- package/{esm/models → cjs/types}/CamOverlayAPI/imagesSchema.d.ts +17 -17
- package/cjs/types/CamOverlayAPI/imagesSchema.js +9 -0
- package/cjs/{models → types}/CamOverlayAPI/index.d.ts +2 -4
- package/cjs/{models → types}/CamOverlayAPI/index.js +2 -4
- package/cjs/{models → types}/CamOverlayAPI/infotickerSchema.d.ts +25 -25
- package/cjs/{models → types}/CamOverlayAPI/infotickerSchema.js +6 -7
- package/{esm/models → cjs/types}/CamOverlayAPI/pipSchema.d.ts +19 -19
- package/cjs/{models → types}/CamOverlayAPI/pipSchema.js +5 -6
- package/{esm/models → cjs/types}/CamOverlayAPI/ptzCompassSchema.d.ts +16 -13
- package/cjs/{models → types}/CamOverlayAPI/ptzCompassSchema.js +5 -5
- package/{esm/models → cjs/types}/CamOverlayAPI/ptzSchema.d.ts +26 -26
- 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/{models → types}/CamOverlayAPI/screenSharingSchema.d.ts +13 -13
- package/cjs/types/CamOverlayAPI/screenSharingSchema.js +8 -0
- package/{esm/models/CamOverlayAPI/widgetCommonSchema.d.ts → cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts} +75 -56
- package/cjs/{models/CamOverlayAPI/widgetCommonSchema.js → types/CamOverlayAPI/serviceCommonTypes.js} +33 -18
- package/{esm/models → cjs/types}/CamOverlayAPI/webCameraSharingSchema.d.ts +13 -13
- 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/CamStreamerAPI.d.ts +22299 -0
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +165 -0
- package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +501 -0
- package/cjs/types/CamStreamerAPI/facebookSchema.js +23 -0
- package/cjs/types/CamStreamerAPI/index.d.ts +6 -0
- package/cjs/types/CamStreamerAPI/index.js +22 -0
- package/cjs/types/{CamStreamerAPI.d.ts → CamStreamerAPI/oldStreamSchema.d.ts} +104 -35
- package/cjs/types/CamStreamerAPI/oldStreamSchema.js +53 -0
- package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +500 -0
- package/cjs/types/CamStreamerAPI/streamCommonTypes.js +119 -0
- package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +7379 -0
- package/cjs/types/CamStreamerAPI/streamsSchema.js +59 -0
- package/cjs/types/CamStreamerAPI/windySchema.d.ts +435 -0
- package/cjs/types/CamStreamerAPI/windySchema.js +11 -0
- package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +468 -0
- package/cjs/types/CamStreamerAPI/youtubeSchema.js +22 -0
- package/cjs/types/CamSwitcherAPI.d.ts +181 -121
- package/cjs/types/CamSwitcherAPI.js +31 -1
- package/cjs/{events → types}/GenetecAgent.d.ts +47 -47
- package/cjs/types/GenetecAgent.js +31 -0
- package/cjs/types/PlaneTrackerAPI.d.ts +980 -0
- package/cjs/types/PlaneTrackerAPI.js +333 -0
- package/cjs/types/VapixAPI.d.ts +255 -15
- package/cjs/types/VapixAPI.js +66 -3
- package/cjs/types/VapixEvents.d.ts +15 -0
- package/cjs/types/VapixEvents.js +2 -0
- package/cjs/types/common.d.ts +43 -3
- package/cjs/types/common.js +17 -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 +282 -0
- package/cjs/types/ws/CamStreamerEvents.js +36 -0
- package/cjs/types/ws/PlaneTrackerEvents.d.ts +1703 -0
- package/cjs/types/ws/PlaneTrackerEvents.js +207 -0
- package/cjs/web/DefaultClient.d.ts +7 -5
- package/cjs/web/DefaultClient.js +25 -11
- 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 +99 -184
- package/esm/CamScripterAPI.js +51 -57
- package/esm/CamStreamerAPI.js +149 -51
- package/esm/CamSwitcherAPI.js +137 -192
- package/esm/PlaneTrackerAPI.js +190 -0
- package/esm/VapixAPI.js +314 -218
- package/esm/{CreatePackage.js → bin/CreatePackage.js} +16 -16
- package/esm/errors/errors.js +122 -6
- package/esm/index.js +20 -8
- package/esm/internal/BasicAPI.js +89 -0
- package/esm/internal/ProxyClient.js +28 -34
- package/esm/{CamSwitcherEvents.js → internal/WsEvents.js} +31 -20
- package/esm/internal/constants.js +1 -0
- package/esm/internal/convertors.js +108 -0
- package/esm/internal/utils.js +0 -9
- 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 +12 -16
- 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 +110 -0
- package/esm/{models → types}/CamOverlayAPI/accuweatherSchema.js +3 -4
- package/esm/{models → types}/CamOverlayAPI/customGraphicsSchema.js +3 -4
- package/esm/types/CamOverlayAPI/imagesSchema.js +6 -0
- package/esm/{models → types}/CamOverlayAPI/index.js +2 -4
- package/esm/{models → types}/CamOverlayAPI/infotickerSchema.js +3 -4
- package/esm/{models → types}/CamOverlayAPI/pipSchema.js +4 -5
- package/esm/{models → types}/CamOverlayAPI/ptzCompassSchema.js +4 -4
- 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/{models/CamOverlayAPI/widgetCommonSchema.js → types/CamOverlayAPI/serviceCommonTypes.js} +32 -17
- 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/CamStreamerAPI.js +142 -0
- package/esm/types/CamStreamerAPI/facebookSchema.js +17 -0
- package/esm/types/CamStreamerAPI/index.js +6 -0
- package/esm/types/CamStreamerAPI/oldStreamSchema.js +50 -0
- package/esm/types/CamStreamerAPI/streamCommonTypes.js +116 -0
- package/esm/types/CamStreamerAPI/streamsSchema.js +53 -0
- package/esm/types/CamStreamerAPI/windySchema.js +5 -0
- package/esm/types/CamStreamerAPI/youtubeSchema.js +16 -0
- package/esm/types/CamSwitcherAPI.js +31 -1
- package/esm/types/GenetecAgent.js +28 -0
- package/esm/types/PlaneTrackerAPI.js +330 -0
- package/esm/types/VapixAPI.js +65 -2
- package/esm/types/VapixEvents.js +1 -0
- package/esm/types/common.js +16 -1
- package/esm/types/ws/CamOverlayEvents.js +16 -0
- package/esm/types/ws/CamStreamerEvents.js +33 -0
- package/esm/types/ws/PlaneTrackerEvents.js +204 -0
- package/esm/web/DefaultClient.js +25 -11
- 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 +43 -9
- package/{esm → types}/CamOverlayAPI.d.ts +560 -336
- package/types/CamScripterAPI.d.ts +43 -0
- package/types/CamStreamerAPI.d.ts +3141 -0
- package/types/CamSwitcherAPI.d.ts +165 -0
- package/types/PlaneTrackerAPI.d.ts +236 -0
- package/types/VapixAPI.d.ts +119 -0
- package/types/bin/CreatePackage.d.ts +1 -0
- package/types/errors/errors.d.ts +103 -0
- package/types/index.d.ts +28 -0
- package/types/internal/BasicAPI.d.ts +15 -0
- package/types/internal/ProxyClient.d.ts +10 -0
- package/types/internal/WsEvents.d.ts +38 -0
- package/{esm → types}/internal/constants.d.ts +1 -0
- package/types/internal/convertors.d.ts +6 -0
- package/types/internal/types.d.ts +47 -0
- package/{esm → types}/internal/utils.d.ts +1 -3
- package/{esm → types}/internal/versionCompare.d.ts +2 -2
- package/types/node/CamOverlayDrawingAPI.d.ts +41 -0
- package/{cjs → 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/{esm/models/CamOverlayAPI/widgetsSchema.d.ts → types/types/CamOverlayAPI/CamOverlayAPI.d.ts} +2534 -746
- package/{esm/models → types/types}/CamOverlayAPI/accuweatherSchema.d.ts +15 -15
- package/{esm/models → types/types}/CamOverlayAPI/customGraphicsSchema.d.ts +106 -105
- package/{cjs/models → types/types}/CamOverlayAPI/imagesSchema.d.ts +17 -17
- package/{esm/models → types/types}/CamOverlayAPI/index.d.ts +2 -4
- package/{esm/models → types/types}/CamOverlayAPI/infotickerSchema.d.ts +25 -25
- package/{cjs/models → types/types}/CamOverlayAPI/pipSchema.d.ts +19 -19
- package/{cjs/models → types/types}/CamOverlayAPI/ptzCompassSchema.d.ts +16 -13
- package/{cjs/models → types/types}/CamOverlayAPI/ptzSchema.d.ts +26 -26
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
- package/{esm/models → types/types}/CamOverlayAPI/screenSharingSchema.d.ts +13 -13
- package/{cjs/models/CamOverlayAPI/widgetCommonSchema.d.ts → types/types/CamOverlayAPI/serviceCommonTypes.d.ts} +75 -56
- package/{cjs/models → types/types}/CamOverlayAPI/webCameraSharingSchema.d.ts +13 -13
- 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/CamStreamerAPI.d.ts +22299 -0
- package/types/types/CamStreamerAPI/facebookSchema.d.ts +501 -0
- package/types/types/CamStreamerAPI/index.d.ts +6 -0
- package/{esm/types/CamStreamerAPI.d.ts → types/types/CamStreamerAPI/oldStreamSchema.d.ts} +104 -35
- package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +500 -0
- package/types/types/CamStreamerAPI/streamsSchema.d.ts +7379 -0
- package/types/types/CamStreamerAPI/windySchema.d.ts +435 -0
- package/types/types/CamStreamerAPI/youtubeSchema.d.ts +468 -0
- package/{esm → types}/types/CamSwitcherAPI.d.ts +181 -121
- package/{esm/events → types/types}/GenetecAgent.d.ts +47 -47
- package/types/types/PlaneTrackerAPI.d.ts +980 -0
- package/{esm → types}/types/VapixAPI.d.ts +255 -15
- package/types/types/VapixEvents.d.ts +15 -0
- package/types/types/common.d.ts +77 -0
- package/types/types/ws/CamOverlayEvents.d.ts +88 -0
- package/types/types/ws/CamStreamerEvents.d.ts +282 -0
- package/types/types/ws/PlaneTrackerEvents.d.ts +1703 -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 -10
- package/cjs/events/GenetecAgent.js +0 -123
- package/cjs/models/CamOverlayAPI/constants.d.ts +0 -11
- package/cjs/models/CamOverlayAPI/constants.js +0 -14
- package/cjs/models/CamOverlayAPI/fileSchema.d.ts +0 -28
- package/cjs/models/CamOverlayAPI/fileSchema.js +0 -17
- package/cjs/models/CamOverlayAPI/imagesSchema.js +0 -10
- package/cjs/models/CamOverlayAPI/ptzSchema.js +0 -13
- package/cjs/models/CamOverlayAPI/screenSharingSchema.js +0 -9
- package/cjs/models/CamOverlayAPI/webCameraSharingSchema.js +0 -9
- package/cjs/models/CamOverlayAPI/widgetsSchema.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 -328
- package/cjs/types/CamOverlayAPI.js +0 -26
- package/cjs/types/CamStreamerAPI.js +0 -28
- 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 -78
- package/esm/VapixEvents.d.ts +0 -43
- package/esm/errors/errors.d.ts +0 -37
- package/esm/events/AxisCameraStationEvents.d.ts +0 -10
- package/esm/events/GenetecAgent.js +0 -119
- package/esm/index.d.ts +0 -16
- package/esm/internal/ProxyClient.d.ts +0 -11
- package/esm/internal/types.d.ts +0 -35
- package/esm/models/CamOverlayAPI/constants.d.ts +0 -11
- package/esm/models/CamOverlayAPI/constants.js +0 -11
- package/esm/models/CamOverlayAPI/fileSchema.d.ts +0 -28
- package/esm/models/CamOverlayAPI/fileSchema.js +0 -14
- package/esm/models/CamOverlayAPI/imagesSchema.js +0 -7
- package/esm/models/CamOverlayAPI/ptzSchema.js +0 -10
- package/esm/models/CamOverlayAPI/screenSharingSchema.js +0 -6
- package/esm/models/CamOverlayAPI/webCameraSharingSchema.js +0 -6
- package/esm/models/CamOverlayAPI/widgetsSchema.js +0 -24
- package/esm/node/DefaultClient.d.ts +0 -16
- 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 -328
- package/esm/types/CamOverlayAPI.js +0 -14
- package/esm/types/CamScripterAPI.d.ts +0 -67
- package/esm/types/CamStreamerAPI.js +0 -25
- package/esm/types/common.d.ts +0 -37
- 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/{esm/types → cjs/types/ws}/CamSwitcherEvents.d.ts +8 -8
- 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/transformers.d.ts +0 -0
- package/{esm/internal → types/node}/Digest.d.ts +0 -0
- package/{cjs/types → types/types/ws}/CamSwitcherEvents.d.ts +8 -8
- /package/{esm/node → types/web}/index.d.ts +0 -0
package/cjs/types/VapixAPI.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.audioSampleRatesResponseSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.
|
|
3
|
+
exports.portSequenceStateSchema = exports.portSetSchema = exports.getPortsResponseSchema = exports.portStatusSchema = exports.audioSampleRatesResponseSchema = exports.timeZoneSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.ptzOverviewSchema = exports.sdCardInfoSchema = exports.sdCardWatchedStatuses = exports.guardTourSchema = exports.APP_IDS = exports.applicationListSchema = exports.applicationSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const transformers_1 = require("../internal/transformers");
|
|
6
6
|
exports.applicationSchema = zod_1.z.object({
|
|
@@ -15,6 +15,19 @@ exports.applicationSchema = zod_1.z.object({
|
|
|
15
15
|
VendorHomePage: zod_1.z.string().optional(),
|
|
16
16
|
LicenseName: zod_1.z.string().optional(),
|
|
17
17
|
});
|
|
18
|
+
exports.applicationListSchema = zod_1.z.array(exports.applicationSchema.extend({
|
|
19
|
+
appId: zod_1.z
|
|
20
|
+
.union([
|
|
21
|
+
zod_1.z.literal('CamStreamer'),
|
|
22
|
+
zod_1.z.literal('CamSwitcher'),
|
|
23
|
+
zod_1.z.literal('CamOverlay'),
|
|
24
|
+
zod_1.z.literal('CamScripter'),
|
|
25
|
+
zod_1.z.literal('PlaneTracker'),
|
|
26
|
+
zod_1.z.literal('Ndihxplugin'),
|
|
27
|
+
zod_1.z.literal('SportTracker'),
|
|
28
|
+
])
|
|
29
|
+
.nullable(),
|
|
30
|
+
}));
|
|
18
31
|
exports.APP_IDS = [
|
|
19
32
|
'CamStreamer',
|
|
20
33
|
'CamSwitcher',
|
|
@@ -45,7 +58,12 @@ const audioSampleRatesSchema = zod_1.z.object({
|
|
|
45
58
|
});
|
|
46
59
|
const audioSampleRatesOutSchema = audioSampleRatesSchema.transform(transformers_1.toCamelCaseDeep);
|
|
47
60
|
exports.sdCardWatchedStatuses = ['OK', 'connected', 'disconnected'];
|
|
48
|
-
exports.
|
|
61
|
+
exports.sdCardInfoSchema = zod_1.z.object({
|
|
62
|
+
status: zod_1.z.enum(exports.sdCardWatchedStatuses),
|
|
63
|
+
totalSize: zod_1.z.number(),
|
|
64
|
+
freeSize: zod_1.z.number(),
|
|
65
|
+
});
|
|
66
|
+
exports.ptzOverviewSchema = zod_1.z.record(zod_1.z.number(), zod_1.z.array(zod_1.z.object({ id: zod_1.z.number(), name: zod_1.z.string() })));
|
|
49
67
|
exports.cameraPTZItemDataSchema = zod_1.z.object({
|
|
50
68
|
pan: zod_1.z.number().optional(),
|
|
51
69
|
tilt: zod_1.z.number().optional(),
|
|
@@ -110,9 +128,23 @@ exports.dateTimeinfoSchema = zod_1.z.object({
|
|
|
110
128
|
dstEnabled: zod_1.z.boolean(),
|
|
111
129
|
localDateTime: zod_1.z.string(),
|
|
112
130
|
posixTimeZone: zod_1.z.string(),
|
|
113
|
-
timeZone: zod_1.z.string(),
|
|
131
|
+
timeZone: zod_1.z.string().optional(),
|
|
114
132
|
}),
|
|
115
133
|
});
|
|
134
|
+
exports.timeZoneSchema = zod_1.z.discriminatedUnion('status', [
|
|
135
|
+
zod_1.z.object({
|
|
136
|
+
status: zod_1.z.literal('success'),
|
|
137
|
+
data: zod_1.z.object({
|
|
138
|
+
activeTimeZone: zod_1.z.string(),
|
|
139
|
+
}),
|
|
140
|
+
}),
|
|
141
|
+
zod_1.z.object({
|
|
142
|
+
status: zod_1.z.literal('error'),
|
|
143
|
+
error: zod_1.z.object({
|
|
144
|
+
message: zod_1.z.string(),
|
|
145
|
+
}),
|
|
146
|
+
}),
|
|
147
|
+
]);
|
|
116
148
|
exports.audioSampleRatesResponseSchema = zod_1.z.object({
|
|
117
149
|
data: zod_1.z.object({
|
|
118
150
|
encoders: zod_1.z
|
|
@@ -123,3 +155,34 @@ exports.audioSampleRatesResponseSchema = zod_1.z.object({
|
|
|
123
155
|
.partial(),
|
|
124
156
|
}),
|
|
125
157
|
});
|
|
158
|
+
exports.portStatusSchema = zod_1.z.object({
|
|
159
|
+
port: zod_1.z.string(),
|
|
160
|
+
state: zod_1.z.enum(['open', 'closed']),
|
|
161
|
+
configurable: zod_1.z.boolean(),
|
|
162
|
+
readonly: zod_1.z.boolean().optional(),
|
|
163
|
+
usage: zod_1.z.string(),
|
|
164
|
+
direction: zod_1.z.enum(['input', 'output']),
|
|
165
|
+
name: zod_1.z.string(),
|
|
166
|
+
normalState: zod_1.z.enum(['open', 'closed']),
|
|
167
|
+
});
|
|
168
|
+
exports.getPortsResponseSchema = zod_1.z.object({
|
|
169
|
+
apiVersion: zod_1.z.string(),
|
|
170
|
+
context: zod_1.z.string(),
|
|
171
|
+
method: zod_1.z.literal('getPorts'),
|
|
172
|
+
data: zod_1.z.object({
|
|
173
|
+
numberOfPorts: zod_1.z.number(),
|
|
174
|
+
items: zod_1.z.array(exports.portStatusSchema),
|
|
175
|
+
}),
|
|
176
|
+
});
|
|
177
|
+
exports.portSetSchema = zod_1.z.object({
|
|
178
|
+
port: zod_1.z.string(),
|
|
179
|
+
state: zod_1.z.enum(['open', 'closed']),
|
|
180
|
+
usage: zod_1.z.string().optional(),
|
|
181
|
+
direction: zod_1.z.enum(['input', 'output']).optional(),
|
|
182
|
+
name: zod_1.z.string().optional(),
|
|
183
|
+
normalState: zod_1.z.enum(['open', 'closed']).optional(),
|
|
184
|
+
});
|
|
185
|
+
exports.portSequenceStateSchema = zod_1.z.object({
|
|
186
|
+
state: zod_1.z.enum(['open', 'closed']),
|
|
187
|
+
time: zod_1.z.number().min(0).max(65535),
|
|
188
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type TVapixEventMessage = {
|
|
2
|
+
apiVersion: string;
|
|
3
|
+
method: string;
|
|
4
|
+
params: {
|
|
5
|
+
notification: {
|
|
6
|
+
timestamp: number;
|
|
7
|
+
topic: string;
|
|
8
|
+
message: {
|
|
9
|
+
source: Record<string, string>;
|
|
10
|
+
data: Record<string, string>;
|
|
11
|
+
key: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
package/cjs/types/common.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const booleanSchema: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
2
3
|
export declare const audioChannelSchema: z.ZodUnion<[z.ZodLiteral<"mono">, z.ZodLiteral<"stereo">]>;
|
|
3
4
|
export type TAudioChannel = z.infer<typeof audioChannelSchema>;
|
|
4
5
|
export declare const audioChannelCountSchema: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
5
6
|
export type TAudioChannelCount = z.infer<typeof audioChannelCountSchema>;
|
|
6
7
|
export declare const h264ProfileSchema: z.ZodUnion<[z.ZodLiteral<"high">, z.ZodLiteral<"main">, z.ZodLiteral<"baseline">]>;
|
|
7
8
|
export type TH264Profile = z.infer<typeof h264ProfileSchema>;
|
|
9
|
+
export declare const flashStorageTypeSchema: z.ZodLiteral<"FLASH">;
|
|
10
|
+
export declare const sdCardStorageTypeSchema: z.ZodLiteral<"SD_DISK">;
|
|
8
11
|
export declare const storageTypeSchema: z.ZodUnion<[z.ZodLiteral<"SD_DISK">, z.ZodLiteral<"FLASH">]>;
|
|
9
12
|
export type TStorageType = z.infer<typeof storageTypeSchema>;
|
|
10
13
|
export declare const networkCameraListSchema: z.ZodArray<z.ZodObject<{
|
|
@@ -17,21 +20,58 @@ export declare const networkCameraListSchema: z.ZodArray<z.ZodObject<{
|
|
|
17
20
|
name: string;
|
|
18
21
|
ip: string;
|
|
19
22
|
}>, "many">;
|
|
23
|
+
export type TNetworkCameraList = z.infer<typeof networkCameraListSchema>;
|
|
20
24
|
export type TNetworkCamera = z.infer<typeof networkCameraListSchema>[number];
|
|
21
25
|
export declare const keyboardShortcutSchema: z.ZodNullable<z.ZodString>;
|
|
22
26
|
export declare const keyboardShortcutsSchema: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
|
|
23
27
|
export type TKeyboardShortcut = z.infer<typeof keyboardShortcutSchema>;
|
|
24
28
|
export type TKeyboardShortcuts = z.infer<typeof keyboardShortcutsSchema>;
|
|
25
|
-
export type
|
|
29
|
+
export type TProxyTarget = {
|
|
26
30
|
ip: string;
|
|
27
31
|
mdnsName: string;
|
|
28
32
|
port: number;
|
|
29
33
|
user: string;
|
|
30
34
|
pass: string;
|
|
31
|
-
}
|
|
35
|
+
};
|
|
36
|
+
export type TProxyParams = {
|
|
37
|
+
path: string;
|
|
38
|
+
target: TProxyTarget;
|
|
39
|
+
};
|
|
40
|
+
export type THttpRequestOptions = {
|
|
41
|
+
timeout?: number;
|
|
42
|
+
proxyParams?: TProxyParams;
|
|
43
|
+
};
|
|
32
44
|
export type TCameraImageConfig = {
|
|
33
45
|
camera?: string;
|
|
34
46
|
resolution?: string;
|
|
35
47
|
compression?: number;
|
|
36
|
-
overlays?:
|
|
48
|
+
overlays?: string;
|
|
49
|
+
[key: string]: string | number | undefined;
|
|
50
|
+
};
|
|
51
|
+
export declare const bitrateModeSchema: z.ZodUnion<[z.ZodLiteral<"VBR">, z.ZodLiteral<"MBR">, z.ZodLiteral<"ABR">]>;
|
|
52
|
+
export type TBitrateMode = z.infer<typeof bitrateModeSchema>;
|
|
53
|
+
export declare const bitrateVapixParamsSchema: z.ZodObject<{
|
|
54
|
+
bitrateMode: z.ZodUnion<[z.ZodLiteral<"VBR">, z.ZodLiteral<"MBR">, z.ZodLiteral<"ABR">]>;
|
|
55
|
+
maximumBitRate: z.ZodNumber;
|
|
56
|
+
retentionTime: z.ZodNumber;
|
|
57
|
+
bitRateLimit: z.ZodNumber;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
bitrateMode: "VBR" | "MBR" | "ABR";
|
|
60
|
+
maximumBitRate: number;
|
|
61
|
+
retentionTime: number;
|
|
62
|
+
bitRateLimit: number;
|
|
63
|
+
}, {
|
|
64
|
+
bitrateMode: "VBR" | "MBR" | "ABR";
|
|
65
|
+
maximumBitRate: number;
|
|
66
|
+
retentionTime: number;
|
|
67
|
+
bitRateLimit: number;
|
|
68
|
+
}>;
|
|
69
|
+
export type TBitrateVapixParams = z.infer<typeof bitrateVapixParamsSchema>;
|
|
70
|
+
export type FileLike = typeof File extends {
|
|
71
|
+
prototype: infer T;
|
|
72
|
+
} ? T : {
|
|
73
|
+
name: string;
|
|
74
|
+
size: number;
|
|
75
|
+
type: string;
|
|
37
76
|
};
|
|
77
|
+
export declare const fileSchema: z.ZodType<File, z.ZodTypeDef, File>;
|
package/cjs/types/common.js
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keyboardShortcutsSchema = exports.keyboardShortcutSchema = exports.networkCameraListSchema = exports.storageTypeSchema = exports.h264ProfileSchema = exports.audioChannelCountSchema = exports.audioChannelSchema = void 0;
|
|
3
|
+
exports.fileSchema = exports.bitrateVapixParamsSchema = exports.bitrateModeSchema = exports.keyboardShortcutsSchema = exports.keyboardShortcutSchema = exports.networkCameraListSchema = exports.storageTypeSchema = exports.sdCardStorageTypeSchema = exports.flashStorageTypeSchema = exports.h264ProfileSchema = exports.audioChannelCountSchema = exports.audioChannelSchema = exports.booleanSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
exports.booleanSchema = zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]);
|
|
5
6
|
exports.audioChannelSchema = zod_1.z.union([zod_1.z.literal('mono'), zod_1.z.literal('stereo')]);
|
|
6
7
|
exports.audioChannelCountSchema = zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2)]);
|
|
7
8
|
exports.h264ProfileSchema = zod_1.z.union([zod_1.z.literal('high'), zod_1.z.literal('main'), zod_1.z.literal('baseline')]);
|
|
8
|
-
exports.
|
|
9
|
+
exports.flashStorageTypeSchema = zod_1.z.literal('FLASH');
|
|
10
|
+
exports.sdCardStorageTypeSchema = zod_1.z.literal('SD_DISK');
|
|
11
|
+
exports.storageTypeSchema = zod_1.z.union([exports.sdCardStorageTypeSchema, exports.flashStorageTypeSchema]);
|
|
9
12
|
exports.networkCameraListSchema = zod_1.z.array(zod_1.z.object({
|
|
10
13
|
name: zod_1.z.string(),
|
|
11
14
|
ip: zod_1.z.string(),
|
|
12
15
|
}));
|
|
13
16
|
exports.keyboardShortcutSchema = zod_1.z.string().nullable();
|
|
14
17
|
exports.keyboardShortcutsSchema = zod_1.z.record(exports.keyboardShortcutSchema);
|
|
18
|
+
exports.bitrateModeSchema = zod_1.z.union([zod_1.z.literal('VBR'), zod_1.z.literal('MBR'), zod_1.z.literal('ABR')]);
|
|
19
|
+
exports.bitrateVapixParamsSchema = zod_1.z.object({
|
|
20
|
+
bitrateMode: exports.bitrateModeSchema,
|
|
21
|
+
maximumBitRate: zod_1.z.number(),
|
|
22
|
+
retentionTime: zod_1.z.number(),
|
|
23
|
+
bitRateLimit: zod_1.z.number(),
|
|
24
|
+
});
|
|
25
|
+
exports.fileSchema = typeof File !== 'undefined'
|
|
26
|
+
? zod_1.z.instanceof(File)
|
|
27
|
+
: zod_1.z.custom((val) => {
|
|
28
|
+
return val !== null && typeof val === 'object' && 'name' in val && 'size' in val && 'type' in val;
|
|
29
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const coEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"init">;
|
|
4
|
+
data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"authorization">;
|
|
6
|
+
state: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
type: "authorization";
|
|
9
|
+
state: string;
|
|
10
|
+
}, {
|
|
11
|
+
type: "authorization";
|
|
12
|
+
state: string;
|
|
13
|
+
}>, z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"ServiceStart">;
|
|
15
|
+
serviceId: z.ZodNumber;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
type: "ServiceStart";
|
|
18
|
+
serviceId: number;
|
|
19
|
+
}, {
|
|
20
|
+
type: "ServiceStart";
|
|
21
|
+
serviceId: number;
|
|
22
|
+
}>, z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"ServiceStop">;
|
|
24
|
+
serviceId: z.ZodNumber;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: "ServiceStop";
|
|
27
|
+
serviceId: number;
|
|
28
|
+
}, {
|
|
29
|
+
type: "ServiceStop";
|
|
30
|
+
serviceId: number;
|
|
31
|
+
}>]>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
type: "init";
|
|
34
|
+
data: {
|
|
35
|
+
type: "authorization";
|
|
36
|
+
state: string;
|
|
37
|
+
} | {
|
|
38
|
+
type: "ServiceStart";
|
|
39
|
+
serviceId: number;
|
|
40
|
+
} | {
|
|
41
|
+
type: "ServiceStop";
|
|
42
|
+
serviceId: number;
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
type: "init";
|
|
46
|
+
data: {
|
|
47
|
+
type: "authorization";
|
|
48
|
+
state: string;
|
|
49
|
+
} | {
|
|
50
|
+
type: "ServiceStart";
|
|
51
|
+
serviceId: number;
|
|
52
|
+
} | {
|
|
53
|
+
type: "ServiceStop";
|
|
54
|
+
serviceId: number;
|
|
55
|
+
};
|
|
56
|
+
}>, z.ZodObject<{
|
|
57
|
+
type: z.ZodLiteral<"authorization">;
|
|
58
|
+
state: z.ZodString;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
type: "authorization";
|
|
61
|
+
state: string;
|
|
62
|
+
}, {
|
|
63
|
+
type: "authorization";
|
|
64
|
+
state: string;
|
|
65
|
+
}>, z.ZodObject<{
|
|
66
|
+
type: z.ZodLiteral<"ServiceStart">;
|
|
67
|
+
serviceId: z.ZodNumber;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
type: "ServiceStart";
|
|
70
|
+
serviceId: number;
|
|
71
|
+
}, {
|
|
72
|
+
type: "ServiceStart";
|
|
73
|
+
serviceId: number;
|
|
74
|
+
}>, z.ZodObject<{
|
|
75
|
+
type: z.ZodLiteral<"ServiceStop">;
|
|
76
|
+
serviceId: z.ZodNumber;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
type: "ServiceStop";
|
|
79
|
+
serviceId: number;
|
|
80
|
+
}, {
|
|
81
|
+
type: "ServiceStop";
|
|
82
|
+
serviceId: number;
|
|
83
|
+
}>]>;
|
|
84
|
+
export type TCamOverlayEvent = z.infer<typeof coEventsSchema>;
|
|
85
|
+
export type TCamOverlayEventType = TCamOverlayEvent['type'];
|
|
86
|
+
export type TCamOverlayEventOfType<T extends TCamOverlayEventType> = Extract<TCamOverlayEvent, {
|
|
87
|
+
type: T;
|
|
88
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.coEventsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const coEventsDataSchema = zod_1.z.discriminatedUnion('type', [
|
|
6
|
+
zod_1.z.object({ type: zod_1.z.literal('authorization'), state: zod_1.z.string() }),
|
|
7
|
+
zod_1.z.object({
|
|
8
|
+
type: zod_1.z.literal('ServiceStart'),
|
|
9
|
+
serviceId: zod_1.z.number(),
|
|
10
|
+
}),
|
|
11
|
+
zod_1.z.object({
|
|
12
|
+
type: zod_1.z.literal('ServiceStop'),
|
|
13
|
+
serviceId: zod_1.z.number(),
|
|
14
|
+
}),
|
|
15
|
+
]);
|
|
16
|
+
exports.coEventsSchema = zod_1.z.discriminatedUnion('type', [
|
|
17
|
+
zod_1.z.object({ type: zod_1.z.literal('init'), data: coEventsDataSchema }),
|
|
18
|
+
...coEventsDataSchema.options,
|
|
19
|
+
]);
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const csEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"authorization">;
|
|
4
|
+
state: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
type: "authorization";
|
|
7
|
+
state: string;
|
|
8
|
+
}, {
|
|
9
|
+
type: "authorization";
|
|
10
|
+
state: string;
|
|
11
|
+
}>, z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"StreamState">;
|
|
13
|
+
streamId: z.ZodString;
|
|
14
|
+
isStreaming: z.ZodBoolean;
|
|
15
|
+
active: z.ZodBoolean;
|
|
16
|
+
enabled: z.ZodBoolean;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
type: "StreamState";
|
|
19
|
+
streamId: string;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
active: boolean;
|
|
22
|
+
isStreaming: boolean;
|
|
23
|
+
}, {
|
|
24
|
+
type: "StreamState";
|
|
25
|
+
streamId: string;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
active: boolean;
|
|
28
|
+
isStreaming: boolean;
|
|
29
|
+
}>, z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"CS_API_SUCCESS">;
|
|
31
|
+
apiCall: z.ZodString;
|
|
32
|
+
message: z.ZodString;
|
|
33
|
+
streamId: z.ZodString;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
message: string;
|
|
36
|
+
type: "CS_API_SUCCESS";
|
|
37
|
+
streamId: string;
|
|
38
|
+
apiCall: string;
|
|
39
|
+
}, {
|
|
40
|
+
message: string;
|
|
41
|
+
type: "CS_API_SUCCESS";
|
|
42
|
+
streamId: string;
|
|
43
|
+
apiCall: string;
|
|
44
|
+
}>, z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<"CS_API_ERROR">;
|
|
46
|
+
apiCall: z.ZodString;
|
|
47
|
+
message: z.ZodString;
|
|
48
|
+
streamId: z.ZodString;
|
|
49
|
+
code: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
code: string;
|
|
52
|
+
message: string;
|
|
53
|
+
type: "CS_API_ERROR";
|
|
54
|
+
streamId: string;
|
|
55
|
+
apiCall: string;
|
|
56
|
+
}, {
|
|
57
|
+
code: string;
|
|
58
|
+
message: string;
|
|
59
|
+
type: "CS_API_ERROR";
|
|
60
|
+
streamId: string;
|
|
61
|
+
apiCall: string;
|
|
62
|
+
}>, z.ZodObject<{
|
|
63
|
+
type: z.ZodLiteral<"PortChanged">;
|
|
64
|
+
port: z.ZodNumber;
|
|
65
|
+
value: z.ZodBoolean;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
value: boolean;
|
|
68
|
+
type: "PortChanged";
|
|
69
|
+
port: number;
|
|
70
|
+
}, {
|
|
71
|
+
value: boolean;
|
|
72
|
+
type: "PortChanged";
|
|
73
|
+
port: number;
|
|
74
|
+
}>]>;
|
|
75
|
+
export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
76
|
+
type: z.ZodLiteral<"init">;
|
|
77
|
+
data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
78
|
+
type: z.ZodLiteral<"authorization">;
|
|
79
|
+
state: z.ZodString;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
type: "authorization";
|
|
82
|
+
state: string;
|
|
83
|
+
}, {
|
|
84
|
+
type: "authorization";
|
|
85
|
+
state: string;
|
|
86
|
+
}>, z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"StreamState">;
|
|
88
|
+
streamId: z.ZodString;
|
|
89
|
+
isStreaming: z.ZodBoolean;
|
|
90
|
+
active: z.ZodBoolean;
|
|
91
|
+
enabled: z.ZodBoolean;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
type: "StreamState";
|
|
94
|
+
streamId: string;
|
|
95
|
+
enabled: boolean;
|
|
96
|
+
active: boolean;
|
|
97
|
+
isStreaming: boolean;
|
|
98
|
+
}, {
|
|
99
|
+
type: "StreamState";
|
|
100
|
+
streamId: string;
|
|
101
|
+
enabled: boolean;
|
|
102
|
+
active: boolean;
|
|
103
|
+
isStreaming: boolean;
|
|
104
|
+
}>, z.ZodObject<{
|
|
105
|
+
type: z.ZodLiteral<"CS_API_SUCCESS">;
|
|
106
|
+
apiCall: z.ZodString;
|
|
107
|
+
message: z.ZodString;
|
|
108
|
+
streamId: z.ZodString;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
message: string;
|
|
111
|
+
type: "CS_API_SUCCESS";
|
|
112
|
+
streamId: string;
|
|
113
|
+
apiCall: string;
|
|
114
|
+
}, {
|
|
115
|
+
message: string;
|
|
116
|
+
type: "CS_API_SUCCESS";
|
|
117
|
+
streamId: string;
|
|
118
|
+
apiCall: string;
|
|
119
|
+
}>, z.ZodObject<{
|
|
120
|
+
type: z.ZodLiteral<"CS_API_ERROR">;
|
|
121
|
+
apiCall: z.ZodString;
|
|
122
|
+
message: z.ZodString;
|
|
123
|
+
streamId: z.ZodString;
|
|
124
|
+
code: z.ZodString;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
code: string;
|
|
127
|
+
message: string;
|
|
128
|
+
type: "CS_API_ERROR";
|
|
129
|
+
streamId: string;
|
|
130
|
+
apiCall: string;
|
|
131
|
+
}, {
|
|
132
|
+
code: string;
|
|
133
|
+
message: string;
|
|
134
|
+
type: "CS_API_ERROR";
|
|
135
|
+
streamId: string;
|
|
136
|
+
apiCall: string;
|
|
137
|
+
}>, z.ZodObject<{
|
|
138
|
+
type: z.ZodLiteral<"PortChanged">;
|
|
139
|
+
port: z.ZodNumber;
|
|
140
|
+
value: z.ZodBoolean;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
value: boolean;
|
|
143
|
+
type: "PortChanged";
|
|
144
|
+
port: number;
|
|
145
|
+
}, {
|
|
146
|
+
value: boolean;
|
|
147
|
+
type: "PortChanged";
|
|
148
|
+
port: number;
|
|
149
|
+
}>]>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
type: "init";
|
|
152
|
+
data: {
|
|
153
|
+
type: "authorization";
|
|
154
|
+
state: string;
|
|
155
|
+
} | {
|
|
156
|
+
type: "StreamState";
|
|
157
|
+
streamId: string;
|
|
158
|
+
enabled: boolean;
|
|
159
|
+
active: boolean;
|
|
160
|
+
isStreaming: boolean;
|
|
161
|
+
} | {
|
|
162
|
+
message: string;
|
|
163
|
+
type: "CS_API_SUCCESS";
|
|
164
|
+
streamId: string;
|
|
165
|
+
apiCall: string;
|
|
166
|
+
} | {
|
|
167
|
+
code: string;
|
|
168
|
+
message: string;
|
|
169
|
+
type: "CS_API_ERROR";
|
|
170
|
+
streamId: string;
|
|
171
|
+
apiCall: string;
|
|
172
|
+
} | {
|
|
173
|
+
value: boolean;
|
|
174
|
+
type: "PortChanged";
|
|
175
|
+
port: number;
|
|
176
|
+
};
|
|
177
|
+
}, {
|
|
178
|
+
type: "init";
|
|
179
|
+
data: {
|
|
180
|
+
type: "authorization";
|
|
181
|
+
state: string;
|
|
182
|
+
} | {
|
|
183
|
+
type: "StreamState";
|
|
184
|
+
streamId: string;
|
|
185
|
+
enabled: boolean;
|
|
186
|
+
active: boolean;
|
|
187
|
+
isStreaming: boolean;
|
|
188
|
+
} | {
|
|
189
|
+
message: string;
|
|
190
|
+
type: "CS_API_SUCCESS";
|
|
191
|
+
streamId: string;
|
|
192
|
+
apiCall: string;
|
|
193
|
+
} | {
|
|
194
|
+
code: string;
|
|
195
|
+
message: string;
|
|
196
|
+
type: "CS_API_ERROR";
|
|
197
|
+
streamId: string;
|
|
198
|
+
apiCall: string;
|
|
199
|
+
} | {
|
|
200
|
+
value: boolean;
|
|
201
|
+
type: "PortChanged";
|
|
202
|
+
port: number;
|
|
203
|
+
};
|
|
204
|
+
}>, z.ZodObject<{
|
|
205
|
+
type: z.ZodLiteral<"authorization">;
|
|
206
|
+
state: z.ZodString;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
type: "authorization";
|
|
209
|
+
state: string;
|
|
210
|
+
}, {
|
|
211
|
+
type: "authorization";
|
|
212
|
+
state: string;
|
|
213
|
+
}>, z.ZodObject<{
|
|
214
|
+
type: z.ZodLiteral<"StreamState">;
|
|
215
|
+
streamId: z.ZodString;
|
|
216
|
+
isStreaming: z.ZodBoolean;
|
|
217
|
+
active: z.ZodBoolean;
|
|
218
|
+
enabled: z.ZodBoolean;
|
|
219
|
+
}, "strip", z.ZodTypeAny, {
|
|
220
|
+
type: "StreamState";
|
|
221
|
+
streamId: string;
|
|
222
|
+
enabled: boolean;
|
|
223
|
+
active: boolean;
|
|
224
|
+
isStreaming: boolean;
|
|
225
|
+
}, {
|
|
226
|
+
type: "StreamState";
|
|
227
|
+
streamId: string;
|
|
228
|
+
enabled: boolean;
|
|
229
|
+
active: boolean;
|
|
230
|
+
isStreaming: boolean;
|
|
231
|
+
}>, z.ZodObject<{
|
|
232
|
+
type: z.ZodLiteral<"CS_API_SUCCESS">;
|
|
233
|
+
apiCall: z.ZodString;
|
|
234
|
+
message: z.ZodString;
|
|
235
|
+
streamId: z.ZodString;
|
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
|
237
|
+
message: string;
|
|
238
|
+
type: "CS_API_SUCCESS";
|
|
239
|
+
streamId: string;
|
|
240
|
+
apiCall: string;
|
|
241
|
+
}, {
|
|
242
|
+
message: string;
|
|
243
|
+
type: "CS_API_SUCCESS";
|
|
244
|
+
streamId: string;
|
|
245
|
+
apiCall: string;
|
|
246
|
+
}>, z.ZodObject<{
|
|
247
|
+
type: z.ZodLiteral<"CS_API_ERROR">;
|
|
248
|
+
apiCall: z.ZodString;
|
|
249
|
+
message: z.ZodString;
|
|
250
|
+
streamId: z.ZodString;
|
|
251
|
+
code: z.ZodString;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
code: string;
|
|
254
|
+
message: string;
|
|
255
|
+
type: "CS_API_ERROR";
|
|
256
|
+
streamId: string;
|
|
257
|
+
apiCall: string;
|
|
258
|
+
}, {
|
|
259
|
+
code: string;
|
|
260
|
+
message: string;
|
|
261
|
+
type: "CS_API_ERROR";
|
|
262
|
+
streamId: string;
|
|
263
|
+
apiCall: string;
|
|
264
|
+
}>, z.ZodObject<{
|
|
265
|
+
type: z.ZodLiteral<"PortChanged">;
|
|
266
|
+
port: z.ZodNumber;
|
|
267
|
+
value: z.ZodBoolean;
|
|
268
|
+
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
value: boolean;
|
|
270
|
+
type: "PortChanged";
|
|
271
|
+
port: number;
|
|
272
|
+
}, {
|
|
273
|
+
value: boolean;
|
|
274
|
+
type: "PortChanged";
|
|
275
|
+
port: number;
|
|
276
|
+
}>]>;
|
|
277
|
+
export type TCamStreamerEvent = z.infer<typeof csEventsDataSchema>;
|
|
278
|
+
export type TCamStreamerEventType = TCamStreamerEvent['type'];
|
|
279
|
+
export type TCamStreamerEventOfType<T extends TCamStreamerEventType> = Extract<TCamStreamerEvent, {
|
|
280
|
+
type: T;
|
|
281
|
+
}>;
|
|
282
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.csEventsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const csEventsDataSchema = zod_1.z.discriminatedUnion('type', [
|
|
6
|
+
zod_1.z.object({ type: zod_1.z.literal('authorization'), state: zod_1.z.string() }),
|
|
7
|
+
zod_1.z.object({
|
|
8
|
+
type: zod_1.z.literal('StreamState'),
|
|
9
|
+
streamId: zod_1.z.string(),
|
|
10
|
+
isStreaming: zod_1.z.boolean(),
|
|
11
|
+
active: zod_1.z.boolean(),
|
|
12
|
+
enabled: zod_1.z.boolean(),
|
|
13
|
+
}),
|
|
14
|
+
zod_1.z.object({
|
|
15
|
+
type: zod_1.z.literal('CS_API_SUCCESS'),
|
|
16
|
+
apiCall: zod_1.z.string(),
|
|
17
|
+
message: zod_1.z.string(),
|
|
18
|
+
streamId: zod_1.z.string(),
|
|
19
|
+
}),
|
|
20
|
+
zod_1.z.object({
|
|
21
|
+
type: zod_1.z.literal('CS_API_ERROR'),
|
|
22
|
+
apiCall: zod_1.z.string(),
|
|
23
|
+
message: zod_1.z.string(),
|
|
24
|
+
streamId: zod_1.z.string(),
|
|
25
|
+
code: zod_1.z.string(),
|
|
26
|
+
}),
|
|
27
|
+
zod_1.z.object({
|
|
28
|
+
type: zod_1.z.literal('PortChanged'),
|
|
29
|
+
port: zod_1.z.number(),
|
|
30
|
+
value: zod_1.z.boolean(),
|
|
31
|
+
}),
|
|
32
|
+
]);
|
|
33
|
+
exports.csEventsSchema = zod_1.z.discriminatedUnion('type', [
|
|
34
|
+
zod_1.z.object({ type: zod_1.z.literal('init'), data: csEventsDataSchema }),
|
|
35
|
+
...csEventsDataSchema.options,
|
|
36
|
+
]);
|