@camera.ui/browser 0.0.47 → 0.0.49
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/{packages/client/node → types/packages/client/browser}/src/client.d.ts +6 -1
- package/dist/types/packages/client/browser/src/index.d.ts +2 -0
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +21 -0
- package/dist/{packages/client/node → types/packages/client/browser}/src/proxy/deviceManager.d.ts +3 -2
- package/dist/types/packages/client/browser/src/proxy/index.d.ts +4 -0
- package/dist/{packages → types/packages}/client/node/src/types.d.ts +1 -10
- package/dist/{server → types/server}/src/api/database/types.d.ts +1 -0
- package/dist/{server → types/server}/src/api/schemas/backup.schema.d.ts +52 -52
- package/dist/{server → types/server}/src/api/schemas/cameras.schema.d.ts +70 -64
- package/dist/{server → types/server}/src/api/types/index.d.ts +0 -1
- package/dist/{server/src/camera/index.d.ts → types/server/src/camera/base.d.ts} +37 -36
- package/dist/{server → types/server}/src/camera/streaming/browser/browser-peer-connection.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/browser/browser-streaming-session.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/browser/webrtc-browser-connection.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/peer-connection.d.ts +3 -2
- package/dist/{server → types/server}/src/camera/streaming/streaming-session.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/webrtc-connection.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/types.d.ts +8 -63
- package/dist/types/server/src/camera/utils/subscribed.d.ts +9 -0
- package/dist/types/server/src/detector/types.d.ts +48 -0
- package/dist/{server → types/server}/src/plugins/types.d.ts +2 -8
- package/dist/{server → types/server}/src/proxy/types.d.ts +12 -13
- package/dist/{server → types/server}/src/services/config/types.d.ts +1 -1
- package/dist/{shared → types/shared}/types/index.d.ts +2 -0
- package/package.json +24 -14
- package/dist/packages/client/node/src/index.d.ts +0 -2
- package/dist/packages/client/node/src/proxy/cameraDevice/cameraDevice.browser.d.ts +0 -83
- package/dist/packages/client/node/src/proxy/cameraDevice/cameraDevice.mock.d.ts +0 -1
- package/dist/packages/client/node/src/proxy/cameraDevice/cameraDevice.node.d.ts +0 -19
- package/dist/packages/client/node/src/proxy/cameraDevice/index.d.ts +0 -2
- package/dist/packages/client/node/src/proxy/index.d.ts +0 -4
- package/dist/server/bin/python.d.ts +0 -26
- package/dist/server/src/api/database/index.d.ts +0 -25
- package/dist/server/src/api/go2rtc/api/application.d.ts +0 -9
- package/dist/server/src/api/go2rtc/api/config.d.ts +0 -9
- package/dist/server/src/api/go2rtc/api/index.d.ts +0 -3
- package/dist/server/src/api/go2rtc/api/snapshot.d.ts +0 -8
- package/dist/server/src/api/go2rtc/api/streams.d.ts +0 -11
- package/dist/server/src/api/go2rtc/index.d.ts +0 -13
- package/dist/server/src/api/go2rtc/queue.d.ts +0 -10
- package/dist/server/src/api/middlewares/socketAuth.middleware.d.ts +0 -41
- package/dist/server/src/api/services/auth.service.d.ts +0 -20
- package/dist/server/src/api/services/cameras.service.d.ts +0 -55
- package/dist/server/src/api/services/plugins.service.d.ts +0 -25
- package/dist/server/src/api/services/users.service.d.ts +0 -13
- package/dist/server/src/api/utils/constants.d.ts +0 -15
- package/dist/server/src/api/ws/index.d.ts +0 -15
- package/dist/server/src/api/ws/nsp/logs.d.ts +0 -11
- package/dist/server/src/api/ws/nsp/main.d.ts +0 -9
- package/dist/server/src/api/ws/nsp/metrics.d.ts +0 -33
- package/dist/server/src/api/ws/nsp/notifications.d.ts +0 -11
- package/dist/server/src/api/ws/nsp/plugins.d.ts +0 -13
- package/dist/server/src/api/ws/nsp/status.d.ts +0 -20
- package/dist/server/src/api/ws/nsp/streams.d.ts +0 -15
- package/dist/server/src/api.d.ts +0 -31
- package/dist/server/src/camera/utils/subscribed.d.ts +0 -6
- package/dist/server/src/go2rtc/index.d.ts +0 -26
- package/dist/server/src/plugins/index.d.ts +0 -29
- package/dist/server/src/plugins/node/api.d.ts +0 -37
- package/dist/server/src/plugins/node/cameraStorage.d.ts +0 -107
- package/dist/server/src/plugins/node/config.d.ts +0 -104
- package/dist/server/src/plugins/node/logger.d.ts +0 -11
- package/dist/server/src/plugins/node/proxy/cameraDevice.d.ts +0 -33
- package/dist/server/src/plugins/node/proxy/deviceManager.d.ts +0 -45
- package/dist/server/src/plugins/node/proxy/index.d.ts +0 -4
- package/dist/server/src/plugins/node/proxy/pluginsManager.d.ts +0 -36
- package/dist/server/src/plugins/node/proxy/queue.d.ts +0 -17
- package/dist/server/src/plugins/node/proxy/systemManager.d.ts +0 -34
- package/dist/server/src/plugins/node/schema.d.ts +0 -268
- package/dist/server/src/plugins/node/storageController.d.ts +0 -28
- package/dist/server/src/plugins/plugin.d.ts +0 -51
- package/dist/server/src/plugins/worker-ipc.d.ts +0 -16
- package/dist/server/src/plugins/worker.d.ts +0 -30
- package/dist/server/src/proxy/api.d.ts +0 -29
- package/dist/server/src/proxy/camera.d.ts +0 -98
- package/dist/server/src/proxy/constants.d.ts +0 -7
- package/dist/server/src/proxy/index.d.ts +0 -29
- package/dist/server/src/proxy/plugin.d.ts +0 -12
- package/dist/server/src/proxy/queue.d.ts +0 -16
- package/dist/server/src/proxy/utils/generateKeys.d.ts +0 -5
- package/dist/server/src/proxy/ws.d.ts +0 -12
- package/dist/server/src/services/config/constants.d.ts +0 -6
- package/dist/server/src/services/config/index.d.ts +0 -58
- package/dist/server/src/services/logger/index.d.ts +0 -28
- package/dist/shared/common/utils.d.ts +0 -6
- package/dist/{packages → types/packages}/client/node/src/api.d.ts +0 -0
- package/dist/{packages → types/packages}/client/node/src/proxy/pluginsManager.d.ts +0 -0
- package/dist/{packages → types/packages}/client/node/src/proxy/systemManager.d.ts +0 -0
- package/dist/{packages → types/packages}/client/node/src/socket.d.ts +0 -0
- package/dist/{server → types/server}/src/api/go2rtc/types.d.ts +0 -0
- package/dist/{server → types/server}/src/api/schemas/config.schema.d.ts +5 -5
- package/dist/{server → types/server}/src/api/schemas/go2rtc.schema.d.ts +79 -79
- package/dist/{server → types/server}/src/api/schemas/users.schema.d.ts +84 -84
- /package/dist/{server → types/server}/src/api/ws/types.d.ts +0 -0
- /package/dist/{server → types/server}/src/go2rtc/types.d.ts +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CameraStorage } from './cameraStorage';
|
|
2
|
-
import type { PluginJsonSchemaForm } from '../types';
|
|
3
|
-
import type { PluginAPI } from './api';
|
|
4
|
-
export declare class StorageController {
|
|
5
|
-
private api;
|
|
6
|
-
private cameraStorages;
|
|
7
|
-
constructor(api: PluginAPI);
|
|
8
|
-
/**
|
|
9
|
-
* Create a camera storage instance
|
|
10
|
-
*
|
|
11
|
-
* @param instance - The plugin instance
|
|
12
|
-
* @param cameraId - The camera id
|
|
13
|
-
* @param schema - The plugin schema
|
|
14
|
-
*/
|
|
15
|
-
createCameraStorage(instance: any, cameraId: string, schema?: PluginJsonSchemaForm): Promise<CameraStorage>;
|
|
16
|
-
/**
|
|
17
|
-
* Get a camera storage instance
|
|
18
|
-
*
|
|
19
|
-
* @param cameraId - The camera id
|
|
20
|
-
*/
|
|
21
|
-
getCameraStorage(cameraId: string): CameraStorage | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Remove a camera storage instance
|
|
24
|
-
*
|
|
25
|
-
* @param cameraId - The camera id
|
|
26
|
-
*/
|
|
27
|
-
removeCameraStorage(cameraId: string): void;
|
|
28
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @url https://github.com/homebridge/homebridge/blob/src/plugin.ts
|
|
4
|
-
* (c) Homebridge <https://github.com/homebridge>
|
|
5
|
-
*
|
|
6
|
-
**/
|
|
7
|
-
import { PythonInstaller } from '../../bin/python';
|
|
8
|
-
import { PluginConfigService } from './node/config';
|
|
9
|
-
import type { PluginConstructor } from '../api';
|
|
10
|
-
import type { CameraUiPlugin, IPackageJson } from '../api/types';
|
|
11
|
-
import type { PluginContract } from './types';
|
|
12
|
-
export interface Context {
|
|
13
|
-
engines?: Record<string, string>;
|
|
14
|
-
dependencies?: Record<string, string>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Represents a loaded camera.ui plugin.
|
|
18
|
-
*/
|
|
19
|
-
export declare class Plugin {
|
|
20
|
-
private logger;
|
|
21
|
-
private configService;
|
|
22
|
-
private _disabled;
|
|
23
|
-
private _info;
|
|
24
|
-
private _contract;
|
|
25
|
-
readonly main: string;
|
|
26
|
-
readonly id: string;
|
|
27
|
-
readonly pluginName: string;
|
|
28
|
-
readonly displayName: string;
|
|
29
|
-
readonly scope?: string;
|
|
30
|
-
readonly isPython: boolean;
|
|
31
|
-
readonly isESM: boolean;
|
|
32
|
-
readonly isSymLink: boolean;
|
|
33
|
-
readonly installPath: string;
|
|
34
|
-
readonly pythonInstallPath: string;
|
|
35
|
-
readonly configFile: string;
|
|
36
|
-
readonly storagePath: string;
|
|
37
|
-
readonly py: PythonInstaller;
|
|
38
|
-
readonly config: PluginConfigService;
|
|
39
|
-
pluginConstructor?: PluginConstructor;
|
|
40
|
-
private loadContext?;
|
|
41
|
-
get contract(): PluginContract;
|
|
42
|
-
get info(): CameraUiPlugin;
|
|
43
|
-
set info(value: CameraUiPlugin);
|
|
44
|
-
get disabled(): boolean;
|
|
45
|
-
set disabled(value: boolean);
|
|
46
|
-
constructor(pluginName: string, installPath: string, packageJSON: IPackageJson, pluginId: string, scope?: string, storagePath?: string);
|
|
47
|
-
load(): Promise<void>;
|
|
48
|
-
reparsePackageJson(): void;
|
|
49
|
-
private parsePackageJson;
|
|
50
|
-
private parseContract;
|
|
51
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import type { ProcessMessage, ProcessResponse } from './types';
|
|
4
|
-
export declare interface WorkerIPC {
|
|
5
|
-
on(event: 'message', listener: (message: ProcessResponse) => void): this;
|
|
6
|
-
}
|
|
7
|
-
export declare class WorkerIPC extends EventEmitter {
|
|
8
|
-
private ipc?;
|
|
9
|
-
private id;
|
|
10
|
-
get address(): string | null | undefined;
|
|
11
|
-
constructor(id: string);
|
|
12
|
-
listen(): Promise<void>;
|
|
13
|
-
close(): Promise<void>;
|
|
14
|
-
sendMessage(message: ProcessMessage): Promise<void>;
|
|
15
|
-
private listenToChild;
|
|
16
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from './plugin';
|
|
2
|
-
import { PLUGIN_STATUS } from './types';
|
|
3
|
-
export declare class PluginWorker {
|
|
4
|
-
plugin: Plugin;
|
|
5
|
-
private pluginWorker?;
|
|
6
|
-
private proxyServer;
|
|
7
|
-
private ipc;
|
|
8
|
-
private api;
|
|
9
|
-
private logger;
|
|
10
|
-
private configService;
|
|
11
|
-
private socketService;
|
|
12
|
-
private started;
|
|
13
|
-
private shuttingDown;
|
|
14
|
-
private _status;
|
|
15
|
-
get status(): PLUGIN_STATUS;
|
|
16
|
-
constructor(plugin: Plugin);
|
|
17
|
-
start(): Promise<void>;
|
|
18
|
-
teardown(): Promise<void>;
|
|
19
|
-
restart(): Promise<void>;
|
|
20
|
-
getPID(): number;
|
|
21
|
-
isRunning(): boolean;
|
|
22
|
-
private gatherDevices;
|
|
23
|
-
private kill;
|
|
24
|
-
private setStatus;
|
|
25
|
-
private sendMessage;
|
|
26
|
-
private handleClose;
|
|
27
|
-
private reset;
|
|
28
|
-
private cleanedProcessEnv;
|
|
29
|
-
private isLineVisible;
|
|
30
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Camera } from '../api/database/types';
|
|
2
|
-
import type { CameraConfig } from '../camera/types';
|
|
3
|
-
import type { MessageQueue } from './queue';
|
|
4
|
-
import type { ApiProxyMethods, ProxyMessageStructure } from './types';
|
|
5
|
-
export declare class ApiProxy implements ApiProxyMethods {
|
|
6
|
-
private camerasService;
|
|
7
|
-
private pluginsService;
|
|
8
|
-
private messageQueue;
|
|
9
|
-
constructor(messageQueue: MessageQueue);
|
|
10
|
-
getCameraByName(data: {
|
|
11
|
-
name: string;
|
|
12
|
-
}): Promise<Camera | undefined>;
|
|
13
|
-
getCameraById(data: {
|
|
14
|
-
id: string;
|
|
15
|
-
}): Promise<Camera | undefined>;
|
|
16
|
-
createCamera(data: {
|
|
17
|
-
camera: CameraConfig;
|
|
18
|
-
pluginId: string;
|
|
19
|
-
}): Promise<Camera>;
|
|
20
|
-
removeCameraByName(data: {
|
|
21
|
-
name: string;
|
|
22
|
-
pluginId: string;
|
|
23
|
-
}): Promise<void>;
|
|
24
|
-
removeCameraById(data: {
|
|
25
|
-
id: string;
|
|
26
|
-
pluginId: string;
|
|
27
|
-
}): Promise<void>;
|
|
28
|
-
handleMessage(message: ProxyMessageStructure): Promise<void>;
|
|
29
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/// <reference types="pouchdb-core" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { Camera } from '../api/database/types';
|
|
4
|
-
import type { CameraDelegate, CameraPrebufferDelegate, FfmpegOptions, OnSetEvent, PrebufferType, StateValues, StreamInfo } from '../camera/types';
|
|
5
|
-
import type { IceServer } from '../services/config/types';
|
|
6
|
-
import type { MessageQueue } from './queue';
|
|
7
|
-
import type { CameraDeviceProxyMethods, ProxyMessageStructure } from './types';
|
|
8
|
-
export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
|
|
9
|
-
private api;
|
|
10
|
-
private configService;
|
|
11
|
-
private camerasService;
|
|
12
|
-
private pluginsService;
|
|
13
|
-
private messageQueue;
|
|
14
|
-
constructor(messageQueue: MessageQueue);
|
|
15
|
-
connect(data: {
|
|
16
|
-
cameraId: string;
|
|
17
|
-
pluginId?: string;
|
|
18
|
-
ws?: boolean | undefined;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
disconnect(data: {
|
|
21
|
-
cameraId: string;
|
|
22
|
-
pluginId?: string | undefined;
|
|
23
|
-
ws?: boolean | undefined;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
reboot(data: {
|
|
26
|
-
cameraId: string;
|
|
27
|
-
pluginId?: string;
|
|
28
|
-
ws?: boolean | undefined;
|
|
29
|
-
}): Promise<void>;
|
|
30
|
-
getStreamInfo(data: {
|
|
31
|
-
sourceName: string;
|
|
32
|
-
cameraId: string;
|
|
33
|
-
pluginId?: string;
|
|
34
|
-
ws?: boolean | undefined;
|
|
35
|
-
}): Promise<StreamInfo | undefined>;
|
|
36
|
-
isPrebuffering(data: {
|
|
37
|
-
sourceName: string;
|
|
38
|
-
type: PrebufferType;
|
|
39
|
-
cameraId: string;
|
|
40
|
-
pluginId?: string;
|
|
41
|
-
ws?: boolean | undefined;
|
|
42
|
-
}): Promise<boolean>;
|
|
43
|
-
getPrebufferRawUrl(data: {
|
|
44
|
-
sourceName: string;
|
|
45
|
-
type: PrebufferType;
|
|
46
|
-
cameraId: string;
|
|
47
|
-
pluginId?: string;
|
|
48
|
-
ws?: boolean | undefined;
|
|
49
|
-
}): Promise<string | undefined>;
|
|
50
|
-
getFffmpegPath(): string;
|
|
51
|
-
getIceServers(): IceServer[];
|
|
52
|
-
snapshot(data: {
|
|
53
|
-
forceNew?: boolean;
|
|
54
|
-
cameraId: string;
|
|
55
|
-
pluginId?: string;
|
|
56
|
-
ws?: boolean;
|
|
57
|
-
}): Promise<ArrayBuffer>;
|
|
58
|
-
streamVideo(data: {
|
|
59
|
-
sourceName: string;
|
|
60
|
-
options: FfmpegOptions;
|
|
61
|
-
cameraId: string;
|
|
62
|
-
pluginId?: string;
|
|
63
|
-
ws?: boolean;
|
|
64
|
-
}): Promise<void>;
|
|
65
|
-
recordToFile(data: {
|
|
66
|
-
sourceName: string;
|
|
67
|
-
outputPath: string;
|
|
68
|
-
duration?: number;
|
|
69
|
-
cameraId: string;
|
|
70
|
-
pluginId?: string;
|
|
71
|
-
ws?: boolean;
|
|
72
|
-
}): Promise<void>;
|
|
73
|
-
updateState<T extends keyof StateValues>(data: {
|
|
74
|
-
stateName: T;
|
|
75
|
-
eventData: OnSetEvent<T>;
|
|
76
|
-
cameraId: string;
|
|
77
|
-
pluginId?: string;
|
|
78
|
-
ws?: boolean;
|
|
79
|
-
}): Promise<void>;
|
|
80
|
-
refreshStates(data: {
|
|
81
|
-
cameraId: string;
|
|
82
|
-
pluginId?: string;
|
|
83
|
-
ws?: boolean;
|
|
84
|
-
}): Promise<{
|
|
85
|
-
camera: Camera;
|
|
86
|
-
states: StateValues;
|
|
87
|
-
cameraState: boolean;
|
|
88
|
-
}>;
|
|
89
|
-
onRequestReboot(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['reboot']>): Promise<Buffer>;
|
|
90
|
-
onRequestGetStreamInfo(pluginId: string, cameraId: string, ...args: Parameters<CameraPrebufferDelegate['getStreamInfo']>): Promise<StreamInfo | undefined>;
|
|
91
|
-
onRequestIsPrebuffering(pluginId: string, cameraId: string, ...args: Parameters<CameraPrebufferDelegate['isPrebuffering']>): Promise<boolean>;
|
|
92
|
-
onRequestGetRawUrl(pluginId: string, cameraId: string, ...args: Parameters<CameraPrebufferDelegate['getPrebufferRawUrl']>): Promise<string | undefined>;
|
|
93
|
-
onRequestSnapshotRequest(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['snapshotRequest']>): Promise<Buffer>;
|
|
94
|
-
onRequestPrepareStream(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['prepareStream']>): Promise<void>;
|
|
95
|
-
onRequestWebRTCOffer(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['onOffer']>): Promise<string>;
|
|
96
|
-
onRequestWebRTCIceCandidates(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['onCandidates']>): Promise<void>;
|
|
97
|
-
handleMessage(message: ProxyMessageStructure): Promise<void>;
|
|
98
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Dealer, Publisher, Reply, Request, Router, SocketOptions, Subscriber } from '@seydx/zeromq';
|
|
2
|
-
export declare const ROUTER_OPTIONS: SocketOptions<Router>;
|
|
3
|
-
export declare const REPLY_OPTIONS: SocketOptions<Reply>;
|
|
4
|
-
export declare const PUBLISHER_OPTIONS: SocketOptions<Publisher>;
|
|
5
|
-
export declare const REQUEST_OPTIONS: SocketOptions<Request>;
|
|
6
|
-
export declare const SUBSCRIBER_OPTIONS: SocketOptions<Subscriber>;
|
|
7
|
-
export declare const DEALER_OPTIONS: SocketOptions<Dealer>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Publisher, Router } from '@seydx/zeromq';
|
|
2
|
-
import { ApiProxy } from './api';
|
|
3
|
-
import { CameraDeviceProxy } from './camera';
|
|
4
|
-
import { PluginProxy } from './plugin';
|
|
5
|
-
import type { StateValues } from '../camera/types';
|
|
6
|
-
import type { CameraDeviceListenerMessagePayload, DeviceManagerProxyEvents, PluginsManagerProxyEvents, SystemManagerProxyEvents } from './types';
|
|
7
|
-
import type { ProxyBridge } from './ws';
|
|
8
|
-
export declare class ProxyServer {
|
|
9
|
-
api?: ApiProxy;
|
|
10
|
-
camera?: CameraDeviceProxy;
|
|
11
|
-
plugin?: PluginProxy;
|
|
12
|
-
router: Router;
|
|
13
|
-
publisher: Publisher;
|
|
14
|
-
socketBridge?: ProxyBridge;
|
|
15
|
-
publicKey?: string;
|
|
16
|
-
private messageQueue;
|
|
17
|
-
constructor();
|
|
18
|
-
initialize(): Promise<void>;
|
|
19
|
-
close(): Promise<void>;
|
|
20
|
-
publishDeviceManagerEvent<K extends keyof DeviceManagerProxyEvents>(targetId: string, type: K, data: DeviceManagerProxyEvents[K]): Promise<void>;
|
|
21
|
-
publishSystemManagerEvent<K extends keyof SystemManagerProxyEvents>(targetId: string, type: K, data: SystemManagerProxyEvents[K]): Promise<void>;
|
|
22
|
-
publishPluginsManagerEvent<K extends keyof PluginsManagerProxyEvents>(targetId: string, type: K, data: PluginsManagerProxyEvents[K]): Promise<void>;
|
|
23
|
-
publishCameraEvent<K extends keyof StateValues>(cameraId: string, stateName: K, data: {
|
|
24
|
-
newEvent: StateValues[K];
|
|
25
|
-
oldEvent: StateValues[K];
|
|
26
|
-
}, targetId?: string): Promise<void>;
|
|
27
|
-
publishCameraEvent(cameraId: string, type: CameraDeviceListenerMessagePayload['type'], data?: any, targetId?: string): Promise<void>;
|
|
28
|
-
private isCameraState;
|
|
29
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { CameraStorage } from '../plugins/node/cameraStorage';
|
|
2
|
-
import { type BasePlugin } from '../plugins/types';
|
|
3
|
-
import type { MessageQueue } from './queue';
|
|
4
|
-
import type { MethodKeys, ProxyMessageStructure } from './types';
|
|
5
|
-
export declare class PluginProxy {
|
|
6
|
-
private pluginsService;
|
|
7
|
-
private messageQueue;
|
|
8
|
-
constructor(messageQueue: MessageQueue);
|
|
9
|
-
onRequestPluginFn<K extends Exclude<MethodKeys<BasePlugin>, 'configureCameras'>>(pluginId: string, fn: K, ...args: Parameters<BasePlugin[K]>): Promise<ReturnType<BasePlugin[K]>>;
|
|
10
|
-
onRequestStorageFn<K extends MethodKeys<CameraStorage>>(pluginId: string, cameraId: string, fn: K, ...args: Parameters<CameraStorage[K]>): Promise<Awaited<ReturnType<CameraStorage[K]>>>;
|
|
11
|
-
handleMessage(message: ProxyMessageStructure): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ProxyServer } from '.';
|
|
2
|
-
import type { ProxyMessageStructure } from './types';
|
|
3
|
-
export declare class MessageQueue {
|
|
4
|
-
private logger;
|
|
5
|
-
private proxyServer;
|
|
6
|
-
private router;
|
|
7
|
-
private aborted;
|
|
8
|
-
private isProcessing;
|
|
9
|
-
private queue;
|
|
10
|
-
private pendingResponses;
|
|
11
|
-
constructor(proxyServer: ProxyServer);
|
|
12
|
-
abortQueue(): void;
|
|
13
|
-
enqueue(message: ProxyMessageStructure): Promise<any>;
|
|
14
|
-
private processQueue;
|
|
15
|
-
private listenToDealer;
|
|
16
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Namespace, Server } from 'socket.io';
|
|
2
|
-
import type { SocketNsp } from '../api/ws/types';
|
|
3
|
-
export declare class ProxyBridge {
|
|
4
|
-
nsp: Namespace;
|
|
5
|
-
nspName: SocketNsp;
|
|
6
|
-
private logger;
|
|
7
|
-
private configService;
|
|
8
|
-
private proxy?;
|
|
9
|
-
constructor(io: Server);
|
|
10
|
-
init(): void;
|
|
11
|
-
private setupEventListeners;
|
|
12
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RTCIceServer } from 'werift';
|
|
2
|
-
import type { Go2RtcConfig, IConfig, IceServer } from './types';
|
|
3
|
-
export declare const DEFAULT_ICE_SERVERS: IceServer[];
|
|
4
|
-
export declare const DEFAULT_WERIFT_ICE_SERVERS: RTCIceServer[];
|
|
5
|
-
export declare const DEFAULT_CONFIG: IConfig;
|
|
6
|
-
export declare const DEFAULT_GO2RTC_CONFIG: Go2RtcConfig;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { Go2RtcConfig, IConfig, Secrets } from './types';
|
|
2
|
-
export declare class ConfigService {
|
|
3
|
-
private logger;
|
|
4
|
-
private _config;
|
|
5
|
-
private _go2rtcConfig;
|
|
6
|
-
CAMERAS_ID: string;
|
|
7
|
-
PLUGINS_ID: string;
|
|
8
|
-
SETTINGS_ID: string;
|
|
9
|
-
TOKENS_ID: string;
|
|
10
|
-
USERS_ID: string;
|
|
11
|
-
SECRETS: Secrets;
|
|
12
|
-
static IS_DEV: boolean;
|
|
13
|
-
static IS_DOCKER: boolean;
|
|
14
|
-
static IS_ELECTRON: boolean;
|
|
15
|
-
static IS_HA: boolean;
|
|
16
|
-
static IS_STANDARD: boolean;
|
|
17
|
-
static IS_SERVICE: boolean;
|
|
18
|
-
INTERFACE_PATH: string;
|
|
19
|
-
BASE_PATH: string;
|
|
20
|
-
BASE_NODE_MODULE_PATH: string;
|
|
21
|
-
static VERSION: string;
|
|
22
|
-
static MIN_NODE_VERSION: string;
|
|
23
|
-
static NODE_VERSION: string;
|
|
24
|
-
STORAGE_PATH: string;
|
|
25
|
-
DATABASE_PATH: string;
|
|
26
|
-
USERS_STORAGE_PATH: string;
|
|
27
|
-
PLUGINS_STRICT_RESOLUTION: boolean;
|
|
28
|
-
PLUGINS_STORAGE_PATH: string;
|
|
29
|
-
PLUGINS_INSTALL_PATH: string;
|
|
30
|
-
PLUGINS_PJSON_FILE: string;
|
|
31
|
-
LOG_FILE: string;
|
|
32
|
-
CONFIG_FILE: string;
|
|
33
|
-
SECRETS_FILE: string;
|
|
34
|
-
FFMPEG_BINARY: string;
|
|
35
|
-
PYTHON_BINARY: string;
|
|
36
|
-
GO2RTC_BINARY: string;
|
|
37
|
-
GO2RTC_CONFIG_FILE: string;
|
|
38
|
-
UI_PORT: number;
|
|
39
|
-
UI_ELECTRON_PORT: number;
|
|
40
|
-
get config(): IConfig;
|
|
41
|
-
set config(newConfig: IConfig);
|
|
42
|
-
get go2rtcConfig(): Go2RtcConfig;
|
|
43
|
-
set go2rtcConfig(newConfig: Go2RtcConfig);
|
|
44
|
-
constructor();
|
|
45
|
-
read(): void;
|
|
46
|
-
writeConfig(newConfig?: IConfig): void;
|
|
47
|
-
writeGo2RtcConfigFile(newConfig?: Go2RtcConfig): void;
|
|
48
|
-
writeGo2RtcConfigApi(newConfig?: Go2RtcConfig): Promise<void>;
|
|
49
|
-
mergeGo2RtcConfig(): Promise<void>;
|
|
50
|
-
private defaultConfig;
|
|
51
|
-
private defaultGo2RtcConfig;
|
|
52
|
-
private readConfig;
|
|
53
|
-
private readGo2RtcConfig;
|
|
54
|
-
private updateConfig;
|
|
55
|
-
private updateGo2RtcConfig;
|
|
56
|
-
private updateSecrets;
|
|
57
|
-
static extractVersion(str: string): string | null;
|
|
58
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import type { Socket } from 'socket.io';
|
|
3
|
-
import type { UiNotification } from '../../api/types';
|
|
4
|
-
import type { LoggingLevel } from '../config/types';
|
|
5
|
-
export declare class Logger {
|
|
6
|
-
private _loggerPrefix;
|
|
7
|
-
private _debugEnabled;
|
|
8
|
-
private _traceLogging;
|
|
9
|
-
private _disableTimestamps;
|
|
10
|
-
notifications: UiNotification[];
|
|
11
|
-
get debugEnabled(): boolean;
|
|
12
|
-
set debugEnabled(state: boolean);
|
|
13
|
-
get traceLogging(): boolean;
|
|
14
|
-
set traceLogging(state: boolean);
|
|
15
|
-
get disableTimestamps(): boolean;
|
|
16
|
-
set disableTimestamps(state: boolean);
|
|
17
|
-
get prefix(): string;
|
|
18
|
-
constructor();
|
|
19
|
-
log(...args: any[]): void;
|
|
20
|
-
error(...args: any[]): void;
|
|
21
|
-
warn(...args: any[]): void;
|
|
22
|
-
attention(...args: any[]): void;
|
|
23
|
-
debug(...args: any[]): void;
|
|
24
|
-
trace(...args: any[]): void;
|
|
25
|
-
notify(title: string, text: string, type: LoggingLevel, link: string, socket?: Socket): Promise<void>;
|
|
26
|
-
private setNotification;
|
|
27
|
-
private formatDateTime;
|
|
28
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { JwtTokenDecoded } from '../types';
|
|
2
|
-
export declare const toQuery: (data: any) => string;
|
|
3
|
-
export declare const toData: (query: string) => Record<string, any>;
|
|
4
|
-
export declare const isJson: (str: any) => boolean;
|
|
5
|
-
export declare const parseJwt: (access_token: string) => JwtTokenDecoded;
|
|
6
|
-
export declare const sleep: (ms: number) => Promise<void>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -71,16 +71,16 @@ export declare const mqttSchema: zod.ZodObject<{
|
|
|
71
71
|
cert?: string | undefined;
|
|
72
72
|
key?: string | undefined;
|
|
73
73
|
};
|
|
74
|
-
user?: string | undefined;
|
|
75
74
|
password?: string | undefined;
|
|
75
|
+
user?: string | undefined;
|
|
76
76
|
}, {
|
|
77
|
+
port?: number | undefined;
|
|
77
78
|
enabled?: boolean | undefined;
|
|
79
|
+
password?: string | undefined;
|
|
78
80
|
host?: string | undefined;
|
|
79
|
-
port?: number | undefined;
|
|
80
81
|
topicPrefix?: string | undefined;
|
|
81
82
|
clientId?: string | undefined;
|
|
82
83
|
user?: string | undefined;
|
|
83
|
-
password?: string | undefined;
|
|
84
84
|
tls?: {
|
|
85
85
|
enabled?: boolean | undefined;
|
|
86
86
|
cert?: string | undefined;
|
|
@@ -192,12 +192,12 @@ export declare const patchConfigSchema: zod.ZodObject<{
|
|
|
192
192
|
disableTimestamps?: boolean | undefined;
|
|
193
193
|
};
|
|
194
194
|
port?: number | undefined;
|
|
195
|
-
insecurePort?: number | undefined;
|
|
196
|
-
tempFile?: string | undefined;
|
|
197
195
|
plugins?: {
|
|
198
196
|
sudo?: boolean | undefined;
|
|
199
197
|
disabledPlugins?: string[] | undefined;
|
|
200
198
|
} | undefined;
|
|
199
|
+
insecurePort?: number | undefined;
|
|
200
|
+
tempFile?: string | undefined;
|
|
201
201
|
settings?: {
|
|
202
202
|
snapshotCache?: number | undefined;
|
|
203
203
|
} | undefined;
|