@camera.ui/server 0.0.50-internal.0 → 0.0.50-internal.2
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/dist/interface/index.html +44 -44
- package/dist/interface/js/{@primevue.OhxoO3MD.0.0.50-internal.0.js → @primevue.BAIU_p3r.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@tanstack.D1IL6eOv.0.0.50-internal.0.js → @tanstack.mdCorqzE.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@vee-validate.BGPyWWTh.0.0.50-internal.0.js → @vee-validate.D0vsSsly.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@vueuse.BsKtqdiG.0.0.50-internal.0.js → @vueuse.we5ZpWr2.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Adminpanel.D93Kvbwp.0.0.50-internal.0.js → Adminpanel.9AEBJ3H1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Camera.DF2l3OMA.0.0.50-internal.0.js → Camera.CZcnEH0C.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Cameras.YzvZccdv.0.0.50-internal.0.js → Cameras.DE0LkcGu.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/Cammesh.CVvmkelB.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{Camview.CB7_HnoQ.0.0.50-internal.0.js → Camview.CUr4pGoU.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Config.BwflsWTm.0.0.50-internal.0.js → Config.CaJhu4fF.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/{Console.DZM8pN8Q.0.0.50-internal.0.js → Console.5VUmgryj.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiConsole.BXXU7Gth.0.0.50-internal.0.js → CuiConsole.iYmUxAR5.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiPluginCard.YFOrpbVD.0.0.50-internal.0.js → CuiPluginCard.DXPyE5mF.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiTimeline.VV5KSJd5.0.0.50-internal.0.js → CuiTimeline.BqtlOFnV.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{FirstSteps.b-nvymgb.0.0.50-internal.0.js → FirstSteps.C_RI-SDQ.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Plugin.BOMpVEwM.0.0.50-internal.0.js → Plugin.Ch_v02eN.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Plugins.DdPwaUDA.0.0.50-internal.0.js → Plugins.BpXAYgSG.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/Recordings.CIKHJytH.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{Settings.D24ttaPu.0.0.50-internal.0.js → Settings.BcLoGNEy.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsAccount.ms3aqz4E.0.0.50-internal.0.js → SettingsAccount.DMROW8kx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/SettingsAppearance.CUaHpihp.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{SettingsAppearance.vue_vue_type_script_setup_true_lang.CBQ6lL3T.0.0.50-internal.0.js → SettingsAppearance.vue_vue_type_script_setup_true_lang.BuKZ-Uco.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsBackup.BPEc4Rjg.0.0.50-internal.0.js → SettingsBackup.0QdwFSpv.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/SettingsRecordings.B-aj0U8_.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{SettingsRemote.BL5nXbUT.0.0.50-internal.0.js → SettingsRemote.Bi1YAJ76.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsSystem.D7T0AIpm.0.0.50-internal.0.js → SettingsSystem.CAx66Iir.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsUsers.1u0vCOVG.0.0.50-internal.0.js → SettingsUsers.CQcDtGy1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{VersionsHandler.vue_vue_type_script_setup_true_lang.xDishkkS.0.0.50-internal.0.js → VersionsHandler.vue_vue_type_script_setup_true_lang.BhXMzIhV.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{ace-builds.D1nmvCwb.0.0.50-internal.0.js → ace-builds.C0sCXSu5.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/{ace.config.G96T2z54.0.0.50-internal.0.js → ace.config.DNqPWa0Q.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{backup.B_Gzxtp_.0.0.50-internal.0.js → backup.DAXgG3bP.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{chart.js.CP_nMnnf.0.0.50-internal.0.js → chart.js.Bq3YocRX.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{close-circle.DYLuVIOg.0.0.50-internal.0.js → close-circle.9rxyNw0z.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{dnd-core.T9OeW7mu.0.0.50-internal.0.js → dnd-core.BuEvHAsS.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{draggabilly.D3zGcBb3.0.0.50-internal.0.js → draggabilly.DUdE08x8.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{engine.io-client.kITRnq-g.0.0.50-internal.0.js → engine.io-client.DWU6YI8o.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{fast-deep-equal.Bpc9mIsj.0.0.50-internal.0.js → fast-deep-equal.BpPyC6E4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{highlight.js.BlSXU-Wb.0.0.50-internal.0.js → highlight.js.BoR2Rhdd.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{linkify-it.C3N1lWsJ.0.0.50-internal.0.js → linkify-it.BXzPONHs.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{main.D0YR3Jat.0.0.50-internal.0.js → main.DwcBYfWc.0.0.50-internal.2.js} +3 -3
- package/dist/interface/js/{markdown-it.Dj0dt5s2.0.0.50-internal.0.js → markdown-it.BUDVOjPt.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{nprogress.BwQWDcGj.0.0.50-internal.0.js → nprogress.CsG-OBoI.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{pinia.DRh7plEC.0.0.50-internal.0.js → pinia.CqEQao5R.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{primevue.Cl58krXf.0.0.50-internal.0.js → primevue.D91sslRx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{qrcode.C1sDj6P8.0.0.50-internal.0.js → qrcode.SdSTPzZO.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{react-dnd-touch-backend.BA4WhUJo.0.0.50-internal.0.js → react-dnd-touch-backend.BwroebQ4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{refresh-rounded.D_SmhhUf.0.0.50-internal.0.js → refresh-rounded.DxM48YSv.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{rxjs.C-fTBwEO.0.0.50-internal.0.js → rxjs.Cmpbnzo4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{socket.io-client.DKrRxgjP.0.0.50-internal.0.js → socket.io-client.DF2YgZo1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{socket.io-parser.EXj3YDH2.0.0.50-internal.0.js → socket.io-parser.BUs2ineY.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{system.CY8rGd-Q.0.0.50-internal.0.js → system.DmkT2LKx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{trash-fill.CMnCN3Oy.0.0.50-internal.0.js → trash-fill.dPzyZDVa.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{unidragger.D0w6Tqtt.0.0.50-internal.0.js → unidragger.y2ZlFveS.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vee-validate.BeiObIH8.0.0.50-internal.0.js → vee-validate.Y-alCADW.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-chartjs.DtdZdiYw.0.0.50-internal.0.js → vue-chartjs.sRVFTqDf.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-i18n.BW2bx_6z.0.0.50-internal.0.js → vue-i18n.D5WrXOZa.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-inline-svg.BJkQGmKz.0.0.50-internal.0.js → vue-inline-svg.R0uz_abA.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-router.B2mOXHaC.0.0.50-internal.0.js → vue-router.65mnGy-o.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-zoomable.BKDyCJE7.0.0.50-internal.0.js → vue-zoomable.B1Qop6Uu.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue3-dnd.DRK24CBp.0.0.50-internal.0.js → vue3-dnd.CwmyAcir.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{zoom-out.DxvzgVEo.0.0.50-internal.0.js → zoom-out.CMPALvRh.0.0.50-internal.2.js} +1 -1
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +1 -1
- package/dist/server/src/rpc/server.js +4 -1
- package/dist/server/src/rpc/server.js.map +1 -1
- package/package.json +1 -1
- package/.prettierignore +0 -12
- package/.prettierrc.json +0 -12
- package/artillery.yaml +0 -29
- package/bin/cameraui-server.ts +0 -11
- package/dist/interface/js/Cammesh.D-6dAROQ.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/Recordings.DhxjIW7e.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsAppearance.DsTjKXk1.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsRecordings.DgW7M0jj.0.0.50-internal.0.js +0 -1
- package/eslint.config.js +0 -103
- package/localdeps.txt +0 -10
- package/mypy.ini +0 -30
- package/requirements.txt +0 -15
- package/ruff.toml +0 -90
- package/src/__init__.py +0 -0
- package/src/_camera_ui_tools/__init__.py +0 -0
- package/src/_camera_ui_tools/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/api/controllers/api.controller.ts +0 -19
- package/src/api/controllers/auth.controller.ts +0 -294
- package/src/api/controllers/backup.controller.ts +0 -72
- package/src/api/controllers/cameras.controller.ts +0 -1029
- package/src/api/controllers/config.controller.ts +0 -102
- package/src/api/controllers/files.controller.ts +0 -35
- package/src/api/controllers/frameWorkers.controller.ts +0 -109
- package/src/api/controllers/plugins.controller.ts +0 -1206
- package/src/api/controllers/system.controller.ts +0 -273
- package/src/api/controllers/users.controller.ts +0 -648
- package/src/api/database/checks.ts +0 -268
- package/src/api/database/constants.ts +0 -8
- package/src/api/database/index.ts +0 -262
- package/src/api/database/migration.ts +0 -62
- package/src/api/database/selfcheck.ts +0 -492
- package/src/api/database/types.ts +0 -104
- package/src/api/go2rtc/api/application.ts +0 -48
- package/src/api/go2rtc/api/config.ts +0 -61
- package/src/api/go2rtc/api/discover.ts +0 -197
- package/src/api/go2rtc/api/index.ts +0 -49
- package/src/api/go2rtc/api/snapshot.ts +0 -44
- package/src/api/go2rtc/api/streams.ts +0 -168
- package/src/api/go2rtc/index.ts +0 -43
- package/src/api/go2rtc/queue.ts +0 -50
- package/src/api/go2rtc/types.ts +0 -174
- package/src/api/index.ts +0 -286
- package/src/api/middlewares/authPermission.middleware.ts +0 -46
- package/src/api/middlewares/authValidation.middleware.ts +0 -160
- package/src/api/middlewares/pagination.middleware.ts +0 -67
- package/src/api/middlewares/socketAuth.middleware.ts +0 -136
- package/src/api/plugins/header.plugin.ts +0 -15
- package/src/api/plugins/logger.plugin.ts +0 -44
- package/src/api/plugins/proxy.plugin.ts +0 -255
- package/src/api/plugins/socket.plugin.ts +0 -28
- package/src/api/plugins/system.plugin.ts +0 -48
- package/src/api/plugins/useragent.plugin.ts +0 -19
- package/src/api/routes/api.routes.ts +0 -10
- package/src/api/routes/auth.routes.ts +0 -56
- package/src/api/routes/backup.routes.ts +0 -28
- package/src/api/routes/cameras.routes.ts +0 -281
- package/src/api/routes/config.routes.ts +0 -66
- package/src/api/routes/files.routes.ts +0 -15
- package/src/api/routes/frameWorkers.routes.ts +0 -39
- package/src/api/routes/index.ts +0 -37
- package/src/api/routes/plugins.routes.ts +0 -420
- package/src/api/routes/system.routes.ts +0 -101
- package/src/api/routes/users.routes.ts +0 -167
- package/src/api/schemas/backup.schema.ts +0 -112
- package/src/api/schemas/cameras.schema.ts +0 -479
- package/src/api/schemas/config.schema.ts +0 -38
- package/src/api/schemas/go2rtc.schema.ts +0 -189
- package/src/api/schemas/plugins.schema.ts +0 -126
- package/src/api/schemas/storage.schema.ts +0 -11
- package/src/api/schemas/system.schema.ts +0 -45
- package/src/api/schemas/users.schema.ts +0 -185
- package/src/api/services/auth.service.ts +0 -210
- package/src/api/services/backup.service.ts +0 -144
- package/src/api/services/cameras.service.ts +0 -671
- package/src/api/services/plugins.service.ts +0 -470
- package/src/api/services/system.service.ts +0 -85
- package/src/api/services/users.service.ts +0 -276
- package/src/api/types/index.ts +0 -675
- package/src/api/utils/cert.ts +0 -254
- package/src/api/utils/constants.ts +0 -17
- package/src/api/utils/fetch.ts +0 -21
- package/src/api/utils/moveFiles.ts +0 -45
- package/src/api/utils/parse.ts +0 -17
- package/src/api/websocket/index.ts +0 -110
- package/src/api/websocket/nsp/logs.ts +0 -240
- package/src/api/websocket/nsp/main.ts +0 -27
- package/src/api/websocket/nsp/metrics.ts +0 -301
- package/src/api/websocket/nsp/notifications.ts +0 -43
- package/src/api/websocket/nsp/plugins.ts +0 -37
- package/src/api/websocket/nsp/server.ts +0 -220
- package/src/api/websocket/nsp/status.ts +0 -77
- package/src/api/websocket/types.ts +0 -55
- package/src/api.ts +0 -163
- package/src/camera/classes.ts +0 -32
- package/src/camera/controller.ts +0 -579
- package/src/camera/device.ts +0 -422
- package/src/camera/frameWorker.ts +0 -403
- package/src/camera/index.ts +0 -679
- package/src/camera/interfaces.ts +0 -95
- package/src/camera/iou.ts +0 -153
- package/src/camera/polygon.ts +0 -226
- package/src/camera/python/__init__.py +0 -0
- package/src/camera/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/classes.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/delegate_controller.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/interfaces.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou2.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/polygon.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/video_frame.cpython-311.pyc +0 -0
- package/src/camera/python/classes.py +0 -41
- package/src/camera/python/interfaces.py +0 -130
- package/src/camera/python/iou.py +0 -158
- package/src/camera/python/polygon.py +0 -230
- package/src/camera/python/test/__pycache__/polygon.cpython-310.pyc +0 -0
- package/src/camera/python/test/iou_test.py +0 -799
- package/src/camera/python/test/polygon.py +0 -238
- package/src/camera/python/test/polygon_test.py +0 -256
- package/src/camera/python/test/polygon_test2.py +0 -484
- package/src/camera/python/typings.py +0 -50
- package/src/camera/python/video_frame.py +0 -143
- package/src/camera/session.ts +0 -192
- package/src/camera/streaming/fmp4-session.ts +0 -390
- package/src/camera/streaming/peer-connection.ts +0 -273
- package/src/camera/streaming/rtsp-session.ts +0 -331
- package/src/camera/streaming/webrtc-connection.ts +0 -260
- package/src/camera/streaming/werift-session.ts +0 -317
- package/src/camera/test/iou_test.ts +0 -761
- package/src/camera/test/polygon.test.ts +0 -611
- package/src/camera/test/polygon_test.ts +0 -210
- package/src/camera/types.ts +0 -48
- package/src/camera/utils.ts +0 -489
- package/src/camera/videoFrame.ts +0 -123
- package/src/cloud/index.ts +0 -61
- package/src/cloud/remote/cloudflare.ts +0 -18
- package/src/cloud/remote/upnp.ts +0 -18
- package/src/cloud/remote/utils.ts +0 -24
- package/src/cloud/types.ts +0 -16
- package/src/decoder/child.ts +0 -883
- package/src/decoder/imageUtils.ts +0 -275
- package/src/decoder/manager.ts +0 -251
- package/src/decoder/python/__init__.py +0 -0
- package/src/decoder/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/image_utils.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/utils.cpython-311.pyc +0 -0
- package/src/decoder/python/child.py +0 -903
- package/src/decoder/python/image_utils.py +0 -196
- package/src/decoder/python/pool.py +0 -45
- package/src/decoder/python/test/group.py +0 -62
- package/src/decoder/python/test/motion.mp4 +0 -0
- package/src/decoder/python/test/motion2.mp4 +0 -0
- package/src/decoder/python/test/opencl.cl +0 -70
- package/src/decoder/python/test/opencl2.cl +0 -130
- package/src/decoder/python/test/test.py +0 -427
- package/src/decoder/python/test/test1.jpg +0 -0
- package/src/decoder/python/test/test1_resized.jpg +0 -0
- package/src/decoder/python/test/test2.jpg +0 -0
- package/src/decoder/python/test/test2.py +0 -451
- package/src/decoder/python/test/test2_resized.jpg +0 -0
- package/src/decoder/python/test/test3.jpg +0 -0
- package/src/decoder/python/test/utils.py +0 -50
- package/src/decoder/python/typings.py +0 -57
- package/src/decoder/python/utils.py +0 -70
- package/src/decoder/test/child.ts +0 -117
- package/src/decoder/test/ffmpeg.ts +0 -371
- package/src/decoder/test/test.ts +0 -182
- package/src/decoder/types.ts +0 -27
- package/src/decoder/utils.ts +0 -64
- package/src/decoder/wasm/asconfig.json +0 -28
- package/src/decoder/wasm/assembly/console.ts +0 -1
- package/src/decoder/wasm/assembly/index.ts +0 -890
- package/src/decoder/wasm/build/decoder.d.ts +0 -43
- package/src/decoder/wasm/build/decoder.js +0 -108
- package/src/decoder/wasm/build/decoder.wasm +0 -0
- package/src/decoder/wasm/tsconfig.json +0 -5
- package/src/decoder/worker.ts +0 -113
- package/src/go2rtc/index.ts +0 -324
- package/src/go2rtc/types.ts +0 -88
- package/src/main.ts +0 -267
- package/src/manager/coreManager.ts +0 -78
- package/src/manager/deviceManager.ts +0 -132
- package/src/manager/types.ts +0 -17
- package/src/plugins/index.ts +0 -443
- package/src/plugins/plugin.ts +0 -177
- package/src/plugins/runtime/base.ts +0 -282
- package/src/plugins/runtime/index.ts +0 -15
- package/src/plugins/runtime/node/child.ts +0 -193
- package/src/plugins/runtime/node/index.ts +0 -67
- package/src/plugins/runtime/node/plugin.ts +0 -122
- package/src/plugins/runtime/node/pluginApi.ts +0 -27
- package/src/plugins/runtime/node/proxy/cameraDevice.ts +0 -299
- package/src/plugins/runtime/node/proxy/coreManager.ts +0 -128
- package/src/plugins/runtime/node/proxy/deviceManager.ts +0 -187
- package/src/plugins/runtime/node/storage.ts +0 -312
- package/src/plugins/runtime/node/storageController.ts +0 -91
- package/src/plugins/runtime/python/__init__.py +0 -0
- package/src/plugins/runtime/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/camera_storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/config_service.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/ipc.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/namespaces.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_api.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/proxy_utils.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/schema.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage_controller.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/child.py +0 -248
- package/src/plugins/runtime/python/index.ts +0 -73
- package/src/plugins/runtime/python/namespaces.py +0 -101
- package/src/plugins/runtime/python/plugin.py +0 -155
- package/src/plugins/runtime/python/plugin_api.py +0 -29
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/core_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/camera_device.py +0 -1732
- package/src/plugins/runtime/python/proxy/core_manager.py +0 -126
- package/src/plugins/runtime/python/proxy/device_manager.py +0 -197
- package/src/plugins/runtime/python/schema.py +0 -99
- package/src/plugins/runtime/python/storage.py +0 -353
- package/src/plugins/runtime/python/storage_controller.py +0 -102
- package/src/plugins/runtime/python/typings.py +0 -195
- package/src/plugins/schema.ts +0 -472
- package/src/plugins/types.ts +0 -60
- package/src/plugins/worker.ts +0 -250
- package/src/rpc/index.ts +0 -149
- package/src/rpc/namespaces.ts +0 -79
- package/src/rpc/server.ts +0 -422
- package/src/rpc/types.ts +0 -119
- package/src/rpc/utils.ts +0 -16
- package/src/services/config/constants.ts +0 -47
- package/src/services/config/defaults.ts +0 -57
- package/src/services/config/index.ts +0 -744
- package/src/services/config/types.ts +0 -211
- package/src/services/logger/index.ts +0 -96
- package/src/types.ts +0 -47
- package/src/utils/path.ts +0 -16
- package/src/utils/pythonInstaller.ts +0 -597
- package/tsconfig.json +0 -37
- package/types/fastify.d.ts +0 -14
- package/updates.config.js +0 -3
- /package/dist/interface/assets/{@xterm.DYP7pi_n.0.0.50-internal.0.css → @xterm.DYP7pi_n.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Adminpanel.BKek2EMH.0.0.50-internal.0.css → Adminpanel.BKek2EMH.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Cameras.BDWZJqPN.0.0.50-internal.0.css → Cameras.BDWZJqPN.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Camview.BFUFMoNX.0.0.50-internal.0.css → Camview.BFUFMoNX.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiConsole.DCYyxdVg.0.0.50-internal.0.css → CuiConsole.DCYyxdVg.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiPluginCard.yF8V0SZY.0.0.50-internal.0.css → CuiPluginCard.yF8V0SZY.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiTimeline.BkIwlYtw.0.0.50-internal.0.css → CuiTimeline.BkIwlYtw.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Plugin.DJElsAn5.0.0.50-internal.0.css → Plugin.DJElsAn5.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Plugins.0h77qnmN.0.0.50-internal.0.css → Plugins.0h77qnmN.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Settings.CkgfRkQr.0.0.50-internal.0.css → Settings.CkgfRkQr.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{SettingsAccount.DeFul3eQ.0.0.50-internal.0.css → SettingsAccount.DeFul3eQ.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{SettingsBackup.CX0rT0QJ.0.0.50-internal.0.css → SettingsBackup.CX0rT0QJ.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{highlight.Ch2EwETz.0.0.50-internal.0.css → highlight.Ch2EwETz.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{logo-256.BCQk9H1-.0.0.50-internal.0.png → logo-256.BCQk9H1-.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{logo-512.DLKVOU2S.0.0.50-internal.0.png → logo-512.DLKVOU2S.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{logo.DmEiRk0z.0.0.50-internal.0.png → logo.DmEiRk0z.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{main.Cip9LkS3.0.0.50-internal.0.css → main.Cip9LkS3.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{mode-json.Br7xisR1.0.0.50-internal.0.js → mode-json.Br7xisR1.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{mode-yaml.CIYL8U3d.0.0.50-internal.0.js → mode-yaml.CIYL8U3d.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-base.jEXLGV2h.0.0.50-internal.0.js → worker-base.jEXLGV2h.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-json.DgwNIOck.0.0.50-internal.0.js → worker-json.DgwNIOck.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-yaml.B3uUYINB.0.0.50-internal.0.js → worker-yaml.B3uUYINB.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@babel.l0sNRNKZ.0.0.50-internal.0.js → @babel.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@intlify.BkGPX90O.0.0.50-internal.0.js → @intlify.BkGPX90O.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@kurkle.D8fDXNIl.0.0.50-internal.0.js → @kurkle.D8fDXNIl.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@primeuix.BFAY2Bk9.0.0.50-internal.0.js → @primeuix.BFAY2Bk9.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@react-dnd.CcwRs9xb.0.0.50-internal.0.js → @react-dnd.CcwRs9xb.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@socket.io.Dkula2eQ.0.0.50-internal.0.js → @socket.io.Dkula2eQ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@vue.B5vqhCp2.0.0.50-internal.0.js → @vue.B5vqhCp2.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@xterm.CAa7rpjv.0.0.50-internal.0.js → @xterm.C-5Lxnx_.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{axios.DHr9lByg.0.0.50-internal.0.js → axios.DHr9lByg.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{birpc.l0sNRNKZ.0.0.50-internal.0.js → birpc.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{compare-versions.DqEOhma6.0.0.50-internal.0.js → compare-versions.DqEOhma6.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{dijkstrajs.C00ieaqj.0.0.50-internal.0.js → dijkstrajs.C00ieaqj.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{engine.io-parser.BiEtp6m2.0.0.50-internal.0.js → engine.io-parser.BiEtp6m2.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{entities.C20TfXL6.0.0.50-internal.0.js → entities.C20TfXL6.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{ev-emitter.X5f1qa-c.0.0.50-internal.0.js → ev-emitter.X5f1qa-c.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{get-size.D1dS-IaP.0.0.50-internal.0.js → get-size.D1dS-IaP.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{hookable.l0sNRNKZ.0.0.50-internal.0.js → hookable.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{mdurl.k9Sl0PQj.0.0.50-internal.0.js → mdurl.k9Sl0PQj.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{perfect-debounce.l0sNRNKZ.0.0.50-internal.0.js → perfect-debounce.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{primelocale.Bga3dOQu.0.0.50-internal.0.js → primelocale.Bga3dOQu.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{punycode.js.Dj65hjkv.0.0.50-internal.0.js → punycode.js.Dj65hjkv.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.0.js → react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{redux.BFxtlG_c.0.0.50-internal.0.js → redux.BFxtlG_c.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{tslib.9k7AwCpt.0.0.50-internal.0.js → tslib.9k7AwCpt.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{uc.micro.kMc2yuuw.0.0.50-internal.0.js → uc.micro.kMc2yuuw.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{uuid.C6aID195.0.0.50-internal.0.js → uuid.C6aID195.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{vue.l0sNRNKZ.0.0.50-internal.0.js → vue.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{zod.SKKegNRO.0.0.50-internal.0.js → zod.SKKegNRO.0.0.50-internal.2.js} +0 -0
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import * as zod from 'zod';
|
|
2
|
-
|
|
3
|
-
import type { MultipartFile } from '@fastify/multipart';
|
|
4
|
-
|
|
5
|
-
export const ACCEPTED_BACKUP_TYPES = ['application/x-tar'];
|
|
6
|
-
export const MAX_BACKUP_FILE_SIZE = 1024 * 1024 * 200; // 200mb
|
|
7
|
-
|
|
8
|
-
const supportedThemesSchema = zod.union([zod.literal('light'), zod.literal('dark')]);
|
|
9
|
-
|
|
10
|
-
const supportedLanguageAbbreviatonsSchema = zod.union([zod.literal('de'), zod.literal('en')]);
|
|
11
|
-
|
|
12
|
-
const themeLocalStorageSchema = zod
|
|
13
|
-
.object({
|
|
14
|
-
theme: supportedThemesSchema,
|
|
15
|
-
autoMode: zod.boolean(),
|
|
16
|
-
})
|
|
17
|
-
.strict();
|
|
18
|
-
|
|
19
|
-
const camerasSchema = zod
|
|
20
|
-
.object({
|
|
21
|
-
showEvents: zod.boolean(),
|
|
22
|
-
})
|
|
23
|
-
.strict();
|
|
24
|
-
|
|
25
|
-
const camviewSchema = zod
|
|
26
|
-
.object({
|
|
27
|
-
dragDisabled: zod.boolean().optional(),
|
|
28
|
-
viewid: zod.string().optional(),
|
|
29
|
-
})
|
|
30
|
-
.strict();
|
|
31
|
-
|
|
32
|
-
const configSchema = zod
|
|
33
|
-
.object({
|
|
34
|
-
zoom: zod.number().min(8).max(20),
|
|
35
|
-
})
|
|
36
|
-
.strict();
|
|
37
|
-
|
|
38
|
-
const consoleSchema = zod
|
|
39
|
-
.object({
|
|
40
|
-
zoom: zod.number().min(8).max(20),
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
.strict();
|
|
44
|
-
|
|
45
|
-
const interfaceSchema = zod.object({
|
|
46
|
-
showBottomBarOnMobile: zod.boolean(),
|
|
47
|
-
selectedSettingsView: zod.string(),
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const uiSettingsLocalStorageSchema = zod
|
|
51
|
-
.object({
|
|
52
|
-
cameras: camerasSchema,
|
|
53
|
-
camview: camviewSchema,
|
|
54
|
-
config: configSchema,
|
|
55
|
-
console: consoleSchema,
|
|
56
|
-
interface: interfaceSchema,
|
|
57
|
-
})
|
|
58
|
-
.strict();
|
|
59
|
-
|
|
60
|
-
const uiLocalStorageSchema = zod
|
|
61
|
-
.object({
|
|
62
|
-
ui: uiSettingsLocalStorageSchema
|
|
63
|
-
.partial()
|
|
64
|
-
.optional()
|
|
65
|
-
.default({
|
|
66
|
-
config: {
|
|
67
|
-
zoom: 12,
|
|
68
|
-
},
|
|
69
|
-
console: {
|
|
70
|
-
zoom: 12,
|
|
71
|
-
},
|
|
72
|
-
}),
|
|
73
|
-
|
|
74
|
-
theme: themeLocalStorageSchema.partial().optional().default({
|
|
75
|
-
theme: 'light',
|
|
76
|
-
autoMode: false,
|
|
77
|
-
}),
|
|
78
|
-
locale: supportedLanguageAbbreviatonsSchema.optional().default('en'),
|
|
79
|
-
})
|
|
80
|
-
.strict();
|
|
81
|
-
|
|
82
|
-
export const downloadBackupSchema = zod
|
|
83
|
-
.object({
|
|
84
|
-
localStorage: uiLocalStorageSchema.partial().optional(),
|
|
85
|
-
})
|
|
86
|
-
.strict();
|
|
87
|
-
|
|
88
|
-
export const restoreBackupSchema = zod.object({
|
|
89
|
-
upload: zod
|
|
90
|
-
.custom<MultipartFile | File>()
|
|
91
|
-
.refine((file) => {
|
|
92
|
-
const isMultipartFile = (x: any): x is MultipartFile => x.mimetype !== undefined;
|
|
93
|
-
|
|
94
|
-
if (isMultipartFile(file)) {
|
|
95
|
-
return Buffer.byteLength((file as any)._buf) <= MAX_BACKUP_FILE_SIZE;
|
|
96
|
-
} else {
|
|
97
|
-
return file.size <= MAX_BACKUP_FILE_SIZE;
|
|
98
|
-
}
|
|
99
|
-
}, 'Max file size is 50MB')
|
|
100
|
-
.refine((file) => {
|
|
101
|
-
const isMultipartFile = (x: any): x is MultipartFile => x.mimetype !== undefined;
|
|
102
|
-
|
|
103
|
-
if (isMultipartFile(file)) {
|
|
104
|
-
return ACCEPTED_BACKUP_TYPES.includes(file.mimetype);
|
|
105
|
-
} else {
|
|
106
|
-
return ACCEPTED_BACKUP_TYPES.includes(file.type);
|
|
107
|
-
}
|
|
108
|
-
}, '.tar.* files are accepted') as zod.ZodType<MultipartFile>,
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
export type DownloadBackupInput = zod.TypeOf<typeof downloadBackupSchema>;
|
|
112
|
-
export type RestoreBackupInput = zod.TypeOf<typeof restoreBackupSchema>;
|
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
-
import * as zod from 'zod';
|
|
3
|
-
|
|
4
|
-
function hasCloudProtocol(urls: string[]): boolean {
|
|
5
|
-
const cloudProtocols = ['kasa://', 'nest:', 'ring:', 'tapo://'];
|
|
6
|
-
return urls.some((url) => cloudProtocols.some((protocol) => url.startsWith(protocol)));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const recordingsSettingsSchema = zod
|
|
10
|
-
.object({
|
|
11
|
-
enabled: zod.boolean().default(false),
|
|
12
|
-
})
|
|
13
|
-
.strict();
|
|
14
|
-
|
|
15
|
-
export const objectClassesSchema = zod.union([zod.literal('animal'), zod.literal('person'), zod.literal('vehicle'), zod.literal('other'), zod.literal('motion')]);
|
|
16
|
-
|
|
17
|
-
export const pointsSchema = zod.tuple([zod.number(), zod.number()]);
|
|
18
|
-
|
|
19
|
-
export const detectionZoneSchema = zod
|
|
20
|
-
.object({
|
|
21
|
-
name: zod.string().min(1, 'Zone Name is required'),
|
|
22
|
-
points: pointsSchema.array().min(3, 'At least 3 points are required'),
|
|
23
|
-
type: zod.union([zod.literal('intersect'), zod.literal('contain')]),
|
|
24
|
-
filter: zod.union([zod.literal('include'), zod.literal('exclude')]),
|
|
25
|
-
classes: objectClassesSchema.array(),
|
|
26
|
-
isPrivacyMask: zod.boolean(),
|
|
27
|
-
color: zod
|
|
28
|
-
.string()
|
|
29
|
-
.regex(/^#([0-9A-Fa-f]{3}){1,2}$/, 'Must be a valid hex color (e.g. #FF0000 or #F00)')
|
|
30
|
-
.default('#df2a4c'),
|
|
31
|
-
})
|
|
32
|
-
.array();
|
|
33
|
-
|
|
34
|
-
export const detectionSettingsSchema = zod.object({
|
|
35
|
-
motion: zod.object({
|
|
36
|
-
timeout: zod.number().min(10, 'Minimum 10 seconds'),
|
|
37
|
-
}),
|
|
38
|
-
object: zod.object({
|
|
39
|
-
confidence: zod.number().min(0.3, 'Minimum 0.3').max(1, 'Maximum 1'),
|
|
40
|
-
}),
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export const inputRoleSchema = zod.union([zod.literal('high-resolution'), zod.literal('mid-resolution'), zod.literal('low-resolution'), zod.literal('snapshot')]);
|
|
44
|
-
|
|
45
|
-
export const streamingSourceRole = zod.union([zod.literal('high-resolution'), zod.literal('mid-resolution'), zod.literal('low-resolution'), zod.literal('auto')]);
|
|
46
|
-
|
|
47
|
-
export const inputProtocolSchema = zod.union([
|
|
48
|
-
zod.literal('bubble://'),
|
|
49
|
-
zod.literal('cui://'),
|
|
50
|
-
zod.literal('doorbird://'),
|
|
51
|
-
zod.literal('dvrip://'),
|
|
52
|
-
zod.literal('echo:'),
|
|
53
|
-
zod.literal('eseecloud://'),
|
|
54
|
-
zod.literal('exec:'),
|
|
55
|
-
zod.literal('expr:'),
|
|
56
|
-
zod.literal('ffmpeg:'),
|
|
57
|
-
zod.literal('flussonic://'),
|
|
58
|
-
zod.literal('gopro://'),
|
|
59
|
-
zod.literal('hass:'),
|
|
60
|
-
zod.literal('homekit://'),
|
|
61
|
-
zod.literal('http://'),
|
|
62
|
-
zod.literal('https://'),
|
|
63
|
-
zod.literal('httpx://'),
|
|
64
|
-
zod.literal('isapi://'),
|
|
65
|
-
zod.literal('ivideon:'),
|
|
66
|
-
zod.literal('kasa://'),
|
|
67
|
-
zod.literal('nest:'),
|
|
68
|
-
zod.literal('onvif://'),
|
|
69
|
-
zod.literal('ring:'),
|
|
70
|
-
zod.literal('roborock://'),
|
|
71
|
-
zod.literal('rtmp://'),
|
|
72
|
-
zod.literal('rtsp://'),
|
|
73
|
-
zod.literal('rtspx://'),
|
|
74
|
-
zod.literal('tapo://'),
|
|
75
|
-
zod.literal('tcp://'),
|
|
76
|
-
zod.literal('webrtc:'),
|
|
77
|
-
zod.literal('webtorrent:'),
|
|
78
|
-
]);
|
|
79
|
-
|
|
80
|
-
const protocolList = inputProtocolSchema.options.map((option) => option.value);
|
|
81
|
-
const protocolRegex = new RegExp(`^(${protocolList.join('|')})`);
|
|
82
|
-
|
|
83
|
-
const urlSchema = zod.string().refine(
|
|
84
|
-
(val) => {
|
|
85
|
-
if (!protocolRegex.test(val)) return false;
|
|
86
|
-
|
|
87
|
-
try {
|
|
88
|
-
new URL(val);
|
|
89
|
-
return true;
|
|
90
|
-
} catch {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
message: 'Invalid URL format or unsupported protocol',
|
|
96
|
-
},
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
export const inputSchema = zod
|
|
100
|
-
.object({
|
|
101
|
-
_id: zod
|
|
102
|
-
.string()
|
|
103
|
-
.default(uuidv4())
|
|
104
|
-
.transform(() => uuidv4()),
|
|
105
|
-
name: zod
|
|
106
|
-
.string()
|
|
107
|
-
.min(1, 'Camera Source Name is required')
|
|
108
|
-
.transform((val) => val.replace(/ /g, '_').toLowerCase()),
|
|
109
|
-
role: inputRoleSchema,
|
|
110
|
-
useForSnapshot: zod.boolean().default(false),
|
|
111
|
-
hotMode: zod.boolean().default(false),
|
|
112
|
-
urls: urlSchema.array().min(1, 'At least one valid URL is required'),
|
|
113
|
-
})
|
|
114
|
-
.strict();
|
|
115
|
-
|
|
116
|
-
export const patchInputSchema = zod
|
|
117
|
-
.object({
|
|
118
|
-
_id: zod
|
|
119
|
-
.string()
|
|
120
|
-
.default(uuidv4())
|
|
121
|
-
.transform(() => uuidv4()),
|
|
122
|
-
name: zod
|
|
123
|
-
.string()
|
|
124
|
-
.min(1, 'Camera Source Name is required')
|
|
125
|
-
.transform((val) => val.replace(/ /g, '_').toLowerCase()),
|
|
126
|
-
role: inputRoleSchema,
|
|
127
|
-
useForSnapshot: zod.boolean().default(false),
|
|
128
|
-
hotMode: zod.boolean().default(false),
|
|
129
|
-
urls: urlSchema.array().min(1, 'At least one valid URL is required'),
|
|
130
|
-
})
|
|
131
|
-
.strict();
|
|
132
|
-
|
|
133
|
-
export const extensionSchema = zod.object({
|
|
134
|
-
id: zod.string(),
|
|
135
|
-
name: zod.string(),
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
export const extensionsSettingsSchema = zod
|
|
139
|
-
.object({
|
|
140
|
-
hub: extensionSchema.array().optional(),
|
|
141
|
-
cameraController: extensionSchema.optional(),
|
|
142
|
-
motionDetection: extensionSchema.optional(),
|
|
143
|
-
audioDetection: extensionSchema.optional(),
|
|
144
|
-
objectDetection: extensionSchema.optional(),
|
|
145
|
-
ptz: extensionSchema.optional(),
|
|
146
|
-
plugins: extensionSchema.array(),
|
|
147
|
-
})
|
|
148
|
-
.strict();
|
|
149
|
-
|
|
150
|
-
export const streamingModeSchema = zod.union([zod.literal('auto'), zod.literal('mse'), zod.literal('webrtc'), zod.literal('webrtc/tcp')]);
|
|
151
|
-
|
|
152
|
-
export const aspectRatioSchema = zod.union([zod.literal('16:9'), zod.literal('8:3'), zod.literal('4:3'), zod.literal('auto')]);
|
|
153
|
-
|
|
154
|
-
export const frameWorkerSettingsSchema = zod.object({
|
|
155
|
-
decoder: zod.union([zod.literal('pillow'), zod.literal('wasm'), zod.literal('rust'), zod.literal('gpu')]),
|
|
156
|
-
fps: zod.number().min(0, 'Minimum 0 fps').max(30, 'Maximum 30 fps'),
|
|
157
|
-
resolution: zod.union([zod.literal('640x480'), zod.literal('640x360'), zod.literal('320x240'), zod.literal('320x180')]),
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
export const cameraTypeSchema = zod.union([zod.literal('camera'), zod.literal('doorbell')]);
|
|
161
|
-
|
|
162
|
-
export const interfaceSettingsSchema = zod.object({
|
|
163
|
-
streamingMode: streamingModeSchema,
|
|
164
|
-
streamingSource: streamingSourceRole,
|
|
165
|
-
aspectRatio: aspectRatioSchema,
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
export const cameraInfoSchema = zod.object({
|
|
169
|
-
model: zod.string().optional(),
|
|
170
|
-
manufacturer: zod.string().optional(),
|
|
171
|
-
hardware: zod.string().optional(),
|
|
172
|
-
serialNumber: zod.string().optional(),
|
|
173
|
-
firmwareVersion: zod.string().optional(),
|
|
174
|
-
supportUrl: zod.string().optional(),
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
export const pairCameraSchema = zod
|
|
178
|
-
.object({
|
|
179
|
-
name: zod.string().min(1, 'Camera name is required'),
|
|
180
|
-
url: zod.string().url().min(1, 'Camera URL is required'),
|
|
181
|
-
type: zod.union([
|
|
182
|
-
zod.literal('Google'),
|
|
183
|
-
zod.literal('Ring'),
|
|
184
|
-
zod.literal('HomeKit'),
|
|
185
|
-
zod.literal('Onvif'),
|
|
186
|
-
zod.literal('Hass'),
|
|
187
|
-
zod.literal('GoPro'),
|
|
188
|
-
zod.literal('Roborock'),
|
|
189
|
-
zod.literal('FFmpeg'),
|
|
190
|
-
zod.literal('DVRip'),
|
|
191
|
-
zod.literal('Webtorrent'),
|
|
192
|
-
]),
|
|
193
|
-
// onvif (optional)/roborock
|
|
194
|
-
username: zod.string().optional(),
|
|
195
|
-
// ring
|
|
196
|
-
email: zod.string().email().optional(),
|
|
197
|
-
// onvif (optional)/roborock/ring
|
|
198
|
-
password: zod.string().optional(),
|
|
199
|
-
// homekit
|
|
200
|
-
pin: zod.string().length(8, { message: 'PIN must be 8 characters long' }).optional(),
|
|
201
|
-
// google nest
|
|
202
|
-
clientId: zod.string().optional(),
|
|
203
|
-
clientSecret: zod.string().optional(),
|
|
204
|
-
refreshToken: zod.string().optional(),
|
|
205
|
-
projectId: zod.string().optional(),
|
|
206
|
-
})
|
|
207
|
-
.strict()
|
|
208
|
-
.refine(
|
|
209
|
-
(data) => {
|
|
210
|
-
if (data.type === 'HomeKit') {
|
|
211
|
-
return !!data.pin;
|
|
212
|
-
}
|
|
213
|
-
return true;
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
message: 'PIN is required for HomeKit cameras',
|
|
217
|
-
path: ['pin'],
|
|
218
|
-
},
|
|
219
|
-
)
|
|
220
|
-
.refine(
|
|
221
|
-
(data) => {
|
|
222
|
-
if (data.type === 'Google') {
|
|
223
|
-
return !!data.clientId;
|
|
224
|
-
}
|
|
225
|
-
return true;
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
message: 'Client ID is required for Google cameras',
|
|
229
|
-
path: ['clientId'],
|
|
230
|
-
},
|
|
231
|
-
)
|
|
232
|
-
.refine(
|
|
233
|
-
(data) => {
|
|
234
|
-
if (data.type === 'Google') {
|
|
235
|
-
return !!data.clientSecret;
|
|
236
|
-
}
|
|
237
|
-
return true;
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
message: 'Client Secret is required for Google cameras',
|
|
241
|
-
path: ['clientSecret'],
|
|
242
|
-
},
|
|
243
|
-
)
|
|
244
|
-
.refine(
|
|
245
|
-
(data) => {
|
|
246
|
-
if (data.type === 'Google') {
|
|
247
|
-
return !!data.projectId;
|
|
248
|
-
}
|
|
249
|
-
return true;
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
message: 'Project ID is required for Google cameras',
|
|
253
|
-
path: ['projectId'],
|
|
254
|
-
},
|
|
255
|
-
)
|
|
256
|
-
.refine(
|
|
257
|
-
(data) => {
|
|
258
|
-
if (data.type === 'Google') {
|
|
259
|
-
return !!data.refreshToken;
|
|
260
|
-
}
|
|
261
|
-
return true;
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
message: 'Refresh Token is required for Google cameras',
|
|
265
|
-
path: ['refreshToken'],
|
|
266
|
-
},
|
|
267
|
-
)
|
|
268
|
-
.refine(
|
|
269
|
-
(data) => {
|
|
270
|
-
if (data.type === 'Ring') {
|
|
271
|
-
return !!data.email;
|
|
272
|
-
}
|
|
273
|
-
return true;
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
message: 'Email is required',
|
|
277
|
-
path: ['email'],
|
|
278
|
-
},
|
|
279
|
-
)
|
|
280
|
-
.refine(
|
|
281
|
-
(data) => {
|
|
282
|
-
if (data.type === 'Roborock') {
|
|
283
|
-
return !!data.username;
|
|
284
|
-
}
|
|
285
|
-
return true;
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
message: 'Username is required',
|
|
289
|
-
path: ['username'],
|
|
290
|
-
},
|
|
291
|
-
)
|
|
292
|
-
.refine(
|
|
293
|
-
(data) => {
|
|
294
|
-
if (data.type === 'Roborock' || data.type === 'Ring') {
|
|
295
|
-
return !!data.password;
|
|
296
|
-
}
|
|
297
|
-
return true;
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
message: 'Password is required',
|
|
301
|
-
path: ['password'],
|
|
302
|
-
},
|
|
303
|
-
);
|
|
304
|
-
|
|
305
|
-
export const createCameraSchema = zod
|
|
306
|
-
.object({
|
|
307
|
-
_id: zod
|
|
308
|
-
.string()
|
|
309
|
-
.default(uuidv4())
|
|
310
|
-
.transform(() => uuidv4()),
|
|
311
|
-
nativeId: zod.string().optional(),
|
|
312
|
-
pluginId: zod.string().default('native'),
|
|
313
|
-
disabled: zod.boolean().default(false),
|
|
314
|
-
name: zod.string().min(1, 'Camera name is required'),
|
|
315
|
-
type: cameraTypeSchema.default('camera'),
|
|
316
|
-
isCloud: zod.boolean().default(false),
|
|
317
|
-
snapshotTTL: zod.number().min(30, 'Minimum cache time must be 30').default(600),
|
|
318
|
-
info: cameraInfoSchema.default({
|
|
319
|
-
model: 'IP Camera',
|
|
320
|
-
manufacturer: 'camera.ui',
|
|
321
|
-
hardware: 'Camera',
|
|
322
|
-
serialNumber: 'Unknown',
|
|
323
|
-
firmwareVersion: 'Unknown',
|
|
324
|
-
supportUrl: 'Unknown',
|
|
325
|
-
}),
|
|
326
|
-
sources: inputSchema
|
|
327
|
-
.array()
|
|
328
|
-
.refine((sources) => sources.some((source) => source.role === 'high-resolution' || source.role === 'mid-resolution' || source.role === 'low-resolution'), {
|
|
329
|
-
path: ['sources[].role'],
|
|
330
|
-
message: 'One of the roles "high-resolution", "mid-resolution" or "low-resolution" is required',
|
|
331
|
-
})
|
|
332
|
-
.refine(
|
|
333
|
-
(sources) => {
|
|
334
|
-
const snapshotSources = sources.filter((source) => source.useForSnapshot);
|
|
335
|
-
return snapshotSources.length <= 1;
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
message: 'Only one source can be used for snapshot',
|
|
339
|
-
path: ['sources'],
|
|
340
|
-
},
|
|
341
|
-
)
|
|
342
|
-
.refine(
|
|
343
|
-
(sources) => {
|
|
344
|
-
const snapshotSources = sources.filter((source) => source.role === 'snapshot');
|
|
345
|
-
return snapshotSources.every((source) => !source.useForSnapshot);
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
message: 'Snapshot source can not be used with useForSnapshot',
|
|
349
|
-
path: ['sources'],
|
|
350
|
-
},
|
|
351
|
-
)
|
|
352
|
-
.refine(
|
|
353
|
-
(sources) => {
|
|
354
|
-
const snapshotSources = sources.filter((source) => source.role === 'snapshot');
|
|
355
|
-
return snapshotSources.every((source) => !source.hotMode);
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
message: 'Snapshot source can not be used with hotMode',
|
|
359
|
-
},
|
|
360
|
-
),
|
|
361
|
-
extensions: extensionsSettingsSchema.default({
|
|
362
|
-
hub: [],
|
|
363
|
-
plugins: [],
|
|
364
|
-
}),
|
|
365
|
-
recording: recordingsSettingsSchema.default({
|
|
366
|
-
enabled: false,
|
|
367
|
-
}),
|
|
368
|
-
interface: interfaceSettingsSchema.default({
|
|
369
|
-
streamingMode: 'auto',
|
|
370
|
-
streamingSource: 'auto',
|
|
371
|
-
aspectRatio: '16:9',
|
|
372
|
-
}),
|
|
373
|
-
detectionZones: detectionZoneSchema.default([]),
|
|
374
|
-
detectionSettings: detectionSettingsSchema.default({
|
|
375
|
-
motion: {
|
|
376
|
-
timeout: 60,
|
|
377
|
-
},
|
|
378
|
-
object: {
|
|
379
|
-
confidence: 0.7,
|
|
380
|
-
},
|
|
381
|
-
}),
|
|
382
|
-
frameWorkerSettings: frameWorkerSettingsSchema.default({
|
|
383
|
-
decoder: 'rust',
|
|
384
|
-
fps: 10,
|
|
385
|
-
resolution: '320x180',
|
|
386
|
-
}),
|
|
387
|
-
})
|
|
388
|
-
.strict()
|
|
389
|
-
.transform((data) => {
|
|
390
|
-
const allUrls = data.sources.flatMap((source) => source.urls);
|
|
391
|
-
if (data.isCloud || hasCloudProtocol(allUrls)) {
|
|
392
|
-
return {
|
|
393
|
-
...data,
|
|
394
|
-
isCloud: true,
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
return data;
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
export const patchCameraSchema = zod
|
|
402
|
-
.object({
|
|
403
|
-
disabled: zod.boolean().optional(),
|
|
404
|
-
type: cameraTypeSchema.optional(),
|
|
405
|
-
name: zod.string().min(1, 'Camera name is required').optional(),
|
|
406
|
-
isCloud: zod.boolean().optional(),
|
|
407
|
-
snapshotTTL: zod.number().min(30, 'Minimum cache time must be 30').optional(),
|
|
408
|
-
info: cameraInfoSchema.partial().optional(),
|
|
409
|
-
sources: patchInputSchema
|
|
410
|
-
.array()
|
|
411
|
-
.refine((sources) => sources.some((source) => source.role === 'high-resolution' || source.role === 'mid-resolution' || source.role === 'low-resolution'), {
|
|
412
|
-
path: ['sources[].role'],
|
|
413
|
-
message: 'One of the roles "high-resolution", "mid-resolution" or "low-resolution" is required',
|
|
414
|
-
})
|
|
415
|
-
.refine(
|
|
416
|
-
(sources) => {
|
|
417
|
-
const snapshotSources = sources.filter((source) => source.useForSnapshot);
|
|
418
|
-
return snapshotSources.length <= 1;
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
message: 'Only one source can be used for snapshot',
|
|
422
|
-
path: ['sources'],
|
|
423
|
-
},
|
|
424
|
-
)
|
|
425
|
-
.refine(
|
|
426
|
-
(sources) => {
|
|
427
|
-
const snapshotSources = sources.filter((source) => source.role === 'snapshot');
|
|
428
|
-
return snapshotSources.every((source) => !source.useForSnapshot);
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
message: 'Snapshot source can not be used with useForSnapshot',
|
|
432
|
-
path: ['sources'],
|
|
433
|
-
},
|
|
434
|
-
)
|
|
435
|
-
.refine(
|
|
436
|
-
(sources) => {
|
|
437
|
-
const snapshotSources = sources.filter((source) => source.role === 'snapshot');
|
|
438
|
-
return snapshotSources.every((source) => !source.hotMode);
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
message: 'Snapshot source can not be used with hotMode',
|
|
442
|
-
},
|
|
443
|
-
)
|
|
444
|
-
.optional(),
|
|
445
|
-
extensions: extensionsSettingsSchema.partial().optional(),
|
|
446
|
-
interface: interfaceSettingsSchema.partial().optional(),
|
|
447
|
-
recording: recordingsSettingsSchema.partial().optional(),
|
|
448
|
-
detectionZones: detectionZoneSchema.optional(),
|
|
449
|
-
detectionSettings: detectionSettingsSchema.partial().optional(),
|
|
450
|
-
frameWorkerSettings: frameWorkerSettingsSchema.partial().optional(),
|
|
451
|
-
})
|
|
452
|
-
.strict()
|
|
453
|
-
// Ähnliche Transformation wie oben
|
|
454
|
-
.transform((data) => {
|
|
455
|
-
if (data.sources) {
|
|
456
|
-
const allUrls = data.sources.flatMap((source) => source.urls);
|
|
457
|
-
|
|
458
|
-
// Wenn isCloud schon auf true gesetzt wurde oder eine der URLs ein Cloud-Protokoll hat
|
|
459
|
-
if (data.isCloud === true || hasCloudProtocol(allUrls)) {
|
|
460
|
-
return {
|
|
461
|
-
...data,
|
|
462
|
-
isCloud: true,
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
return data;
|
|
468
|
-
});
|
|
469
|
-
|
|
470
|
-
export const previewCameraSchema = zod
|
|
471
|
-
.object({
|
|
472
|
-
url: zod.string(),
|
|
473
|
-
})
|
|
474
|
-
.strict();
|
|
475
|
-
|
|
476
|
-
export type PreviewCameraInput = zod.TypeOf<typeof previewCameraSchema>;
|
|
477
|
-
export type CreateCameraInput = zod.TypeOf<typeof createCameraSchema>;
|
|
478
|
-
export type PairCameraInput = zod.TypeOf<typeof pairCameraSchema>;
|
|
479
|
-
export type PatchCameraInput = zod.TypeOf<typeof patchCameraSchema>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as zod from 'zod';
|
|
2
|
-
|
|
3
|
-
import { DEFAULT_CONFIG_LOGGER, DEFAULT_CONFIG_PLUGINS, DEFAULT_CONFIG_PORT, DEFAULT_CONFIG_SSL } from '../../services/config/defaults.js';
|
|
4
|
-
|
|
5
|
-
export const logLevelSchema = zod.union([zod.literal('info'), zod.literal('debug'), zod.literal('warn'), zod.literal('error'), zod.literal('trace')]);
|
|
6
|
-
|
|
7
|
-
export const loggerSchema = zod
|
|
8
|
-
.object({
|
|
9
|
-
level: logLevelSchema.optional().default(DEFAULT_CONFIG_LOGGER.level),
|
|
10
|
-
disableTimestamps: zod.boolean().optional().default(DEFAULT_CONFIG_LOGGER.disableTimestamps!),
|
|
11
|
-
})
|
|
12
|
-
.strict();
|
|
13
|
-
|
|
14
|
-
export const iConfigSSLSchema = zod
|
|
15
|
-
.object({
|
|
16
|
-
certFile: zod.string(),
|
|
17
|
-
keyFile: zod.string(),
|
|
18
|
-
caFile: zod.string(),
|
|
19
|
-
addresses: zod.string().array().optional().default(DEFAULT_CONFIG_SSL.addresses!),
|
|
20
|
-
})
|
|
21
|
-
.strict();
|
|
22
|
-
|
|
23
|
-
export const pluginsSchema = zod
|
|
24
|
-
.object({
|
|
25
|
-
disabledPlugins: zod.string().array().default(DEFAULT_CONFIG_PLUGINS.disabledPlugins),
|
|
26
|
-
})
|
|
27
|
-
.strict();
|
|
28
|
-
|
|
29
|
-
export const patchConfigSchema = zod
|
|
30
|
-
.object({
|
|
31
|
-
port: zod.number().min(1024, 'Min port range').max(49151, 'Max port range').default(DEFAULT_CONFIG_PORT),
|
|
32
|
-
ssl: iConfigSSLSchema,
|
|
33
|
-
logger: loggerSchema,
|
|
34
|
-
plugins: pluginsSchema,
|
|
35
|
-
})
|
|
36
|
-
.strict();
|
|
37
|
-
|
|
38
|
-
export type PatchConfigInput = zod.TypeOf<typeof patchConfigSchema>;
|