@camera.ui/browser 0.0.81 → 0.0.83
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/client.d.ts +1 -7
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +4 -14
- package/dist/types/packages/client/browser/src/proxy/index.d.ts +0 -2
- package/dist/types/packages/client/browser/src/streaming/go2rts-session.d.ts +2 -0
- package/dist/types/server/src/api/database/index.d.ts +11 -8
- package/dist/types/server/src/api/database/migration.d.ts +12 -0
- package/dist/types/server/src/api/database/types.d.ts +22 -2
- 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 +18 -18
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +116 -96
- package/dist/types/server/src/api/schemas/config.schema.d.ts +11 -11
- package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +60 -60
- package/dist/types/server/src/api/schemas/plugins.schema.d.ts +47 -0
- package/dist/types/server/src/api/schemas/users.schema.d.ts +499 -112
- package/dist/types/server/src/api/services/cameras.service.d.ts +1 -1
- package/dist/types/server/src/api/services/users.service.d.ts +12 -3
- package/dist/types/server/src/api/types/index.d.ts +41 -30
- package/dist/types/server/src/api.d.ts +3 -3
- package/dist/types/server/src/camera/controller.d.ts +11 -11
- package/dist/types/server/src/camera/device.d.ts +15 -3
- package/dist/types/server/src/camera/index.d.ts +23 -46
- package/dist/types/server/src/camera/interfaces/camera.d.ts +1 -1
- package/dist/types/server/src/camera/types.d.ts +2 -21
- package/dist/types/server/src/camera/videoFrame.d.ts +3 -3
- package/dist/types/server/src/decoder/types.d.ts +12 -10
- package/dist/types/server/src/decoder/worker.d.ts +3 -5
- 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 +12 -9
- package/dist/types/server/src/nats/messageQueue.d.ts +20 -0
- package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +8 -19
- package/dist/types/server/src/nats/proxy/deviceManager.d.ts +6 -21
- 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 +44 -102
- 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/interfaces/audioDetection.d.ts +7 -0
- package/dist/types/server/src/plugins/{base.d.ts → interfaces/base.d.ts} +2 -2
- package/dist/types/server/src/plugins/interfaces/motionDetection.d.ts +6 -0
- package/dist/types/server/src/plugins/interfaces/objectDetection.d.ts +7 -0
- package/dist/types/server/src/plugins/plugin.d.ts +4 -13
- package/dist/types/server/src/plugins/types.d.ts +16 -5
- package/dist/types/server/src/plugins/worker.d.ts +1 -1
- package/dist/types/server/src/polyglot/node/plugins/cameraStorage.d.ts +2 -2
- package/dist/types/server/src/polyglot/node/plugins/{api.d.ts → pluginApi.d.ts} +10 -17
- 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 +12 -26
- 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 +14 -10
- package/dist/types/server/src/polyglot/node/plugins/storageController.d.ts +2 -2
- package/dist/types/server/src/services/config/index.d.ts +3 -2
- package/dist/types/server/src/services/config/types.d.ts +4 -4
- 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/dist/types/server/src/utils/utils.d.ts +1 -2
- package/package.json +6 -6
- package/dist/types/packages/client/browser/src/proxy/pluginsManager.d.ts +0 -10
- package/dist/types/packages/client/browser/src/proxy/systemManager.d.ts +0 -10
- 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 -33
- 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 -54
- 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 -21
- 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 -10
- 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/camera/interfaces/audioDetection.d.ts +0 -10
- package/dist/types/server/src/camera/interfaces/motionDetection.d.ts +0 -10
- package/dist/types/server/src/camera/interfaces/objectDetection.d.ts +0 -10
- 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 -4
- package/dist/types/server/src/nats/proxy/pluginsManager.d.ts +0 -12
- package/dist/types/server/src/nats/proxy/systemManager.d.ts +0 -8
- package/dist/types/server/src/nats/queue.d.ts +0 -17
- package/dist/types/server/src/polyglot/node/plugins/proxy/index.d.ts +0 -4
- package/dist/types/server/src/polyglot/node/plugins/proxy/pluginsManager.d.ts +0 -39
- package/dist/types/server/src/polyglot/node/plugins/proxy/queue.d.ts +0 -20
- package/dist/types/server/src/polyglot/node/plugins/proxy/systemManager.d.ts +0 -37
- /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,
|
|
3
|
+
import type { JsonSchema, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaForm, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectWithButtons, JsonSchemaString, PluginJsonSchema, PluginJsonSchemaForm, PluginRootSchema, RootSchema } from '../../../plugins/types.js';
|
|
4
4
|
type RootZodSchema = z.ZodObject<Record<string, ZodTypeAny>, 'strict', ZodTypeAny, {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
}, {
|
|
@@ -58,6 +58,15 @@ export declare const generateJsonFromSchema: (jsonSchema: JsonSchema | PluginJso
|
|
|
58
58
|
* @returns - The generated JSON object.
|
|
59
59
|
*/
|
|
60
60
|
export declare const generateJsonFromSchemaWithConfig: (jsonSchema: JsonSchema | PluginJsonSchema, config: Record<string, any>, path?: string) => any;
|
|
61
|
+
/**
|
|
62
|
+
* Generate a new config object from a given JSON schema and use values from a config file.
|
|
63
|
+
* Contains only storable values.
|
|
64
|
+
*
|
|
65
|
+
* @param jsonSchema - The JSON schema.
|
|
66
|
+
* @param config - The config file with values to use.
|
|
67
|
+
* @param path - The path to the current JSON schema.
|
|
68
|
+
*/
|
|
69
|
+
export declare const generateStorableConfig: (jsonSchema: JsonSchemaForm | JsonSchema, config: Record<string, any>, path?: string) => Record<string, any>;
|
|
61
70
|
/**
|
|
62
71
|
* Removes all functions from a given Plugin JSON schema form.
|
|
63
72
|
*
|
|
@@ -78,7 +87,8 @@ export declare const removeFunctionsFromSchema: (jsonSchema: PluginJsonSchema) =
|
|
|
78
87
|
* @param jsonSchema - The JSON schema to check.
|
|
79
88
|
* @returns - True if the JSON schema is readonly, false otherwise.
|
|
80
89
|
*/
|
|
81
|
-
export declare const
|
|
90
|
+
export declare const schemaIsReadonly: (jsonSchema: JsonSchema | PluginJsonSchema) => boolean;
|
|
91
|
+
export declare const schemaIsStorable: (jsonSchema: JsonSchema | PluginJsonSchema) => boolean;
|
|
82
92
|
/**
|
|
83
93
|
* Converts a config path to a schema path.
|
|
84
94
|
*
|
|
@@ -167,7 +177,7 @@ export declare const generateObjectSchemaWithButtons: (value: Record<string, any
|
|
|
167
177
|
* @param array - The array for which the JSON schema should be generated.
|
|
168
178
|
* @returns - The generated JSON schema for the array.
|
|
169
179
|
*/
|
|
170
|
-
export declare const generateArraySchema: (array: any[]) => JsonSchemaArray;
|
|
180
|
+
export declare const generateArraySchema: (array: string[] | number[] | boolean[] | Record<string, any>[]) => JsonSchemaArray;
|
|
171
181
|
/**
|
|
172
182
|
* Checks if the given JSON schema is of string type.
|
|
173
183
|
*
|
|
@@ -217,13 +227,7 @@ export declare const isObjectTypeWithButtons: (jsonSchema: Partial<JsonSchema>)
|
|
|
217
227
|
* @returns - True if the JSON schema is of array type, false otherwise.
|
|
218
228
|
*/
|
|
219
229
|
export declare const isArrayType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaArray;
|
|
220
|
-
|
|
221
|
-
* Checks if the given value is a JSON AnyOf Schema.
|
|
222
|
-
*
|
|
223
|
-
* @param value - The value to check.
|
|
224
|
-
* @returns - True if the value is a JSON AnyOf schema, false otherwise.
|
|
225
|
-
*/
|
|
226
|
-
export declare const isAnyOfSchema: (value: any) => value is JsonSchemaAnyOf;
|
|
230
|
+
export declare const isJsonSchema: (value: any) => value is JsonSchema;
|
|
227
231
|
/**
|
|
228
232
|
* Checks if the given value is a JSON Primitive schema.
|
|
229
233
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CameraStorage } from './cameraStorage.js';
|
|
2
2
|
import type { PluginJsonSchemaForm } from '../../../plugins/types.js';
|
|
3
|
-
import type {
|
|
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
|
*
|
|
@@ -31,12 +31,11 @@ export declare class ConfigService {
|
|
|
31
31
|
readonly GO2RTC_CONFIG_FILE: string;
|
|
32
32
|
readonly NATS_BINARY: string;
|
|
33
33
|
readonly UI_PORT: number;
|
|
34
|
-
readonly UI_ELECTRON_PORT: number;
|
|
35
34
|
get config(): IConfig;
|
|
36
35
|
set config(newConfig: IConfig);
|
|
37
36
|
get go2rtcConfig(): Go2RtcConfig;
|
|
38
37
|
set go2rtcConfig(newConfig: Go2RtcConfig);
|
|
39
|
-
constructor();
|
|
38
|
+
constructor(storagePath?: string);
|
|
40
39
|
static extractVersion(str: string): string | null;
|
|
41
40
|
read(): void;
|
|
42
41
|
writeConfig(newConfig?: IConfig): void;
|
|
@@ -50,4 +49,6 @@ export declare class ConfigService {
|
|
|
50
49
|
private updateConfig;
|
|
51
50
|
private updateGo2RtcConfig;
|
|
52
51
|
private updateSecrets;
|
|
52
|
+
private createDirs;
|
|
53
|
+
private generatePluginsPackageJson;
|
|
53
54
|
}
|
|
@@ -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
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { JwtTokenDecoded } from '../api/types/index.js';
|
|
2
1
|
export type Customizer<TObject, TSource> = (objValue: any, srcValue: any, key: string, object: TObject, source: TSource, stack: any[]) => any;
|
|
3
2
|
export declare const toQuery: (data: any) => string;
|
|
4
3
|
export declare const toData: (query: string) => Record<string, any>;
|
|
5
4
|
export declare const isJson: (str: any) => boolean;
|
|
6
|
-
export declare const parseJwt: (access_token: string) => JwtTokenDecoded;
|
|
7
5
|
export declare const sleep: (ms: number) => Promise<void>;
|
|
8
6
|
export declare const isEqual: (first: any, second: any, ignoreOrder?: boolean) => boolean;
|
|
9
7
|
export declare const mergeWith: <TObject, TSource>(object: TObject, source: TSource, customizer: Customizer<TObject, TSource>, stack?: any[]) => TObject & TSource;
|
|
10
8
|
export declare const orderBy: (array: any[], keys: string[], orders: ("asc" | "desc")[]) => any[];
|
|
11
9
|
export declare const structuredClone: <T>(obj: T) => T;
|
|
10
|
+
export declare const createSourceName: (cameraName: string, sourceName: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"description": "camera.ui browser client",
|
|
5
5
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
6
6
|
"module": "./dist/bundle.js",
|
|
@@ -23,17 +23,17 @@
|
|
|
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"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@rushstack/eslint-patch": "^1.10.
|
|
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.
|
|
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,10 +0,0 @@
|
|
|
1
|
-
import type { BaseLogger } from '../../../../../shared/types/index.js';
|
|
2
|
-
import type { SocketService } from '../socket.js';
|
|
3
|
-
interface PluginsManagerBrowserProxyMethods {
|
|
4
|
-
}
|
|
5
|
-
export declare class PluginsManager implements PluginsManagerBrowserProxyMethods {
|
|
6
|
-
private socketService;
|
|
7
|
-
private logger;
|
|
8
|
-
constructor(socketService: SocketService, logger: BaseLogger);
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BaseLogger } from '../../../../../shared/types/index.js';
|
|
2
|
-
import type { SocketService } from '../socket.js';
|
|
3
|
-
interface SystemManagerBrowserProxyMethods {
|
|
4
|
-
}
|
|
5
|
-
export declare class SystemManager implements SystemManagerBrowserProxyMethods {
|
|
6
|
-
private socketService;
|
|
7
|
-
private logger;
|
|
8
|
-
constructor(socketService: SocketService, logger: BaseLogger);
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -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,33 +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, 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
|
-
insert(req: FastifyRequest<AuthLoginRequest & CamerasInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
23
|
-
preview(req: FastifyRequest<AuthLoginRequest & CamerasPreviewRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
24
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | DBCamera[];
|
|
25
|
-
patchByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest & CamerasPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
26
|
-
enableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
27
|
-
disableExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest & CamerasExtensionsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
28
|
-
addExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
29
|
-
removeExtensionByName(req: FastifyRequest<AuthLoginRequest & CamerasExtensionsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
30
|
-
removeByName(req: FastifyRequest<AuthLoginRequest & CamerasParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
31
|
-
removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
32
|
-
private resolvePluginName;
|
|
33
|
-
}
|
|
@@ -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,54 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { AuthLoginRequest, CameraUiPlugin, PaginationRequest, PluginExtension, PluginsActionRequest, PluginsConfigPatchRequest, PluginsInsertRequest, PluginsParamsNameRequest, PluginsParamsRemoveRequest, PluginsQueryRequest } from '../types/index.js';
|
|
3
|
-
export interface PluginInfo {
|
|
4
|
-
pluginName: string;
|
|
5
|
-
id?: string;
|
|
6
|
-
version?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class PluginsController {
|
|
9
|
-
private app;
|
|
10
|
-
private logger;
|
|
11
|
-
private configService;
|
|
12
|
-
private io;
|
|
13
|
-
private pluginManager;
|
|
14
|
-
private proxyServer;
|
|
15
|
-
private service;
|
|
16
|
-
private camerasService;
|
|
17
|
-
constructor(app: FastifyInstance);
|
|
18
|
-
enableByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
19
|
-
disableByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
20
|
-
getByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply;
|
|
21
|
-
getPluginUpdateByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
22
|
-
getVersionsByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
23
|
-
getChangelogByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
24
|
-
getConfigJsonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
25
|
-
getPluginSchemaByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
26
|
-
submitActionButtonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsActionRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
27
|
-
getContractByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): FastifyReply;
|
|
28
|
-
getReadmeByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsQueryRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
29
|
-
getReleaseByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
30
|
-
installOrUpdate(req: FastifyRequest<AuthLoginRequest & PluginsInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
31
|
-
managePlugin(action: 'install' | 'uninstall' | 'unlink', pluginInfo: PluginInfo): Promise<string>;
|
|
32
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | CameraUiPlugin[];
|
|
33
|
-
listExtensions(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | PluginExtension[];
|
|
34
|
-
patchConfigJsonByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsConfigPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
35
|
-
restartByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
36
|
-
search(req: FastifyRequest<AuthLoginRequest & PluginsQueryRequest & PaginationRequest>, reply: FastifyReply): Promise<FastifyReply | CameraUiPlugin[]>;
|
|
37
|
-
startByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
38
|
-
stopByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
39
|
-
uninstallByName(req: FastifyRequest<AuthLoginRequest & PluginsParamsNameRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
40
|
-
uninstallAll(req: FastifyRequest<AuthLoginRequest & PluginsParamsRemoveRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
41
|
-
private cleanNpmCache;
|
|
42
|
-
private ensurePluginDirExists;
|
|
43
|
-
private getAvailablePluginVersions;
|
|
44
|
-
private getLastNodeModulesPath;
|
|
45
|
-
private getNpmModuleLatestVersion;
|
|
46
|
-
private getNpmPath;
|
|
47
|
-
private getPluginFromNpm;
|
|
48
|
-
private pluginsPackageJson;
|
|
49
|
-
private removeSynologyMetadata;
|
|
50
|
-
private runNpmCommand;
|
|
51
|
-
private searchNpmRegistrySingle;
|
|
52
|
-
private resolvePluginName;
|
|
53
|
-
private isScopedPlugin;
|
|
54
|
-
}
|
|
@@ -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,21 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
2
|
-
import type { DBCamviewLayout, DBUser } from '../database/types.js';
|
|
3
|
-
import type { AuthLoginRequest, AuthParamsRequest, PaginationRequest, 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
|
-
constructor(app: FastifyInstance);
|
|
9
|
-
insert(req: FastifyRequest<AuthLoginRequest & UsersInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
10
|
-
getByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
11
|
-
list(req: FastifyRequest<AuthLoginRequest & PaginationRequest>, reply: FastifyReply): FastifyReply | Partial<DBUser>[];
|
|
12
|
-
patchByName(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & UsersPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
13
|
-
removeByName(req: FastifyRequest<AuthLoginRequest & UsersParamsRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
14
|
-
removeAll(req: FastifyRequest<AuthLoginRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
15
|
-
insertView(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsInsertRequest>, reply: FastifyReply): Promise<FastifyReply>;
|
|
16
|
-
getViewById(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): FastifyReply;
|
|
17
|
-
listViews(req: FastifyRequest<AuthLoginRequest & PaginationRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): FastifyReply | Partial<DBUser>[];
|
|
18
|
-
patchViewById(req: FastifyRequest<AuthLoginRequest & AuthParamsRequest & UsersParamsRequest & ViewsParamsRequest & ViewsPatchRequest>, reply: FastifyReply): Promise<FastifyReply | void>;
|
|
19
|
-
removeViewById(req: FastifyRequest<AuthLoginRequest & PaginationRequest & UsersParamsRequest & ViewsParamsRequest>, reply: FastifyReply): Promise<FastifyReply | DBCamviewLayout[]>;
|
|
20
|
-
removeAllViews(req: FastifyRequest<AuthLoginRequest & PaginationRequest & AuthParamsRequest & UsersParamsRequest>, reply: FastifyReply): Promise<FastifyReply | DBCamviewLayout[]>;
|
|
21
|
-
}
|
|
@@ -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;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { FastifyPluginAsync } from 'fastify';
|
|
2
|
-
import type { Server, ServerOptions } from 'socket.io';
|
|
3
|
-
declare module 'fastify' {
|
|
4
|
-
interface FastifyInstance {
|
|
5
|
-
io: Server;
|
|
6
|
-
}
|
|
7
|
-
interface FastifyRequest {
|
|
8
|
-
io: Server;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare const SocketIoPlugin: FastifyPluginAsync<Partial<ServerOptions>>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
|
2
|
-
declare module 'fastify' {
|
|
3
|
-
interface FastifyInstance {
|
|
4
|
-
system: System;
|
|
5
|
-
}
|
|
6
|
-
interface FastifyRequest {
|
|
7
|
-
system: System;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
declare class System {
|
|
11
|
-
private app;
|
|
12
|
-
private database;
|
|
13
|
-
private io;
|
|
14
|
-
private go2rtc;
|
|
15
|
-
private proxyServer;
|
|
16
|
-
constructor(app: FastifyInstance);
|
|
17
|
-
close(): Promise<void>;
|
|
18
|
-
restartGo2rtc(): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
export declare const SystemPlugin: FastifyPluginAsync;
|
|
21
|
-
export {};
|