@camera.ui/browser 0.0.109 → 0.0.111
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/bundle.js +1 -1
- package/dist/bundle.js.LICENSE.txt +11 -20
- package/dist/types/packages/client/browser/src/client.d.ts +5 -7
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +20 -24
- package/dist/types/packages/client/browser/src/proxy/coreManager.d.ts +10 -12
- package/dist/types/packages/client/browser/src/proxy/deviceManager.d.ts +10 -12
- package/dist/types/packages/client/browser/src/proxy.d.ts +7 -0
- package/dist/types/packages/client/browser/src/streaming/config.d.ts +21 -0
- package/dist/types/packages/client/browser/src/streaming/go2rts-session.d.ts +255 -40
- package/dist/types/packages/client/browser/src/streaming/types.d.ts +38 -0
- package/dist/types/packages/client/browser/src/types.d.ts +6 -8
- package/dist/types/packages/types/src/index.d.ts +304 -222
- package/dist/types/server/src/api/database/types.d.ts +17 -25
- package/dist/types/server/src/api/go2rtc/types.d.ts +66 -11
- package/dist/types/server/src/api/schemas/backup.schema.d.ts +24 -24
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +1414 -530
- package/dist/types/server/src/api/schemas/config.schema.d.ts +30 -42
- package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +186 -154
- package/dist/types/server/src/api/schemas/plugins.schema.d.ts +17 -17
- package/dist/types/server/src/api/schemas/storage.schema.d.ts +22 -0
- package/dist/types/server/src/api/schemas/system.schema.d.ts +171 -3
- package/dist/types/server/src/api/schemas/users.schema.d.ts +162 -318
- package/dist/types/server/src/api/types/index.d.ts +48 -46
- package/dist/types/server/src/api/websocket/types.d.ts +4 -2
- package/dist/types/server/src/camera/classes.d.ts +2 -0
- package/dist/types/{packages/plugineer/src/polyglot/node → server/src}/camera/index.d.ts +33 -32
- package/dist/types/server/src/camera/interfaces.d.ts +17 -0
- package/dist/types/{packages/plugineer/src/polyglot/node → server/src}/camera/polygon.d.ts +2 -2
- package/dist/types/server/src/camera/types.d.ts +16 -10
- package/dist/types/server/src/go2rtc/types.d.ts +5 -4
- package/dist/types/server/src/manager/types.d.ts +15 -0
- package/dist/types/server/src/plugins/schema.d.ts +27 -34
- package/dist/types/server/src/plugins/types.d.ts +43 -1
- package/dist/types/server/src/rpc/namespaces.d.ts +35 -0
- package/dist/types/server/src/rpc/types.d.ts +111 -0
- package/dist/types/server/src/services/config/defaults.d.ts +12 -0
- package/dist/types/server/src/services/config/types.d.ts +10 -4
- package/dist/types/server/src/types.d.ts +3 -0
- package/dist/types/shared/types/index.d.ts +9 -8
- package/package.json +19 -16
- package/dist/types/packages/client/browser/src/socket.d.ts +0 -15
- package/dist/types/packages/common/src/nats/messageQueue.d.ts +0 -48
- package/dist/types/packages/common/src/nats/nats.d.ts +0 -30
- package/dist/types/packages/common/src/nats/packer.d.ts +0 -2
- package/dist/types/packages/plugineer/src/polyglot/node/camera/interfaces/camera.d.ts +0 -8
- package/dist/types/packages/plugineer/src/polyglot/node/camera/interfaces/ptz.d.ts +0 -11
- package/dist/types/packages/plugineer/src/polyglot/node/camera/types.d.ts +0 -18
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/schema.d.ts +0 -62
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/types.d.ts +0 -135
- package/dist/types/packages/plugineer/src/types.d.ts +0 -4
- package/dist/types/server/src/api/controllers/api.controller.d.ts +0 -7
- package/dist/types/server/src/api/controllers/auth.controller.d.ts +0 -16
- package/dist/types/server/src/api/controllers/backup.controller.d.ts +0 -10
- package/dist/types/server/src/api/controllers/cameras.controller.d.ts +0 -38
- package/dist/types/server/src/api/controllers/config.controller.d.ts +0 -14
- package/dist/types/server/src/api/controllers/files.controller.d.ts +0 -8
- package/dist/types/server/src/api/controllers/frameWorkers.controller.d.ts +0 -11
- package/dist/types/server/src/api/controllers/plugins.controller.d.ts +0 -48
- package/dist/types/server/src/api/controllers/system.controller.d.ts +0 -23
- package/dist/types/server/src/api/controllers/users.controller.d.ts +0 -28
- package/dist/types/server/src/api/database/checks.d.ts +0 -55
- package/dist/types/server/src/api/database/constants.d.ts +0 -8
- package/dist/types/server/src/api/database/index.d.ts +0 -30
- package/dist/types/server/src/api/database/migration.d.ts +0 -15
- package/dist/types/server/src/api/database/selfcheck.d.ts +0 -48
- package/dist/types/server/src/api/go2rtc/api/application.d.ts +0 -9
- package/dist/types/server/src/api/go2rtc/api/config.d.ts +0 -8
- package/dist/types/server/src/api/go2rtc/api/index.d.ts +0 -1
- package/dist/types/server/src/api/go2rtc/api/snapshot.d.ts +0 -8
- package/dist/types/server/src/api/go2rtc/api/streams.d.ts +0 -12
- package/dist/types/server/src/api/go2rtc/index.d.ts +0 -14
- package/dist/types/server/src/api/go2rtc/queue.d.ts +0 -10
- package/dist/types/server/src/api/index.d.ts +0 -22
- package/dist/types/server/src/api/middlewares/authPermission.middleware.d.ts +0 -5
- package/dist/types/server/src/api/middlewares/authValidation.middleware.d.ts +0 -4
- package/dist/types/server/src/api/middlewares/pagination.middleware.d.ts +0 -3
- package/dist/types/server/src/api/middlewares/socketAuth.middleware.d.ts +0 -41
- package/dist/types/server/src/api/plugins/header.plugin.d.ts +0 -2
- package/dist/types/server/src/api/plugins/socket.plugin.d.ts +0 -11
- package/dist/types/server/src/api/plugins/system.plugin.d.ts +0 -20
- package/dist/types/server/src/api/plugins/useragent.plugin.d.ts +0 -8
- package/dist/types/server/src/api/routes/api.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/auth.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/backup.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/cameras.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/config.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/files.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/frameWorkers.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/index.d.ts +0 -6
- package/dist/types/server/src/api/routes/plugins.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/system.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/users.routes.d.ts +0 -2
- package/dist/types/server/src/api/services/auth.service.d.ts +0 -24
- package/dist/types/server/src/api/services/backup.service.d.ts +0 -11
- package/dist/types/server/src/api/services/cameras.service.d.ts +0 -55
- package/dist/types/server/src/api/services/plugins.service.d.ts +0 -38
- package/dist/types/server/src/api/services/system.service.d.ts +0 -13
- package/dist/types/server/src/api/services/users.service.d.ts +0 -25
- package/dist/types/server/src/api/utils/cameraSource.d.ts +0 -6
- package/dist/types/server/src/api/utils/cert.d.ts +0 -11
- package/dist/types/server/src/api/utils/constants.d.ts +0 -13
- package/dist/types/server/src/api/utils/fetch.d.ts +0 -1
- package/dist/types/server/src/api/utils/moveFiles.d.ts +0 -4
- package/dist/types/server/src/api/utils/parse.d.ts +0 -2
- package/dist/types/server/src/api/websocket/go2rtc.d.ts +0 -21
- package/dist/types/server/src/api/websocket/index.d.ts +0 -16
- package/dist/types/server/src/api/websocket/nsp/logs.d.ts +0 -19
- package/dist/types/server/src/api/websocket/nsp/main.d.ts +0 -9
- package/dist/types/server/src/api/websocket/nsp/metrics.d.ts +0 -24
- package/dist/types/server/src/api/websocket/nsp/notifications.d.ts +0 -12
- package/dist/types/server/src/api/websocket/nsp/plugins.d.ts +0 -13
- package/dist/types/server/src/api/websocket/nsp/proxy.d.ts +0 -27
- package/dist/types/server/src/api/websocket/nsp/server.d.ts +0 -26
- package/dist/types/server/src/api/websocket/nsp/status.d.ts +0 -15
- package/dist/types/server/src/api.d.ts +0 -29
- package/dist/types/server/src/camera/controller.d.ts +0 -61
- package/dist/types/server/src/camera/frameWorker.d.ts +0 -45
- package/dist/types/server/src/go2rtc/index.d.ts +0 -25
- package/dist/types/server/src/main.d.ts +0 -25
- package/dist/types/server/src/nats/index.d.ts +0 -40
- package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +0 -22
- package/dist/types/server/src/nats/proxy/coreManager.d.ts +0 -14
- package/dist/types/server/src/nats/proxy/deviceManager.d.ts +0 -14
- package/dist/types/server/src/nats/server.d.ts +0 -38
- package/dist/types/server/src/nats/types.d.ts +0 -18
- package/dist/types/server/src/nats/utils.d.ts +0 -2
- package/dist/types/server/src/plugins/index.d.ts +0 -33
- package/dist/types/server/src/plugins/plugin.d.ts +0 -35
- package/dist/types/server/src/plugins/worker.d.ts +0 -55
- package/dist/types/server/src/services/config/constants.d.ts +0 -6
- package/dist/types/server/src/services/config/index.d.ts +0 -67
- package/dist/types/server/src/services/logger/index.d.ts +0 -16
- /package/dist/types/{packages/plugineer/src/polyglot/node → server/src}/camera/iou.d.ts +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { DBCamera } from '../database/types.js';
|
|
3
|
-
import type { AuthLoginRequest, CameraSnapshotQueryRequest, CameraSourceParamsRequest, CameraZoneInsertPatchRequest, CameraZonesParamsRequest, CamerasExtensionsParamsRequest, CamerasExtensionsRequest, CamerasInsertRequest, CamerasParamsIdRequest, CamerasParamsRequest, CamerasPatchRequest, CamerasPreviewRequest, ExtensionsPatchRequest, ExtensionsSubmitRequest, PaginationRequest } from '../types/index.js';
|
|
4
|
-
export declare class CamerasController {
|
|
5
|
-
private app;
|
|
6
|
-
private api;
|
|
7
|
-
private go2rtcApi;
|
|
8
|
-
private configService;
|
|
9
|
-
private service;
|
|
10
|
-
private pluginsService;
|
|
11
|
-
private proxyServer;
|
|
12
|
-
constructor(app: FastifyInstance);
|
|
13
|
-
getByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
14
|
-
getZoneByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
15
|
-
insertZone(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZoneInsertPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
patchZoneByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesParamsRequest & CameraZoneInsertPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
17
|
-
removeZoneByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
18
|
-
getExtensionsByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
19
|
-
getExtensionConfigByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
20
|
-
patchExtensionConfigByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & ExtensionsPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
21
|
-
submitExtensionConfigByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & ExtensionsSubmitRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
22
|
-
probeSourceByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraSourceParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
23
|
-
getSnapshotByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraSnapshotQueryRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
24
|
-
getSnapshotById(req: FastifyRequest<AuthLoginRequest & CamerasParamsIdRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
25
|
-
insert(req: FastifyRequest<AuthLoginRequest & CamerasInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
26
|
-
preview(req: FastifyRequest<AuthLoginRequest & CamerasPreviewRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
27
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | DBCamera[];
|
|
28
|
-
patchByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CamerasPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
29
|
-
clearLog(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): FastifyReply | void;
|
|
30
|
-
downloadLog(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): FastifyReply | void;
|
|
31
|
-
enableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
32
|
-
disableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
33
|
-
addExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
34
|
-
removeExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
35
|
-
removeByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
36
|
-
removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
37
|
-
private resolvePluginName;
|
|
38
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, ConfigPatchRequest, ConfigRequest, Go2RtcConfigPatchRequest } from '../types/index.js';
|
|
3
|
-
export declare class ConfigController {
|
|
4
|
-
private app;
|
|
5
|
-
private configService;
|
|
6
|
-
private go2rtcApi;
|
|
7
|
-
constructor(app: FastifyInstance);
|
|
8
|
-
showConfig(req: FastifyRequest<AuthLoginRequest & ConfigRequest>, reply: FastifyReply): FastifyReply;
|
|
9
|
-
showGo2RtcConfig(req: FastifyRequest<AuthLoginRequest & ConfigRequest>, reply: FastifyReply): FastifyReply;
|
|
10
|
-
downloadConfig(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
11
|
-
downloadGo2RtcConfig(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
12
|
-
patchConfig(req: FastifyRequest<AuthLoginRequest & ConfigPatchRequest>, reply: FastifyReply): FastifyReply | void;
|
|
13
|
-
patchGo2RtcConfig(req: FastifyRequest<AuthLoginRequest & Go2RtcConfigPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, FilesParamsRequest } from '../types/index.js';
|
|
3
|
-
export declare class FilesController {
|
|
4
|
-
private app;
|
|
5
|
-
private configService;
|
|
6
|
-
constructor(app: FastifyInstance);
|
|
7
|
-
serve(req: FastifyRequest<AuthLoginRequest & FilesParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, FrameWorker, FrameWorkerParamsNameRequest, PaginationRequest } from '../types/index.js';
|
|
3
|
-
export declare class FrameWorkersController {
|
|
4
|
-
private app;
|
|
5
|
-
private api;
|
|
6
|
-
constructor(app: FastifyInstance);
|
|
7
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | FrameWorker[];
|
|
8
|
-
restartByName(req: FastifyRequest<AuthLoginRequest & FrameWorkerParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
9
|
-
startByName(req: FastifyRequest<AuthLoginRequest & FrameWorkerParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
10
|
-
stopByName(req: FastifyRequest<AuthLoginRequest & FrameWorkerParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
11
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, CameraUiPlugin, PaginationRequest, PluginExtension, PluginsActionRequest, PluginsConfigPatchRequest, PluginsDetectAudioRequest, PluginsDetectMotionRequest, PluginsDetectObjectRequest, PluginsInsertRequest, PluginsInterfaceQuery, PluginsParamsNameRequest, PluginsParamsRemoveRequest, PluginsQueryRequest } from '../types/index.js';
|
|
3
|
-
export declare class PluginsController {
|
|
4
|
-
private app;
|
|
5
|
-
private logger;
|
|
6
|
-
private configService;
|
|
7
|
-
private io;
|
|
8
|
-
private pluginManager;
|
|
9
|
-
private proxyServer;
|
|
10
|
-
private service;
|
|
11
|
-
private camerasService;
|
|
12
|
-
private socketService;
|
|
13
|
-
constructor(app: FastifyInstance);
|
|
14
|
-
enableByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
15
|
-
disableByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
getByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply;
|
|
17
|
-
getPluginUpdateByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
18
|
-
getVersionsByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
19
|
-
getChangelogByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
20
|
-
getConfigJsonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
21
|
-
getPluginLogoByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
22
|
-
getPluginSchemaByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
23
|
-
getPluginInterface(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsInterfaceQuery>, reply: FastifyReply): Promise<FastifyReply>;
|
|
24
|
-
detectObjects(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsDetectObjectRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
25
|
-
detectAudio(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsDetectAudioRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
26
|
-
detectMotion(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsDetectMotionRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
27
|
-
submitActionButtonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsActionRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
28
|
-
getContractByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply;
|
|
29
|
-
getReadmeByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsQueryRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
30
|
-
getReleaseByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
31
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | CameraUiPlugin[];
|
|
32
|
-
listExtensions(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | PluginExtension[];
|
|
33
|
-
patchConfigJsonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsConfigPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
34
|
-
restartByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
35
|
-
clearLog(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply | void;
|
|
36
|
-
downloadLog(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply | void;
|
|
37
|
-
search(req: FastifyRequest<AuthLoginRequest & PluginsQueryRequest & PaginationRequest>, reply: FastifyReply): Promise<FastifyReply | CameraUiPlugin[]>;
|
|
38
|
-
startByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
39
|
-
stopByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
40
|
-
installOrUpdate(req: FastifyRequest<AuthLoginRequest & PluginsInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
41
|
-
uninstallByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
42
|
-
uninstallAll(req: FastifyRequest<AuthLoginRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
43
|
-
private getAvailablePluginVersions;
|
|
44
|
-
private getPluginFromNpm;
|
|
45
|
-
private searchNpmRegistrySingle;
|
|
46
|
-
private resolvePluginName;
|
|
47
|
-
private isScopedPlugin;
|
|
48
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, FilesParamsRequest, ServerUpdateRequest, SystemPatchRequest } from '../types/index.js';
|
|
3
|
-
export declare class SystemController {
|
|
4
|
-
private app;
|
|
5
|
-
private configService;
|
|
6
|
-
private go2rtcApi;
|
|
7
|
-
private proxy;
|
|
8
|
-
private logger;
|
|
9
|
-
private socketService;
|
|
10
|
-
private service;
|
|
11
|
-
constructor(app: FastifyInstance);
|
|
12
|
-
updateServer(req: FastifyRequest<AuthLoginRequest & ServerUpdateRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
13
|
-
systemInfo(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
14
|
-
patchSystemInfo(req: FastifyRequest<AuthLoginRequest & SystemPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
15
|
-
checkVersion(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
natsInfo(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
17
|
-
go2rtcInfo(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
18
|
-
clearLog(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): FastifyReply | void;
|
|
19
|
-
downloadLog(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): FastifyReply | void;
|
|
20
|
-
downloadCert(req: FastifyRequest<AuthLoginRequest & FilesParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
21
|
-
restart(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
22
|
-
restartGo2rtc(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
23
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { DBCamviewLayout, DBUser } from '../database/types.js';
|
|
3
|
-
import type { AuthLoginRequest, AuthParamsRequest, CamerasParamsRequest, PaginationRequest, ShortcutInsertRequest, ShortcutParamsRequest, ShortcutPatchRequest, UsersInsertRequest, UsersParamsRequest, UsersPatchRequest, ViewsInsertRequest, ViewsParamsRequest, ViewsPatchRequest } from '../types/index.js';
|
|
4
|
-
export declare class UsersController {
|
|
5
|
-
private app;
|
|
6
|
-
private configService;
|
|
7
|
-
private service;
|
|
8
|
-
private camerasService;
|
|
9
|
-
constructor(app: FastifyInstance);
|
|
10
|
-
insert(req: FastifyRequest<AuthLoginRequest & UsersInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
11
|
-
getByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
12
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | Partial<DBUser>[];
|
|
13
|
-
patchByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & UsersPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
14
|
-
removeByName(req: FastifyRequest<AuthLoginRequest & UsersParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
15
|
-
removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
insertShortcut(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
17
|
-
getShortcutByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
18
|
-
getShortcutsByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
19
|
-
patchShortcutByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest & ShortcutPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
20
|
-
removeShortcutByCameraName(req: FastifyRequest<AuthLoginRequest & PaginationRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
21
|
-
removeAllShortcutsByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
22
|
-
insertView(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
23
|
-
getViewById(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
24
|
-
listViews(req: FastifyRequest<AuthLoginRequest & PaginationRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): FastifyReply | Partial<DBUser>[];
|
|
25
|
-
patchViewById(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest & ViewsPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
26
|
-
removeViewById(req: FastifyRequest<AuthLoginRequest & PaginationRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | DBCamviewLayout[]>;
|
|
27
|
-
removeAllViews(req: FastifyRequest<AuthLoginRequest & PaginationRequest & AuthParamsRequest & UsersParamsRequest>, reply: FastifyReply): Promise<FastifyReply | DBCamviewLayout[]>;
|
|
28
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export interface PathExistenceResult {
|
|
2
|
-
path: string;
|
|
3
|
-
exists: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface FFmpegExistenceResult {
|
|
6
|
-
path: string;
|
|
7
|
-
exists: boolean;
|
|
8
|
-
hasPermissions: boolean;
|
|
9
|
-
error?: Error;
|
|
10
|
-
}
|
|
11
|
-
export interface PathPermissionsResult {
|
|
12
|
-
path: string;
|
|
13
|
-
hasPermissions: boolean;
|
|
14
|
-
error?: Error;
|
|
15
|
-
}
|
|
16
|
-
export interface CleanedUpFilesResult {
|
|
17
|
-
path: string;
|
|
18
|
-
wasCleaned: boolean;
|
|
19
|
-
error?: Error;
|
|
20
|
-
}
|
|
21
|
-
export interface DatabaseCorruptionResult {
|
|
22
|
-
dbPath: string;
|
|
23
|
-
isCorrupt: boolean;
|
|
24
|
-
error?: Error;
|
|
25
|
-
}
|
|
26
|
-
export interface PortAvailabilityResult {
|
|
27
|
-
port: number;
|
|
28
|
-
isAvailable: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface OrphanedProcessesResult {
|
|
31
|
-
processInfo: ProcInfo;
|
|
32
|
-
killed?: boolean;
|
|
33
|
-
wasOrphaned?: boolean;
|
|
34
|
-
error?: Error;
|
|
35
|
-
}
|
|
36
|
-
export interface PathPermission {
|
|
37
|
-
path: string;
|
|
38
|
-
mode: number;
|
|
39
|
-
}
|
|
40
|
-
export interface ProcInfo {
|
|
41
|
-
pid: number;
|
|
42
|
-
startTime: number;
|
|
43
|
-
command: string;
|
|
44
|
-
args: string[];
|
|
45
|
-
titles?: string[];
|
|
46
|
-
uniqueId?: string;
|
|
47
|
-
}
|
|
48
|
-
export declare function checkPathsExist(pathsToCheck: string[]): Promise<PathExistenceResult[]>;
|
|
49
|
-
export declare function checkPathPermissions(pathsWithPermissionsToCheck: PathPermission[]): Promise<PathPermissionsResult[]>;
|
|
50
|
-
export declare function cleanUpFiles(filesToClean: string[]): Promise<CleanedUpFilesResult[]>;
|
|
51
|
-
export declare function checkDatabaseCorruption(dbPath: string): Promise<DatabaseCorruptionResult>;
|
|
52
|
-
export declare function checkPortAvailability(portsToCheck: number[]): Promise<PortAvailabilityResult[]>;
|
|
53
|
-
export declare function checkFfmpegBinary(ffmpegPaths: string[]): Promise<PathExistenceResult[]>;
|
|
54
|
-
export declare function checkOrphanedProcesses(processInfos: ProcInfo[]): Promise<OrphanedProcessesResult[]>;
|
|
55
|
-
export declare function checkInstalledFFmpegs(): Promise<FFmpegExistenceResult[]>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const CAMERAS_ID = "cameras";
|
|
2
|
-
export declare const DATABASE_ID = "database";
|
|
3
|
-
export declare const PLUGINS_ID = "plugins";
|
|
4
|
-
export declare const USER_PLUGINS_ID = "user-plugins";
|
|
5
|
-
export declare const SETTINGS_ID = "settings";
|
|
6
|
-
export declare const USERS_ID = "users";
|
|
7
|
-
export declare const SYSTEM_ID = "system";
|
|
8
|
-
export declare const TOKENS_ID = "tokens";
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Database as DB, RootDatabase as RootDB } from 'lmdb';
|
|
2
|
-
import type { DBAuth, DBCamera, DBPlugin, DBSettings, DBSystem, DBUser } from './types.js';
|
|
3
|
-
export declare class Database {
|
|
4
|
-
static readonly VERSION = "1.0.9";
|
|
5
|
-
authDB: RootDB<DBAuth, 'auth'>;
|
|
6
|
-
camerasDB: DB<DBCamera[], 'cameras'>;
|
|
7
|
-
pluginsDB: DB<DBPlugin[], 'plugins'>;
|
|
8
|
-
settingsDB: DB<DBSettings, 'settings'>;
|
|
9
|
-
usersDB: DB<DBUser[], 'users'>;
|
|
10
|
-
systemDB: DB<DBSystem, 'system'>;
|
|
11
|
-
private lowdb;
|
|
12
|
-
private databaseMigration;
|
|
13
|
-
private selfCheck;
|
|
14
|
-
private configService;
|
|
15
|
-
private logger;
|
|
16
|
-
private api;
|
|
17
|
-
private authDbPath;
|
|
18
|
-
constructor();
|
|
19
|
-
initialize(): Promise<void>;
|
|
20
|
-
close(): Promise<void>;
|
|
21
|
-
getRootAdminId(): Promise<string | null>;
|
|
22
|
-
updateCameras(): Promise<void>;
|
|
23
|
-
private ensureDatabases;
|
|
24
|
-
private prepareDatabases;
|
|
25
|
-
private ensureAdmin;
|
|
26
|
-
private initializeRootAdmin;
|
|
27
|
-
private generateAdmin;
|
|
28
|
-
private saveRootAdminSecret;
|
|
29
|
-
private updateConfig;
|
|
30
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Database as DB, RootDatabase as RootDB } from 'lmdb';
|
|
2
|
-
import type { DBAuth, DBCamera, DBPlugin, DBSettings, DBSystem, DBUser } from './types.js';
|
|
3
|
-
export declare class DatabaseMigrationTable {
|
|
4
|
-
private authDB;
|
|
5
|
-
private camerasDB;
|
|
6
|
-
private pluginsDB;
|
|
7
|
-
private settingsDB;
|
|
8
|
-
private usersDB;
|
|
9
|
-
private systemDB;
|
|
10
|
-
private logger;
|
|
11
|
-
private configService;
|
|
12
|
-
constructor(authDB: RootDB<DBAuth, 'auth'>, camerasDB: DB<DBCamera[], 'cameras'>, pluginsDB: DB<DBPlugin[], 'plugins'>, settingsDB: DB<DBSettings, 'settings'>, usersDB: DB<DBUser[], 'users'>, systemDB: DB<DBSystem, 'system'>);
|
|
13
|
-
migrate(): Promise<void>;
|
|
14
|
-
private getMigrations;
|
|
15
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { CleanedUpFilesResult, DatabaseCorruptionResult, FFmpegExistenceResult, OrphanedProcessesResult, PathExistenceResult, PathPermissionsResult, PortAvailabilityResult } from './checks.js';
|
|
2
|
-
export interface SelfCheckConfig {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
checks: {
|
|
5
|
-
pathsExistence: boolean;
|
|
6
|
-
pathsPermissions: boolean;
|
|
7
|
-
cleanupFiles: boolean;
|
|
8
|
-
databaseCorruption: boolean;
|
|
9
|
-
portAvailability: boolean;
|
|
10
|
-
ffmpegBinaries: boolean;
|
|
11
|
-
orphanedProcesses: boolean;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export interface SelfCheckResults {
|
|
15
|
-
status: 'success' | 'error' | 'disabled';
|
|
16
|
-
error?: string;
|
|
17
|
-
pathsExistence?: PathExistenceResult[];
|
|
18
|
-
pathsPermissions?: PathPermissionsResult[];
|
|
19
|
-
cleanedUpFiles?: CleanedUpFilesResult[];
|
|
20
|
-
databaseCorruption?: DatabaseCorruptionResult;
|
|
21
|
-
portAvailability?: PortAvailabilityResult[];
|
|
22
|
-
installedFFmpegs?: FFmpegExistenceResult[];
|
|
23
|
-
orphanedProcesses?: OrphanedProcessesResult[];
|
|
24
|
-
}
|
|
25
|
-
export declare class SelfCheck {
|
|
26
|
-
private logger;
|
|
27
|
-
private configService;
|
|
28
|
-
private config;
|
|
29
|
-
constructor(config?: Partial<SelfCheckConfig>);
|
|
30
|
-
run(): Promise<void>;
|
|
31
|
-
private performChecks;
|
|
32
|
-
private checkForCriticalIssues;
|
|
33
|
-
private checkForNonCriticalIssues;
|
|
34
|
-
private saveCheckReport;
|
|
35
|
-
private generateCheckReport;
|
|
36
|
-
private formatIssues;
|
|
37
|
-
private formatPathsExistence;
|
|
38
|
-
private formatPathsPermissions;
|
|
39
|
-
private formatCleanedUpFiles;
|
|
40
|
-
private formatDatabaseCorruption;
|
|
41
|
-
private formatPortAvailability;
|
|
42
|
-
private formatFfmpegBinaries;
|
|
43
|
-
private formatOrphanedProcesses;
|
|
44
|
-
private sanitizeDetails;
|
|
45
|
-
private serializeError;
|
|
46
|
-
private getPathName;
|
|
47
|
-
private isCriticalPath;
|
|
48
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RequestQueue } from '../queue.js';
|
|
2
|
-
import type { ApplicationResponse, ExitData } from '../types.js';
|
|
3
|
-
export declare class ApplicationApi {
|
|
4
|
-
private requestQueue;
|
|
5
|
-
constructor(requestQueue: RequestQueue);
|
|
6
|
-
close(data: ExitData): Promise<void>;
|
|
7
|
-
info(): Promise<ApplicationResponse>;
|
|
8
|
-
restart(): Promise<void>;
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RequestQueue } from '../queue.js';
|
|
2
|
-
export declare class ConfigApi {
|
|
3
|
-
private requestQueue;
|
|
4
|
-
constructor(requestQueue: RequestQueue);
|
|
5
|
-
getConfig(): Promise<any>;
|
|
6
|
-
rewriteConfig(data: Record<string, any>): Promise<void>;
|
|
7
|
-
mergeConfig(data: Record<string, any>): Promise<void>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const fetchInstance: () => ((url: RequestInfo, options?: RequestInit) => Promise<Response>);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RequestQueue } from '../queue.js';
|
|
2
|
-
import type { SourceData } from '../types.js';
|
|
3
|
-
export declare class SnapshotApi {
|
|
4
|
-
private requestQueue;
|
|
5
|
-
constructor(requestQueue: RequestQueue);
|
|
6
|
-
jpeg(data: SourceData): Promise<ArrayBuffer>;
|
|
7
|
-
mp4(data: SourceData): Promise<ArrayBuffer>;
|
|
8
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ProbeConfig } from '@camera.ui/types';
|
|
2
|
-
import type { RequestQueue } from '../queue.js';
|
|
3
|
-
import type { CreateStreamData, Go2RTCProbe, SourceData, UpdateStreamData } from '../types.js';
|
|
4
|
-
export declare class StreamsApi {
|
|
5
|
-
private requestQueue;
|
|
6
|
-
constructor(requestQueue: RequestQueue);
|
|
7
|
-
createStream(data: CreateStreamData): Promise<void>;
|
|
8
|
-
deleteStream(data: SourceData): Promise<void>;
|
|
9
|
-
getStreamInfo(data: SourceData): Promise<Go2RTCProbe>;
|
|
10
|
-
updateStreamSource(data: UpdateStreamData): Promise<void>;
|
|
11
|
-
probeStreamSource(data: SourceData, probeData?: ProbeConfig): Promise<Go2RTCProbe>;
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ApplicationApi } from './api/application.js';
|
|
2
|
-
import { ConfigApi } from './api/config.js';
|
|
3
|
-
import { SnapshotApi } from './api/snapshot.js';
|
|
4
|
-
import { StreamsApi } from './api/streams.js';
|
|
5
|
-
export declare class Go2RtcApi {
|
|
6
|
-
private api;
|
|
7
|
-
private requestQueue;
|
|
8
|
-
applicationApi: ApplicationApi;
|
|
9
|
-
configApi: ConfigApi;
|
|
10
|
-
snapshotApi: SnapshotApi;
|
|
11
|
-
streamsApi: StreamsApi;
|
|
12
|
-
constructor();
|
|
13
|
-
clear(): void;
|
|
14
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance } from 'fastify';
|
|
2
|
-
import type { Http2SecureServer } from 'http2';
|
|
3
|
-
export declare class Server {
|
|
4
|
-
isRunning: boolean;
|
|
5
|
-
app?: FastifyInstance<Http2SecureServer>;
|
|
6
|
-
private api;
|
|
7
|
-
private logger;
|
|
8
|
-
private configService;
|
|
9
|
-
constructor();
|
|
10
|
-
register(): Promise<void>;
|
|
11
|
-
listen(): Promise<void>;
|
|
12
|
-
close(): Promise<void>;
|
|
13
|
-
private setupListeners;
|
|
14
|
-
private registerPlugins;
|
|
15
|
-
private registerRouters;
|
|
16
|
-
private get corsOptions();
|
|
17
|
-
private get helmetOptions();
|
|
18
|
-
private get serverOptions();
|
|
19
|
-
private qsParser;
|
|
20
|
-
private get socketOptions();
|
|
21
|
-
private get staticOptions();
|
|
22
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, AuthParamsRequest } from '../types/index.js';
|
|
3
|
-
export declare const onlyAdminCanDoThisAction: (req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply) => Promise<FastifyReply>;
|
|
4
|
-
export declare const onlySameUserOrAdminCanDoThisAction: (req: FastifyRequest<AuthLoginRequest & AuthParamsRequest>, reply: FastifyReply) => Promise<FastifyReply>;
|
|
5
|
-
export declare const sameUserCantDoThisAction: (req: FastifyRequest<AuthLoginRequest & AuthParamsRequest>, reply: FastifyReply) => Promise<FastifyReply>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, AuthNewLoginRequest } from '../types/index.js';
|
|
3
|
-
export declare const isPasswordAndUserMatch: (req: FastifyRequest<AuthNewLoginRequest>, reply: FastifyReply) => Promise<FastifyReply>;
|
|
4
|
-
export declare const validJWTNeeded: (req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply) => Promise<FastifyReply>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, PaginationRequest, PaginationResponse } from '../types/index.js';
|
|
3
|
-
export declare const pages: (req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply, payload: any) => Promise<PaginationResponse | void>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { Algorithm } from 'jsonwebtoken';
|
|
2
|
-
import type { Socket } from 'socket.io';
|
|
3
|
-
export declare class UnauthorizedError extends Error {
|
|
4
|
-
inner: {
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
7
|
-
data: {
|
|
8
|
-
message: string;
|
|
9
|
-
code: string;
|
|
10
|
-
type: 'UnauthorizedError';
|
|
11
|
-
};
|
|
12
|
-
constructor(code: string, error: {
|
|
13
|
-
message: string;
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
export declare const isUnauthorizedError: (error: unknown) => error is UnauthorizedError;
|
|
17
|
-
declare module 'socket.io' {
|
|
18
|
-
interface Socket extends ExtendedSocket {
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
interface ExtendedSocket {
|
|
22
|
-
encodedToken?: string;
|
|
23
|
-
decodedToken?: any;
|
|
24
|
-
user?: any;
|
|
25
|
-
}
|
|
26
|
-
type SocketIOMiddleware = (socket: Socket, next: (error?: UnauthorizedError) => void) => void;
|
|
27
|
-
interface CompleteDecodedToken {
|
|
28
|
-
header: {
|
|
29
|
-
alg: Algorithm;
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
};
|
|
32
|
-
payload: any;
|
|
33
|
-
}
|
|
34
|
-
type SecretCallback = (decodedToken: CompleteDecodedToken) => Promise<string> | string;
|
|
35
|
-
export interface AuthorizeOptions {
|
|
36
|
-
secret: string | SecretCallback;
|
|
37
|
-
algorithms?: Algorithm[];
|
|
38
|
-
onAuthentication?: (decodedToken: any) => Promise<any>;
|
|
39
|
-
}
|
|
40
|
-
export declare const authorize: (options: AuthorizeOptions) => SocketIOMiddleware;
|
|
41
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { FastifyPluginAsync } from 'fastify';
|
|
2
|
-
import type { Server, ServerOptions } from 'socket.io';
|
|
3
|
-
declare module 'fastify' {
|
|
4
|
-
interface FastifyInstance {
|
|
5
|
-
io: Server;
|
|
6
|
-
}
|
|
7
|
-
interface FastifyRequest {
|
|
8
|
-
io: Server;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare const SocketIoPlugin: FastifyPluginAsync<Partial<ServerOptions>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
|
2
|
-
declare module 'fastify' {
|
|
3
|
-
interface FastifyInstance {
|
|
4
|
-
system: System;
|
|
5
|
-
}
|
|
6
|
-
interface FastifyRequest {
|
|
7
|
-
system: System;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
declare class System {
|
|
11
|
-
private app;
|
|
12
|
-
private cameraui;
|
|
13
|
-
private go2rtc;
|
|
14
|
-
constructor(app: FastifyInstance);
|
|
15
|
-
close(): void;
|
|
16
|
-
restart(): Promise<void>;
|
|
17
|
-
restartGo2rtc(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
export declare const SystemPlugin: FastifyPluginAsync;
|
|
20
|
-
export {};
|