@camera.ui/browser 0.0.109 → 0.0.111
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/bundle.js.LICENSE.txt +11 -20
- package/dist/types/packages/client/browser/src/client.d.ts +5 -7
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +20 -24
- package/dist/types/packages/client/browser/src/proxy/coreManager.d.ts +10 -12
- package/dist/types/packages/client/browser/src/proxy/deviceManager.d.ts +10 -12
- package/dist/types/packages/client/browser/src/proxy.d.ts +7 -0
- package/dist/types/packages/client/browser/src/streaming/config.d.ts +21 -0
- package/dist/types/packages/client/browser/src/streaming/go2rts-session.d.ts +255 -40
- package/dist/types/packages/client/browser/src/streaming/types.d.ts +38 -0
- package/dist/types/packages/client/browser/src/types.d.ts +6 -8
- package/dist/types/packages/types/src/index.d.ts +304 -222
- package/dist/types/server/src/api/database/types.d.ts +17 -25
- package/dist/types/server/src/api/go2rtc/types.d.ts +66 -11
- package/dist/types/server/src/api/schemas/backup.schema.d.ts +24 -24
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +1414 -530
- package/dist/types/server/src/api/schemas/config.schema.d.ts +30 -42
- package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +186 -154
- package/dist/types/server/src/api/schemas/plugins.schema.d.ts +17 -17
- package/dist/types/server/src/api/schemas/storage.schema.d.ts +22 -0
- package/dist/types/server/src/api/schemas/system.schema.d.ts +171 -3
- package/dist/types/server/src/api/schemas/users.schema.d.ts +162 -318
- package/dist/types/server/src/api/types/index.d.ts +48 -46
- package/dist/types/server/src/api/websocket/types.d.ts +4 -2
- package/dist/types/server/src/camera/classes.d.ts +2 -0
- package/dist/types/{packages/plugineer/src/polyglot/node → server/src}/camera/index.d.ts +33 -32
- package/dist/types/server/src/camera/interfaces.d.ts +17 -0
- package/dist/types/{packages/plugineer/src/polyglot/node → server/src}/camera/polygon.d.ts +2 -2
- package/dist/types/server/src/camera/types.d.ts +16 -10
- package/dist/types/server/src/go2rtc/types.d.ts +5 -4
- package/dist/types/server/src/manager/types.d.ts +15 -0
- package/dist/types/server/src/plugins/schema.d.ts +27 -34
- package/dist/types/server/src/plugins/types.d.ts +43 -1
- package/dist/types/server/src/rpc/namespaces.d.ts +35 -0
- package/dist/types/server/src/rpc/types.d.ts +111 -0
- package/dist/types/server/src/services/config/defaults.d.ts +12 -0
- package/dist/types/server/src/services/config/types.d.ts +10 -4
- package/dist/types/server/src/types.d.ts +3 -0
- package/dist/types/shared/types/index.d.ts +9 -8
- package/package.json +19 -16
- package/dist/types/packages/client/browser/src/socket.d.ts +0 -15
- package/dist/types/packages/common/src/nats/messageQueue.d.ts +0 -48
- package/dist/types/packages/common/src/nats/nats.d.ts +0 -30
- package/dist/types/packages/common/src/nats/packer.d.ts +0 -2
- package/dist/types/packages/plugineer/src/polyglot/node/camera/interfaces/camera.d.ts +0 -8
- package/dist/types/packages/plugineer/src/polyglot/node/camera/interfaces/ptz.d.ts +0 -11
- package/dist/types/packages/plugineer/src/polyglot/node/camera/types.d.ts +0 -18
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/schema.d.ts +0 -62
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/types.d.ts +0 -135
- package/dist/types/packages/plugineer/src/types.d.ts +0 -4
- package/dist/types/server/src/api/controllers/api.controller.d.ts +0 -7
- package/dist/types/server/src/api/controllers/auth.controller.d.ts +0 -16
- package/dist/types/server/src/api/controllers/backup.controller.d.ts +0 -10
- package/dist/types/server/src/api/controllers/cameras.controller.d.ts +0 -38
- package/dist/types/server/src/api/controllers/config.controller.d.ts +0 -14
- package/dist/types/server/src/api/controllers/files.controller.d.ts +0 -8
- package/dist/types/server/src/api/controllers/frameWorkers.controller.d.ts +0 -11
- package/dist/types/server/src/api/controllers/plugins.controller.d.ts +0 -48
- package/dist/types/server/src/api/controllers/system.controller.d.ts +0 -23
- package/dist/types/server/src/api/controllers/users.controller.d.ts +0 -28
- package/dist/types/server/src/api/database/checks.d.ts +0 -55
- package/dist/types/server/src/api/database/constants.d.ts +0 -8
- package/dist/types/server/src/api/database/index.d.ts +0 -30
- package/dist/types/server/src/api/database/migration.d.ts +0 -15
- package/dist/types/server/src/api/database/selfcheck.d.ts +0 -48
- package/dist/types/server/src/api/go2rtc/api/application.d.ts +0 -9
- package/dist/types/server/src/api/go2rtc/api/config.d.ts +0 -8
- package/dist/types/server/src/api/go2rtc/api/index.d.ts +0 -1
- package/dist/types/server/src/api/go2rtc/api/snapshot.d.ts +0 -8
- package/dist/types/server/src/api/go2rtc/api/streams.d.ts +0 -12
- package/dist/types/server/src/api/go2rtc/index.d.ts +0 -14
- package/dist/types/server/src/api/go2rtc/queue.d.ts +0 -10
- package/dist/types/server/src/api/index.d.ts +0 -22
- package/dist/types/server/src/api/middlewares/authPermission.middleware.d.ts +0 -5
- package/dist/types/server/src/api/middlewares/authValidation.middleware.d.ts +0 -4
- package/dist/types/server/src/api/middlewares/pagination.middleware.d.ts +0 -3
- package/dist/types/server/src/api/middlewares/socketAuth.middleware.d.ts +0 -41
- package/dist/types/server/src/api/plugins/header.plugin.d.ts +0 -2
- package/dist/types/server/src/api/plugins/socket.plugin.d.ts +0 -11
- package/dist/types/server/src/api/plugins/system.plugin.d.ts +0 -20
- package/dist/types/server/src/api/plugins/useragent.plugin.d.ts +0 -8
- package/dist/types/server/src/api/routes/api.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/auth.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/backup.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/cameras.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/config.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/files.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/frameWorkers.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/index.d.ts +0 -6
- package/dist/types/server/src/api/routes/plugins.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/system.routes.d.ts +0 -2
- package/dist/types/server/src/api/routes/users.routes.d.ts +0 -2
- package/dist/types/server/src/api/services/auth.service.d.ts +0 -24
- package/dist/types/server/src/api/services/backup.service.d.ts +0 -11
- package/dist/types/server/src/api/services/cameras.service.d.ts +0 -55
- package/dist/types/server/src/api/services/plugins.service.d.ts +0 -38
- package/dist/types/server/src/api/services/system.service.d.ts +0 -13
- package/dist/types/server/src/api/services/users.service.d.ts +0 -25
- package/dist/types/server/src/api/utils/cameraSource.d.ts +0 -6
- package/dist/types/server/src/api/utils/cert.d.ts +0 -11
- package/dist/types/server/src/api/utils/constants.d.ts +0 -13
- package/dist/types/server/src/api/utils/fetch.d.ts +0 -1
- package/dist/types/server/src/api/utils/moveFiles.d.ts +0 -4
- package/dist/types/server/src/api/utils/parse.d.ts +0 -2
- package/dist/types/server/src/api/websocket/go2rtc.d.ts +0 -21
- package/dist/types/server/src/api/websocket/index.d.ts +0 -16
- package/dist/types/server/src/api/websocket/nsp/logs.d.ts +0 -19
- package/dist/types/server/src/api/websocket/nsp/main.d.ts +0 -9
- package/dist/types/server/src/api/websocket/nsp/metrics.d.ts +0 -24
- package/dist/types/server/src/api/websocket/nsp/notifications.d.ts +0 -12
- package/dist/types/server/src/api/websocket/nsp/plugins.d.ts +0 -13
- package/dist/types/server/src/api/websocket/nsp/proxy.d.ts +0 -27
- package/dist/types/server/src/api/websocket/nsp/server.d.ts +0 -26
- package/dist/types/server/src/api/websocket/nsp/status.d.ts +0 -15
- package/dist/types/server/src/api.d.ts +0 -29
- package/dist/types/server/src/camera/controller.d.ts +0 -61
- package/dist/types/server/src/camera/frameWorker.d.ts +0 -45
- package/dist/types/server/src/go2rtc/index.d.ts +0 -25
- package/dist/types/server/src/main.d.ts +0 -25
- package/dist/types/server/src/nats/index.d.ts +0 -40
- package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +0 -22
- package/dist/types/server/src/nats/proxy/coreManager.d.ts +0 -14
- package/dist/types/server/src/nats/proxy/deviceManager.d.ts +0 -14
- package/dist/types/server/src/nats/server.d.ts +0 -38
- package/dist/types/server/src/nats/types.d.ts +0 -18
- package/dist/types/server/src/nats/utils.d.ts +0 -2
- package/dist/types/server/src/plugins/index.d.ts +0 -33
- package/dist/types/server/src/plugins/plugin.d.ts +0 -35
- package/dist/types/server/src/plugins/worker.d.ts +0 -55
- package/dist/types/server/src/services/config/constants.d.ts +0 -6
- package/dist/types/server/src/services/config/index.d.ts +0 -67
- package/dist/types/server/src/services/logger/index.d.ts +0 -16
- /package/dist/types/{packages/plugineer/src/polyglot/node → server/src}/camera/iou.d.ts +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type { AuthConfig } from '@camera.ui/common';
|
|
2
|
-
import type {
|
|
3
|
-
import type { CameraExtension, CameraZone, RootSchema } from '@camera.ui/types';
|
|
1
|
+
import type { AuthConfig } from '@camera.ui/rpc-common';
|
|
2
|
+
import type { CameraExtension, CameraExtensions, DetectionZone, ProbeConfig, SchemaConfig } from '@camera.ui/types';
|
|
4
3
|
import type { Readable } from 'node:stream';
|
|
4
|
+
import type { PLUGIN_STATUS, PluginContract } from '../../plugins/types.js';
|
|
5
5
|
import type { LoggingLevel } from '../../services/config/types.js';
|
|
6
|
-
import type {
|
|
7
|
-
import type { ApplicationResponse } from '../go2rtc/types.js';
|
|
6
|
+
import type { DBCamera, DBCamviewLayout, DBRoles, DBUser } from '../database/types.js';
|
|
7
|
+
import type { ApplicationResponse, DeviceSourceType } from '../go2rtc/types.js';
|
|
8
8
|
import type { RestoreBackupInput } from '../schemas/backup.schema.js';
|
|
9
|
-
import type { CreateCameraInput, PatchCameraInput, PreviewCameraInput } from '../schemas/cameras.schema.js';
|
|
9
|
+
import type { CreateCameraInput, PairCameraInput, PatchCameraInput, PreviewCameraInput } from '../schemas/cameras.schema.js';
|
|
10
10
|
import type { PatchConfigInput } from '../schemas/config.schema.js';
|
|
11
11
|
import type { PatchGo2RtcConfigInput } from '../schemas/go2rtc.schema.js';
|
|
12
12
|
import type { DetectAudioInput, DetectMotionInput, DetectObjectInput } from '../schemas/plugins.schema.js';
|
|
13
|
+
import type { PatchStorateInput, SetStorageInput, SubmitStorageInput } from '../schemas/storage.schema.js';
|
|
13
14
|
import type { PatchSystemInput } from '../schemas/system.schema.js';
|
|
14
15
|
import type { CreateShortcutInput, CreateUserInput, CreateViewInput, LoginUserInput, PatchShortcutInput, PatchUserInput, PatchViewInput } from '../schemas/users.schema.js';
|
|
15
16
|
export interface BusboyFileStream extends Readable {
|
|
@@ -25,23 +26,28 @@ export interface UiNotification {
|
|
|
25
26
|
link?: string;
|
|
26
27
|
}
|
|
27
28
|
export interface JwtTokenEncoded {
|
|
28
|
-
_id: string;
|
|
29
|
+
readonly _id: string;
|
|
29
30
|
access_token: string;
|
|
30
31
|
refresh_token: string;
|
|
31
32
|
token_type: string;
|
|
32
33
|
expires_in: number;
|
|
33
34
|
expires_at: Date;
|
|
34
35
|
}
|
|
35
|
-
export interface
|
|
36
|
-
_id: string;
|
|
37
|
-
avatar: string;
|
|
36
|
+
export interface UserData extends JwtTokenEncoded {
|
|
38
37
|
username: string;
|
|
38
|
+
avatar: string;
|
|
39
39
|
role: DBRoles;
|
|
40
|
-
oneLogin: boolean;
|
|
41
40
|
rememberMe: boolean;
|
|
41
|
+
singleSession: boolean;
|
|
42
42
|
firstLogin: boolean;
|
|
43
43
|
sessionTimer: number;
|
|
44
44
|
}
|
|
45
|
+
export interface JwtPayload {
|
|
46
|
+
_id: string;
|
|
47
|
+
username: string;
|
|
48
|
+
rememberMe: boolean;
|
|
49
|
+
sessionTimer: number;
|
|
50
|
+
}
|
|
45
51
|
export interface JwtRefreshPayload {
|
|
46
52
|
_id: string;
|
|
47
53
|
}
|
|
@@ -54,7 +60,6 @@ export interface ClientData {
|
|
|
54
60
|
export declare const enum REFRESH_TOKEN {
|
|
55
61
|
EXPIRES_IN = "7d"
|
|
56
62
|
}
|
|
57
|
-
export declare const PAGINATION_DEFAULTS: PaginationQuery;
|
|
58
63
|
export interface CameraCamviewSettings {
|
|
59
64
|
enabled: boolean;
|
|
60
65
|
mode: InterfaceStreamMode;
|
|
@@ -64,10 +69,6 @@ export type InterfaceStreamMode = 'live' | 'snapshot';
|
|
|
64
69
|
export interface JwtTokenDecoded {
|
|
65
70
|
_id: string;
|
|
66
71
|
username: string;
|
|
67
|
-
avatar: string;
|
|
68
|
-
role: DBRoles;
|
|
69
|
-
oneLogin: boolean;
|
|
70
|
-
firstLogin: boolean;
|
|
71
72
|
rememberMe: boolean;
|
|
72
73
|
sessionTimer: number;
|
|
73
74
|
exp: Readonly<number>;
|
|
@@ -105,8 +106,8 @@ export interface Pagination {
|
|
|
105
106
|
startIndex: number;
|
|
106
107
|
endIndex: number;
|
|
107
108
|
totalItems: number;
|
|
108
|
-
currentPage
|
|
109
|
-
totalPages
|
|
109
|
+
currentPage: number;
|
|
110
|
+
totalPages: number;
|
|
110
111
|
nextPageQuery?: string | null;
|
|
111
112
|
prevPageQuery?: string | null;
|
|
112
113
|
}
|
|
@@ -130,12 +131,8 @@ export interface PluginExtension {
|
|
|
130
131
|
pluginName: string;
|
|
131
132
|
displayName: string;
|
|
132
133
|
type: CameraExtension[];
|
|
133
|
-
builtIn?: boolean;
|
|
134
|
-
externPlugin?: boolean;
|
|
135
134
|
}
|
|
136
|
-
export interface PluginExtensionConfig extends PluginExtension {
|
|
137
|
-
rootSchema?: RootSchema;
|
|
138
|
-
config?: Record<string, any>;
|
|
135
|
+
export interface PluginExtensionConfig extends PluginExtension, SchemaConfig {
|
|
139
136
|
}
|
|
140
137
|
export interface ExtensionsResponse {
|
|
141
138
|
pagination: Pagination;
|
|
@@ -169,7 +166,6 @@ export interface Go2RtcInfo {
|
|
|
169
166
|
auth: Partial<Go2RtcInfoAuth>;
|
|
170
167
|
}
|
|
171
168
|
export interface NatsInfo {
|
|
172
|
-
servers: string[];
|
|
173
169
|
auth: AuthConfig;
|
|
174
170
|
}
|
|
175
171
|
export interface TokenClientDataResponse {
|
|
@@ -205,21 +201,31 @@ export interface AuthRefreshRequest {
|
|
|
205
201
|
refresh_token: string;
|
|
206
202
|
};
|
|
207
203
|
}
|
|
208
|
-
export interface AuthTokensRequest {
|
|
209
|
-
Querystring: {
|
|
210
|
-
clientData?: boolean;
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
204
|
export interface CamerasParamsRequest {
|
|
214
205
|
Params: {
|
|
215
206
|
cameraname: string;
|
|
216
207
|
};
|
|
217
208
|
}
|
|
209
|
+
export interface CamerasStreamRequest {
|
|
210
|
+
Params: {
|
|
211
|
+
cameraid: string;
|
|
212
|
+
sourcename: string;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
218
215
|
export interface CameraSnapshotQueryRequest {
|
|
219
216
|
Querystring: {
|
|
220
217
|
forceNew?: boolean;
|
|
221
218
|
};
|
|
222
219
|
}
|
|
220
|
+
export interface CameraDiscoverQueryRequest {
|
|
221
|
+
Querystring: {
|
|
222
|
+
type?: DeviceSourceType;
|
|
223
|
+
src?: string;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
export interface CameraProbeSourceQueryRequest {
|
|
227
|
+
Querystring: ProbeConfig;
|
|
228
|
+
}
|
|
223
229
|
export interface CameraSourceParamsRequest {
|
|
224
230
|
Params: {
|
|
225
231
|
sourcename: string;
|
|
@@ -230,11 +236,6 @@ export interface CamerasParamsIdRequest {
|
|
|
230
236
|
cameraid: string;
|
|
231
237
|
};
|
|
232
238
|
}
|
|
233
|
-
export interface CameraZonesParamsRequest {
|
|
234
|
-
Params: {
|
|
235
|
-
zonename: string;
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
239
|
export interface CamerasExtensionsParamsRequest {
|
|
239
240
|
Params: {
|
|
240
241
|
cameraname: string;
|
|
@@ -248,24 +249,28 @@ export interface CamerasExtensionsRequest {
|
|
|
248
249
|
};
|
|
249
250
|
}
|
|
250
251
|
export interface CameraZoneInsertPatchRequest {
|
|
251
|
-
Body:
|
|
252
|
+
Body: DetectionZone[];
|
|
252
253
|
}
|
|
253
254
|
export interface CamerasInsertRequest {
|
|
254
255
|
Body: CreateCameraInput;
|
|
255
256
|
}
|
|
257
|
+
export interface CameraPairRequest {
|
|
258
|
+
Body: PairCameraInput;
|
|
259
|
+
}
|
|
256
260
|
export interface CamerasPreviewRequest {
|
|
257
261
|
Body: PreviewCameraInput;
|
|
258
262
|
}
|
|
259
263
|
export interface CamerasPatchRequest {
|
|
260
264
|
Body: PatchCameraInput;
|
|
261
265
|
}
|
|
262
|
-
export interface
|
|
263
|
-
Body:
|
|
266
|
+
export interface StoragePatchRequest {
|
|
267
|
+
Body: PatchStorateInput;
|
|
264
268
|
}
|
|
265
|
-
export interface
|
|
266
|
-
Body:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
+
export interface StorageSetRequest {
|
|
270
|
+
Body: SetStorageInput;
|
|
271
|
+
}
|
|
272
|
+
export interface StorageSubmitRequest {
|
|
273
|
+
Body: SubmitStorageInput;
|
|
269
274
|
}
|
|
270
275
|
export interface ConfigRequest {
|
|
271
276
|
Querystring: {
|
|
@@ -338,11 +343,6 @@ export interface PluginsDetectAudioRequest {
|
|
|
338
343
|
export interface PluginsInterfaceQueryType {
|
|
339
344
|
type: 'objectDetection' | 'motionDetection' | 'audioDetection';
|
|
340
345
|
}
|
|
341
|
-
export interface PluginsInterfaceQuery {
|
|
342
|
-
Querystring: {
|
|
343
|
-
type: PluginsInterfaceQueryType;
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
346
|
export interface UsersParamsRequest {
|
|
347
347
|
Params: {
|
|
348
348
|
username: string;
|
|
@@ -431,6 +431,7 @@ export interface CamerasSettings {
|
|
|
431
431
|
export interface InterfaceSettinges {
|
|
432
432
|
showBottomBarOnMobile: boolean;
|
|
433
433
|
selectedSettingsView: SettingsViews;
|
|
434
|
+
navbarStayCollapsed: boolean;
|
|
434
435
|
}
|
|
435
436
|
export interface UiSettingsLocalStorage {
|
|
436
437
|
cameras: CamerasSettings;
|
|
@@ -594,6 +595,7 @@ export interface CameraUiPlugin {
|
|
|
594
595
|
links?: {
|
|
595
596
|
npm?: string;
|
|
596
597
|
homepage?: string;
|
|
598
|
+
bugs?: string;
|
|
597
599
|
};
|
|
598
600
|
author?: string;
|
|
599
601
|
engines?: {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import type { PLUGIN_STATUS } from '@camera.ui/plugineer';
|
|
2
1
|
import type { Namespace } from 'socket.io';
|
|
2
|
+
import type { PLUGIN_STATUS } from '../../plugins/types.js';
|
|
3
3
|
import type { RuntimeInfo } from '../../services/config/types.js';
|
|
4
|
-
export type SocketNsp = '/camera.ui' | '/metrics' | '/logs' | '/status' | '/notifications' | '/plugins' | '/
|
|
4
|
+
export type SocketNsp = '/camera.ui' | '/metrics' | '/logs' | '/status' | '/notifications' | '/plugins' | '/server';
|
|
5
5
|
export interface SocketNspMap {
|
|
6
6
|
nsp: Namespace;
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
}
|
|
9
|
+
export type ProcessType = 'system' | 'core' | 'frameworker' | 'plugin';
|
|
9
10
|
export interface ProcessInfo {
|
|
10
11
|
name: string;
|
|
11
12
|
pid?: number;
|
|
12
13
|
cpuLoad: string;
|
|
13
14
|
memLoad: string;
|
|
15
|
+
type: ProcessType;
|
|
14
16
|
timestamp: number;
|
|
15
17
|
}
|
|
16
18
|
export interface ServerProcessInfo {
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { Subscribed } from '@camera.ui/common/utils';
|
|
2
|
+
import { CameraDeviceCapability } from '@camera.ui/types';
|
|
2
3
|
import TTLCache from '@isaacs/ttlcache';
|
|
3
4
|
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import type {
|
|
5
|
+
import type { AudioState, BatteryState, Camera, CameraDetectionSettings, CameraFrameWorkerSettings, CameraInformation, CameraSource, CameraType, DetectionZone, DoorbellState, LightState, LoggerService, MotionState, ObjectState, SetValues, SirenState, StateValues } from '@camera.ui/types';
|
|
5
6
|
import type { Observable } from 'rxjs';
|
|
7
|
+
import type { CameraInterfaces, PluginCapabilities } from './types.js';
|
|
6
8
|
export declare abstract class BaseCameraDevice extends Subscribed {
|
|
9
|
+
#private;
|
|
7
10
|
readonly logger: LoggerService;
|
|
8
11
|
protected snapshotCache: TTLCache<string, ArrayBuffer>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
readonly cameraSubject: BehaviorSubject<Camera>;
|
|
13
|
+
readonly cameraState: BehaviorSubject<boolean>;
|
|
14
|
+
readonly frameWorkerState: BehaviorSubject<boolean>;
|
|
15
|
+
readonly lightState: BehaviorSubject<LightState>;
|
|
16
|
+
readonly motionState: BehaviorSubject<MotionState>;
|
|
17
|
+
readonly audioState: BehaviorSubject<AudioState>;
|
|
18
|
+
readonly objectState: BehaviorSubject<ObjectState>;
|
|
19
|
+
readonly doorbellState: BehaviorSubject<DoorbellState>;
|
|
20
|
+
readonly sirenState: BehaviorSubject<SirenState>;
|
|
21
|
+
readonly batteryState: BehaviorSubject<BatteryState>;
|
|
22
|
+
readonly capabilities: BehaviorSubject<PluginCapabilities[]>;
|
|
18
23
|
readonly onConnected: Observable<boolean>;
|
|
24
|
+
readonly onFrameWorkerConnected: Observable<boolean>;
|
|
19
25
|
readonly onLightSwitched: Observable<LightState>;
|
|
20
26
|
readonly onMotionDetected: Observable<MotionState>;
|
|
21
27
|
readonly onAudioDetected: Observable<AudioState>;
|
|
@@ -23,13 +29,13 @@ export declare abstract class BaseCameraDevice extends Subscribed {
|
|
|
23
29
|
readonly onDoorbellPressed: Observable<DoorbellState>;
|
|
24
30
|
readonly onSirenDetected: Observable<SirenState>;
|
|
25
31
|
readonly onBatteryChanged: Observable<BatteryState>;
|
|
26
|
-
protected abstract
|
|
27
|
-
protected abstract ptzDelegate: CameraPTZDelegate;
|
|
32
|
+
protected abstract cameraInterfaces: CameraInterfaces;
|
|
28
33
|
protected get cameraObject(): Camera;
|
|
29
34
|
get id(): string;
|
|
30
35
|
get nativeId(): string | undefined;
|
|
31
36
|
get pluginId(): string;
|
|
32
37
|
get connected(): boolean;
|
|
38
|
+
get frameWorkerConnected(): boolean;
|
|
33
39
|
get disabled(): boolean;
|
|
34
40
|
get name(): string;
|
|
35
41
|
get type(): CameraType;
|
|
@@ -37,29 +43,27 @@ export declare abstract class BaseCameraDevice extends Subscribed {
|
|
|
37
43
|
get isCloud(): boolean;
|
|
38
44
|
get hasLight(): boolean;
|
|
39
45
|
get hasSiren(): boolean;
|
|
40
|
-
get
|
|
46
|
+
get hasDoorbell(): boolean;
|
|
41
47
|
get hasBattery(): boolean;
|
|
42
|
-
get hasMotionDetector(): boolean;
|
|
43
|
-
get extendedMotionDetector(): boolean;
|
|
44
48
|
get hasAudioDetector(): boolean;
|
|
49
|
+
get hasMotionDetector(): boolean;
|
|
45
50
|
get hasObjectDetector(): boolean;
|
|
46
51
|
get hasPtz(): boolean;
|
|
47
52
|
get snapshotTTL(): number;
|
|
48
|
-
get
|
|
49
|
-
get
|
|
53
|
+
get detectionZones(): DetectionZone[];
|
|
54
|
+
get detectionSettings(): CameraDetectionSettings;
|
|
50
55
|
get frameWorkerSettings(): CameraFrameWorkerSettings;
|
|
51
56
|
get streamSource(): CameraSource;
|
|
52
|
-
get snapshotSource():
|
|
57
|
+
get snapshotSource(): CameraSource | undefined;
|
|
53
58
|
get highResolutionSource(): CameraSource | undefined;
|
|
54
59
|
get midResolutionSource(): CameraSource | undefined;
|
|
55
60
|
get lowResolutionSource(): CameraSource | undefined;
|
|
56
|
-
get
|
|
61
|
+
get interfaces(): CameraInterfaces;
|
|
57
62
|
abstract get sources(): CameraSource[];
|
|
58
|
-
abstract get internalSources(): CameraInternalSource[];
|
|
59
63
|
constructor(camera: Camera, logger: LoggerService);
|
|
60
|
-
|
|
64
|
+
getCapabilities(): CameraDeviceCapability[];
|
|
65
|
+
hasCapability(capability: CameraDeviceCapability): boolean;
|
|
61
66
|
getValue<T extends keyof StateValues>(stateName: T): StateValues[T];
|
|
62
|
-
snapshot(forceNew?: boolean): Promise<ArrayBuffer | undefined>;
|
|
63
67
|
onStateChange<T extends keyof StateValues>(stateName: T): Observable<{
|
|
64
68
|
newState: StateValues[T];
|
|
65
69
|
oldState: StateValues[T];
|
|
@@ -69,23 +73,20 @@ export declare abstract class BaseCameraDevice extends Subscribed {
|
|
|
69
73
|
oldData: Camera[T];
|
|
70
74
|
newData: Camera[T];
|
|
71
75
|
}>;
|
|
76
|
+
onCapabilitiesChange(): Observable<{
|
|
77
|
+
oldCapabilities: CameraDeviceCapability[];
|
|
78
|
+
newCapabilities: CameraDeviceCapability[];
|
|
79
|
+
}>;
|
|
80
|
+
protected abstract cleanup(): void;
|
|
72
81
|
protected removeAllListeners(): void;
|
|
73
82
|
protected updateCamera(updatedCamera: Camera): void;
|
|
74
83
|
protected updateCameraState(state: boolean): void;
|
|
84
|
+
protected updateFrameWorkerState(state: boolean): void;
|
|
85
|
+
protected updateCapabilities(capabilities: PluginCapabilities[]): void;
|
|
75
86
|
protected updateStateInternal<T extends keyof SetValues>(stateName: T, eventData: SetValues[T], skipCheck?: boolean, skipDetectionsCheck?: boolean): void;
|
|
76
87
|
protected checkStateInternal<T extends keyof SetValues>(stateName: T, event: SetValues[T], skipDetectionsCheck?: boolean): {
|
|
77
88
|
changed: boolean;
|
|
78
89
|
event: StateValues[T];
|
|
79
90
|
};
|
|
80
91
|
protected stateChanged<T extends keyof SetValues>(oldState?: SetValues[T], newState?: SetValues[T], type?: keyof StateValues): boolean;
|
|
81
|
-
protected getAudioState(event: AudioSetEvent, ignoreLastEvet?: boolean): AudioState;
|
|
82
|
-
protected getMotionState(event: MotionSetEvent, ignoreLastEvet?: boolean): MotionState;
|
|
83
|
-
protected getObjectState(event: ObjectSetEvent, ignoreLastEvet?: boolean): ObjectState;
|
|
84
|
-
protected getDoorbellState(event: DoorbellSetEvent, ignoreLastEvet?: boolean): DoorbellState;
|
|
85
|
-
protected getLightState(event: LightSetEvent, ignoreLastEvet?: boolean): LightState;
|
|
86
|
-
protected getSirenState(event: SirenSetEvent, ignoreLastEvet?: boolean): SirenState;
|
|
87
|
-
protected getBatteryState(event: BatterySetEvent, ignoreLastEvet?: boolean): BatteryState;
|
|
88
|
-
protected cleanState<T extends keyof StateValues>(state: StateValues[T] | SetValues[T]): SetValues[T];
|
|
89
|
-
private isStateEvent;
|
|
90
|
-
private createStateObservable;
|
|
91
92
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RPCConnection } from '@camera.ui/rpc-common';
|
|
2
|
+
import type { PTZCommand, PTZInterface, SnapshotInterface, StreamingInterface } from '@camera.ui/types';
|
|
3
|
+
import type { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import type { CameraInterfaces, PluginCapabilities } from './types.js';
|
|
5
|
+
interface ProxyInstance {
|
|
6
|
+
createRPCConnection(namespace: string): Promise<RPCConnection>;
|
|
7
|
+
}
|
|
8
|
+
export declare class CameraInterface implements CameraInterfaces {
|
|
9
|
+
#private;
|
|
10
|
+
interfaces?: PTZInterface | SnapshotInterface | StreamingInterface;
|
|
11
|
+
constructor(proxy: ProxyInstance, capabilities: BehaviorSubject<PluginCapabilities[]>, cameraId: string, pluginId?: string);
|
|
12
|
+
streamUrl(sourceName: string): Promise<string>;
|
|
13
|
+
snapshot(sourceId: string, forceNew?: boolean): Promise<ArrayBuffer | undefined>;
|
|
14
|
+
ptzCommand(command: PTZCommand): Promise<void>;
|
|
15
|
+
disconnect(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CameraDetectionSettings, Detection, DetectionZone } from '@camera.ui/types';
|
|
2
2
|
export declare const convertZonePointsToPixels: (zone: DetectionZone, detection: Detection) => DetectionZone;
|
|
3
3
|
export declare const convertBoundingBoxToPixels: (detection: Detection) => Detection;
|
|
4
|
-
export declare const areDetectionsValid: (detections: Detection[], zones: DetectionZone[], activitySettings:
|
|
4
|
+
export declare const areDetectionsValid: (detections: Detection[], zones: DetectionZone[], activitySettings: CameraDetectionSettings) => Detection[];
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { AudioSetEvent, AudioState, BatterySetEvent, BatteryState, CameraDevice, CameraDeviceCapability, DoorbellSetEvent, DoorbellState, LightSetEvent, LightState, MotionSetEvent, MotionState, ObjectSetEvent, ObjectState, ProbeConfig, ProbeStream, PTZInterface, SirenSetEvent, SirenState, SnapshotInterface, StreamingInterface } from '@camera.ui/types';
|
|
2
|
+
import type { RefreshedStates } from '../rpc/types.js';
|
|
3
|
+
import type { FunctionPropertyNames } from '../types.js';
|
|
4
|
+
export type States = LightState | MotionState | AudioState | ObjectState | DoorbellState | SirenState | BatteryState;
|
|
5
|
+
export type Sets = LightSetEvent | MotionSetEvent | AudioSetEvent | ObjectSetEvent | DoorbellSetEvent | SirenSetEvent | BatterySetEvent;
|
|
6
|
+
export interface CameraDeviceInterface extends Omit<Pick<CameraDevice, FunctionPropertyNames<CameraDevice>>, 'extend' | 'addCapabilities' | 'removeCapabilities' | 'getFrames' | 'onStateChange' | 'onPropertyChange' | 'onCapabilitiesChange'> {
|
|
7
|
+
refreshStates(): Promise<RefreshedStates>;
|
|
8
|
+
snapshot(sourceId: string, forceNew?: boolean): Promise<ArrayBuffer | undefined>;
|
|
9
|
+
probeStream(sourceId: string, probeConfig?: ProbeConfig, refresh?: boolean): Promise<ProbeStream | undefined>;
|
|
10
|
+
addPluginCapabilities(pluginId: string, capabilities: CameraDeviceCapability[]): void;
|
|
11
|
+
removePluginCapabilities(pluginId: string, capabilities: CameraDeviceCapability[]): void;
|
|
12
|
+
}
|
|
13
|
+
export type CameraInterfaces = PTZInterface & SnapshotInterface & StreamingInterface;
|
|
14
|
+
export interface PluginCapabilities {
|
|
15
|
+
pluginId: string;
|
|
16
|
+
capabilities: CameraDeviceCapability[];
|
|
5
17
|
}
|
|
6
|
-
export type CameraStateCallbacks = {
|
|
7
|
-
[K in keyof StateValues]: (event: StateValues[K]) => void;
|
|
8
|
-
};
|
|
9
|
-
export type StateValue<T extends keyof StateValues> = StateValues[T];
|
|
10
|
-
export type SetValue<T extends keyof SetValues> = SetValues[T];
|
|
11
|
-
export type OnChangeCallback<T extends keyof StateValues> = (newEvent: StateValues[T], oldEvent: StateValues[T]) => void;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export declare const sourcePrefixes: readonly ["bubble://", "dvrip://", "echo:", "exec:", "expr:", "ffmpeg:", "gopro://", "hass:", "homekit://", "http://", "https://", "httpx://", "isapi://", "ivideon:", "kasa://", "nest:", "onvif://", "roborock://", "rtmp://", "rtsp://", "rtspx://", "tapo://", "tcp://", "webrtc:", "webtorrent:"];
|
|
2
|
-
export declare const rtspPresets: readonly ["#backchannel=
|
|
1
|
+
export declare const sourcePrefixes: readonly ["bubble://", "doorbird://", "dvrip://", "echo:", "eseecloud://", "exec:", "expr:", "ffmpeg:", "flussonic://", "gopro://", "hass:", "homekit://", "http://", "https://", "httpx://", "isapi://", "ivideon:", "kasa://", "nest:", "onvif://", "ring:", "roborock://", "rtmp://", "rtsp://", "rtspx://", "tapo://", "tcp://", "webrtc:", "webtorrent:"];
|
|
2
|
+
export declare const rtspPresets: readonly ["#backchannel=", "#header=", "#media=audio", "#media=video", "#timeout=10", "#timeout=20", "#timeout=30", "#transport="];
|
|
3
3
|
export declare const ffmpegPresets: readonly ["#audio=aac", "#audio=aac/16000", "#audio=mp3", "#audio=opus", "#audio=pcm", "#audio=pcm/8000", "#audio=pcm/16000", "#audio=pcm/48000", "#audio=pcma", "#audio=pcma/8000", "#audio=pcma/16000", "#audio=pcma/48000", "#audio=pcml", "#audio=pcml/8000", "#audio=pcml/44100", "#audio=pcmu", "#audio=pcmu/8000", "#audio=pcmu/16000", "#audio=pcmu/48000", "#drawtext", "#hardware", "#hardware=cuda", "#hardware=dxva2", "#hardware=rkmpp", "#hardware=v4l2m2m", "#hardware=vaapi", "#hardware=videotoolbox", "#height=", "#raw=", "#rotate=-90", "#rotate=90", "#rotate=180", "#rotate=270", "#video=copy", "#video=h264", "#video=h265", "#video=mjpeg", "#width="];
|
|
4
4
|
export declare const homekitPresets: readonly ["client_id=", "client_private=", "device_id=", "device_public="];
|
|
5
5
|
export declare const httpPresets: readonly ["#header="];
|
|
6
6
|
export declare const nestPresets: readonly ["client_id=", "client_secret=", "refresh_token=", "project_id=", "device_id="];
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const ringPresets: readonly ["device_id=", "refresh_token="];
|
|
8
|
+
export declare const webrtcPresets: readonly ["#client_id=", "#format=openipc", "#format=wyze", "#format=kinesis", "#ice_servers="];
|
|
8
9
|
export type SourcePrefixes = (typeof sourcePrefixes)[number];
|
|
9
10
|
export type RtspPresets = (typeof rtspPresets)[number];
|
|
10
11
|
export type FFmpegPresets = (typeof ffmpegPresets)[number];
|
|
11
12
|
export type HomekitPresets = (typeof homekitPresets)[number];
|
|
12
13
|
export type HttpPresets = (typeof httpPresets)[number];
|
|
13
14
|
export type NestPresets = (typeof nestPresets)[number];
|
|
14
|
-
export type WebrtcPresets = (typeof
|
|
15
|
+
export type WebrtcPresets = (typeof webrtcPresets)[number];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Camera, CameraConfig, CoreManager, DeviceManager, FfmpegArgs, HWAccelOptions, IceServer } from '@camera.ui/types';
|
|
2
|
+
import type { PluginInfo } from '../plugins/types.js';
|
|
3
|
+
export interface CoreManagerInterface extends Omit<CoreManager, keyof CoreManager> {
|
|
4
|
+
getFFmpegPath(): Promise<string>;
|
|
5
|
+
getHwaccelInfo(options: HWAccelOptions): Promise<FfmpegArgs[]>;
|
|
6
|
+
getServerAddresses(): Promise<string[]>;
|
|
7
|
+
getIceServers(): Promise<IceServer[]>;
|
|
8
|
+
getPlugin(pluginName: string): Promise<PluginInfo | undefined>;
|
|
9
|
+
}
|
|
10
|
+
export interface DeviceManagerInterface extends Omit<DeviceManager, keyof DeviceManager> {
|
|
11
|
+
createCamera(cameraConfig: CameraConfig, pluginId: string): Promise<Camera>;
|
|
12
|
+
updateCamera(cameraNameOrId: string, cameraConfig: Partial<CameraConfig>, pluginId: string): Promise<Camera>;
|
|
13
|
+
getCamera(cameraNameOrId: string, pluginId: string): Promise<Camera | undefined>;
|
|
14
|
+
removeCamera(cameraNameOrId: string, pluginId: string): Promise<void>;
|
|
15
|
+
}
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { JsonSchema, JsonSchemaArray, JsonSchemaBoolean,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const createZodStringSchema: (jsonSchema: JsonSchemaString) => OptionalZodString;
|
|
29
|
-
export declare const createZodNumberSchema: (jsonSchema: JsonSchemaNumber) => OptionalZodNumber;
|
|
30
|
-
export declare const createZodBooleanSchema: (jsonSchema: JsonSchemaBoolean) => OptionalZodBoolean;
|
|
31
|
-
export declare const createEnumSchema: (jsonSchema: JsonSchemaEnum) => OptionalZodEnum | OptionalZodEnumMultiple;
|
|
32
|
-
export declare const createZodObjectSchema: (jsonSchema: JsonSchemaObject) => OptionalZodZobject;
|
|
33
|
-
export declare const createZodArraySchema: (jsonSchema: JsonSchemaArray) => OptionalZodArray;
|
|
34
|
-
export {};
|
|
1
|
+
import * as zod from 'zod';
|
|
2
|
+
import type { JsonSchema, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaNumber, JsonSchemaString, JsonSchemaSubmit, JsonSchemaWithoutCallbacks, JsonSchemaWithoutKey } from '@camera.ui/types';
|
|
3
|
+
export declare const isStringType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaString;
|
|
4
|
+
export declare const isNumberType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaNumber;
|
|
5
|
+
export declare const isBooleanType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaBoolean;
|
|
6
|
+
export declare const isEnumType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaEnum;
|
|
7
|
+
export declare const isArrayType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaArray;
|
|
8
|
+
export declare const isButtonType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaButton;
|
|
9
|
+
export declare const isSubmitType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaSubmit;
|
|
10
|
+
export declare const isValidableStringType: (schema: JsonSchemaWithoutKey) => schema is JsonSchemaString;
|
|
11
|
+
export declare const isConfigDefault: (config: Record<string, any>, schemas: JsonSchema[]) => boolean;
|
|
12
|
+
export declare const generateDefaultValue: (schema: JsonSchema) => any;
|
|
13
|
+
export declare const generateConfigFromSchemas: (schemas: JsonSchema[]) => Record<string, any>;
|
|
14
|
+
export declare const getValueByKey: (config: Record<string, any> | undefined, key: string) => any;
|
|
15
|
+
export declare const setValueByKey: (config: Record<string, any>, key: string, value: any) => void;
|
|
16
|
+
export declare const findSchemaByKey: (schemas: JsonSchema[], key: string) => JsonSchema | undefined;
|
|
17
|
+
export declare const removeCallbacksFromSchema: (schema: JsonSchemaWithoutKey) => JsonSchemaWithoutCallbacks;
|
|
18
|
+
export declare const removeCallbacksFromSchemas: (schemas: JsonSchema[]) => JsonSchemaWithoutCallbacks[];
|
|
19
|
+
export declare const generateStorableConfig: (schemas: JsonSchema[], config: Record<string, any>) => Record<string, any>;
|
|
20
|
+
export declare const getSchemasByGroup: (schemas: JsonSchema[], group: string) => JsonSchema[];
|
|
21
|
+
export declare const schemaGroupIsReadonly: (schemas: JsonSchema[], group: string) => boolean;
|
|
22
|
+
export declare const schemaGroupIsStorable: (schemas: JsonSchema[], group: string) => boolean;
|
|
23
|
+
export declare const isValidFormat: (value: string, format?: string) => boolean;
|
|
24
|
+
export declare const validateValue: (value: any, schema: JsonSchemaWithoutKey) => boolean;
|
|
25
|
+
export declare const validateConfig: (config: Record<string, any>, schemas: JsonSchema[]) => Record<string, string[]>;
|
|
26
|
+
export declare const generateZodSchemaField: (schema: JsonSchema) => zod.ZodTypeAny;
|
|
27
|
+
export declare const generateZodSchema: (schemas: JsonSchema[]) => zod.ZodObject<any>;
|
|
@@ -1,7 +1,49 @@
|
|
|
1
|
-
import type { CameraExtension } from '@camera.ui/types';
|
|
1
|
+
import type { Camera, CameraExtension } from '@camera.ui/types';
|
|
2
2
|
export interface Context {
|
|
3
3
|
engines?: Record<string, string>;
|
|
4
4
|
dependencies?: Record<string, string>;
|
|
5
5
|
}
|
|
6
6
|
export declare const PLUGIN_IDENTIFIER_PATTERN: RegExp;
|
|
7
7
|
export declare const CAMERA_EXTENSIONS: CameraExtension[];
|
|
8
|
+
export interface ProcessLoadMessage {
|
|
9
|
+
cameras: Camera[];
|
|
10
|
+
plugin: PluginInfo;
|
|
11
|
+
storage: PluginStorage;
|
|
12
|
+
}
|
|
13
|
+
export interface ProcessMessage {
|
|
14
|
+
type: PLUGIN_COMMAND;
|
|
15
|
+
data?: ProcessLoadMessage;
|
|
16
|
+
}
|
|
17
|
+
export interface ProcessResponse {
|
|
18
|
+
type: PLUGIN_STATUS;
|
|
19
|
+
error?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare enum PLUGIN_STATUS {
|
|
22
|
+
READY = "ready",
|
|
23
|
+
STARTING = "starting",
|
|
24
|
+
STARTED = "started",
|
|
25
|
+
STOPPING = "stopping",
|
|
26
|
+
STOPPED = "stopped",
|
|
27
|
+
ERROR = "error",
|
|
28
|
+
UNKNOWN = "unknown",
|
|
29
|
+
DISABLED = "disabled"
|
|
30
|
+
}
|
|
31
|
+
export declare enum PLUGIN_COMMAND {
|
|
32
|
+
START = "start",
|
|
33
|
+
STOP = "stop"
|
|
34
|
+
}
|
|
35
|
+
export interface PluginStorage {
|
|
36
|
+
installPath: string;
|
|
37
|
+
storagePath: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PluginInfo {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
contract: PluginContract;
|
|
43
|
+
}
|
|
44
|
+
export interface PluginContract {
|
|
45
|
+
extensions: CameraExtension[];
|
|
46
|
+
dependencies?: string[];
|
|
47
|
+
pythonVersion?: string;
|
|
48
|
+
bundled?: boolean;
|
|
49
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface CoreManagerNamespaces {
|
|
2
|
+
coreManagerSubject: string;
|
|
3
|
+
coreManagerRpc: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DeviceManagerNamespaces {
|
|
6
|
+
deviceManagerSubject: string;
|
|
7
|
+
deviceManagerRpc: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FrameWorkerNamespaces {
|
|
10
|
+
frameWorkerChildRpc: string;
|
|
11
|
+
frameWorkerChild: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PluginNamespaces {
|
|
14
|
+
pluginDeviceManagerSubject: string;
|
|
15
|
+
pluginChildRpc: string;
|
|
16
|
+
pluginChild: string;
|
|
17
|
+
pluginStorageRpc: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CameraNamespaces {
|
|
20
|
+
cameraSubject: string;
|
|
21
|
+
cameraControllerRpc: string;
|
|
22
|
+
cameraMotionFrameSubject: string;
|
|
23
|
+
}
|
|
24
|
+
export interface PluginCameraNamespaces {
|
|
25
|
+
cameraInterfacesRpc: string;
|
|
26
|
+
cameraStorageRpc: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class NamespaceManager {
|
|
29
|
+
static coreManagerNamespaces(): CoreManagerNamespaces;
|
|
30
|
+
static deviceManagerNamespaces(): DeviceManagerNamespaces;
|
|
31
|
+
static frameWorkerNamespaces(cameraId: string): FrameWorkerNamespaces;
|
|
32
|
+
static pluginNamespaces(pluginId: string): PluginNamespaces;
|
|
33
|
+
static cameraNamespaces(cameraId: string): CameraNamespaces;
|
|
34
|
+
static pluginCameraNamespaces(pluginId: string, cameraId: string): PluginCameraNamespaces;
|
|
35
|
+
}
|