@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,420 +0,0 @@
|
|
|
1
|
-
import { PluginsController } from '../controllers/plugins.controller.js';
|
|
2
|
-
import { onlyAdminCanDoThisAction } from '../middlewares/authPermission.middleware.js';
|
|
3
|
-
import { validJWTNeeded } from '../middlewares/authValidation.middleware.js';
|
|
4
|
-
import { pages } from '../middlewares/pagination.middleware.js';
|
|
5
|
-
import { detectAudioSchema, detectMotionSchema, detectObjectSchema, installPluginSchema } from '../schemas/plugins.schema.js';
|
|
6
|
-
|
|
7
|
-
import type { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
|
8
|
-
import type { ZodTypeProvider } from 'fastify-type-provider-zod';
|
|
9
|
-
import { patchStorageSchema, setStorageSchema, submitStorageSchema } from '../schemas/storage.schema.js';
|
|
10
|
-
|
|
11
|
-
export const PluginsRoute: FastifyPluginAsync = async (app: FastifyInstance): Promise<void> => {
|
|
12
|
-
const pluginsController = new PluginsController(app);
|
|
13
|
-
|
|
14
|
-
app.route({
|
|
15
|
-
url: '/',
|
|
16
|
-
method: 'GET',
|
|
17
|
-
preValidation: [validJWTNeeded],
|
|
18
|
-
preSerialization: [pages],
|
|
19
|
-
handler: pluginsController.list.bind(pluginsController),
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
app.route({
|
|
23
|
-
url: '/extensions',
|
|
24
|
-
method: 'GET',
|
|
25
|
-
preValidation: [validJWTNeeded],
|
|
26
|
-
preSerialization: [pages],
|
|
27
|
-
handler: pluginsController.listExtensions.bind(pluginsController),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
app.route({
|
|
31
|
-
url: '/search',
|
|
32
|
-
method: 'GET',
|
|
33
|
-
preValidation: [validJWTNeeded],
|
|
34
|
-
preSerialization: [pages],
|
|
35
|
-
handler: pluginsController.search.bind(pluginsController),
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
app.route({
|
|
39
|
-
url: '/progress',
|
|
40
|
-
method: 'GET',
|
|
41
|
-
preValidation: [validJWTNeeded],
|
|
42
|
-
preSerialization: [pages],
|
|
43
|
-
handler: pluginsController.installProgress.bind(pluginsController),
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
47
|
-
url: '/',
|
|
48
|
-
method: 'POST',
|
|
49
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
50
|
-
handler: pluginsController.installOrUpdate.bind(pluginsController),
|
|
51
|
-
schema: {
|
|
52
|
-
body: installPluginSchema,
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
app.route({
|
|
57
|
-
url: '/',
|
|
58
|
-
method: 'DELETE',
|
|
59
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
60
|
-
handler: pluginsController.uninstallAll.bind(pluginsController),
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
app.route({
|
|
64
|
-
url: '/:pluginname',
|
|
65
|
-
method: 'GET',
|
|
66
|
-
preValidation: [validJWTNeeded],
|
|
67
|
-
handler: pluginsController.getByName.bind(pluginsController),
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
app.route({
|
|
71
|
-
url: '/@:scope/:pluginname',
|
|
72
|
-
method: 'GET',
|
|
73
|
-
preValidation: [validJWTNeeded],
|
|
74
|
-
handler: pluginsController.getByName.bind(pluginsController),
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
app.route({
|
|
78
|
-
url: '/:pluginname/versions',
|
|
79
|
-
method: 'GET',
|
|
80
|
-
preValidation: [validJWTNeeded],
|
|
81
|
-
handler: pluginsController.getVersionsByName.bind(pluginsController),
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
app.route({
|
|
85
|
-
url: '/@:scope/:pluginname/versions',
|
|
86
|
-
method: 'GET',
|
|
87
|
-
preValidation: [validJWTNeeded],
|
|
88
|
-
handler: pluginsController.getVersionsByName.bind(pluginsController),
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
app.route({
|
|
92
|
-
url: '/:pluginname/update',
|
|
93
|
-
method: 'GET',
|
|
94
|
-
preValidation: [validJWTNeeded],
|
|
95
|
-
handler: pluginsController.getPluginUpdateByName.bind(pluginsController),
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
app.route({
|
|
99
|
-
url: '/@:scope/:pluginname/update',
|
|
100
|
-
method: 'GET',
|
|
101
|
-
preValidation: [validJWTNeeded],
|
|
102
|
-
handler: pluginsController.getPluginUpdateByName.bind(pluginsController),
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
app.route({
|
|
106
|
-
url: '/:pluginname/contract',
|
|
107
|
-
method: 'GET',
|
|
108
|
-
preValidation: [validJWTNeeded],
|
|
109
|
-
handler: pluginsController.getContractByName.bind(pluginsController),
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
app.route({
|
|
113
|
-
url: '/@:scope/:pluginname/contract',
|
|
114
|
-
method: 'GET',
|
|
115
|
-
preValidation: [validJWTNeeded],
|
|
116
|
-
handler: pluginsController.getContractByName.bind(pluginsController),
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
app.route({
|
|
120
|
-
url: '/:pluginname/config',
|
|
121
|
-
method: 'GET',
|
|
122
|
-
preValidation: [validJWTNeeded],
|
|
123
|
-
handler: pluginsController.getConfigByName.bind(pluginsController),
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
app.route({
|
|
127
|
-
url: '/@:scope/:pluginname/config',
|
|
128
|
-
method: 'GET',
|
|
129
|
-
preValidation: [validJWTNeeded],
|
|
130
|
-
handler: pluginsController.getConfigByName.bind(pluginsController),
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
134
|
-
url: '/:pluginname/config',
|
|
135
|
-
method: 'PATCH',
|
|
136
|
-
preValidation: [validJWTNeeded],
|
|
137
|
-
handler: pluginsController.patchConfigByName.bind(pluginsController),
|
|
138
|
-
schema: {
|
|
139
|
-
body: patchStorageSchema,
|
|
140
|
-
},
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
144
|
-
url: '/@:scope/:pluginname/config',
|
|
145
|
-
method: 'PATCH',
|
|
146
|
-
preValidation: [validJWTNeeded],
|
|
147
|
-
handler: pluginsController.patchConfigByName.bind(pluginsController),
|
|
148
|
-
schema: {
|
|
149
|
-
body: patchStorageSchema,
|
|
150
|
-
},
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
154
|
-
url: '/:pluginname/config',
|
|
155
|
-
method: 'POST',
|
|
156
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
157
|
-
handler: pluginsController.submitConfigByName.bind(pluginsController),
|
|
158
|
-
schema: {
|
|
159
|
-
body: submitStorageSchema,
|
|
160
|
-
},
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
164
|
-
url: '/@:scope/:pluginname/config',
|
|
165
|
-
method: 'POST',
|
|
166
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
167
|
-
handler: pluginsController.submitConfigByName.bind(pluginsController),
|
|
168
|
-
schema: {
|
|
169
|
-
body: submitStorageSchema,
|
|
170
|
-
},
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
174
|
-
url: '/:pluginname/config',
|
|
175
|
-
method: 'PUT',
|
|
176
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
177
|
-
handler: pluginsController.setConfigByName.bind(pluginsController),
|
|
178
|
-
schema: {
|
|
179
|
-
body: setStorageSchema,
|
|
180
|
-
},
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
184
|
-
url: '/@:scope/:pluginname/config',
|
|
185
|
-
method: 'PUT',
|
|
186
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
187
|
-
handler: pluginsController.setConfigByName.bind(pluginsController),
|
|
188
|
-
schema: {
|
|
189
|
-
body: setStorageSchema,
|
|
190
|
-
},
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
app.route({
|
|
194
|
-
url: '/:pluginname/logo',
|
|
195
|
-
method: 'GET',
|
|
196
|
-
preValidation: [validJWTNeeded],
|
|
197
|
-
handler: pluginsController.getPluginLogoByName.bind(pluginsController),
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
app.route({
|
|
201
|
-
url: '/@:scope/:pluginname/logo',
|
|
202
|
-
method: 'GET',
|
|
203
|
-
preValidation: [validJWTNeeded],
|
|
204
|
-
handler: pluginsController.getPluginLogoByName.bind(pluginsController),
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
app.route({
|
|
208
|
-
url: '/:pluginname/readme',
|
|
209
|
-
method: 'GET',
|
|
210
|
-
preValidation: [validJWTNeeded],
|
|
211
|
-
handler: pluginsController.getReadmeByName.bind(pluginsController),
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
app.route({
|
|
215
|
-
url: '/@:scope/:pluginname/readme',
|
|
216
|
-
method: 'GET',
|
|
217
|
-
preValidation: [validJWTNeeded],
|
|
218
|
-
handler: pluginsController.getReadmeByName.bind(pluginsController),
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
app.route({
|
|
222
|
-
url: '/:pluginname/changelog',
|
|
223
|
-
method: 'GET',
|
|
224
|
-
preValidation: [validJWTNeeded],
|
|
225
|
-
handler: pluginsController.getChangelogByName.bind(pluginsController),
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
app.route({
|
|
229
|
-
url: '/@:scope/:pluginname/changelog',
|
|
230
|
-
method: 'GET',
|
|
231
|
-
preValidation: [validJWTNeeded],
|
|
232
|
-
handler: pluginsController.getChangelogByName.bind(pluginsController),
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
app.route({
|
|
236
|
-
url: '/:pluginname/interface',
|
|
237
|
-
method: 'GET',
|
|
238
|
-
preValidation: [validJWTNeeded],
|
|
239
|
-
handler: pluginsController.getPluginInterface.bind(pluginsController),
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
app.route({
|
|
243
|
-
url: '/@:scope/:pluginname/interface',
|
|
244
|
-
method: 'GET',
|
|
245
|
-
preValidation: [validJWTNeeded],
|
|
246
|
-
handler: pluginsController.getPluginInterface.bind(pluginsController),
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
250
|
-
url: '/:pluginname/detect/audio',
|
|
251
|
-
method: 'POST',
|
|
252
|
-
preValidation: [validJWTNeeded],
|
|
253
|
-
handler: pluginsController.detectAudio.bind(pluginsController),
|
|
254
|
-
schema: {
|
|
255
|
-
body: detectAudioSchema,
|
|
256
|
-
},
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
260
|
-
url: '/@:scope/:pluginname/detect/audio',
|
|
261
|
-
method: 'POST',
|
|
262
|
-
preValidation: [validJWTNeeded],
|
|
263
|
-
handler: pluginsController.detectAudio.bind(pluginsController),
|
|
264
|
-
schema: {
|
|
265
|
-
body: detectAudioSchema,
|
|
266
|
-
},
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
270
|
-
url: '/:pluginname/detect/motion',
|
|
271
|
-
method: 'POST',
|
|
272
|
-
preValidation: [validJWTNeeded],
|
|
273
|
-
handler: pluginsController.detectMotion.bind(pluginsController),
|
|
274
|
-
schema: {
|
|
275
|
-
body: detectMotionSchema,
|
|
276
|
-
},
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
280
|
-
url: '/@:scope/:pluginname/detect/motion',
|
|
281
|
-
method: 'POST',
|
|
282
|
-
preValidation: [validJWTNeeded],
|
|
283
|
-
handler: pluginsController.detectMotion.bind(pluginsController),
|
|
284
|
-
schema: {
|
|
285
|
-
body: detectMotionSchema,
|
|
286
|
-
},
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
290
|
-
url: '/:pluginname/detect/objects',
|
|
291
|
-
method: 'POST',
|
|
292
|
-
preValidation: [validJWTNeeded],
|
|
293
|
-
handler: pluginsController.detectObjects.bind(pluginsController),
|
|
294
|
-
schema: {
|
|
295
|
-
body: detectObjectSchema,
|
|
296
|
-
},
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
300
|
-
url: '/@:scope/:pluginname/detect/objects',
|
|
301
|
-
method: 'POST',
|
|
302
|
-
preValidation: [validJWTNeeded],
|
|
303
|
-
handler: pluginsController.detectObjects.bind(pluginsController),
|
|
304
|
-
schema: {
|
|
305
|
-
body: detectObjectSchema,
|
|
306
|
-
},
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
app.route({
|
|
310
|
-
url: '/:pluginname/start',
|
|
311
|
-
method: 'PUT',
|
|
312
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
313
|
-
handler: pluginsController.startByName.bind(pluginsController),
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
app.route({
|
|
317
|
-
url: '/@:scope/:pluginname/start',
|
|
318
|
-
method: 'PUT',
|
|
319
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
320
|
-
handler: pluginsController.startByName.bind(pluginsController),
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
app.route({
|
|
324
|
-
url: '/:pluginname/stop',
|
|
325
|
-
method: 'PUT',
|
|
326
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
327
|
-
handler: pluginsController.stopByName.bind(pluginsController),
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
app.route({
|
|
331
|
-
url: '/@:scope/:pluginname/stop',
|
|
332
|
-
method: 'PUT',
|
|
333
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
334
|
-
handler: pluginsController.stopByName.bind(pluginsController),
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
app.route({
|
|
338
|
-
url: '/:pluginname/restart',
|
|
339
|
-
method: 'PUT',
|
|
340
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
341
|
-
handler: pluginsController.restartByName.bind(pluginsController),
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
app.route({
|
|
345
|
-
url: '/@:scope/:pluginname/restart',
|
|
346
|
-
method: 'PUT',
|
|
347
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
348
|
-
handler: pluginsController.restartByName.bind(pluginsController),
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
app.route({
|
|
352
|
-
url: '/:pluginname/enable',
|
|
353
|
-
method: 'PUT',
|
|
354
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
355
|
-
handler: pluginsController.enableByName.bind(pluginsController),
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
app.route({
|
|
359
|
-
url: '/@:scope/:pluginname/enable',
|
|
360
|
-
method: 'PUT',
|
|
361
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
362
|
-
handler: pluginsController.enableByName.bind(pluginsController),
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
app.route({
|
|
366
|
-
url: '/:pluginname/disable',
|
|
367
|
-
method: 'PUT',
|
|
368
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
369
|
-
handler: pluginsController.disableByName.bind(pluginsController),
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
app.route({
|
|
373
|
-
url: '/@:scope/:pluginname/disable',
|
|
374
|
-
method: 'PUT',
|
|
375
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
376
|
-
handler: pluginsController.disableByName.bind(pluginsController),
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
app.route({
|
|
380
|
-
url: '/@:scope/:pluginname/log/download',
|
|
381
|
-
method: 'GET',
|
|
382
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
383
|
-
handler: pluginsController.downloadLog.bind(pluginsController),
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
app.route({
|
|
387
|
-
url: '/:pluginname/log/download',
|
|
388
|
-
method: 'GET',
|
|
389
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
390
|
-
handler: pluginsController.downloadLog.bind(pluginsController),
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
app.route({
|
|
394
|
-
url: '/:pluginname/log',
|
|
395
|
-
method: 'DELETE',
|
|
396
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
397
|
-
handler: pluginsController.clearLog.bind(pluginsController),
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
app.route({
|
|
401
|
-
url: '/@:scope/:pluginname/log',
|
|
402
|
-
method: 'DELETE',
|
|
403
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
404
|
-
handler: pluginsController.clearLog.bind(pluginsController),
|
|
405
|
-
});
|
|
406
|
-
|
|
407
|
-
app.route({
|
|
408
|
-
url: '/:pluginname',
|
|
409
|
-
method: 'DELETE',
|
|
410
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
411
|
-
handler: pluginsController.uninstallByName.bind(pluginsController),
|
|
412
|
-
});
|
|
413
|
-
|
|
414
|
-
app.route({
|
|
415
|
-
url: '/@:scope/:pluginname',
|
|
416
|
-
method: 'DELETE',
|
|
417
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
418
|
-
handler: pluginsController.uninstallByName.bind(pluginsController),
|
|
419
|
-
});
|
|
420
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { SystemController } from '../controllers/system.controller.js';
|
|
2
|
-
import { onlyAdminCanDoThisAction, onlyMasterCanDoThisAction } from '../middlewares/authPermission.middleware.js';
|
|
3
|
-
import { validJWTNeeded } from '../middlewares/authValidation.middleware.js';
|
|
4
|
-
import { patchSystemSchema, updateServerSchema } from '../schemas/system.schema.js';
|
|
5
|
-
|
|
6
|
-
import type { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
|
7
|
-
import type { ZodTypeProvider } from 'fastify-type-provider-zod';
|
|
8
|
-
|
|
9
|
-
export const SystemRoute: FastifyPluginAsync = async (app: FastifyInstance): Promise<void> => {
|
|
10
|
-
const systemController = new SystemController(app);
|
|
11
|
-
|
|
12
|
-
app.route({
|
|
13
|
-
url: '/',
|
|
14
|
-
method: 'GET',
|
|
15
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
16
|
-
handler: systemController.systemInfo.bind(systemController),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
app.route({
|
|
20
|
-
url: '/',
|
|
21
|
-
method: 'PATCH',
|
|
22
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
23
|
-
handler: systemController.patchSystemInfo.bind(systemController),
|
|
24
|
-
schema: {
|
|
25
|
-
body: patchSystemSchema,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
app.route({
|
|
30
|
-
url: '/version',
|
|
31
|
-
method: 'GET',
|
|
32
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
33
|
-
handler: systemController.checkVersion.bind(systemController),
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
37
|
-
url: '/update',
|
|
38
|
-
method: 'POST',
|
|
39
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
40
|
-
handler: systemController.updateServer.bind(systemController),
|
|
41
|
-
schema: {
|
|
42
|
-
body: updateServerSchema,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
app.route({
|
|
47
|
-
url: '/log/download',
|
|
48
|
-
method: 'GET',
|
|
49
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
50
|
-
handler: systemController.downloadLog.bind(systemController),
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
app.route({
|
|
54
|
-
url: '/log',
|
|
55
|
-
method: 'DELETE',
|
|
56
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
57
|
-
handler: systemController.clearLog.bind(systemController),
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
app.route({
|
|
61
|
-
url: '/cert',
|
|
62
|
-
method: 'POST',
|
|
63
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
64
|
-
handler: systemController.downloadCert.bind(systemController),
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
app.route({
|
|
68
|
-
url: '/restart',
|
|
69
|
-
method: 'PUT',
|
|
70
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
71
|
-
handler: systemController.restart.bind(systemController),
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
app.route({
|
|
75
|
-
url: '/reset',
|
|
76
|
-
method: 'PUT',
|
|
77
|
-
preValidation: [validJWTNeeded, onlyMasterCanDoThisAction],
|
|
78
|
-
handler: systemController.reset.bind(systemController),
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
app.route({
|
|
82
|
-
url: '/restart/go2rtc',
|
|
83
|
-
method: 'PUT',
|
|
84
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
85
|
-
handler: systemController.restartGo2rtc.bind(systemController),
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
app.route({
|
|
89
|
-
url: '/go2rtc',
|
|
90
|
-
method: 'GET',
|
|
91
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
92
|
-
handler: systemController.go2rtcInfo.bind(systemController),
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
app.route({
|
|
96
|
-
url: '/nats',
|
|
97
|
-
method: 'GET',
|
|
98
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
99
|
-
handler: systemController.natsInfo.bind(systemController),
|
|
100
|
-
});
|
|
101
|
-
};
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { UsersController } from '../controllers/users.controller.js';
|
|
2
|
-
import { onlyAdminCanDoThisAction, onlySameUserOrAdminCanDoThisAction } from '../middlewares/authPermission.middleware.js';
|
|
3
|
-
import { validJWTNeeded } from '../middlewares/authValidation.middleware.js';
|
|
4
|
-
import { pages } from '../middlewares/pagination.middleware.js';
|
|
5
|
-
import {
|
|
6
|
-
createUserSchema,
|
|
7
|
-
patchPreferencesCameraShortcutLayout,
|
|
8
|
-
patchPreferencesCamviewViewsLayout,
|
|
9
|
-
patchUserSchema,
|
|
10
|
-
userPreferencesCameraShortcutLayout,
|
|
11
|
-
userPreferencesCamviewViewsLayout,
|
|
12
|
-
} from '../schemas/users.schema.js';
|
|
13
|
-
|
|
14
|
-
import type { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
|
15
|
-
import type { ZodTypeProvider } from 'fastify-type-provider-zod';
|
|
16
|
-
|
|
17
|
-
export const UsersRoute: FastifyPluginAsync = async (app: FastifyInstance): Promise<void> => {
|
|
18
|
-
const usersController = new UsersController(app);
|
|
19
|
-
|
|
20
|
-
app.route({
|
|
21
|
-
method: 'GET',
|
|
22
|
-
url: '/',
|
|
23
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
24
|
-
preSerialization: [pages],
|
|
25
|
-
handler: usersController.list.bind(usersController),
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
29
|
-
method: 'POST',
|
|
30
|
-
url: '/',
|
|
31
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
32
|
-
handler: usersController.insert.bind(usersController),
|
|
33
|
-
schema: {
|
|
34
|
-
body: createUserSchema,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
app.route({
|
|
39
|
-
method: 'DELETE',
|
|
40
|
-
url: '/',
|
|
41
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
42
|
-
handler: usersController.removeAll.bind(usersController),
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
app.route({
|
|
46
|
-
method: 'GET',
|
|
47
|
-
url: '/:username',
|
|
48
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
49
|
-
handler: usersController.getByName.bind(usersController),
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
53
|
-
method: 'PATCH',
|
|
54
|
-
url: '/:username',
|
|
55
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
56
|
-
handler: usersController.patchByName.bind(usersController),
|
|
57
|
-
schema: {
|
|
58
|
-
body: patchUserSchema,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
app.route({
|
|
63
|
-
method: 'DELETE',
|
|
64
|
-
url: '/:username',
|
|
65
|
-
preValidation: [validJWTNeeded, onlyAdminCanDoThisAction],
|
|
66
|
-
handler: usersController.removeByName.bind(usersController),
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
app.route({
|
|
70
|
-
method: 'GET',
|
|
71
|
-
url: '/:username/preferences/cameras/:cameraname/shortcuts',
|
|
72
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
73
|
-
handler: usersController.getShortcutsByCameraName.bind(usersController),
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
app.route({
|
|
77
|
-
method: 'GET',
|
|
78
|
-
url: '/:username/preferences/cameras/:cameraname/shortcuts/:shortcutid',
|
|
79
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
80
|
-
handler: usersController.getShortcutByCameraName.bind(usersController),
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
app.route({
|
|
84
|
-
method: 'DELETE',
|
|
85
|
-
url: '/:username/preferences/cameras/:cameraname/shortcuts/:shortcutid',
|
|
86
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
87
|
-
handler: usersController.removeShortcutByCameraName.bind(usersController),
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
91
|
-
method: 'POST',
|
|
92
|
-
url: '/:username/preferences/cameras/:cameraname/shortcuts',
|
|
93
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
94
|
-
handler: usersController.insertShortcut.bind(usersController),
|
|
95
|
-
schema: {
|
|
96
|
-
body: userPreferencesCameraShortcutLayout,
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
101
|
-
method: 'PATCH',
|
|
102
|
-
url: '/:username/preferences/cameras/:cameraname/shortcuts/:shortcutid',
|
|
103
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
104
|
-
handler: usersController.patchShortcutByCameraName.bind(usersController),
|
|
105
|
-
schema: {
|
|
106
|
-
body: patchPreferencesCameraShortcutLayout,
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
app.route({
|
|
111
|
-
method: 'DELETE',
|
|
112
|
-
url: '/:username/preferences/cameras/:cameraname/shortcuts',
|
|
113
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
114
|
-
handler: usersController.removeAllShortcutsByCameraName.bind(usersController),
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
app.route({
|
|
118
|
-
method: 'GET',
|
|
119
|
-
url: '/:username/preferences/camview/views',
|
|
120
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
121
|
-
preSerialization: [pages],
|
|
122
|
-
handler: usersController.listViews.bind(usersController),
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
app.route({
|
|
126
|
-
method: 'DELETE',
|
|
127
|
-
url: '/:username/preferences/camview/views',
|
|
128
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
129
|
-
preSerialization: [pages],
|
|
130
|
-
handler: usersController.removeAllViews.bind(usersController),
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
app.route({
|
|
134
|
-
method: 'GET',
|
|
135
|
-
url: '/:username/preferences/camview/views/:viewid',
|
|
136
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
137
|
-
handler: usersController.getViewById.bind(usersController),
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
141
|
-
method: 'POST',
|
|
142
|
-
url: '/:username/preferences/camview/views',
|
|
143
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
144
|
-
handler: usersController.insertView.bind(usersController),
|
|
145
|
-
schema: {
|
|
146
|
-
body: userPreferencesCamviewViewsLayout,
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
app.withTypeProvider<ZodTypeProvider>().route({
|
|
151
|
-
method: 'PATCH',
|
|
152
|
-
url: '/:username/preferences/camview/views/:viewid',
|
|
153
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
154
|
-
handler: usersController.patchViewById.bind(usersController),
|
|
155
|
-
schema: {
|
|
156
|
-
body: patchPreferencesCamviewViewsLayout,
|
|
157
|
-
},
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
app.route({
|
|
161
|
-
method: 'DELETE',
|
|
162
|
-
url: '/:username/preferences/camview/views/:viewid',
|
|
163
|
-
preValidation: [validJWTNeeded, onlySameUserOrAdminCanDoThisAction],
|
|
164
|
-
preSerialization: [pages],
|
|
165
|
-
handler: usersController.removeViewById.bind(usersController),
|
|
166
|
-
});
|
|
167
|
-
};
|