@camera.ui/browser 0.0.82 → 0.0.84
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/types/packages/client/browser/src/proxy/cameraDevice.d.ts +3 -7
- package/dist/types/server/src/api/database/types.d.ts +7 -7
- package/dist/types/server/src/api/go2rtc/api/streams.d.ts +4 -4
- package/dist/types/server/src/api/go2rtc/types.d.ts +6 -2
- package/dist/types/server/src/api/schemas/backup.schema.d.ts +3 -3
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +115 -88
- package/dist/types/server/src/api/schemas/plugins.schema.d.ts +29 -32
- package/dist/types/server/src/api/schemas/users.schema.d.ts +11 -6
- package/dist/types/server/src/api/services/cameras.service.d.ts +7 -5
- package/dist/types/server/src/api/types/index.d.ts +13 -3
- package/dist/types/server/src/api/websocket/nsp/metrics.d.ts +4 -22
- package/dist/types/server/src/api/websocket/nsp/status.d.ts +4 -15
- package/dist/types/server/src/api/websocket/types.d.ts +25 -64
- package/dist/types/server/src/api.d.ts +2 -2
- package/dist/types/server/src/camera/controller.d.ts +9 -4
- package/dist/types/server/src/camera/device.d.ts +15 -3
- package/dist/types/server/src/camera/index.d.ts +18 -39
- package/dist/types/server/src/camera/interfaces/camera.d.ts +0 -1
- package/dist/types/server/src/camera/streaming/werift-session.d.ts +10 -1
- package/dist/types/server/src/camera/types.d.ts +1 -3
- package/dist/types/server/src/camera/videoFrame.d.ts +3 -3
- package/dist/types/server/src/decoder/types.d.ts +5 -12
- package/dist/types/server/src/decoder/worker.d.ts +4 -7
- package/dist/types/server/src/nats/connection.d.ts +17 -0
- package/dist/types/server/src/nats/error.d.ts +9 -0
- package/dist/types/server/src/nats/index.d.ts +6 -4
- package/dist/types/server/src/nats/messageQueue.d.ts +7 -4
- package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +1 -1
- package/dist/types/server/src/nats/proxy/deviceManager.d.ts +3 -3
- package/dist/types/server/src/nats/server.d.ts +0 -1
- package/dist/types/server/src/nats/subscription.d.ts +12 -0
- package/dist/types/server/src/nats/types.d.ts +25 -40
- package/dist/types/server/src/nats/utils.d.ts +2 -4
- package/dist/types/server/src/plugins/index.d.ts +3 -5
- package/dist/types/server/src/plugins/plugin.d.ts +4 -13
- package/dist/types/server/src/plugins/types.d.ts +14 -41
- package/dist/types/server/src/plugins/worker.d.ts +1 -1
- package/dist/types/server/src/polyglot/node/plugins/cameraStorage.d.ts +10 -11
- package/dist/types/server/src/polyglot/node/plugins/{api.d.ts → pluginApi.d.ts} +9 -12
- package/dist/types/server/src/polyglot/node/plugins/{logger.d.ts → pluginLogger.d.ts} +2 -0
- package/dist/types/server/src/polyglot/node/plugins/proxy/cameraDevice.d.ts +8 -11
- package/dist/types/server/src/polyglot/node/plugins/proxy/deviceManager.d.ts +6 -8
- package/dist/types/server/src/polyglot/node/plugins/schema.d.ts +22 -9
- package/dist/types/server/src/polyglot/node/plugins/storageController.d.ts +5 -5
- package/dist/types/server/src/services/config/index.d.ts +9 -6
- package/dist/types/server/src/services/config/types.d.ts +5 -5
- package/dist/types/server/src/services/logger/index.d.ts +2 -0
- package/dist/types/server/src/utils/ffmpeg.d.ts +2 -0
- package/dist/types/server/src/utils/pythonInstaller.d.ts +1 -1
- package/dist/types/server/src/utils/subscribed.d.ts +4 -4
- package/package.json +5 -5
- package/dist/types/server/src/api/controllers/api.controller.d.ts +0 -6
- package/dist/types/server/src/api/controllers/auth.controller.d.ts +0 -20
- 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 -34
- 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 -16
- package/dist/types/server/src/api/controllers/plugins.controller.d.ts +0 -59
- package/dist/types/server/src/api/controllers/system.controller.d.ts +0 -14
- package/dist/types/server/src/api/controllers/users.controller.d.ts +0 -28
- package/dist/types/server/src/api/index.d.ts +0 -21
- 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/plugins/cameraui.plugin.d.ts +0 -11
- package/dist/types/server/src/api/plugins/database.plugin.d.ts +0 -11
- package/dist/types/server/src/api/plugins/go2rtc.plugin.d.ts +0 -11
- package/dist/types/server/src/api/plugins/logger.plugin.d.ts +0 -7
- 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 -21
- package/dist/types/server/src/api/plugins/useragent.plugin.d.ts +0 -8
- package/dist/types/server/src/api/routes/api.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/auth.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/backup.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/cameras.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/config.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/files.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/frameWorkers.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/index.d.ts +0 -6
- package/dist/types/server/src/api/routes/plugins.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/system.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/users.routes.d.ts +0 -2
- package/dist/types/server/src/api/services/backup.service.d.ts +0 -11
- package/dist/types/server/src/api/utils/cert.d.ts +0 -11
- package/dist/types/server/src/api/utils/fetch.d.ts +0 -2
- package/dist/types/server/src/api/utils/moveFiles.d.ts +0 -1
- package/dist/types/server/src/api/utils/parse.d.ts +0 -2
- package/dist/types/server/src/decoder/ffmpeg.d.ts +0 -2
- package/dist/types/server/src/main.d.ts +0 -21
- package/dist/types/server/src/nats/proxy/index.d.ts +0 -2
- package/dist/types/server/src/polyglot/node/plugins/proxy/index.d.ts +0 -2
- package/dist/types/server/src/polyglot/node/plugins/proxy/messageQueue.d.ts +0 -20
- /package/dist/types/server/src/polyglot/node/plugins/{config.d.ts → configService.d.ts} +0 -0
|
@@ -2,10 +2,11 @@ import { EventEmitter } from 'node:events';
|
|
|
2
2
|
import { CameraDeviceProxy } from './cameraDevice.js';
|
|
3
3
|
import type { CameraDevice } from '../../../../camera/device.js';
|
|
4
4
|
import type { CameraConfig } from '../../../../camera/types.js';
|
|
5
|
+
import type { AuthConfig } from '../../../../decoder/types.js';
|
|
5
6
|
import type { DeviceManagerProxyEventCallbacks, DeviceManagerProxyMethods } from '../../../../nats/types.js';
|
|
6
7
|
import type { PluginInfo } from '../../../../plugins/types.js';
|
|
7
|
-
import type {
|
|
8
|
-
import type { PluginLogger } from '../
|
|
8
|
+
import type { API } from '../pluginApi.js';
|
|
9
|
+
import type { PluginLogger } from '../pluginLogger.js';
|
|
9
10
|
export declare interface DeviceManager extends DeviceManagerProxyMethods {
|
|
10
11
|
on<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
11
12
|
once<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
@@ -13,7 +14,7 @@ export declare interface DeviceManager extends DeviceManagerProxyMethods {
|
|
|
13
14
|
removeListener<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
14
15
|
removeAllListeners<E extends keyof DeviceManagerProxyEventCallbacks>(event?: E): this;
|
|
15
16
|
}
|
|
16
|
-
export declare class
|
|
17
|
+
export declare class DeviceManagerProxy extends EventEmitter implements DeviceManager {
|
|
17
18
|
private api;
|
|
18
19
|
private logger;
|
|
19
20
|
private initialized;
|
|
@@ -28,10 +29,7 @@ export declare class DeviceManager extends EventEmitter implements DeviceManager
|
|
|
28
29
|
private proxyEndpoints;
|
|
29
30
|
private plugin;
|
|
30
31
|
private devices;
|
|
31
|
-
constructor(api:
|
|
32
|
-
user: string;
|
|
33
|
-
pass: string;
|
|
34
|
-
});
|
|
32
|
+
constructor(api: API, logger: PluginLogger, plugin: PluginInfo, proxyEndpoints: string[], auth: AuthConfig);
|
|
35
33
|
init(): Promise<void>;
|
|
36
34
|
getCameraById(id: string): Promise<CameraDevice | undefined>;
|
|
37
35
|
getCameraByName(name: string): Promise<CameraDevice | undefined>;
|
|
@@ -42,7 +40,7 @@ export declare class DeviceManager extends EventEmitter implements DeviceManager
|
|
|
42
40
|
configureCameras(cameraDevices: CameraDeviceProxy[]): void;
|
|
43
41
|
private requestHandler;
|
|
44
42
|
private emitEvent;
|
|
45
|
-
private
|
|
43
|
+
private onProxyMessage;
|
|
46
44
|
private onRequest;
|
|
47
45
|
private addOrGetCamera;
|
|
48
46
|
private close;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { ZodTypeAny } from 'zod';
|
|
3
|
-
import type { JsonSchema, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaForm, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectWithButtons, JsonSchemaString,
|
|
3
|
+
import type { JsonSchema, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaForm, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectButton, JsonSchemaObjectWithButtons, JsonSchemaString, RootSchema } from '../../../plugins/types.js';
|
|
4
4
|
type RootZodSchema = z.ZodObject<Record<string, ZodTypeAny>, 'strict', ZodTypeAny, {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
}, {
|
|
@@ -42,14 +42,14 @@ export declare const generateSchema: (value: any) => JsonSchema;
|
|
|
42
42
|
* @param rootSchema - The Root JSON schema.
|
|
43
43
|
* @returns - The generated JSON object.
|
|
44
44
|
*/
|
|
45
|
-
export declare const generateJsonFromRootSchema: (rootSchema: RootSchema
|
|
45
|
+
export declare const generateJsonFromRootSchema: (rootSchema: RootSchema) => Record<string, any>;
|
|
46
46
|
/**
|
|
47
47
|
* Generate a JSON object from a JSON schema.
|
|
48
48
|
*
|
|
49
49
|
* @param jsonSchema - The JSON schema.
|
|
50
50
|
* @returns - The generated JSON object.
|
|
51
51
|
*/
|
|
52
|
-
export declare const generateJsonFromSchema: (jsonSchema: JsonSchema
|
|
52
|
+
export declare const generateJsonFromSchema: (jsonSchema: JsonSchema) => any;
|
|
53
53
|
/**
|
|
54
54
|
* Generate a JSON object from a given JSON schema and use values from a config file.
|
|
55
55
|
*
|
|
@@ -57,7 +57,7 @@ export declare const generateJsonFromSchema: (jsonSchema: JsonSchema | PluginJso
|
|
|
57
57
|
* @param config - The config file with values to use.
|
|
58
58
|
* @returns - The generated JSON object.
|
|
59
59
|
*/
|
|
60
|
-
export declare const generateJsonFromSchemaWithConfig: (jsonSchema: JsonSchema
|
|
60
|
+
export declare const generateJsonFromSchemaWithConfig: (jsonSchema: JsonSchema, config: Record<string, any>, path?: string) => any;
|
|
61
61
|
/**
|
|
62
62
|
* Generate a new config object from a given JSON schema and use values from a config file.
|
|
63
63
|
* Contains only storable values.
|
|
@@ -73,22 +73,22 @@ export declare const generateStorableConfig: (jsonSchema: JsonSchemaForm | JsonS
|
|
|
73
73
|
* @param schemaForm - The Plugin JSON schema form from which the functions should be removed.
|
|
74
74
|
* @returns - The Plugin JSON schema form without functions.
|
|
75
75
|
*/
|
|
76
|
-
export declare const removeFunctionsFromSchemaForm: (schemaForm:
|
|
76
|
+
export declare const removeFunctionsFromSchemaForm: (schemaForm: JsonSchemaForm) => JsonSchemaForm;
|
|
77
77
|
/**
|
|
78
78
|
* Removes all functions from a given Plugin JSON schema.
|
|
79
79
|
*
|
|
80
80
|
* @param jsonSchema - The JSON schema from which the functions should be removed.
|
|
81
81
|
* @returns - The JSON schema without functions.
|
|
82
82
|
*/
|
|
83
|
-
export declare const removeFunctionsFromSchema: (jsonSchema:
|
|
83
|
+
export declare const removeFunctionsFromSchema: (jsonSchema: JsonSchema) => JsonSchema;
|
|
84
84
|
/**
|
|
85
85
|
* Checks if a given JSON schema is readonly.
|
|
86
86
|
*
|
|
87
87
|
* @param jsonSchema - The JSON schema to check.
|
|
88
88
|
* @returns - True if the JSON schema is readonly, false otherwise.
|
|
89
89
|
*/
|
|
90
|
-
export declare const schemaIsReadonly: (jsonSchema: JsonSchema
|
|
91
|
-
export declare const schemaIsStorable: (jsonSchema: JsonSchema
|
|
90
|
+
export declare const schemaIsReadonly: (jsonSchema: JsonSchema) => boolean;
|
|
91
|
+
export declare const schemaIsStorable: (jsonSchema: JsonSchema) => boolean;
|
|
92
92
|
/**
|
|
93
93
|
* Converts a config path to a schema path.
|
|
94
94
|
*
|
|
@@ -170,7 +170,7 @@ export declare const generateObjectSchema: (value: Record<string, any>) => JsonS
|
|
|
170
170
|
* @param buttons - Array of min one button and up to two buttons to be included in the schema.
|
|
171
171
|
* @returns - The generated JSON schema for the object.
|
|
172
172
|
*/
|
|
173
|
-
export declare const generateObjectSchemaWithButtons: (value: Record<string, any>, buttons: [
|
|
173
|
+
export declare const generateObjectSchemaWithButtons: (value: Record<string, any>, buttons: JsonSchemaObjectButton[]) => JsonSchemaObjectWithButtons;
|
|
174
174
|
/**
|
|
175
175
|
* Generates a JSON schema for an array.
|
|
176
176
|
*
|
|
@@ -227,6 +227,19 @@ export declare const isObjectTypeWithButtons: (jsonSchema: Partial<JsonSchema>)
|
|
|
227
227
|
* @returns - True if the JSON schema is of array type, false otherwise.
|
|
228
228
|
*/
|
|
229
229
|
export declare const isArrayType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaArray;
|
|
230
|
+
/**
|
|
231
|
+
* Checks if the given JSON schema is of button type.
|
|
232
|
+
*
|
|
233
|
+
* @param jsonSchema - The JSON schema to check.
|
|
234
|
+
* @returns - True if the JSON schema is of button type, false otherwise.
|
|
235
|
+
*/
|
|
236
|
+
export declare const isButtonType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaButton;
|
|
237
|
+
/**
|
|
238
|
+
* Checks if the given value is a JSON schema.
|
|
239
|
+
*
|
|
240
|
+
* @param value - The value to check.
|
|
241
|
+
* @returns - True if the value is a JSON schema, false otherwise.
|
|
242
|
+
*/
|
|
230
243
|
export declare const isJsonSchema: (value: any) => value is JsonSchema;
|
|
231
244
|
/**
|
|
232
245
|
* Checks if the given value is a JSON Primitive schema.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CameraStorage } from './cameraStorage.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { JsonSchemaForm } from '../../../plugins/types.js';
|
|
3
|
+
import type { API } from './pluginApi.js';
|
|
4
4
|
export declare class StorageController {
|
|
5
5
|
private api;
|
|
6
6
|
private cameraStorages;
|
|
7
|
-
constructor(api:
|
|
7
|
+
constructor(api: API);
|
|
8
8
|
/**
|
|
9
9
|
* Create a camera storage instance
|
|
10
10
|
*
|
|
@@ -12,13 +12,13 @@ export declare class StorageController {
|
|
|
12
12
|
* @param cameraId - The camera id
|
|
13
13
|
* @param schema - The plugin schema
|
|
14
14
|
*/
|
|
15
|
-
createCameraStorage(instance: any, cameraId: string, schema?:
|
|
15
|
+
createCameraStorage<T extends Record<string, any> = Record<string, any>>(instance: any, cameraId: string, schema?: JsonSchemaForm): CameraStorage<T>;
|
|
16
16
|
/**
|
|
17
17
|
* Get a camera storage instance
|
|
18
18
|
*
|
|
19
19
|
* @param cameraId - The camera id
|
|
20
20
|
*/
|
|
21
|
-
getCameraStorage(cameraId: string): CameraStorage | undefined;
|
|
21
|
+
getCameraStorage<T extends Record<string, any> = Record<string, any>>(cameraId: string): CameraStorage<T> | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* Remove a camera storage instance
|
|
24
24
|
*
|
|
@@ -5,13 +5,14 @@ export declare class ConfigService {
|
|
|
5
5
|
static readonly IS_DOCKER: boolean;
|
|
6
6
|
static readonly IS_ELECTRON: boolean;
|
|
7
7
|
static readonly IS_HA: boolean;
|
|
8
|
-
static readonly
|
|
9
|
-
static readonly
|
|
10
|
-
static
|
|
11
|
-
static readonly MIN_NODE_VERSION: string;
|
|
8
|
+
static readonly AS_SERVICE: boolean;
|
|
9
|
+
static readonly APP_NAME: string;
|
|
10
|
+
static get VERSION(): string;
|
|
12
11
|
static readonly NODE_VERSION: string;
|
|
12
|
+
static readonly MIN_NODE_VERSION: string;
|
|
13
13
|
static readonly SERVER_PATH: string;
|
|
14
14
|
static readonly INTERFACE_PATH: string;
|
|
15
|
+
static readonly INSTALL_PATH: string | null;
|
|
15
16
|
private logger;
|
|
16
17
|
private _config;
|
|
17
18
|
private _go2rtcConfig;
|
|
@@ -31,12 +32,11 @@ export declare class ConfigService {
|
|
|
31
32
|
readonly GO2RTC_CONFIG_FILE: string;
|
|
32
33
|
readonly NATS_BINARY: string;
|
|
33
34
|
readonly UI_PORT: number;
|
|
34
|
-
readonly UI_ELECTRON_PORT: number;
|
|
35
35
|
get config(): IConfig;
|
|
36
36
|
set config(newConfig: IConfig);
|
|
37
37
|
get go2rtcConfig(): Go2RtcConfig;
|
|
38
38
|
set go2rtcConfig(newConfig: Go2RtcConfig);
|
|
39
|
-
constructor();
|
|
39
|
+
constructor(storagePath?: string);
|
|
40
40
|
static extractVersion(str: string): string | null;
|
|
41
41
|
read(): void;
|
|
42
42
|
writeConfig(newConfig?: IConfig): void;
|
|
@@ -50,4 +50,7 @@ export declare class ConfigService {
|
|
|
50
50
|
private updateConfig;
|
|
51
51
|
private updateGo2RtcConfig;
|
|
52
52
|
private updateSecrets;
|
|
53
|
+
private createDirs;
|
|
54
|
+
private generatePluginsPackageJson;
|
|
55
|
+
private getUserHomeDir;
|
|
53
56
|
}
|
|
@@ -2,7 +2,7 @@ export interface Secrets {
|
|
|
2
2
|
jwtAccessKey: string;
|
|
3
3
|
jwtRefreshKey: string;
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface RuntimeInfo {
|
|
6
6
|
name: string;
|
|
7
7
|
status: RUNTIME_STATUS;
|
|
8
8
|
}
|
|
@@ -90,8 +90,8 @@ export interface Log {
|
|
|
90
90
|
export interface API {
|
|
91
91
|
origin: string;
|
|
92
92
|
listen: string;
|
|
93
|
-
username
|
|
94
|
-
password
|
|
93
|
+
username?: string;
|
|
94
|
+
password?: string;
|
|
95
95
|
}
|
|
96
96
|
export interface Streams {
|
|
97
97
|
[key: string]: string | string[] | null;
|
|
@@ -104,8 +104,8 @@ export interface RTMP {
|
|
|
104
104
|
}
|
|
105
105
|
export interface RTSP {
|
|
106
106
|
listen: string;
|
|
107
|
-
username
|
|
108
|
-
password
|
|
107
|
+
username?: string;
|
|
108
|
+
password?: string;
|
|
109
109
|
default_query: string;
|
|
110
110
|
}
|
|
111
111
|
export interface Webrtc {
|
|
@@ -23,6 +23,8 @@ export declare class Logger {
|
|
|
23
23
|
debug(...args: any[]): void;
|
|
24
24
|
trace(...args: any[]): void;
|
|
25
25
|
notify(title: string, text: string, type: LoggingLevel, link: string, socket?: Socket): Promise<void>;
|
|
26
|
+
formatMessage(level: 'log' | 'warn' | 'error' | 'debug' | 'trace' | 'attention', ...args: any[]): string[];
|
|
26
27
|
private setNotification;
|
|
28
|
+
private formattedArgs;
|
|
27
29
|
private formatDateTime;
|
|
28
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PortablePython } from '@bjia56/portable-python';
|
|
2
|
-
import { PluginLogger } from '../polyglot/node/plugins/
|
|
2
|
+
import { PluginLogger } from '../polyglot/node/plugins/pluginLogger.js';
|
|
3
3
|
export declare const SERVER_PY_VERSION = "3.11";
|
|
4
4
|
export declare class PythonInstaller {
|
|
5
5
|
static readonly versions: string[];
|
|
@@ -2,8 +2,8 @@ import type { Subscription } from 'rxjs';
|
|
|
2
2
|
export declare class Subscribed {
|
|
3
3
|
private readonly subscriptions;
|
|
4
4
|
private readonly additionalSubscriptions;
|
|
5
|
-
addSubscriptions(...subscriptions: Subscription[]): void;
|
|
6
|
-
addAdditionalSubscriptions(...subscriptions: Subscription[]): void;
|
|
7
|
-
unsubscribe(): void;
|
|
8
|
-
unsubscribeAdditional(): void;
|
|
5
|
+
protected addSubscriptions(...subscriptions: Subscription[]): void;
|
|
6
|
+
protected addAdditionalSubscriptions(...subscriptions: Subscription[]): void;
|
|
7
|
+
protected unsubscribe(): void;
|
|
8
|
+
protected unsubscribeAdditional(): void;
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.84",
|
|
4
4
|
"description": "camera.ui browser client",
|
|
5
5
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
6
6
|
"module": "./dist/bundle.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"prepublishOnly": "npm i --package-lock-only && npm run lint && npm run format && npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"axios": "^1.7.
|
|
26
|
+
"axios": "^1.7.3",
|
|
27
27
|
"lru-cache": "^11.0.0",
|
|
28
28
|
"rxjs": "^7.8.1",
|
|
29
29
|
"socket.io-client": "^4.7.5"
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@rushstack/eslint-patch": "^1.10.4",
|
|
33
33
|
"@swc/register": "^0.1.10",
|
|
34
34
|
"@types/webrtc": "^0.0.43",
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
36
|
-
"@typescript-eslint/parser": "^
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^8.0.1",
|
|
36
|
+
"@typescript-eslint/parser": "^8.0.1",
|
|
37
37
|
"bufferutil": "^4.0.8",
|
|
38
38
|
"eslint": "^8.57.0",
|
|
39
39
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"rimraf": "^6.0.1",
|
|
43
43
|
"ts-loader": "^9.5.1",
|
|
44
44
|
"typescript": "^5.5.4",
|
|
45
|
-
"updates": "^16.3.
|
|
45
|
+
"updates": "^16.3.7",
|
|
46
46
|
"utf-8-validate": "^6.0.4",
|
|
47
47
|
"webpack": "^5.93.0",
|
|
48
48
|
"webpack-cli": "^5.1.4"
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { DBCamera } from '../database/types.js';
|
|
3
|
-
import type { AuthLoginRequest, CameraZoneInsertPatchRequest, CameraZonesParamsRequest, CamerasExtensionsParamsRequest, CamerasExtensionsRequest, CamerasInsertRequest, CamerasParamsIdRequest, 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>, reply: FastifyReply): FastifyReply;
|
|
15
|
-
insertZone(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZoneInsertPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
patchZoneByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesParamsRequest & CameraZoneInsertPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
17
|
-
removeZoneByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CameraZonesParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
18
|
-
getExtensionsByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
19
|
-
getExtensionConfigByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
20
|
-
patchExtensionConfigByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & ExtensionsPatchRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
21
|
-
getSnapshotByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
22
|
-
getSnapshotById(req: FastifyRequest<AuthLoginRequest & CamerasParamsIdRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
23
|
-
insert(req: FastifyRequest<AuthLoginRequest & CamerasInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
24
|
-
preview(req: FastifyRequest<AuthLoginRequest & CamerasPreviewRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
25
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | DBCamera[];
|
|
26
|
-
patchByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CamerasPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
27
|
-
enableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
28
|
-
disableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
29
|
-
addExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
30
|
-
removeExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
31
|
-
removeByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
32
|
-
removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
33
|
-
private resolvePluginName;
|
|
34
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, ConfigPatchRequest, ConfigRequest, Go2RtcConfigPatchRequest } from '../types/index.js';
|
|
3
|
-
export declare class ConfigController {
|
|
4
|
-
private app;
|
|
5
|
-
private configService;
|
|
6
|
-
private go2rtcApi;
|
|
7
|
-
constructor(app: FastifyInstance);
|
|
8
|
-
showConfig(req: FastifyRequest<AuthLoginRequest & ConfigRequest>, reply: FastifyReply): FastifyReply;
|
|
9
|
-
showGo2RtcConfig(req: FastifyRequest<AuthLoginRequest & ConfigRequest>, reply: FastifyReply): FastifyReply;
|
|
10
|
-
downloadConfig(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
11
|
-
downloadGo2RtcConfig(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
12
|
-
patchConfig(req: FastifyRequest<AuthLoginRequest & ConfigPatchRequest>, reply: FastifyReply): FastifyReply | void;
|
|
13
|
-
patchGo2RtcConfig(req: FastifyRequest<AuthLoginRequest & Go2RtcConfigPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, FilesParamsRequest } from '../types/index.js';
|
|
3
|
-
export declare class FilesController {
|
|
4
|
-
private app;
|
|
5
|
-
private configService;
|
|
6
|
-
constructor(app: FastifyInstance);
|
|
7
|
-
serve(req: FastifyRequest<AuthLoginRequest & FilesParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, FrameWorker, FrameWorkerParamsNameRequest, PaginationRequest } from '../types/index.js';
|
|
3
|
-
export interface PluginInfo {
|
|
4
|
-
pluginName: string;
|
|
5
|
-
id?: string;
|
|
6
|
-
version?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class FrameWorkersController {
|
|
9
|
-
private app;
|
|
10
|
-
private frameManager;
|
|
11
|
-
constructor(app: FastifyInstance);
|
|
12
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | FrameWorker[];
|
|
13
|
-
restartByName(req: FastifyRequest<AuthLoginRequest & FrameWorkerParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
14
|
-
startByName(req: FastifyRequest<AuthLoginRequest & FrameWorkerParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
15
|
-
stopByName(req: FastifyRequest<AuthLoginRequest & FrameWorkerParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, CameraUiPlugin, PaginationRequest, PluginExtension, PluginsActionRequest, PluginsConfigPatchRequest, PluginsDetectAudioRequest, PluginsDetectMotionRequest, PluginsDetectObjectRequest, PluginsInsertRequest, PluginsInterfaceQuery, PluginsParamsNameRequest, PluginsParamsRemoveRequest, PluginsQueryRequest } from '../types/index.js';
|
|
3
|
-
export 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
|
-
getPluginLogoByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
26
|
-
getPluginSchemaByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
27
|
-
getPluginInterface(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsInterfaceQuery>, reply: FastifyReply): Promise<FastifyReply>;
|
|
28
|
-
detectObjects(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsDetectObjectRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
29
|
-
detectAudio(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsDetectAudioRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
30
|
-
detectMotion(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsDetectMotionRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
31
|
-
submitActionButtonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsActionRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
32
|
-
getContractByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply;
|
|
33
|
-
getReadmeByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsQueryRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
34
|
-
getReleaseByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
35
|
-
installOrUpdate(req: FastifyRequest<AuthLoginRequest & PluginsInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
36
|
-
managePlugin(action: 'install' | 'uninstall' | 'unlink', pluginInfo: PluginInfo): Promise<string>;
|
|
37
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | CameraUiPlugin[];
|
|
38
|
-
listExtensions(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | PluginExtension[];
|
|
39
|
-
patchConfigJsonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsConfigPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
40
|
-
restartByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
41
|
-
search(req: FastifyRequest<AuthLoginRequest & PluginsQueryRequest & PaginationRequest>, reply: FastifyReply): Promise<FastifyReply | CameraUiPlugin[]>;
|
|
42
|
-
startByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
43
|
-
stopByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
44
|
-
uninstallByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
45
|
-
uninstallAll(req: FastifyRequest<AuthLoginRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
46
|
-
private cleanNpmCache;
|
|
47
|
-
private ensurePluginDirExists;
|
|
48
|
-
private getAvailablePluginVersions;
|
|
49
|
-
private getLastNodeModulesPath;
|
|
50
|
-
private getNpmModuleLatestVersion;
|
|
51
|
-
private getNpmPath;
|
|
52
|
-
private getPluginFromNpm;
|
|
53
|
-
private pluginsPackageJson;
|
|
54
|
-
private removeSynologyMetadata;
|
|
55
|
-
private runNpmCommand;
|
|
56
|
-
private searchNpmRegistrySingle;
|
|
57
|
-
private resolvePluginName;
|
|
58
|
-
private isScopedPlugin;
|
|
59
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { DBCamviewLayout, DBUser } from '../database/types.js';
|
|
3
|
-
import type { AuthLoginRequest, AuthParamsRequest, CamerasParamsRequest, PaginationRequest, ShortcutInsertRequest, ShortcutParamsRequest, ShortcutPatchRequest, UsersInsertRequest, UsersParamsRequest, UsersPatchRequest, ViewsInsertRequest, ViewsParamsRequest, ViewsPatchRequest } from '../types/index.js';
|
|
4
|
-
export declare class UsersController {
|
|
5
|
-
private app;
|
|
6
|
-
private configService;
|
|
7
|
-
private service;
|
|
8
|
-
private camerasService;
|
|
9
|
-
constructor(app: FastifyInstance);
|
|
10
|
-
insert(req: FastifyRequest<AuthLoginRequest & UsersInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
11
|
-
getByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
12
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | Partial<DBUser>[];
|
|
13
|
-
patchByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & UsersPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
14
|
-
removeByName(req: FastifyRequest<AuthLoginRequest & UsersParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
15
|
-
removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
insertShortcut(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
17
|
-
getShortcutByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
18
|
-
getShortcutsByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
19
|
-
patchShortcutByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest & ShortcutPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
20
|
-
removeShortcutByCameraName(req: FastifyRequest<AuthLoginRequest & PaginationRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
21
|
-
removeAllShortcutsByCameraName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & CamerasParamsRequest & ShortcutParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
22
|
-
insertView(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
23
|
-
getViewById(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
24
|
-
listViews(req: FastifyRequest<AuthLoginRequest & PaginationRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): FastifyReply | Partial<DBUser>[];
|
|
25
|
-
patchViewById(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest & ViewsPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
26
|
-
removeViewById(req: FastifyRequest<AuthLoginRequest & PaginationRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | DBCamviewLayout[]>;
|
|
27
|
-
removeAllViews(req: FastifyRequest<AuthLoginRequest & PaginationRequest & AuthParamsRequest & UsersParamsRequest>, reply: FastifyReply): Promise<FastifyReply | DBCamviewLayout[]>;
|
|
28
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare class Server {
|
|
2
|
-
private app?;
|
|
3
|
-
private api;
|
|
4
|
-
private logger;
|
|
5
|
-
private configService;
|
|
6
|
-
constructor();
|
|
7
|
-
register(): Promise<void>;
|
|
8
|
-
listen(): Promise<void>;
|
|
9
|
-
close(): Promise<void>;
|
|
10
|
-
private setupListeners;
|
|
11
|
-
private registerPlugins;
|
|
12
|
-
private registerRouters;
|
|
13
|
-
private get corsOptions();
|
|
14
|
-
private get helmetOptions();
|
|
15
|
-
private get multipartOptions();
|
|
16
|
-
private get serverOptions();
|
|
17
|
-
private get localServerOptions();
|
|
18
|
-
private qsParser;
|
|
19
|
-
private get socketOptions();
|
|
20
|
-
private get staticOptions();
|
|
21
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, AuthParamsRequest } from '../types/index.js';
|
|
3
|
-
export declare const onlyAdminCanDoThisAction: (req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply) => Promise<FastifyReply | 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>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, AuthNewLoginRequest } from '../types/index.js';
|
|
3
|
-
export declare const isPasswordAndUserMatch: (req: FastifyRequest<AuthNewLoginRequest>, reply: FastifyReply) => Promise<FastifyReply | any>;
|
|
4
|
-
export declare const validJWTNeeded: (req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply) => Promise<FastifyReply | any>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, PaginationRequest, PaginationResponse } from '../types/index.js';
|
|
3
|
-
export declare const pages: (req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply, payload: any) => Promise<PaginationResponse | void>;
|
|
@@ -1,11 +0,0 @@
|
|
|
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>;
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|