@camera.ui/browser 0.0.110 → 0.0.112
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/LICENSE.md +1 -1
- package/README.md +10 -1
- package/dist/index.d.ts +1269 -0
- package/dist/index.js +4179 -0
- package/package.json +55 -36
- package/CHANGELOG.md +0 -8
- package/dist/bundle.js +0 -2
- package/dist/bundle.js.LICENSE.txt +0 -23
- package/dist/types/packages/client/browser/src/api.d.ts +0 -8
- package/dist/types/packages/client/browser/src/client.d.ts +0 -23
- package/dist/types/packages/client/browser/src/index.d.ts +0 -2
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +0 -30
- package/dist/types/packages/client/browser/src/proxy/coreManager.d.ts +0 -16
- package/dist/types/packages/client/browser/src/proxy/deviceManager.d.ts +0 -18
- package/dist/types/packages/client/browser/src/proxy/index.d.ts +0 -3
- package/dist/types/packages/client/browser/src/socket.d.ts +0 -15
- package/dist/types/packages/client/browser/src/streaming/go2rts-session.d.ts +0 -71
- package/dist/types/packages/client/browser/src/types.d.ts +0 -58
- package/dist/types/packages/client/browser/src/utils.d.ts +0 -12
- 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/common/src/utils/subscribed.d.ts +0 -18
- package/dist/types/packages/plugineer/src/polyglot/node/camera/index.d.ts +0 -91
- 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/iou.d.ts +0 -2
- package/dist/types/packages/plugineer/src/polyglot/node/camera/polygon.d.ts +0 -4
- 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/packages/types/src/index.d.ts +0 -730
- 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/database/types.d.ts +0 -88
- 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/go2rtc/types.d.ts +0 -92
- 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/schemas/backup.schema.d.ts +0 -211
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +0 -980
- package/dist/types/server/src/api/schemas/config.schema.d.ts +0 -114
- package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +0 -703
- package/dist/types/server/src/api/schemas/plugins.schema.d.ts +0 -72
- package/dist/types/server/src/api/schemas/system.schema.d.ts +0 -17
- package/dist/types/server/src/api/schemas/users.schema.d.ts +0 -1013
- 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 -54
- 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/types/index.d.ts +0 -610
- 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/websocket/types.d.ts +0 -41
- 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/camera/types.d.ts +0 -11
- package/dist/types/server/src/go2rtc/index.d.ts +0 -25
- package/dist/types/server/src/go2rtc/types.d.ts +0 -14
- 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/schema.d.ts +0 -34
- package/dist/types/server/src/plugins/types.d.ts +0 -7
- 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/config/types.d.ts +0 -156
- package/dist/types/server/src/services/logger/index.d.ts +0 -16
- package/dist/types/server/src/types.d.ts +0 -31
- package/dist/types/shared/types/index.d.ts +0 -21
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { JsonSchema, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaEnum, JsonSchemaForm, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectButton, JsonSchemaObjectWithButtons, JsonSchemaString, RootSchema } from '@camera.ui/types';
|
|
3
|
-
import type { ZodTypeAny } from 'zod';
|
|
4
|
-
type RootZodSchema = z.ZodObject<Record<string, ZodTypeAny>, 'strict', ZodTypeAny, Record<string, any>, Record<string, any>>;
|
|
5
|
-
type OptionalZodString = z.ZodOptional<z.ZodString> | z.ZodString | z.ZodOptional<z.ZodEffects<z.ZodString, string, string>> | z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
-
type OptionalZodNumber = z.ZodOptional<z.ZodNumber> | z.ZodNumber | z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>> | z.ZodEffects<z.ZodNumber, number, number>;
|
|
7
|
-
type OptionalZodBoolean = z.ZodOptional<z.ZodBoolean> | z.ZodBoolean;
|
|
8
|
-
type OptionalZodZobject = z.ZodOptional<z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny, Record<string, any>, Record<string, any>>> | z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny, Record<string, any>, Record<string, any>> | z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>> | z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
9
|
-
type OptionalZodArray = z.ZodOptional<z.ZodType<any, any, any>> | z.ZodType<any, any, any>;
|
|
10
|
-
type OptionalZodEnum = z.ZodOptional<z.ZodUnion<[z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[]]>> | z.ZodUnion<[z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[]]> | z.ZodEffects<z.ZodAny, any, any> | z.ZodUnion<any>;
|
|
11
|
-
type OptionalZodEnumMultiple = z.ZodOptional<z.ZodArray<z.ZodUnion<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>, 'many'>> | z.ZodArray<z.ZodUnion<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>, 'many'> | z.ZodEffects<z.ZodAny, any, any> | z.ZodUnion<any>;
|
|
12
|
-
type ZodAny = z.ZodType<any, any, any>;
|
|
13
|
-
export declare const generateSchema: (value: any) => JsonSchema;
|
|
14
|
-
export declare const generateRootSchema: (value: Record<string, any>) => RootSchema;
|
|
15
|
-
export declare const generateJsonFromSchemaWithConfig: (jsonSchema: JsonSchema, config: Record<string, any>, path?: string) => any;
|
|
16
|
-
export declare const generateStorableConfig: (jsonSchema: JsonSchemaForm | JsonSchema, config: Record<string, any>) => Record<string, any>;
|
|
17
|
-
export declare const schemaIsReadonly: (jsonSchema: JsonSchema, group?: string) => boolean;
|
|
18
|
-
export declare const schemaIsStorable: (jsonSchema: JsonSchema, group?: string) => boolean;
|
|
19
|
-
export declare const generateZodSchemaFromRoot: (rootSchema: RootSchema) => RootZodSchema;
|
|
20
|
-
export declare const generateZodSchema: (jsonSchema: JsonSchema) => ZodAny;
|
|
21
|
-
export declare const generateNumberSchema: () => JsonSchemaNumber;
|
|
22
|
-
export declare const genereateBooleanSchema: () => JsonSchemaBoolean;
|
|
23
|
-
export declare const generateStringSchema: (value: string) => JsonSchemaString;
|
|
24
|
-
export declare const generateEnumSchema: (value: (string | number | boolean)[]) => JsonSchemaEnum;
|
|
25
|
-
export declare const generateObjectSchema: (value: Record<string, any>) => JsonSchemaObject;
|
|
26
|
-
export declare const generateObjectSchemaWithButtons: (value: Record<string, any>, buttons: JsonSchemaObjectButton[]) => JsonSchemaObjectWithButtons;
|
|
27
|
-
export declare const generateArraySchema: (array: string[] | number[] | boolean[] | Record<string, any>[]) => JsonSchemaArray;
|
|
28
|
-
export declare const createZodStringSchema: (jsonSchema: JsonSchemaString) => OptionalZodString;
|
|
29
|
-
export declare const createZodNumberSchema: (jsonSchema: JsonSchemaNumber) => OptionalZodNumber;
|
|
30
|
-
export declare const createZodBooleanSchema: (jsonSchema: JsonSchemaBoolean) => OptionalZodBoolean;
|
|
31
|
-
export declare const createEnumSchema: (jsonSchema: JsonSchemaEnum) => OptionalZodEnum | OptionalZodEnumMultiple;
|
|
32
|
-
export declare const createZodObjectSchema: (jsonSchema: JsonSchemaObject) => OptionalZodZobject;
|
|
33
|
-
export declare const createZodArraySchema: (jsonSchema: JsonSchemaArray) => OptionalZodArray;
|
|
34
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CameraExtension } from '@camera.ui/types';
|
|
2
|
-
export interface Context {
|
|
3
|
-
engines?: Record<string, string>;
|
|
4
|
-
dependencies?: Record<string, string>;
|
|
5
|
-
}
|
|
6
|
-
export declare const PLUGIN_IDENTIFIER_PATTERN: RegExp;
|
|
7
|
-
export declare const CAMERA_EXTENSIONS: CameraExtension[];
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { PLUGIN_STATUS } from '@camera.ui/plugineer';
|
|
2
|
-
import type { Plugin } from './plugin.js';
|
|
3
|
-
export declare class PluginWorker {
|
|
4
|
-
plugin: Plugin;
|
|
5
|
-
private pluginWorker?;
|
|
6
|
-
private proxyServer;
|
|
7
|
-
private logStream?;
|
|
8
|
-
private api;
|
|
9
|
-
private mainLogger;
|
|
10
|
-
private pluginLogger;
|
|
11
|
-
private processLogger;
|
|
12
|
-
private configService;
|
|
13
|
-
private socketService;
|
|
14
|
-
private pluginManager;
|
|
15
|
-
private py;
|
|
16
|
-
private publisher?;
|
|
17
|
-
private subscriber?;
|
|
18
|
-
private subject;
|
|
19
|
-
private targetSubject;
|
|
20
|
-
private started;
|
|
21
|
-
private shuttingDown;
|
|
22
|
-
private truncateInterval?;
|
|
23
|
-
private truncateIntervalMs;
|
|
24
|
-
private logBuffer;
|
|
25
|
-
private _status;
|
|
26
|
-
get status(): PLUGIN_STATUS;
|
|
27
|
-
constructor(plugin: Plugin);
|
|
28
|
-
start(): Promise<void>;
|
|
29
|
-
teardown(): Promise<void>;
|
|
30
|
-
destroy(): Promise<void>;
|
|
31
|
-
restart(): Promise<void>;
|
|
32
|
-
disable(): void;
|
|
33
|
-
getPID(): number;
|
|
34
|
-
isRunning(): boolean;
|
|
35
|
-
isReady(): boolean;
|
|
36
|
-
cleanup(): Promise<void>;
|
|
37
|
-
writeLog(...args: any[]): void;
|
|
38
|
-
private gatherDevices;
|
|
39
|
-
private kill;
|
|
40
|
-
private setStatus;
|
|
41
|
-
private sendMessage;
|
|
42
|
-
private handleClose;
|
|
43
|
-
private reset;
|
|
44
|
-
private updatePython;
|
|
45
|
-
private onChildMessage;
|
|
46
|
-
private createPythonPath;
|
|
47
|
-
private handleLogData;
|
|
48
|
-
private processLogEntry;
|
|
49
|
-
private writeProcessLog;
|
|
50
|
-
private writeHeader;
|
|
51
|
-
private closeLogStream;
|
|
52
|
-
private removeLogStream;
|
|
53
|
-
private truncateLog;
|
|
54
|
-
private cleanedProcessEnv;
|
|
55
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IceServer } from '@camera.ui/types';
|
|
2
|
-
import type { Go2RtcConfig, IConfig } from './types.js';
|
|
3
|
-
export declare const PROCESS_IDENTIFIER = "--id=camera.ui";
|
|
4
|
-
export declare const DEFAULT_ICE_SERVERS: IceServer[];
|
|
5
|
-
export declare const DEFAULT_CONFIG: IConfig;
|
|
6
|
-
export declare const DEFAULT_GO2RTC_CONFIG: Go2RtcConfig;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import type { LoggerOptions } from '@camera.ui/common/logger';
|
|
3
|
-
import type { ProcInfo } from '../../api/database/checks.js';
|
|
4
|
-
import type { DeepPartial } from '../../types.js';
|
|
5
|
-
import type { EnvironmentInfo, Go2RtcConfig, IConfig, Secrets } from './types.js';
|
|
6
|
-
export declare class ConfigService {
|
|
7
|
-
static get VERSION(): string;
|
|
8
|
-
static get ENVIRONMENT(): EnvironmentInfo;
|
|
9
|
-
static readonly NODE_VERSION: string;
|
|
10
|
-
static readonly MIN_NODE_VERSION: string;
|
|
11
|
-
static readonly SERVER_PATH: string;
|
|
12
|
-
static readonly INTERFACE_PATH: string;
|
|
13
|
-
private logger;
|
|
14
|
-
private _config;
|
|
15
|
-
private _go2rtcConfig;
|
|
16
|
-
readonly SECRETS: Secrets;
|
|
17
|
-
readonly HOME_PATH: string;
|
|
18
|
-
readonly STORAGE_PATH: string;
|
|
19
|
-
readonly LOGS_PATH: string;
|
|
20
|
-
readonly PIDS_FILE: string;
|
|
21
|
-
readonly DATABASE_PATH: string;
|
|
22
|
-
readonly TOKENS_PATH: string;
|
|
23
|
-
readonly USERS_STORAGE_PATH: string;
|
|
24
|
-
readonly TMP_PATH: string;
|
|
25
|
-
readonly PLUGINS_STORAGE_PATH: string;
|
|
26
|
-
readonly PLUGINS_INSTALL_PATH: string;
|
|
27
|
-
readonly REPORTS_FILE: string;
|
|
28
|
-
readonly LOG_FILE: string;
|
|
29
|
-
readonly CONFIG_FILE: string;
|
|
30
|
-
readonly SECRETS_FILE: string;
|
|
31
|
-
readonly ADMIN_FILE: string;
|
|
32
|
-
readonly GO2RTC_BINARY: string;
|
|
33
|
-
readonly GO2RTC_CONFIG_FILE: string;
|
|
34
|
-
readonly NATS_BINARY: string;
|
|
35
|
-
readonly BACKUP_INFO_FILE: string;
|
|
36
|
-
readonly UI_PORT: number;
|
|
37
|
-
get config(): IConfig;
|
|
38
|
-
set config(newConfig: IConfig);
|
|
39
|
-
get go2rtcConfig(): Go2RtcConfig;
|
|
40
|
-
set go2rtcConfig(newConfig: Go2RtcConfig);
|
|
41
|
-
get loggerOptions(): LoggerOptions;
|
|
42
|
-
constructor(homePath?: string);
|
|
43
|
-
static extractVersion(str: string): string | null;
|
|
44
|
-
read(): void;
|
|
45
|
-
writeConfig(newConfig?: DeepPartial<IConfig>): void;
|
|
46
|
-
writeGo2RtcConfigFile(newConfig?: DeepPartial<Go2RtcConfig>): void;
|
|
47
|
-
writeGo2RtcConfigApi(newConfig?: DeepPartial<Go2RtcConfig>): Promise<void>;
|
|
48
|
-
mergeGo2RtcConfig(): Promise<void>;
|
|
49
|
-
updateGo2RtcWebRtcFilter(serverAddresses: string[], oldAddresses?: string[], api?: boolean): Promise<void>;
|
|
50
|
-
addProc(proc: ProcInfo): void;
|
|
51
|
-
removeProcByPID(pid?: number): void;
|
|
52
|
-
getProcs(): ProcInfo[];
|
|
53
|
-
setProcs(pids: ProcInfo[]): void;
|
|
54
|
-
private defaultConfig;
|
|
55
|
-
private defaultGo2RtcConfig;
|
|
56
|
-
private readConfig;
|
|
57
|
-
private readGo2RtcConfig;
|
|
58
|
-
private cleanupConfig;
|
|
59
|
-
private updateConfig;
|
|
60
|
-
private updateGo2RtcConfig;
|
|
61
|
-
private updateSecrets;
|
|
62
|
-
private createDirs;
|
|
63
|
-
private safetyEnsureDir;
|
|
64
|
-
private safetyEmptyDir;
|
|
65
|
-
private safetyEnsureFile;
|
|
66
|
-
private logStart;
|
|
67
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import type { IceServer } from '@camera.ui/types';
|
|
2
|
-
export interface EnvironmentInfo {
|
|
3
|
-
development: boolean;
|
|
4
|
-
docker: boolean;
|
|
5
|
-
electron: boolean;
|
|
6
|
-
homeassistant: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface Secrets {
|
|
9
|
-
jwtAccessKey: string;
|
|
10
|
-
jwtRefreshKey: string;
|
|
11
|
-
}
|
|
12
|
-
export interface RuntimeInfo {
|
|
13
|
-
name: string;
|
|
14
|
-
status: RUNTIME_STATUS;
|
|
15
|
-
}
|
|
16
|
-
export declare const enum RUNTIME_STATUS {
|
|
17
|
-
READY = "ready",
|
|
18
|
-
RESTARTING = "restarting",
|
|
19
|
-
STARTING = "starting",
|
|
20
|
-
STARTED = "started",
|
|
21
|
-
STOPPED = "stopped",
|
|
22
|
-
ERROR = "error",
|
|
23
|
-
UNKNOWN = "unknown"
|
|
24
|
-
}
|
|
25
|
-
export interface InterfaceSettings {
|
|
26
|
-
saveSessions: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface PluginsSettings {
|
|
29
|
-
disabledPlugins: string[];
|
|
30
|
-
}
|
|
31
|
-
export interface IConfig {
|
|
32
|
-
port: number;
|
|
33
|
-
ssl: IConfigSSL;
|
|
34
|
-
logger: Logger;
|
|
35
|
-
settings: InterfaceSettings;
|
|
36
|
-
plugins: PluginsSettings;
|
|
37
|
-
}
|
|
38
|
-
export type LoggingLevel = 'info' | 'debug' | 'warn' | 'error' | 'trace';
|
|
39
|
-
export interface Logger {
|
|
40
|
-
level: LoggingLevel;
|
|
41
|
-
disableTimestamps?: boolean;
|
|
42
|
-
}
|
|
43
|
-
export interface Mqtt {
|
|
44
|
-
enabled?: boolean;
|
|
45
|
-
host?: string;
|
|
46
|
-
port?: number;
|
|
47
|
-
topicPrefix?: string;
|
|
48
|
-
clientId?: string;
|
|
49
|
-
user?: string;
|
|
50
|
-
password?: string;
|
|
51
|
-
tls?: MqttTLS;
|
|
52
|
-
}
|
|
53
|
-
export interface MqttTLS {
|
|
54
|
-
enabled?: boolean;
|
|
55
|
-
cert?: string;
|
|
56
|
-
key?: string;
|
|
57
|
-
}
|
|
58
|
-
export interface IConfigSSL {
|
|
59
|
-
certFile: string;
|
|
60
|
-
keyFile: string;
|
|
61
|
-
addresses?: string[];
|
|
62
|
-
}
|
|
63
|
-
export interface Go2RtcConfig {
|
|
64
|
-
log: Partial<Log>;
|
|
65
|
-
api: API;
|
|
66
|
-
rtsp: RTSP;
|
|
67
|
-
srtp: SRTP;
|
|
68
|
-
rtmp: RTMP;
|
|
69
|
-
webrtc: Webrtc;
|
|
70
|
-
ffmpeg: Ffmpeg;
|
|
71
|
-
streams?: Partial<Streams>;
|
|
72
|
-
homekit?: Partial<HomeKit>;
|
|
73
|
-
hass?: Partial<Hass>;
|
|
74
|
-
webtorrent?: Partial<Webtorrent>;
|
|
75
|
-
ngrok?: Partial<Ngrok>;
|
|
76
|
-
}
|
|
77
|
-
export type LogLevel = 'info' | 'debug' | 'trace' | 'warn' | 'error' | 'fatal';
|
|
78
|
-
export interface Log {
|
|
79
|
-
format: string;
|
|
80
|
-
level: LogLevel;
|
|
81
|
-
api: LogLevel;
|
|
82
|
-
exec: LogLevel;
|
|
83
|
-
ngrok: LogLevel;
|
|
84
|
-
rtsp: LogLevel;
|
|
85
|
-
rtmp: LogLevel;
|
|
86
|
-
homekit: LogLevel;
|
|
87
|
-
webtorrent: LogLevel;
|
|
88
|
-
hass: LogLevel;
|
|
89
|
-
mp4: LogLevel;
|
|
90
|
-
hls: LogLevel;
|
|
91
|
-
mjpeg: LogLevel;
|
|
92
|
-
streams: LogLevel;
|
|
93
|
-
webrtc: LogLevel;
|
|
94
|
-
}
|
|
95
|
-
export interface API {
|
|
96
|
-
origin: string;
|
|
97
|
-
listen: string;
|
|
98
|
-
username?: string;
|
|
99
|
-
password?: string;
|
|
100
|
-
}
|
|
101
|
-
export type Streams = Record<string, string | string[]>;
|
|
102
|
-
export interface SRTP {
|
|
103
|
-
listen: string;
|
|
104
|
-
}
|
|
105
|
-
export interface RTMP {
|
|
106
|
-
listen: string;
|
|
107
|
-
}
|
|
108
|
-
export interface RTSP {
|
|
109
|
-
listen: string;
|
|
110
|
-
username?: string;
|
|
111
|
-
password?: string;
|
|
112
|
-
default_query: string;
|
|
113
|
-
}
|
|
114
|
-
export interface Webrtc {
|
|
115
|
-
listen: string;
|
|
116
|
-
candidates?: string[];
|
|
117
|
-
ice_servers?: IceServer[];
|
|
118
|
-
filters?: WebrtcFilter;
|
|
119
|
-
}
|
|
120
|
-
export interface WebrtcFilter {
|
|
121
|
-
candidates?: string[];
|
|
122
|
-
networks?: string[];
|
|
123
|
-
interfaces?: string[];
|
|
124
|
-
ips?: string[];
|
|
125
|
-
udp_ports?: string[];
|
|
126
|
-
}
|
|
127
|
-
export interface Ffmpeg {
|
|
128
|
-
bin: string;
|
|
129
|
-
global: string;
|
|
130
|
-
file: string;
|
|
131
|
-
http: string;
|
|
132
|
-
rtsp: string;
|
|
133
|
-
output: string;
|
|
134
|
-
[key: string]: string;
|
|
135
|
-
}
|
|
136
|
-
export type HomeKit = Record<string, Partial<HomeKitSettings> | null | undefined>;
|
|
137
|
-
export interface Hass {
|
|
138
|
-
config: string;
|
|
139
|
-
}
|
|
140
|
-
export interface HomeKitSettings {
|
|
141
|
-
pin: number;
|
|
142
|
-
name: string;
|
|
143
|
-
device_id: string;
|
|
144
|
-
device_private: string;
|
|
145
|
-
}
|
|
146
|
-
export interface Webtorrent {
|
|
147
|
-
shares: Shares;
|
|
148
|
-
}
|
|
149
|
-
export type Shares = Record<string, Partial<ShareSettings>>;
|
|
150
|
-
export interface ShareSettings {
|
|
151
|
-
pwd: string;
|
|
152
|
-
src: string;
|
|
153
|
-
}
|
|
154
|
-
export interface Ngrok {
|
|
155
|
-
command: string;
|
|
156
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { Logger } from '@camera.ui/common/logger';
|
|
3
|
-
import type { LoggerOptions } from '@camera.ui/common/logger';
|
|
4
|
-
import type { UiNotification } from '../../api/types/index.js';
|
|
5
|
-
import type { LoggingLevel } from '../config/types.js';
|
|
6
|
-
export declare class LoggerService extends Logger {
|
|
7
|
-
notifications: UiNotification[];
|
|
8
|
-
constructor(options?: LoggerOptions);
|
|
9
|
-
notify(title: string, text: string, type: LoggingLevel, link: string): UiNotification | undefined;
|
|
10
|
-
notify(notification: UiNotification): UiNotification | undefined;
|
|
11
|
-
removeNotification(id: string, notify: boolean): void;
|
|
12
|
-
removeNotification(notification: UiNotification, notify: boolean): void;
|
|
13
|
-
clearNotifications(notifiy: boolean): void;
|
|
14
|
-
createNotification(id: string | undefined, title: string, text: string, type: LoggingLevel, link: string): UiNotification;
|
|
15
|
-
private checkIfNotificationExists;
|
|
16
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type MethodKeys<T> = keyof {
|
|
2
|
-
[K in keyof T as T[K] extends (...args: any) => any ? K : never]: any;
|
|
3
|
-
};
|
|
4
|
-
export type MethodType<T, K extends keyof T> = T[K] extends (...args: any) => any ? T[K] : never;
|
|
5
|
-
export type DeepPartial<T> = T extends object ? {
|
|
6
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
7
|
-
} : T;
|
|
8
|
-
export interface UpdateStartedMessage {
|
|
9
|
-
type: 'UPDATE_STARTED';
|
|
10
|
-
version: string;
|
|
11
|
-
}
|
|
12
|
-
export interface UpdateOutputMessage {
|
|
13
|
-
type: 'UPDATE_OUTPUT';
|
|
14
|
-
data: string;
|
|
15
|
-
}
|
|
16
|
-
export interface UpdateErrorMessage {
|
|
17
|
-
type: 'UPDATE_ERROR';
|
|
18
|
-
data: string;
|
|
19
|
-
}
|
|
20
|
-
export interface UpdateCompleteMessage {
|
|
21
|
-
type: 'UPDATE_COMPLETE';
|
|
22
|
-
version: string;
|
|
23
|
-
}
|
|
24
|
-
export interface UpdateFailedMessage {
|
|
25
|
-
type: 'UPDATE_FAILED';
|
|
26
|
-
error: string;
|
|
27
|
-
}
|
|
28
|
-
export interface RestartRequiredMessage {
|
|
29
|
-
type: 'RESTART_REQUIRED';
|
|
30
|
-
}
|
|
31
|
-
export type CLIMessage = UpdateStartedMessage | UpdateOutputMessage | UpdateErrorMessage | UpdateCompleteMessage | UpdateFailedMessage | RestartRequiredMessage;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type * from '../../packages/common/src/nats/messageQueue.js';
|
|
2
|
-
export { Subscribed as SubscribedImp } from '../../packages/common/src/utils/subscribed.js';
|
|
3
|
-
export * from '../../packages/plugineer/src/polyglot/node/camera/polygon.js';
|
|
4
|
-
export * from '../../packages/plugineer/src/polyglot/node/plugins/schema.js';
|
|
5
|
-
export * from '../../packages/plugineer/src/polyglot/node/plugins/types.js';
|
|
6
|
-
export * from '../../packages/types/src/index.js';
|
|
7
|
-
export type * from '../../server/src/api/database/types.js';
|
|
8
|
-
export type * from '../../server/src/api/go2rtc/types.js';
|
|
9
|
-
export * from '../../server/src/api/schemas/cameras.schema.js';
|
|
10
|
-
export * from '../../server/src/api/schemas/plugins.schema.js';
|
|
11
|
-
export * from '../../server/src/api/schemas/system.schema.js';
|
|
12
|
-
export * from '../../server/src/api/schemas/users.schema.js';
|
|
13
|
-
export type * from '../../server/src/api/types/index.js';
|
|
14
|
-
export type * from '../../server/src/api/websocket/types.js';
|
|
15
|
-
export type * from '../../server/src/camera/types.js';
|
|
16
|
-
export * from '../../server/src/go2rtc/types.js';
|
|
17
|
-
export type * from '../../server/src/nats/types.js';
|
|
18
|
-
export * from '../../server/src/plugins/schema.js';
|
|
19
|
-
export * from '../../server/src/plugins/types.js';
|
|
20
|
-
export * from '../../server/src/services/config/types.js';
|
|
21
|
-
export type * from '../../server/src/types.js';
|