@camera.ui/browser 0.0.72 → 0.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +1 -1
  3. package/dist/types/packages/client/browser/src/streaming/streaming-session.d.ts +2 -1
  4. package/dist/types/packages/client/browser/src/types.d.ts +2 -2
  5. package/dist/types/server/src/api/controllers/api.controller.d.ts +6 -0
  6. package/dist/types/server/src/api/controllers/auth.controller.d.ts +20 -0
  7. package/dist/types/server/src/api/controllers/backup.controller.d.ts +10 -0
  8. package/dist/types/server/src/api/controllers/cameras.controller.d.ts +33 -0
  9. package/dist/types/server/src/api/controllers/config.controller.d.ts +14 -0
  10. package/dist/types/server/src/api/controllers/files.controller.d.ts +8 -0
  11. package/dist/types/server/src/api/controllers/plugins.controller.d.ts +54 -0
  12. package/dist/types/server/src/api/controllers/streams.controller.d.ts +12 -0
  13. package/dist/types/server/src/api/controllers/system.controller.d.ts +14 -0
  14. package/dist/types/server/src/api/controllers/users.controller.d.ts +15 -0
  15. package/dist/types/server/src/api/database/index.d.ts +1 -1
  16. package/dist/types/server/src/api/go2rtc/api/application.d.ts +1 -1
  17. package/dist/types/server/src/api/go2rtc/api/config.d.ts +1 -1
  18. package/dist/types/server/src/api/go2rtc/api/snapshot.d.ts +1 -1
  19. package/dist/types/server/src/api/go2rtc/api/streams.d.ts +1 -1
  20. package/dist/types/server/src/api/index.d.ts +24 -0
  21. package/dist/types/server/src/api/middlewares/authPermission.middleware.d.ts +5 -0
  22. package/dist/types/server/src/api/middlewares/authValidation.middleware.d.ts +4 -0
  23. package/dist/types/server/src/api/middlewares/pagination.middleware.d.ts +3 -0
  24. package/dist/types/server/src/api/plugins/cameraui.plugin.d.ts +11 -0
  25. package/dist/types/server/src/api/plugins/database.plugin.d.ts +11 -0
  26. package/dist/types/server/src/api/plugins/go2rtc.plugin.d.ts +11 -0
  27. package/dist/types/server/src/api/plugins/socket.plugin.d.ts +11 -0
  28. package/dist/types/server/src/api/plugins/system.plugin.d.ts +21 -0
  29. package/dist/types/server/src/api/plugins/useragent.plugin.d.ts +8 -0
  30. package/dist/types/server/src/api/routes/api.routes.d.ts +2 -0
  31. package/dist/types/server/src/api/routes/auth.routes.d.ts +2 -0
  32. package/dist/types/server/src/api/routes/backup.routes.d.ts +2 -0
  33. package/dist/types/server/src/api/routes/cameras.routes.d.ts +2 -0
  34. package/dist/types/server/src/api/routes/config.routes.d.ts +2 -0
  35. package/dist/types/server/src/api/routes/files.routes.d.ts +2 -0
  36. package/dist/types/server/src/api/routes/index.d.ts +7 -0
  37. package/dist/types/server/src/api/routes/plugins.routes.d.ts +2 -0
  38. package/dist/types/server/src/api/routes/streams.routes.d.ts +2 -0
  39. package/dist/types/server/src/api/routes/system.routes.d.ts +2 -0
  40. package/dist/types/server/src/api/routes/users.routes.d.ts +2 -0
  41. package/dist/types/server/src/api/schemas/plugins.schema.d.ts +25 -0
  42. package/dist/types/server/src/api/services/backup.service.d.ts +10 -0
  43. package/dist/types/server/src/api/utils/axios.d.ts +2 -0
  44. package/dist/types/server/src/api/utils/cert.d.ts +11 -0
  45. package/dist/types/server/src/api/utils/moveFiles.d.ts +1 -0
  46. package/dist/types/server/src/api/websocket/nsp/status.d.ts +1 -1
  47. package/dist/types/server/src/api/websocket/types.d.ts +1 -1
  48. package/dist/types/server/src/api.d.ts +4 -4
  49. package/dist/types/server/src/{devices/camera → camera}/cameraDevice.d.ts +1 -1
  50. package/dist/types/server/src/{devices/camera → camera}/controller/index.d.ts +7 -4
  51. package/dist/types/server/src/{devices/camera → camera}/controller/types.d.ts +29 -18
  52. package/dist/types/server/src/{devices/camera → camera}/index.d.ts +24 -14
  53. package/dist/types/server/src/{devices/camera → camera}/streaming/peer-connection.d.ts +8 -7
  54. package/dist/types/server/src/{devices/camera → camera}/streaming/streaming-session.d.ts +1 -1
  55. package/dist/types/server/src/{devices/camera → camera}/streaming/webrtc-connection.d.ts +2 -2
  56. package/dist/types/server/src/decoder/ffmpeg.d.ts +2 -0
  57. package/dist/types/server/src/decoder/index.d.ts +15 -3
  58. package/dist/types/server/src/decoder/types.d.ts +43 -24
  59. package/dist/types/server/src/decoder/worker.d.ts +42 -0
  60. package/dist/types/server/src/main.d.ts +21 -0
  61. package/dist/types/server/src/nats/constants.d.ts +1 -0
  62. package/dist/types/server/src/nats/index.d.ts +1 -1
  63. package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +9 -20
  64. package/dist/types/server/src/nats/proxy/deviceManager.d.ts +1 -1
  65. package/dist/types/server/src/nats/proxy/pluginsManager.d.ts +1 -1
  66. package/dist/types/server/src/nats/server.d.ts +3 -2
  67. package/dist/types/server/src/nats/types.d.ts +13 -22
  68. package/dist/types/server/src/nats/websocket.d.ts +1 -1
  69. package/dist/types/server/src/plugins/base.d.ts +1 -1
  70. package/dist/types/server/src/plugins/plugin.d.ts +1 -1
  71. package/dist/types/server/src/plugins/worker.d.ts +5 -1
  72. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/api.d.ts +2 -2
  73. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/cameraStorage.d.ts +1 -1
  74. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/config.d.ts +1 -1
  75. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/logger.d.ts +2 -0
  76. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/cameraDevice.d.ts +11 -7
  77. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/deviceManager.d.ts +3 -3
  78. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/pluginsManager.d.ts +1 -1
  79. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/queue.d.ts +3 -3
  80. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/systemManager.d.ts +1 -1
  81. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/schema.d.ts +2 -2
  82. package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/storageController.d.ts +1 -1
  83. package/dist/types/server/src/services/logger/index.d.ts +3 -3
  84. package/dist/types/server/src/utils/pythonInstaller.d.ts +2 -1
  85. package/dist/types/server/src/utils/subscribed.d.ts +1 -1
  86. package/dist/types/shared/types/index.d.ts +1 -1
  87. package/package.json +4 -4
  88. package/dist/types/server/src/api/websocket/nsp/frame.d.ts +0 -10
  89. package/dist/types/server/src/decoder/worker/index.d.ts +0 -27
  90. package/dist/types/server/src/plugins/worker-ipc.d.ts +0 -22
  91. /package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/index.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { BaseCameraDevice } from '../../../../../server/src/devices/camera/index.js';
1
+ import { BaseCameraDevice } from '../../../../../server/src/camera/index.js';
2
2
  import { StreamingSession } from '../streaming/streaming-session.js';
3
3
  import type { BaseLogger, Camera, CameraSource, IceServer, SetValues } from '../../../../../shared/types/index.js';
4
4
  import type { SocketService } from '../socket.js';
@@ -1,5 +1,6 @@
1
- import { Observable, ReplaySubject } from 'rxjs';
1
+ import { ReplaySubject } from 'rxjs';
2
2
  import { Subscribed } from '../../../../../shared/types/index.js';
3
+ import type { Observable } from 'rxjs';
3
4
  import type { BaseLogger } from '../../../../../shared/types/index.js';
4
5
  import type { CameraDevice } from '../types.js';
5
6
  import type { WebrtcConnection } from './webrtc-connection.js';
@@ -1,11 +1,11 @@
1
1
  import type { Observable, Subject } from 'rxjs';
2
- import type { BaseCameraDevice } from '../../../../server/src/devices/camera/index.js';
2
+ import type { BaseCameraDevice } from '../../../../server/src/camera/index.js';
3
3
  import type { BaseLogger } from '../../../../shared/types/index.js';
4
4
  import type { StreamingSession } from './streaming/streaming-session.js';
5
+ export type { AudioState, BaseDetection, BaseLogger, Camera, CameraConfig, CameraInput, DoorbellState, FfmpegOptions, Go2RtcAnswerMessage, Go2RtcIceCandidateMessage, Go2RtcIncomingMessage, Go2RtcOfferMessage, Go2RtcOutgoingMessage, LightState, MotionDetection, MotionState, ObjectDetection, ObjectState, SirenState, } from '../../../../shared/types/index.js';
5
6
  export type { BasicPeerConnection } from './streaming/peer-connection.js';
6
7
  export type { StreamingSession } from './streaming/streaming-session.js';
7
8
  export type { WebrtcConnection } from './streaming/webrtc-connection.js';
8
- export type { AudioState, BaseDetection, BaseLogger, Camera, CameraConfig, CameraInput, DoorbellState, FfmpegOptions, Go2RtcAnswerMessage, Go2RtcIceCandidateMessage, Go2RtcIncomingMessage, Go2RtcOfferMessage, Go2RtcOutgoingMessage, LightState, MotionDetection, MotionState, ObjectDetection, ObjectState, SirenState, } from '../../../../shared/types/index.js';
9
9
  export type CameraUiClientConfig = WithCredentials | WithToken;
10
10
  export interface BasicBrowserPeerConnection {
11
11
  enableMicrophone(track: MediaStreamTrack): void;
@@ -0,0 +1,6 @@
1
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
2
+ export declare class ApiController {
3
+ private app;
4
+ constructor(app: FastifyInstance);
5
+ welcome(req: FastifyRequest, reply: FastifyReply): FastifyReply;
6
+ }
@@ -0,0 +1,20 @@
1
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
2
+ import type { JwtTokenClientData, JwtTokenEncoded } from '../types/index.js';
3
+ import type { AuthLoginRequest, AuthNewLoginRequest, AuthParamsRequest, AuthRefreshRequest, AuthTokensRequest, PaginationRequest } from '../types/index.js';
4
+ export declare class AuthController {
5
+ private app;
6
+ private configService;
7
+ private service;
8
+ private userService;
9
+ constructor(app: FastifyInstance);
10
+ check(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): FastifyReply;
11
+ list(req: FastifyRequest<AuthLoginRequest & AuthTokensRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | JwtTokenClientData[] | JwtTokenEncoded[];
12
+ login(req: FastifyRequest<AuthNewLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
13
+ logout(req: FastifyRequest, reply: FastifyReply): Promise<FastifyReply>;
14
+ logoutByToken(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
15
+ logoutAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
16
+ refresh(req: FastifyRequest<AuthRefreshRequest>, reply: FastifyReply): Promise<FastifyReply>;
17
+ private addSessionTimer;
18
+ private clearSessionTimer;
19
+ private refresSessionTimer;
20
+ }
@@ -0,0 +1,10 @@
1
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
2
+ import type { AuthLoginRequest, BackupCreateRequest, BackupRestoreRequest } from '../types/index.js';
3
+ export declare class BackupController {
4
+ private app;
5
+ private logger;
6
+ private service;
7
+ constructor(app: FastifyInstance);
8
+ download(req: FastifyRequest<AuthLoginRequest & BackupCreateRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
9
+ restore(req: FastifyRequest<AuthLoginRequest & BackupRestoreRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
10
+ }
@@ -0,0 +1,33 @@
1
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
2
+ import type { DBCamera } from '../database/types.js';
3
+ import type { AuthLoginRequest, CameraZoneInsertPatchRequest, CameraZonesParamsRequest, CameraZonesTypeRequest, CamerasExtensionsParamsRequest, CamerasExtensionsRequest, CamerasInsertRequest, CamerasParamsRequest, CamerasPatchRequest, CamerasPreviewRequest, ExtensionsPatchRequest, 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 & CameraZonesTypeRequest>, reply: FastifyReply): FastifyReply;
15
+ insertZone(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesTypeRequest & CameraZoneInsertPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
16
+ patchZoneByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesParamsRequest & CameraZonesTypeRequest & CameraZoneInsertPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
17
+ removeZoneByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesParamsRequest & CameraZonesTypeRequest>, 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
+ getSnapshotByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
22
+ insert(req: FastifyRequest<AuthLoginRequest & CamerasInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
23
+ preview(req: FastifyRequest<AuthLoginRequest & CamerasPreviewRequest>, reply: FastifyReply): Promise<FastifyReply>;
24
+ list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | DBCamera[];
25
+ patchByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CamerasPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
26
+ enableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
27
+ disableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
28
+ addExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
29
+ removeExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
30
+ removeByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
31
+ removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
32
+ private resolvePluginName;
33
+ }
@@ -0,0 +1,14 @@
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
+ }
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,54 @@
1
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
2
+ import type { AuthLoginRequest, CameraUiPlugin, PaginationRequest, PluginExtension, PluginsActionRequest, PluginsConfigPatchRequest, PluginsInsertRequest, PluginsParamsNameRequest, PluginsParamsRemoveRequest, PluginsQueryRequest } from '../types/index.js';
3
+ export interface PluginInfo {
4
+ pluginName: string;
5
+ id?: string;
6
+ version?: string;
7
+ }
8
+ export declare class PluginsController {
9
+ private app;
10
+ private logger;
11
+ private configService;
12
+ private io;
13
+ private pluginManager;
14
+ private proxyServer;
15
+ private service;
16
+ private camerasService;
17
+ constructor(app: FastifyInstance);
18
+ enableByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
19
+ disableByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
20
+ getByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply;
21
+ getPluginUpdateByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
22
+ getVersionsByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
23
+ getChangelogByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
24
+ getConfigJsonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
25
+ getPluginSchemaByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
26
+ submitActionButtonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsActionRequest>, reply: FastifyReply): Promise<FastifyReply>;
27
+ getContractByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply;
28
+ getReadmeByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsQueryRequest>, reply: FastifyReply): Promise<FastifyReply>;
29
+ getReleaseByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
30
+ installOrUpdate(req: FastifyRequest<AuthLoginRequest & PluginsInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
31
+ managePlugin(action: 'install' | 'uninstall' | 'unlink', pluginInfo: PluginInfo): Promise<string>;
32
+ list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | CameraUiPlugin[];
33
+ listExtensions(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | PluginExtension[];
34
+ patchConfigJsonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsConfigPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
35
+ restartByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
36
+ search(req: FastifyRequest<AuthLoginRequest & PluginsQueryRequest & PaginationRequest>, reply: FastifyReply): Promise<FastifyReply | CameraUiPlugin[]>;
37
+ startByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
38
+ stopByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
39
+ uninstallByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
40
+ uninstallAll(req: FastifyRequest<AuthLoginRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
41
+ private cleanNpmCache;
42
+ private ensurePluginDirExists;
43
+ private getAvailablePluginVersions;
44
+ private getLastNodeModulesPath;
45
+ private getNpmModuleLatestVersion;
46
+ private getNpmPath;
47
+ private getPluginFromNpm;
48
+ private pluginsPackageJson;
49
+ private removeSynologyMetadata;
50
+ private runNpmCommand;
51
+ private searchNpmRegistrySingle;
52
+ private resolvePluginName;
53
+ private isScopedPlugin;
54
+ }
@@ -0,0 +1,12 @@
1
+ import type { WebSocket } from '@fastify/websocket';
2
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
3
+ import type { StreamsParamsNameRequest } from '../types/index.js';
4
+ export declare class StreamsController {
5
+ private app;
6
+ private api;
7
+ private logger;
8
+ private proxyServer;
9
+ constructor(app: FastifyInstance);
10
+ wsConnection(socket: WebSocket, req: FastifyRequest<StreamsParamsNameRequest>): Promise<void>;
11
+ httpConnection(req: FastifyRequest<StreamsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
12
+ }
@@ -0,0 +1,14 @@
1
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
2
+ import type { AuthLoginRequest, DownloadLogRequest } from '../types/index.js';
3
+ export declare class SystemController {
4
+ private app;
5
+ private configService;
6
+ private go2rtcApi;
7
+ constructor(app: FastifyInstance);
8
+ go2rtcInfo(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
9
+ clearLog(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): FastifyReply | void;
10
+ downloadCert(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): FastifyReply | void;
11
+ downloadLog(req: FastifyRequest<AuthLoginRequest & DownloadLogRequest>, reply: FastifyReply): FastifyReply | void;
12
+ restart(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): FastifyReply | void;
13
+ restartGo2rtc(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
14
+ }
@@ -0,0 +1,15 @@
1
+ import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
2
+ import type { DBUser } from '../database/types.js';
3
+ import type { AuthLoginRequest, AuthParamsRequest, PaginationRequest, UsersInsertRequest, UsersParamsRequest, UsersPatchRequest } from '../types/index.js';
4
+ export declare class UsersController {
5
+ private app;
6
+ private configService;
7
+ private service;
8
+ constructor(app: FastifyInstance);
9
+ getByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest>, reply: FastifyReply): FastifyReply;
10
+ insert(req: FastifyRequest<AuthLoginRequest & UsersInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
11
+ list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | Partial<DBUser>[];
12
+ patchByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & UsersPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
13
+ removeByName(req: FastifyRequest<AuthLoginRequest & UsersParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
14
+ removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
15
+ }
@@ -1,4 +1,4 @@
1
- import { Database as DB, RootDatabase as RootDB } from 'lmdb';
1
+ import type { Database as DB, RootDatabase as RootDB } from 'lmdb';
2
2
  import type { FastifyInstance } from 'fastify';
3
3
  import type { Plugin } from '../../plugins/plugin.js';
4
4
  import type { DBAuth, DBCamera, DBPlugin, DBSettings, DBUser } from './types.js';
@@ -1,4 +1,4 @@
1
- import { RequestQueue } from '../queue.js';
1
+ import type { RequestQueue } from '../queue.js';
2
2
  import type { ApplicationResponse, ExitData } from '../types.js';
3
3
  export declare class ApplicationApi {
4
4
  private requestQueue;
@@ -1,5 +1,5 @@
1
- import { RequestQueue } from '../queue.js';
2
1
  import type { AxiosResponse } from 'axios';
2
+ import type { RequestQueue } from '../queue.js';
3
3
  export declare class ConfigApi {
4
4
  private requestQueue;
5
5
  constructor(requestQueue: RequestQueue);
@@ -1,4 +1,4 @@
1
- import { RequestQueue } from '../queue.js';
1
+ import type { RequestQueue } from '../queue.js';
2
2
  import type { SourceData } from '../types.js';
3
3
  export declare class SnapshotApi {
4
4
  private requestQueue;
@@ -1,5 +1,5 @@
1
- import { RequestQueue } from '../queue.js';
2
1
  import type { AxiosResponse } from 'axios';
2
+ import type { RequestQueue } from '../queue.js';
3
3
  import type { SourceData, StreamData } from '../types.js';
4
4
  export declare class StreamsApi {
5
5
  private requestQueue;
@@ -0,0 +1,24 @@
1
+ export declare class Server {
2
+ private secureApp?;
3
+ private insecureApp?;
4
+ private api;
5
+ private logger;
6
+ private configService;
7
+ constructor();
8
+ register(): Promise<void>;
9
+ listen(): Promise<void>;
10
+ close(): Promise<void>;
11
+ private setupSecureAppListeners;
12
+ private setupInsecureAppListeners;
13
+ private registerSecureAppPlugins;
14
+ private registerInsecureAppPlugins;
15
+ private registerRouters;
16
+ private get corsOptions();
17
+ private get helmetOptions();
18
+ private get multipartOptions();
19
+ private get rateLimitOptions();
20
+ private get insecureServerOptions();
21
+ private get secureServerOptions();
22
+ private get socketOptions();
23
+ private get staticOptions();
24
+ }
@@ -0,0 +1,5 @@
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 | any>;
4
+ export declare const onlySameUserOrAdminCanDoThisAction: (req: FastifyRequest<AuthLoginRequest & AuthParamsRequest>, reply: FastifyReply) => Promise<FastifyReply | any>;
5
+ export declare const sameUserCantDoThisAction: (req: FastifyRequest<AuthLoginRequest & AuthParamsRequest>, reply: FastifyReply) => Promise<FastifyReply | any>;
@@ -0,0 +1,4 @@
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 | any>;
4
+ export declare const validJWTNeeded: (req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply) => Promise<FastifyReply | any>;
@@ -0,0 +1,3 @@
1
+ import { type AuthLoginRequest, type PaginationRequest, type PaginationResponse } from '../types/index.js';
2
+ import type { FastifyReply, FastifyRequest } from 'fastify';
3
+ export declare const pages: (req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply, payload: any) => Promise<PaginationResponse | void>;
@@ -0,0 +1,11 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ import type { PluginManager } from '../../plugins/index.js';
3
+ declare module 'fastify' {
4
+ interface FastifyInstance {
5
+ pluginManager: PluginManager;
6
+ }
7
+ interface FastifyRequest {
8
+ pluginManager: PluginManager;
9
+ }
10
+ }
11
+ export declare const PluginManagerPlugin: FastifyPluginAsync<PluginManager>;
@@ -0,0 +1,11 @@
1
+ import { Database } from '../database/index.js';
2
+ import type { FastifyPluginAsync } from 'fastify';
3
+ declare module 'fastify' {
4
+ interface FastifyInstance {
5
+ dbs: Database;
6
+ }
7
+ interface FastifyRequest {
8
+ dbs: Database;
9
+ }
10
+ }
11
+ export declare const DatabasePlugin: FastifyPluginAsync;
@@ -0,0 +1,11 @@
1
+ import { Go2RtcApi } from '../go2rtc/index.js';
2
+ import type { FastifyPluginAsync } from 'fastify';
3
+ declare module 'fastify' {
4
+ interface FastifyInstance {
5
+ go2rtcApi: Go2RtcApi;
6
+ }
7
+ interface FastifyRequest {
8
+ go2rtcApi: Go2RtcApi;
9
+ }
10
+ }
11
+ export declare const Go2RtcPlugin: FastifyPluginAsync;
@@ -0,0 +1,11 @@
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>>;
@@ -0,0 +1,21 @@
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 database;
13
+ private io;
14
+ private go2rtc;
15
+ private proxyServer;
16
+ constructor(app: FastifyInstance);
17
+ close(): Promise<void>;
18
+ restartGo2rtc(): Promise<void>;
19
+ }
20
+ export declare const SystemPlugin: FastifyPluginAsync;
21
+ export {};
@@ -0,0 +1,8 @@
1
+ import { type Details } from 'express-useragent';
2
+ import type { FastifyPluginAsync } from 'fastify';
3
+ declare module 'fastify' {
4
+ interface FastifyRequest {
5
+ useragent?: Details;
6
+ }
7
+ }
8
+ export declare const UserAgentPlugin: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const ApiRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const AuthRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const BackupRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const CamerasRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const ConfigRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const FilesRoute: FastifyPluginAsync;
@@ -0,0 +1,7 @@
1
+ import type { FastifyInstance } from 'fastify';
2
+ export declare class FastifyRoutes {
3
+ private app;
4
+ constructor(app: FastifyInstance<any, any, any, any>);
5
+ register(): Promise<void>;
6
+ registerInsecure(): Promise<void>;
7
+ }
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const PluginsRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const StreamsRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const SystemRoute: FastifyPluginAsync;
@@ -0,0 +1,2 @@
1
+ import type { FastifyPluginAsync } from 'fastify';
2
+ export declare const UsersRoute: FastifyPluginAsync;
@@ -0,0 +1,25 @@
1
+ import zod from 'zod';
2
+ export declare const installPluginSchema: zod.ZodObject<{
3
+ pluginname: zod.ZodEffects<zod.ZodString, string, string>;
4
+ pluginversion: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
5
+ }, "strict", zod.ZodTypeAny, {
6
+ pluginname: string;
7
+ pluginversion: string;
8
+ }, {
9
+ pluginname: string;
10
+ pluginversion?: string | undefined;
11
+ }>;
12
+ export declare const actionPluginSchema: zod.ZodObject<{
13
+ actionId: zod.ZodString;
14
+ payload: zod.ZodAny;
15
+ }, "strict", zod.ZodTypeAny, {
16
+ actionId: string;
17
+ payload?: any;
18
+ }, {
19
+ actionId: string;
20
+ payload?: any;
21
+ }>;
22
+ export declare const patchPluginConfigJsonSchema: zod.ZodRecord<zod.ZodAny, zod.ZodAny>;
23
+ export type InstallPluginInput = zod.TypeOf<typeof installPluginSchema>;
24
+ export type ActionPluginInput = zod.TypeOf<typeof actionPluginSchema>;
25
+ export type PatchPluginConfigJsonInput = zod.TypeOf<typeof patchPluginConfigJsonSchema>;
@@ -0,0 +1,10 @@
1
+ import type { BackupInfo, MultipartFile, UiLocalStorage } from '../types/index.js';
2
+ export declare class BackupService {
3
+ private logger;
4
+ private configService;
5
+ private socketService;
6
+ constructor();
7
+ createBackup(localStorage?: Partial<UiLocalStorage>): Promise<BackupInfo>;
8
+ restoreBackup(file: MultipartFile): Promise<any>;
9
+ removeBackup(backup: BackupInfo): Promise<void>;
10
+ }
@@ -0,0 +1,2 @@
1
+ declare const axiosInstance: import("axios").AxiosInstance;
2
+ export default axiosInstance;
@@ -0,0 +1,11 @@
1
+ import forge from 'node-forge';
2
+ export interface CertKey {
3
+ cert: string;
4
+ certPath: string;
5
+ key: string;
6
+ keyPath: string;
7
+ }
8
+ export declare const getCert: () => CertKey;
9
+ export declare const createRootCA: (customAddresses?: string[]) => CertKey;
10
+ export declare const createCSR: (addresses: string[], keys: forge.pki.rsa.KeyPair) => Partial<CertKey>;
11
+ export declare const createCert: (customAddresses?: string[]) => CertKey;
@@ -0,0 +1 @@
1
+ export declare const moveFiles: (sourceDir: string, targetDir: string) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import type { Namespace, Server, Socket } from 'socket.io';
2
- import { PLUGIN_STATUS } from '../../../plugins/types.js';
2
+ import type { PLUGIN_STATUS } from '../../../plugins/types.js';
3
3
  import { RUNTIME_STATUS } from '../../../services/config/types.js';
4
4
  import type { SocketNsp } from '../types.js';
5
5
  export declare class StatusNamespace {
@@ -1,6 +1,6 @@
1
- import { PLUGIN_STATUS } from '../../plugins/types.js';
2
1
  import type { Namespace } from 'socket.io';
3
2
  import type { WebSocket } from 'ws';
3
+ import type { PLUGIN_STATUS } from '../../plugins/types.js';
4
4
  import type { VideoStreamingMode } from '../database/types.js';
5
5
  export type SocketNsp = '/camera.ui' | '/metrics' | '/logs' | '/status' | '/notifications' | '/streams' | '/plugins' | '/proxy' | '/frame';
6
6
  export interface SocketNspMap {
@@ -1,13 +1,13 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  import 'reflect-metadata';
3
3
  import { EventEmitter } from 'node:events';
4
- import { CameraController } from './devices/camera/controller/index.js';
4
+ import { CameraController } from './camera/controller/index.js';
5
5
  import type { Camera, CameraExtensions } from './api/database/types.js';
6
- import type { FrameWorker } from './decoder/worker/index.js';
6
+ import type { FrameWorker } from './decoder/worker.js';
7
7
  import type { BasePlugin } from './plugins/base.js';
8
- import type { API } from './plugins/node/api.js';
9
- import type { PluginLogger } from './plugins/node/logger.js';
10
8
  import type { CameraExtension } from './plugins/types.js';
9
+ import type { API } from './polyglot/node/plugins/api.js';
10
+ import type { PluginLogger } from './polyglot/node/plugins/logger.js';
11
11
  export interface PluginConstructor {
12
12
  new (logger: PluginLogger, api: API): BasePlugin;
13
13
  }
@@ -1,6 +1,6 @@
1
1
  import { BaseCameraDevice } from './index.js';
2
2
  import { StreamingSession } from './streaming/streaming-session.js';
3
- import type { VideoFrame } from '../../decoder/types.js';
3
+ import type { VideoFrame } from '../decoder/types.js';
4
4
  import type { CameraDelegate, CameraPrebufferDelegate, FfmpegOptions } from './controller/types.js';
5
5
  import type { StreamingConnectionOptions } from './streaming/peer-connection.js';
6
6
  export declare abstract class CameraDevice extends BaseCameraDevice {
@@ -1,14 +1,15 @@
1
1
  import { CameraDevice } from '../cameraDevice.js';
2
- import type { Camera } from '../../../api/database/types.js';
3
- import type { VideoFrame } from '../../../decoder/types.js';
4
- import type { ProxyServer } from '../../../nats/index.js';
5
- import type { IceServer } from '../../../services/config/types.js';
2
+ import type { Camera } from '../../api/database/types.js';
3
+ import type { VideoFrame } from '../../decoder/types.js';
4
+ import type { ProxyServer } from '../../nats/index.js';
5
+ import type { IceServer } from '../../services/config/types.js';
6
6
  import type { BaseLogger } from './types.js';
7
7
  export declare class CameraController extends CameraDevice {
8
8
  private proxy;
9
9
  private motionTimeout?;
10
10
  private doorbellTimeout?;
11
11
  private doorbellTimeoutDuration;
12
+ private prebufferStateSubscriptions;
12
13
  constructor(camera: Camera, logger: BaseLogger, proxy: ProxyServer);
13
14
  connect(): Promise<void>;
14
15
  disconnect(): Promise<void>;
@@ -19,9 +20,11 @@ export declare class CameraController extends CameraDevice {
19
20
  updateCamera(updatedCamera: Camera): void;
20
21
  cleanup(): void;
21
22
  private subscribeToCameraState;
23
+ private subscribeToCameraSourcesState;
22
24
  private subscribeToMotionState;
23
25
  private subscribeToDoorbellState;
24
26
  private subscribeToCameraChanges;
25
27
  private subscribeToStateChanges;
26
28
  private triggerProxyEvent;
29
+ private isCameraEvent;
27
30
  }