@camera.ui/browser 0.0.81 → 0.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/types/packages/client/browser/src/client.d.ts +1 -7
  3. package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +1 -7
  4. package/dist/types/packages/client/browser/src/proxy/index.d.ts +0 -2
  5. package/dist/types/packages/client/browser/src/streaming/go2rts-session.d.ts +2 -0
  6. package/dist/types/server/src/api/controllers/cameras.controller.d.ts +2 -1
  7. package/dist/types/server/src/api/controllers/plugins.controller.d.ts +6 -1
  8. package/dist/types/server/src/api/controllers/users.controller.d.ts +8 -1
  9. package/dist/types/server/src/api/database/index.d.ts +11 -8
  10. package/dist/types/server/src/api/database/migration.d.ts +12 -0
  11. package/dist/types/server/src/api/database/types.d.ts +22 -2
  12. package/dist/types/server/src/api/schemas/backup.schema.d.ts +15 -15
  13. package/dist/types/server/src/api/schemas/cameras.schema.d.ts +79 -79
  14. package/dist/types/server/src/api/schemas/config.schema.d.ts +11 -11
  15. package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +60 -60
  16. package/dist/types/server/src/api/schemas/plugins.schema.d.ts +50 -0
  17. package/dist/types/server/src/api/schemas/users.schema.d.ts +499 -112
  18. package/dist/types/server/src/api/services/backup.service.d.ts +2 -1
  19. package/dist/types/server/src/api/services/cameras.service.d.ts +0 -1
  20. package/dist/types/server/src/api/services/users.service.d.ts +12 -3
  21. package/dist/types/server/src/api/types/index.d.ts +40 -29
  22. package/dist/types/server/src/api/utils/parse.d.ts +2 -0
  23. package/dist/types/server/src/api.d.ts +1 -1
  24. package/dist/types/server/src/camera/controller.d.ts +2 -7
  25. package/dist/types/server/src/camera/index.d.ts +6 -8
  26. package/dist/types/server/src/camera/interfaces/camera.d.ts +1 -0
  27. package/dist/types/server/src/camera/types.d.ts +1 -18
  28. package/dist/types/server/src/decoder/types.d.ts +10 -1
  29. package/dist/types/server/src/nats/index.d.ts +7 -6
  30. package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +8 -19
  31. package/dist/types/server/src/nats/proxy/deviceManager.d.ts +6 -21
  32. package/dist/types/server/src/nats/proxy/index.d.ts +0 -2
  33. package/dist/types/server/src/nats/types.d.ts +33 -76
  34. package/dist/types/server/src/plugins/interfaces/audioDetection.d.ts +7 -0
  35. package/dist/types/server/src/plugins/{base.d.ts → interfaces/base.d.ts} +2 -2
  36. package/dist/types/server/src/plugins/interfaces/motionDetection.d.ts +6 -0
  37. package/dist/types/server/src/plugins/interfaces/objectDetection.d.ts +7 -0
  38. package/dist/types/server/src/plugins/types.d.ts +12 -5
  39. package/dist/types/server/src/polyglot/node/plugins/api.d.ts +2 -6
  40. package/dist/types/server/src/polyglot/node/plugins/proxy/cameraDevice.d.ts +4 -15
  41. package/dist/types/server/src/polyglot/node/plugins/proxy/index.d.ts +0 -2
  42. package/dist/types/server/src/polyglot/node/plugins/schema.d.ts +14 -10
  43. package/dist/types/server/src/utils/utils.d.ts +1 -2
  44. package/package.json +3 -3
  45. package/dist/types/packages/client/browser/src/proxy/pluginsManager.d.ts +0 -10
  46. package/dist/types/packages/client/browser/src/proxy/systemManager.d.ts +0 -10
  47. package/dist/types/server/src/camera/interfaces/audioDetection.d.ts +0 -10
  48. package/dist/types/server/src/camera/interfaces/motionDetection.d.ts +0 -10
  49. package/dist/types/server/src/camera/interfaces/objectDetection.d.ts +0 -10
  50. package/dist/types/server/src/nats/proxy/pluginsManager.d.ts +0 -12
  51. package/dist/types/server/src/nats/proxy/systemManager.d.ts +0 -8
  52. package/dist/types/server/src/polyglot/node/plugins/proxy/pluginsManager.d.ts +0 -39
  53. package/dist/types/server/src/polyglot/node/plugins/proxy/systemManager.d.ts +0 -37
  54. /package/dist/types/server/src/nats/{queue.d.ts → messageQueue.d.ts} +0 -0
  55. /package/dist/types/server/src/polyglot/node/plugins/proxy/{queue.d.ts → messageQueue.d.ts} +0 -0
@@ -0,0 +1,6 @@
1
+ import { BasePlugin } from './base.js';
2
+ import type { MotionDetectionPluginResponse, RootSchema } from '../types.js';
3
+ export declare abstract class MotionDetectionPlugin extends BasePlugin {
4
+ abstract interfaceSchema(): RootSchema | void;
5
+ abstract detectMotion(videoPath: string, config: Record<string, any>): Promise<MotionDetectionPluginResponse>;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { BasePlugin } from './base.js';
2
+ import type { ImageMetadata } from '../../decoder/types.js';
3
+ import type { ObjectDetectionPluginResponse, RootSchema } from '../types.js';
4
+ export declare abstract class ObjectDetectionPlugin extends BasePlugin {
5
+ abstract interfaceSchema(): RootSchema | void;
6
+ abstract detectObjects(imagePath: string, metadata: ImageMetadata, config: Record<string, any>): Promise<ObjectDetectionPluginResponse>;
7
+ }
@@ -1,4 +1,5 @@
1
1
  import type { Camera } from '../api/database/types.js';
2
+ import type { Detection } from '../camera/types.js';
2
3
  export interface SchemaConfig {
3
4
  rootSchema: PluginRootSchema;
4
5
  config: Record<string, any>;
@@ -75,9 +76,9 @@ export interface JsonBaseSchema<T = any> {
75
76
  hidden?: boolean;
76
77
  group?: string;
77
78
  defaultValue?: T;
79
+ store?: boolean;
78
80
  }
79
81
  export interface PluginJsonBaseSchema<T = any> extends JsonBaseSchema<T> {
80
- store?: boolean;
81
82
  onSet?: (newValue: any, oldValue: any) => Promise<void>;
82
83
  onGet?: () => Promise<any>;
83
84
  }
@@ -134,13 +135,10 @@ export interface PluginJsonSchemaObject extends PluginJsonBaseSchema {
134
135
  export interface JsonSchemaObjectWithButtons extends JsonSchemaObject {
135
136
  buttons: [JsonSchemaButton, JsonSchemaButton?];
136
137
  }
137
- export interface JsonSchemaAnyOf {
138
- anyOf: JsonSchema[];
139
- }
140
138
  export interface JsonSchemaArray extends JsonBaseSchema {
141
139
  type: 'array';
142
140
  opened?: boolean;
143
- items?: JsonSchema | JsonSchemaAnyOf;
141
+ items?: JsonSchema;
144
142
  }
145
143
  export interface JsonSchemaButton {
146
144
  label: string;
@@ -171,4 +169,13 @@ export interface FormSubmitResponse {
171
169
  toast?: ToastMessage;
172
170
  schema?: FormSubmitSchema;
173
171
  }
172
+ export interface MotionDetectionPluginResponse {
173
+ filePath: string;
174
+ }
175
+ export interface ObjectDetectionPluginResponse {
176
+ detections: Detection[];
177
+ }
178
+ export interface AudioDetectionPluginResponse {
179
+ detected: boolean;
180
+ }
174
181
  export {};
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from 'node:events';
2
- import { DeviceManager, PluginsManager, SystemManager } from './proxy/index.js';
2
+ import { DeviceManager } from './proxy/index.js';
3
3
  import { StorageController } from './storageController.js';
4
- import type { BasePlugin } from '../../../plugins/base.js';
4
+ import type { BasePlugin } from '../../../plugins/interfaces/base.js';
5
5
  import type { Plugin } from '../../../plugins/plugin.js';
6
6
  import type { PluginConfigService } from './config.js';
7
7
  import type { PluginLogger } from './logger.js';
@@ -16,8 +16,6 @@ export declare interface API {
16
16
  removeListener(event: 'shutdown', listener: () => void): this;
17
17
  removeAllListeners(event?: string): this;
18
18
  readonly deviceManager: DeviceManager;
19
- readonly pluginsManager: PluginsManager;
20
- readonly systemManager: SystemManager;
21
19
  readonly storageController: StorageController;
22
20
  readonly configService: PluginConfigService;
23
21
  readonly storagePath: string;
@@ -26,8 +24,6 @@ export declare interface API {
26
24
  export declare class PluginAPI extends EventEmitter implements API {
27
25
  private initialized;
28
26
  readonly deviceManager: DeviceManager;
29
- readonly pluginsManager: PluginsManager;
30
- readonly systemManager: SystemManager;
31
27
  readonly storageController: StorageController;
32
28
  readonly configService: PluginConfigService;
33
29
  readonly storagePath: string;
@@ -1,13 +1,10 @@
1
1
  import { CameraDevice } from '../../../../camera/device.js';
2
- import { CameraAudioDetectionInterface } from '../../../../camera/interfaces/audioDetection.js';
3
2
  import { CameraInterface } from '../../../../camera/interfaces/camera.js';
4
- import { CameraMotionDetectionInterface } from '../../../../camera/interfaces/motionDetection.js';
5
- import { CameraObjectDetectionInterface } from '../../../../camera/interfaces/objectDetection.js';
6
3
  import { CameraPrebufferInterface } from '../../../../camera/interfaces/prebuffer.js';
7
4
  import { CameraPTZInterface } from '../../../../camera/interfaces/ptz.js';
8
5
  import { MotionFrame, VideoFrame } from '../../../../camera/videoFrame.js';
9
6
  import type { Camera } from '../../../../api/database/types.js';
10
- import type { CameraAudioDetectionDelegate, CameraConfigInputSettings, CameraDelegate, CameraDelegates, CameraMotionDetectionDelegate, CameraObjectDetectionDelegate, CameraPrebufferDelegate, CameraPTZDelegate, CameraSource, SetValues } from '../../../../camera/types.js';
7
+ import type { CameraConfigInputSettings, CameraDelegates, CameraSource, SetValues } from '../../../../camera/types.js';
11
8
  import type { VideoFrame as VideoFrameImp } from '../../../../decoder/types.js';
12
9
  import type { CameraDeviceProxyMethods } from '../../../../nats/types.js';
13
10
  import type { PluginInfo } from '../../../../plugins/types.js';
@@ -43,11 +40,8 @@ export declare class CameraDeviceProxy extends CameraDevice {
43
40
  private proxyEndpoints;
44
41
  private plugin;
45
42
  cameraDelegate: CameraInterface;
46
- prebufferDelegate: CameraPrebufferInterface;
43
+ protected prebufferDelegate: CameraPrebufferInterface;
47
44
  ptzDelegate: CameraPTZInterface;
48
- audioDetectorDelegate: CameraAudioDetectionInterface;
49
- motionDetectorDelegate: CameraMotionDetectionInterface;
50
- objectDetectorDelegate: CameraObjectDetectionInterface;
51
45
  get sources(): CameraSource[];
52
46
  constructor(api: PluginAPI, logger: PluginLogger, camera: Camera, plugin: PluginInfo, proxyEndpoints: string[], auth: {
53
47
  user: string;
@@ -76,11 +70,6 @@ export declare class CameraDeviceProxy extends CameraDevice {
76
70
  private requestHandler;
77
71
  private listenToMessages;
78
72
  private listenToSignalingMessages;
79
- onRequest<T extends MethodKeys<CameraDeviceProxyMethods>>(client: 'cameraFn', fn: T, args?: Parameters<MethodType<CameraDeviceProxyMethods, T>>, timeout?: number): Promise<any>;
80
- onRequest<T extends MethodKeys<CameraDelegate>>(client: 'cameraDelegate', fn: T, args?: Parameters<MethodType<CameraDelegate, T>>, timeout?: number): Promise<any>;
81
- onRequest<T extends MethodKeys<CameraPrebufferDelegate>>(client: 'prebufferDelegate', fn: T, args?: Parameters<MethodType<CameraPrebufferDelegate, T>>, timeout?: number): Promise<any>;
82
- onRequest<T extends MethodKeys<CameraPTZDelegate>>(client: 'ptzDelegate', fn: T, args?: Parameters<MethodType<CameraPTZDelegate, T>>, timeout?: number): Promise<any>;
83
- onRequest<T extends MethodKeys<CameraMotionDetectionDelegate>>(client: 'motionDetectorDelegate', fn: T, args?: Parameters<MethodType<CameraMotionDetectionDelegate, T>>, timeout?: number): Promise<any>;
84
- onRequest<T extends MethodKeys<CameraObjectDetectionDelegate>>(client: 'objectDetectorDelegate', fn: T, args?: Parameters<MethodType<CameraObjectDetectionDelegate, T>>, timeout?: number): Promise<any>;
85
- onRequest<T extends MethodKeys<CameraAudioDetectionDelegate>>(client: 'audioDetectorDelegate', fn: T, args?: Parameters<MethodType<CameraAudioDetectionDelegate, T>>, timeout?: number): Promise<any>;
73
+ onRequest<T extends MethodKeys<CameraDeviceProxyMethods>>(client: 'cameraFn', fn: T, args?: Parameters<MethodType<CameraDeviceProxyMethods, T>>, timeout?: number): Promise<Awaited<ReturnType<MethodType<CameraDeviceProxyMethods, T>>>>;
74
+ onRequest<T extends keyof CameraDelegates, K extends MethodKeys<CameraDelegates[T]>>(client: T, fn: K, args: Parameters<MethodType<CameraDelegates[T], K>>, timeout?: number): Promise<Awaited<ReturnType<MethodType<CameraDelegates[T], K>>>>;
86
75
  }
@@ -1,4 +1,2 @@
1
1
  export * from './cameraDevice.js';
2
2
  export * from './deviceManager.js';
3
- export * from './pluginsManager.js';
4
- export * from './systemManager.js';
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { ZodTypeAny } from 'zod';
3
- import type { JsonSchema, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectWithButtons, JsonSchemaString, PluginJsonSchema, PluginJsonSchemaForm, PluginRootSchema, RootSchema } from '../../../plugins/types.js';
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 schameIsReadonly: (jsonSchema: JsonSchema | PluginJsonSchema) => boolean;
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,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.81",
3
+ "version": "0.0.82",
4
4
  "description": "camera.ui browser client",
5
5
  "author": "seydx (https://github.com/seydx/camera.ui)",
6
6
  "module": "./dist/bundle.js",
@@ -29,7 +29,7 @@
29
29
  "socket.io-client": "^4.7.5"
30
30
  },
31
31
  "devDependencies": {
32
- "@rushstack/eslint-patch": "^1.10.3",
32
+ "@rushstack/eslint-patch": "^1.10.4",
33
33
  "@swc/register": "^0.1.10",
34
34
  "@types/webrtc": "^0.0.43",
35
35
  "@typescript-eslint/eslint-plugin": "^7.17.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.2.1",
45
+ "updates": "^16.3.3",
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,10 +0,0 @@
1
- import { CameraAudioDetectionDelegate } from '../types.js';
2
- import type { BaseLogger } from '../types.js';
3
- export declare class CameraAudioDetectionInterface extends CameraAudioDetectionDelegate {
4
- delegate?: CameraAudioDetectionDelegate;
5
- private onRequest;
6
- private logger;
7
- constructor(onRequest: (client: any, fn: string, args?: any[], timeout?: number) => Promise<any>, logger: BaseLogger);
8
- detectAudio(audio: Buffer): Promise<boolean>;
9
- private _onRequest;
10
- }
@@ -1,10 +0,0 @@
1
- import { CameraMotionDetectionDelegate } from '../types.js';
2
- import type { BaseLogger, Detection } from '../types.js';
3
- export declare class CameraMotionDetectionInterface extends CameraMotionDetectionDelegate {
4
- delegate?: CameraMotionDetectionDelegate;
5
- private onRequest;
6
- private logger;
7
- constructor(onRequest: (client: any, fn: string, args?: any[], timeout?: number) => Promise<any>, logger: BaseLogger);
8
- detectImage(image: Buffer): Promise<Detection[]>;
9
- private _onRequest;
10
- }
@@ -1,10 +0,0 @@
1
- import { CameraObjectDetectionDelegate } from '../types.js';
2
- import type { BaseLogger, Detection } from '../types.js';
3
- export declare class CameraObjectDetectionInterface extends CameraObjectDetectionDelegate {
4
- delegate?: CameraObjectDetectionDelegate;
5
- private onRequest;
6
- private logger;
7
- constructor(onRequest: (client: any, fn: string, args?: any[], timeout?: number) => Promise<any>, logger: BaseLogger);
8
- detectImage(image: Buffer): Promise<Detection[]>;
9
- private _onRequest;
10
- }
@@ -1,12 +0,0 @@
1
- import type { BasePlugin } from '../../plugins/base.js';
2
- import type { CameraStorage } from '../../polyglot/node/plugins/cameraStorage.js';
3
- import type { MessageQueue } from '../queue.js';
4
- import type { CallablePluginMethods, CallablePluginStorageMethods, PluginsManagerServerProxyMethods, ProxyMessageStructure } from '../types.js';
5
- export declare class PluginsManagerProxy implements PluginsManagerServerProxyMethods {
6
- private pluginsService;
7
- private messageQueue;
8
- constructor(messageQueue: MessageQueue);
9
- onRequestPluginFn<K extends keyof CallablePluginMethods>(pluginId: string, fn: K, ...args: Parameters<BasePlugin[K]>): Promise<ReturnType<BasePlugin[K]>>;
10
- onRequestStorageFn<K extends keyof CallablePluginStorageMethods>(pluginId: string, cameraId: string, fn: K, ...args: Parameters<CameraStorage[K]>): Promise<Awaited<ReturnType<CameraStorage[K]>>>;
11
- handleMessage(message: ProxyMessageStructure): Promise<void | ProxyMessageStructure>;
12
- }
@@ -1,8 +0,0 @@
1
- import type { MessageQueue } from '../queue.js';
2
- import type { ProxyMessageStructure, SystemManagerServerProxyMethods } from '../types.js';
3
- export declare class SystemManagerProxy implements SystemManagerServerProxyMethods {
4
- private pluginsService;
5
- private messageQueue;
6
- constructor(messageQueue: MessageQueue);
7
- handleMessage(message: ProxyMessageStructure): Promise<void | ProxyMessageStructure>;
8
- }
@@ -1,39 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- import type { PluginsManagerProxyEventCallbacks, PluginsManagerProxyMethods } from '../../../../nats/types.js';
3
- import type { PluginInfo } from '../../../../plugins/types.js';
4
- import type { PluginAPI } from '../api.js';
5
- import type { PluginLogger } from '../logger.js';
6
- export declare interface PluginsManager extends PluginsManagerProxyMethods {
7
- on<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
8
- once<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
9
- off<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
10
- removeListener<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
11
- removeAllListeners<E extends keyof PluginsManagerProxyEventCallbacks>(event?: E): this;
12
- }
13
- export declare class PluginsManager extends EventEmitter implements PluginsManager {
14
- private api;
15
- private logger;
16
- private initialized;
17
- private subject;
18
- private pmSubject;
19
- private publisher?;
20
- private pmPublisher?;
21
- private subscriber?;
22
- private pmSubscriber?;
23
- private messageQueue?;
24
- private auth;
25
- private proxyEndpoints;
26
- private plugin;
27
- constructor(api: PluginAPI, logger: PluginLogger, plugin: PluginInfo, proxyEndpoints: string[], auth: {
28
- user: string;
29
- pass: string;
30
- });
31
- init(): Promise<void>;
32
- emit(): boolean;
33
- private requestHandler;
34
- private listenToMessages;
35
- private onRequest;
36
- private isPluginMessage;
37
- private isStorageMessage;
38
- private close;
39
- }
@@ -1,37 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- import type { SystemManagerProxyEventCallbacks, SystemManagerProxyMethods } from '../../../../nats/types.js';
3
- import type { PluginInfo } from '../../../../plugins/types.js';
4
- import type { PluginAPI } from '../api.js';
5
- import type { PluginLogger } from '../logger.js';
6
- export declare interface SystemManager extends SystemManagerProxyMethods {
7
- on<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
8
- once<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
9
- off<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
10
- removeListener<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
11
- removeAllListeners<E extends keyof SystemManagerProxyEventCallbacks>(event?: E): this;
12
- }
13
- export declare class SystemManager extends EventEmitter implements SystemManager {
14
- private api;
15
- private logger;
16
- private initialized;
17
- private subject;
18
- private smSubject;
19
- private publisher?;
20
- private smPublisher?;
21
- private subscriber?;
22
- private smSubscriber?;
23
- private messageQueue?;
24
- private auth;
25
- private proxyEndpoints;
26
- private plugin;
27
- constructor(api: PluginAPI, logger: PluginLogger, plugin: PluginInfo, proxyEndpoints: string[], auth: {
28
- user: string;
29
- pass: string;
30
- });
31
- init(): Promise<void>;
32
- emit(): boolean;
33
- private requestHandler;
34
- private listenToMessages;
35
- private onRequest;
36
- private close;
37
- }