@camera.ui/browser 0.0.103 → 0.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +1 -2
- package/dist/types/packages/client/browser/src/types.d.ts +1 -1
- package/dist/types/packages/client/browser/src/utils.d.ts +1 -1
- package/dist/types/packages/plugineer/src/polyglot/node/camera/index.d.ts +3 -3
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/schema.d.ts +2 -14
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/types.d.ts +3 -2
- package/dist/types/packages/types/src/index.d.ts +75 -29
- package/dist/types/server/src/api/controllers/api.controller.d.ts +7 -0
- package/dist/types/server/src/api/controllers/auth.controller.d.ts +16 -0
- package/dist/types/server/src/api/controllers/backup.controller.d.ts +10 -0
- package/dist/types/server/src/api/controllers/cameras.controller.d.ts +38 -0
- package/dist/types/server/src/api/controllers/config.controller.d.ts +14 -0
- package/dist/types/server/src/api/controllers/files.controller.d.ts +8 -0
- package/dist/types/server/src/api/controllers/frameWorkers.controller.d.ts +11 -0
- package/dist/types/server/src/api/controllers/plugins.controller.d.ts +48 -0
- package/dist/types/server/src/api/controllers/system.controller.d.ts +23 -0
- package/dist/types/server/src/api/controllers/users.controller.d.ts +28 -0
- package/dist/types/server/src/api/database/index.d.ts +3 -4
- package/dist/types/server/src/api/database/types.d.ts +4 -14
- package/dist/types/server/src/api/go2rtc/api/streams.d.ts +2 -1
- package/dist/types/server/src/api/go2rtc/index.d.ts +1 -0
- package/dist/types/server/src/api/go2rtc/types.d.ts +6 -6
- package/dist/types/server/src/api/index.d.ts +22 -0
- package/dist/types/server/src/api/middlewares/authPermission.middleware.d.ts +5 -0
- package/dist/types/server/src/api/middlewares/authValidation.middleware.d.ts +4 -0
- package/dist/types/server/src/api/middlewares/pagination.middleware.d.ts +3 -0
- package/dist/types/server/src/api/middlewares/socketAuth.middleware.d.ts +1 -1
- package/dist/types/server/src/api/plugins/header.plugin.d.ts +2 -0
- package/dist/types/server/src/api/plugins/socket.plugin.d.ts +11 -0
- package/dist/types/server/src/api/plugins/system.plugin.d.ts +20 -0
- package/dist/types/server/src/api/plugins/useragent.plugin.d.ts +8 -0
- package/dist/types/server/src/api/routes/api.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/auth.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/backup.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/cameras.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/config.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/files.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/frameWorkers.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/index.d.ts +6 -0
- package/dist/types/server/src/api/routes/plugins.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/system.routes.d.ts +2 -0
- package/dist/types/server/src/api/routes/users.routes.d.ts +2 -0
- package/dist/types/server/src/api/schemas/backup.schema.d.ts +94 -1
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +16 -16
- package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +4 -4
- package/dist/types/server/src/api/schemas/plugins.schema.d.ts +3 -3
- package/dist/types/server/src/api/schemas/system.schema.d.ts +8 -0
- package/dist/types/server/src/api/schemas/users.schema.d.ts +35 -35
- package/dist/types/server/src/api/services/backup.service.d.ts +11 -0
- package/dist/types/server/src/api/services/cameras.service.d.ts +2 -4
- package/dist/types/server/src/api/services/plugins.service.d.ts +16 -4
- package/dist/types/server/src/api/services/system.service.d.ts +6 -0
- package/dist/types/server/src/api/types/index.d.ts +121 -121
- package/dist/types/server/src/api/utils/cameraSource.d.ts +6 -2
- package/dist/types/server/src/api/utils/cert.d.ts +11 -0
- package/dist/types/server/src/api/utils/fetch.d.ts +1 -2
- package/dist/types/server/src/api/utils/moveFiles.d.ts +4 -0
- package/dist/types/server/src/api/utils/parse.d.ts +1 -1
- package/dist/types/server/src/api/websocket/nsp/logs.d.ts +3 -1
- package/dist/types/server/src/api/websocket/nsp/main.d.ts +2 -0
- package/dist/types/server/src/api/websocket/types.d.ts +3 -9
- package/dist/types/server/src/camera/controller.d.ts +5 -9
- package/dist/types/server/src/camera/frameWorker.d.ts +1 -2
- package/dist/types/server/src/main.d.ts +25 -0
- package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +2 -2
- package/dist/types/server/src/plugins/index.d.ts +3 -2
- package/dist/types/server/src/plugins/plugin.d.ts +0 -2
- package/dist/types/server/src/plugins/worker.d.ts +2 -2
- package/dist/types/server/src/services/config/constants.d.ts +0 -1
- package/dist/types/server/src/services/config/index.d.ts +2 -1
- package/dist/types/server/src/services/config/types.d.ts +3 -10
- package/dist/types/server/src/types.d.ts +24 -0
- package/package.json +15 -16
|
@@ -181,214 +181,232 @@ export interface PaginationQuery {
|
|
|
181
181
|
page?: number;
|
|
182
182
|
pageSize?: number;
|
|
183
183
|
}
|
|
184
|
-
export
|
|
184
|
+
export interface PaginationRequest {
|
|
185
185
|
Querystring: PaginationQuery;
|
|
186
|
-
}
|
|
187
|
-
export
|
|
186
|
+
}
|
|
187
|
+
export interface AuthParamsRequest {
|
|
188
188
|
Params: {
|
|
189
189
|
id: string;
|
|
190
190
|
username?: string;
|
|
191
191
|
};
|
|
192
|
-
}
|
|
193
|
-
export
|
|
192
|
+
}
|
|
193
|
+
export interface AuthLoginRequest {
|
|
194
194
|
Querystring: {
|
|
195
195
|
username?: string;
|
|
196
196
|
password?: string;
|
|
197
197
|
token?: string;
|
|
198
198
|
};
|
|
199
|
-
}
|
|
200
|
-
export
|
|
199
|
+
}
|
|
200
|
+
export interface AuthNewLoginRequest {
|
|
201
201
|
Body: LoginUserInput;
|
|
202
|
-
}
|
|
203
|
-
export
|
|
202
|
+
}
|
|
203
|
+
export interface AuthRefreshRequest {
|
|
204
204
|
Body: {
|
|
205
205
|
refresh_token: string;
|
|
206
206
|
};
|
|
207
|
-
}
|
|
208
|
-
export
|
|
207
|
+
}
|
|
208
|
+
export interface AuthTokensRequest {
|
|
209
209
|
Querystring: {
|
|
210
210
|
clientData?: boolean;
|
|
211
211
|
};
|
|
212
|
-
}
|
|
213
|
-
export
|
|
212
|
+
}
|
|
213
|
+
export interface CamerasParamsRequest {
|
|
214
214
|
Params: {
|
|
215
215
|
cameraname: string;
|
|
216
216
|
};
|
|
217
|
-
}
|
|
218
|
-
export
|
|
217
|
+
}
|
|
218
|
+
export interface CameraSnapshotQueryRequest {
|
|
219
219
|
Querystring: {
|
|
220
220
|
forceNew?: boolean;
|
|
221
221
|
};
|
|
222
|
-
}
|
|
223
|
-
export
|
|
222
|
+
}
|
|
223
|
+
export interface CameraSourceParamsRequest {
|
|
224
224
|
Params: {
|
|
225
225
|
sourcename: string;
|
|
226
226
|
};
|
|
227
|
-
}
|
|
228
|
-
export
|
|
227
|
+
}
|
|
228
|
+
export interface CamerasParamsIdRequest {
|
|
229
229
|
Params: {
|
|
230
230
|
cameraid: string;
|
|
231
231
|
};
|
|
232
|
-
}
|
|
233
|
-
export
|
|
232
|
+
}
|
|
233
|
+
export interface CameraZonesParamsRequest {
|
|
234
234
|
Params: {
|
|
235
235
|
zonename: string;
|
|
236
236
|
};
|
|
237
|
-
}
|
|
238
|
-
export
|
|
237
|
+
}
|
|
238
|
+
export interface CamerasExtensionsParamsRequest {
|
|
239
239
|
Params: {
|
|
240
240
|
cameraname: string;
|
|
241
241
|
pluginname: string;
|
|
242
242
|
scope?: string;
|
|
243
243
|
};
|
|
244
|
-
}
|
|
245
|
-
export
|
|
244
|
+
}
|
|
245
|
+
export interface CamerasExtensionsRequest {
|
|
246
246
|
Querystring: {
|
|
247
247
|
type: CameraExtension;
|
|
248
248
|
};
|
|
249
|
-
}
|
|
250
|
-
export
|
|
249
|
+
}
|
|
250
|
+
export interface CameraZoneInsertPatchRequest {
|
|
251
251
|
Body: CameraZone;
|
|
252
|
-
}
|
|
253
|
-
export
|
|
252
|
+
}
|
|
253
|
+
export interface CamerasInsertRequest {
|
|
254
254
|
Body: CreateCameraInput;
|
|
255
|
-
}
|
|
256
|
-
export
|
|
255
|
+
}
|
|
256
|
+
export interface CamerasPreviewRequest {
|
|
257
257
|
Body: PreviewCameraInput;
|
|
258
|
-
}
|
|
259
|
-
export
|
|
258
|
+
}
|
|
259
|
+
export interface CamerasPatchRequest {
|
|
260
260
|
Body: PatchCameraInput;
|
|
261
|
-
}
|
|
262
|
-
export
|
|
261
|
+
}
|
|
262
|
+
export interface ExtensionsPatchRequest {
|
|
263
263
|
Body: Record<string, any>;
|
|
264
|
-
}
|
|
265
|
-
export
|
|
264
|
+
}
|
|
265
|
+
export interface ExtensionsSubmitRequest {
|
|
266
266
|
Body: {
|
|
267
267
|
configPath: string;
|
|
268
268
|
};
|
|
269
|
-
}
|
|
270
|
-
export
|
|
269
|
+
}
|
|
270
|
+
export interface ConfigRequest {
|
|
271
271
|
Querystring: {
|
|
272
272
|
json?: boolean;
|
|
273
273
|
};
|
|
274
|
-
}
|
|
275
|
-
export
|
|
274
|
+
}
|
|
275
|
+
export interface ConfigPatchRequest {
|
|
276
276
|
Body: PatchConfigInput;
|
|
277
|
-
}
|
|
278
|
-
export
|
|
277
|
+
}
|
|
278
|
+
export interface Go2RtcConfigPatchRequest {
|
|
279
279
|
Body: PatchGo2RtcConfigInput;
|
|
280
|
-
}
|
|
281
|
-
export
|
|
280
|
+
}
|
|
281
|
+
export interface FilesParamsRequest {
|
|
282
282
|
Params: {
|
|
283
283
|
file: string;
|
|
284
284
|
};
|
|
285
|
-
}
|
|
286
|
-
export
|
|
285
|
+
}
|
|
286
|
+
export interface PluginsParamsIdRequest {
|
|
287
287
|
Params: {
|
|
288
288
|
pluginid: string;
|
|
289
289
|
};
|
|
290
|
-
}
|
|
291
|
-
export
|
|
290
|
+
}
|
|
291
|
+
export interface PluginsParamsNameRequest {
|
|
292
292
|
Params: {
|
|
293
293
|
scope?: string;
|
|
294
294
|
pluginname: string;
|
|
295
295
|
};
|
|
296
|
-
}
|
|
297
|
-
export
|
|
296
|
+
}
|
|
297
|
+
export interface FrameWorkerParamsNameRequest {
|
|
298
298
|
Params: {
|
|
299
299
|
frameworkername: string;
|
|
300
300
|
};
|
|
301
|
-
}
|
|
302
|
-
export
|
|
301
|
+
}
|
|
302
|
+
export interface PluginsParamsRemoveRequest {
|
|
303
303
|
Querystring: {
|
|
304
304
|
removeStorage?: boolean;
|
|
305
305
|
};
|
|
306
|
-
}
|
|
306
|
+
}
|
|
307
307
|
export interface PluginsQuery {
|
|
308
308
|
pluginname?: string;
|
|
309
309
|
pluginversion?: string;
|
|
310
310
|
}
|
|
311
|
-
export
|
|
311
|
+
export interface PluginsQueryRequest {
|
|
312
312
|
Querystring: PluginsQuery;
|
|
313
|
-
}
|
|
314
|
-
export
|
|
313
|
+
}
|
|
314
|
+
export interface PluginsInsertRequest {
|
|
315
315
|
Body: {
|
|
316
316
|
pluginname: string;
|
|
317
317
|
pluginversion?: string;
|
|
318
318
|
};
|
|
319
|
-
}
|
|
320
|
-
export
|
|
319
|
+
}
|
|
320
|
+
export interface PluginsConfigPatchRequest {
|
|
321
321
|
Body: Record<string, any>;
|
|
322
|
-
}
|
|
323
|
-
export
|
|
322
|
+
}
|
|
323
|
+
export interface PluginsActionRequest {
|
|
324
324
|
Body: {
|
|
325
325
|
actionId: string;
|
|
326
326
|
payload: any;
|
|
327
327
|
};
|
|
328
|
-
}
|
|
329
|
-
export
|
|
328
|
+
}
|
|
329
|
+
export interface PluginsDetectMotionRequest {
|
|
330
330
|
Body: DetectMotionInput;
|
|
331
|
-
}
|
|
332
|
-
export
|
|
331
|
+
}
|
|
332
|
+
export interface PluginsDetectObjectRequest {
|
|
333
333
|
Body: DetectObjectInput;
|
|
334
|
-
}
|
|
335
|
-
export
|
|
334
|
+
}
|
|
335
|
+
export interface PluginsDetectAudioRequest {
|
|
336
336
|
Body: DetectAudioInput;
|
|
337
|
-
}
|
|
337
|
+
}
|
|
338
338
|
export interface PluginsInterfaceQueryType {
|
|
339
339
|
type: 'objectDetection' | 'motionDetection' | 'audioDetection';
|
|
340
340
|
}
|
|
341
|
-
export
|
|
341
|
+
export interface PluginsInterfaceQuery {
|
|
342
342
|
Querystring: {
|
|
343
343
|
type: PluginsInterfaceQueryType;
|
|
344
344
|
};
|
|
345
|
-
}
|
|
346
|
-
export
|
|
345
|
+
}
|
|
346
|
+
export interface UsersParamsRequest {
|
|
347
347
|
Params: {
|
|
348
348
|
username: string;
|
|
349
349
|
};
|
|
350
|
-
}
|
|
351
|
-
export
|
|
350
|
+
}
|
|
351
|
+
export interface UsersInsertRequest {
|
|
352
352
|
Body: CreateUserInput & {
|
|
353
353
|
avatar: string;
|
|
354
354
|
};
|
|
355
|
-
}
|
|
356
|
-
export
|
|
355
|
+
}
|
|
356
|
+
export interface UsersPatchRequest {
|
|
357
357
|
Body: PatchUserInput & {
|
|
358
358
|
avatar: string;
|
|
359
359
|
};
|
|
360
|
-
}
|
|
361
|
-
export
|
|
360
|
+
}
|
|
361
|
+
export interface SystemPatchRequest {
|
|
362
362
|
Body: PatchSystemInput;
|
|
363
|
-
}
|
|
364
|
-
export
|
|
363
|
+
}
|
|
364
|
+
export interface ServerUpdateRequest {
|
|
365
|
+
Body: {
|
|
366
|
+
version: string;
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
export interface ViewsParamsRequest {
|
|
365
370
|
Params: {
|
|
366
371
|
viewid: string;
|
|
367
372
|
};
|
|
368
|
-
}
|
|
369
|
-
export
|
|
373
|
+
}
|
|
374
|
+
export interface ViewsInsertRequest {
|
|
370
375
|
Body: CreateViewInput;
|
|
371
|
-
}
|
|
372
|
-
export
|
|
376
|
+
}
|
|
377
|
+
export interface ViewsPatchRequest {
|
|
373
378
|
Body: PatchViewInput;
|
|
374
|
-
}
|
|
375
|
-
export
|
|
379
|
+
}
|
|
380
|
+
export interface ShortcutParamsRequest {
|
|
376
381
|
Params: {
|
|
377
382
|
shortcutid: string;
|
|
378
383
|
};
|
|
379
|
-
}
|
|
380
|
-
export
|
|
384
|
+
}
|
|
385
|
+
export interface ShortcutInsertRequest {
|
|
381
386
|
Body: CreateShortcutInput;
|
|
382
|
-
}
|
|
383
|
-
export
|
|
387
|
+
}
|
|
388
|
+
export interface ShortcutPatchRequest {
|
|
384
389
|
Body: PatchShortcutInput;
|
|
385
|
-
}
|
|
386
|
-
export
|
|
390
|
+
}
|
|
391
|
+
export interface BackupCreateRequest {
|
|
387
392
|
Body: {
|
|
388
393
|
localStorage: Partial<UiLocalStorage>;
|
|
389
394
|
};
|
|
390
|
-
}
|
|
395
|
+
}
|
|
396
|
+
export interface PluginBackupInfo {
|
|
397
|
+
id: string;
|
|
398
|
+
name: string;
|
|
399
|
+
version: string;
|
|
400
|
+
}
|
|
391
401
|
export interface BackupInfo {
|
|
402
|
+
timestamp: number;
|
|
403
|
+
platform: string;
|
|
404
|
+
node: string;
|
|
405
|
+
version: string;
|
|
406
|
+
plugins: PluginBackupInfo[];
|
|
407
|
+
localStorage: Partial<UiLocalStorage>;
|
|
408
|
+
}
|
|
409
|
+
export interface BackupStorage {
|
|
392
410
|
backupDirectory: string;
|
|
393
411
|
backupFile: string;
|
|
394
412
|
backupFileName: string;
|
|
@@ -430,9 +448,9 @@ export interface UiLocalStorage {
|
|
|
430
448
|
theme: ThemeLocalStorage;
|
|
431
449
|
locale: SupportedLanguageAbbreviatons;
|
|
432
450
|
}
|
|
433
|
-
export
|
|
451
|
+
export interface BackupRestoreRequest {
|
|
434
452
|
Body: RestoreBackupInput;
|
|
435
|
-
}
|
|
453
|
+
}
|
|
436
454
|
export interface INpmPluginState {
|
|
437
455
|
updateAvailable: boolean;
|
|
438
456
|
betaUpdateAvailable: boolean;
|
|
@@ -463,32 +481,18 @@ export interface IPackageJson {
|
|
|
463
481
|
contributors?: string[] | INpmPerson[];
|
|
464
482
|
files?: string[];
|
|
465
483
|
main?: string;
|
|
466
|
-
bin?: string |
|
|
467
|
-
[key: string]: string;
|
|
468
|
-
};
|
|
484
|
+
bin?: string | Record<string, string>;
|
|
469
485
|
repository?: string | {
|
|
470
486
|
type: string;
|
|
471
487
|
url: string;
|
|
472
488
|
};
|
|
473
|
-
scripts?:
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
};
|
|
479
|
-
devDependencies?: {
|
|
480
|
-
[key: string]: string;
|
|
481
|
-
};
|
|
482
|
-
peerDependencies?: {
|
|
483
|
-
[key: string]: string;
|
|
484
|
-
};
|
|
485
|
-
optionalDependencies?: {
|
|
486
|
-
[key: string]: string;
|
|
487
|
-
};
|
|
489
|
+
scripts?: Record<string, string>;
|
|
490
|
+
dependencies?: Record<string, string>;
|
|
491
|
+
devDependencies?: Record<string, string>;
|
|
492
|
+
peerDependencies?: Record<string, string>;
|
|
493
|
+
optionalDependencies?: Record<string, string>;
|
|
488
494
|
bundledDependencies?: string[];
|
|
489
|
-
engines?:
|
|
490
|
-
[key: string]: string;
|
|
491
|
-
};
|
|
495
|
+
engines?: Record<string, string>;
|
|
492
496
|
os?: string[];
|
|
493
497
|
cpu?: string[];
|
|
494
498
|
preferGlobal?: boolean;
|
|
@@ -496,9 +500,7 @@ export interface IPackageJson {
|
|
|
496
500
|
publishConfig?: {
|
|
497
501
|
registry?: string;
|
|
498
502
|
};
|
|
499
|
-
exports?:
|
|
500
|
-
[key: string]: any;
|
|
501
|
-
};
|
|
503
|
+
exports?: Record<string, any>;
|
|
502
504
|
type?: 'module';
|
|
503
505
|
'camera.ui'?: PluginContract;
|
|
504
506
|
}
|
|
@@ -510,9 +512,7 @@ export interface INpmRegistryModule {
|
|
|
510
512
|
latest: string;
|
|
511
513
|
[key: string]: string;
|
|
512
514
|
};
|
|
513
|
-
versions:
|
|
514
|
-
[key: string]: IPackageJson;
|
|
515
|
-
};
|
|
515
|
+
versions: Record<string, IPackageJson>;
|
|
516
516
|
time: {
|
|
517
517
|
created: string;
|
|
518
518
|
modified: string;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import type { CameraInputSettings
|
|
2
|
-
export
|
|
1
|
+
import type { CameraInputSettings } from '@camera.ui/types';
|
|
2
|
+
export interface InternalCameraInputSettings extends CameraInputSettings {
|
|
3
|
+
convertedName: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function isInternalSource(source: CameraInputSettings): boolean;
|
|
6
|
+
export declare function generateInternalCameraSources(cameraName: string, source: CameraInputSettings): InternalCameraInputSettings[] | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Certificate {
|
|
2
|
+
cert: string;
|
|
3
|
+
key: string;
|
|
4
|
+
certPath: string;
|
|
5
|
+
keyPath: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class CertificateGeneration {
|
|
8
|
+
static createRootCA(customAddresses: string[]): Certificate;
|
|
9
|
+
static createHostCert(customAddresses: string[], rootCAObject: Certificate): Certificate;
|
|
10
|
+
static generateCert(forceNew?: boolean): Certificate;
|
|
11
|
+
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare
|
|
2
|
-
export default fetchWithTimeout;
|
|
1
|
+
export declare function fetchWithTimeout(url: string, options?: RequestInit): Promise<Response>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { JwtTokenDecoded } from '../types/index.js';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function parseJwt(access_token: string): JwtTokenDecoded;
|
|
@@ -3,7 +3,7 @@ import type { SocketNsp } from '../types.js';
|
|
|
3
3
|
export declare class LogsNamespace {
|
|
4
4
|
nsp: Namespace;
|
|
5
5
|
nspName: SocketNsp;
|
|
6
|
-
private
|
|
6
|
+
private tailInstances;
|
|
7
7
|
private api;
|
|
8
8
|
private configService;
|
|
9
9
|
private pluginManager;
|
|
@@ -12,6 +12,8 @@ export declare class LogsNamespace {
|
|
|
12
12
|
getCameraLog(socket: Socket, cameraName: string): void;
|
|
13
13
|
getPluginLog(socket: Socket, pluginName: string): void;
|
|
14
14
|
private tailLogFromFileNative;
|
|
15
|
+
private setupTail;
|
|
16
|
+
private filterLine;
|
|
15
17
|
private removeName;
|
|
16
18
|
private removeBracketedContent;
|
|
17
19
|
}
|
|
@@ -23,12 +23,8 @@ export interface ServerProcesses {
|
|
|
23
23
|
go2rtc: ProcessInfo[];
|
|
24
24
|
nats: ProcessInfo[];
|
|
25
25
|
}
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
export interface WorkerProcesses {
|
|
30
|
-
[key: string]: ProcessInfo[];
|
|
31
|
-
}
|
|
26
|
+
export type WorkerProcessInfo = Record<string, ProcessInfo>;
|
|
27
|
+
export type WorkerProcesses = Record<string, ProcessInfo[]>;
|
|
32
28
|
export interface AllProcesses extends ServerProcessInfo {
|
|
33
29
|
plugins: WorkerProcessInfo;
|
|
34
30
|
workers: WorkerProcessInfo;
|
|
@@ -42,6 +38,4 @@ export interface ServerRuntime {
|
|
|
42
38
|
go2rtc?: RuntimeInfo;
|
|
43
39
|
nats?: RuntimeInfo;
|
|
44
40
|
}
|
|
45
|
-
export
|
|
46
|
-
[key: string]: PluginRuntimeInfo;
|
|
47
|
-
}
|
|
41
|
+
export type WorkerRuntime = Record<string, PluginRuntimeInfo>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CameraDevice, CameraPrebufferInterface, CameraPTZInterface } from '@camera.ui/plugineer';
|
|
2
2
|
import { FrameWorker } from './frameWorker.js';
|
|
3
3
|
import type { Logger } from '@camera.ui/common/logger';
|
|
4
|
-
import type { Camera, CameraConfigInputSettings, CameraDelegate, CameraDeviceInternalSource, CameraDeviceSource, MotionFrame, ProbeStream, SetValues, VideoFrame } from '@camera.ui/types';
|
|
4
|
+
import type { Camera, CameraConfigInputSettings, CameraDelegate, CameraDeviceInternalSource, CameraDeviceSource, MotionFrame, ProbeConfig, ProbeStream, SetValues, VideoFrame } from '@camera.ui/types';
|
|
5
|
+
import type { WriteStream } from 'node:fs';
|
|
5
6
|
export declare class CameraController extends CameraDevice {
|
|
6
7
|
readonly frameWorker: FrameWorker;
|
|
7
8
|
readonly streamInfos: Map<string, ProbeStream>;
|
|
8
|
-
|
|
9
|
+
readonly logStream?: WriteStream;
|
|
9
10
|
private motionTimeout?;
|
|
10
11
|
private objectTimeout?;
|
|
11
12
|
private objectTimeoutDuration;
|
|
@@ -25,7 +26,6 @@ export declare class CameraController extends CameraDevice {
|
|
|
25
26
|
get camera(): Camera;
|
|
26
27
|
get sources(): CameraDeviceSource[];
|
|
27
28
|
get internalSources(): CameraDeviceInternalSource[];
|
|
28
|
-
private get _sources();
|
|
29
29
|
constructor(camera: Camera, logger: Logger);
|
|
30
30
|
setDelegate(): void;
|
|
31
31
|
getFrames(): AsyncIterableIterator<VideoFrame>;
|
|
@@ -33,14 +33,13 @@ export declare class CameraController extends CameraDevice {
|
|
|
33
33
|
connect(): Promise<void>;
|
|
34
34
|
disconnect(): Promise<void>;
|
|
35
35
|
updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T]): Promise<void>;
|
|
36
|
-
probeStream(sourceId: string, refresh?: boolean): Promise<ProbeStream | undefined>;
|
|
36
|
+
probeStream(sourceId: string, probeConfig?: ProbeConfig, refresh?: boolean): Promise<ProbeStream | undefined>;
|
|
37
37
|
addCameraSource(source: CameraConfigInputSettings): Promise<void>;
|
|
38
38
|
updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>): Promise<void>;
|
|
39
39
|
removeCameraSource(sourceId: string): Promise<void>;
|
|
40
40
|
updateCamera(updatedCamera: Camera): void;
|
|
41
41
|
cleanup(): void;
|
|
42
42
|
writeLog(...args: any[]): void;
|
|
43
|
-
private internalLog;
|
|
44
43
|
private subscribeToCameraState;
|
|
45
44
|
private subscribeToCameraChanges;
|
|
46
45
|
private subscribeToStateChanges;
|
|
@@ -52,10 +51,7 @@ export declare class CameraController extends CameraDevice {
|
|
|
52
51
|
private isCameraEvent;
|
|
53
52
|
private generateAudioStreamInfo;
|
|
54
53
|
private generateVideoStreamInfo;
|
|
55
|
-
private
|
|
56
|
-
private getVideoCodecProperties;
|
|
57
|
-
private generateSdp;
|
|
58
|
-
private createLogStream;
|
|
54
|
+
private writeHeader;
|
|
59
55
|
private closeLogStream;
|
|
60
56
|
private removeLogStream;
|
|
61
57
|
private truncateLog;
|
|
@@ -32,12 +32,11 @@ export declare class FrameWorker extends Subscribed {
|
|
|
32
32
|
restart(): Promise<void>;
|
|
33
33
|
getPID(): number;
|
|
34
34
|
private startWorker;
|
|
35
|
-
private
|
|
35
|
+
private attemptRestart;
|
|
36
36
|
private reset;
|
|
37
37
|
private killWorker;
|
|
38
38
|
private sendMessage;
|
|
39
39
|
private onChildMessage;
|
|
40
40
|
private setStatus;
|
|
41
|
-
private internalLog;
|
|
42
41
|
private createPythonPath;
|
|
43
42
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import 'reflect-metadata';
|
|
3
|
+
import type { Logger } from '@camera.ui/common';
|
|
4
|
+
declare class CameraUi {
|
|
5
|
+
readonly logger: Logger;
|
|
6
|
+
private api;
|
|
7
|
+
private database;
|
|
8
|
+
private configService;
|
|
9
|
+
private pluginManager;
|
|
10
|
+
private go2rtc;
|
|
11
|
+
private go2rtcApi;
|
|
12
|
+
private server;
|
|
13
|
+
private proxy;
|
|
14
|
+
private signalHandler;
|
|
15
|
+
private homePath;
|
|
16
|
+
status: 'loading' | 'ready';
|
|
17
|
+
constructor();
|
|
18
|
+
start(): Promise<void>;
|
|
19
|
+
close(): Promise<void>;
|
|
20
|
+
restart(): Promise<void>;
|
|
21
|
+
requestUpdate(version?: string): Promise<AsyncGenerator<string, void, unknown>>;
|
|
22
|
+
private initializePlugins;
|
|
23
|
+
private setStatus;
|
|
24
|
+
}
|
|
25
|
+
export type { CameraUi };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MessageQueue, ProxyMessageStructure } from '@camera.ui/common';
|
|
2
2
|
import type { CameraDeviceProxyMethods, CameraInterfaces, RefreshedStates } from '@camera.ui/plugineer';
|
|
3
|
-
import type { CameraConfigInputSettings, ProbeStream, SetValues } from '@camera.ui/types';
|
|
3
|
+
import type { CameraConfigInputSettings, ProbeConfig, ProbeStream, SetValues } from '@camera.ui/types';
|
|
4
4
|
import type { MethodKeys, MethodType } from '../../types.js';
|
|
5
5
|
export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
|
|
6
6
|
private api;
|
|
@@ -12,7 +12,7 @@ export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
|
|
|
12
12
|
connect(cameraId: string, pluginId: string): void;
|
|
13
13
|
disconnect(cameraId: string, pluginId: string): void;
|
|
14
14
|
updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T], cameraId: string, pluginId: string): Promise<void>;
|
|
15
|
-
probeStream(sourceId: string, refresh: boolean, cameraId: string): Promise<ProbeStream | undefined>;
|
|
15
|
+
probeStream(sourceId: string, probeConfig: ProbeConfig | undefined, refresh: boolean, cameraId: string): Promise<ProbeStream | undefined>;
|
|
16
16
|
addCameraSource(source: CameraConfigInputSettings, cameraId: string, pluginId: string): Promise<void>;
|
|
17
17
|
updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>, cameraId: string, pluginId: string): Promise<void>;
|
|
18
18
|
removeCameraSource(sourceId: string, cameraId: string, pluginId: string): Promise<void>;
|
|
@@ -17,13 +17,14 @@ export declare class PluginManager {
|
|
|
17
17
|
static loadPackageJSON(installPath: string): IPackageJson;
|
|
18
18
|
initializeInstalledPlugins(): Promise<void>;
|
|
19
19
|
initializeInstalledPlugin(plugin: Plugin): Promise<void>;
|
|
20
|
-
loadPlugin(absolutePath: string): Promise<Plugin>;
|
|
20
|
+
loadPlugin(absolutePath: string, oldId?: string): Promise<Plugin>;
|
|
21
21
|
removePlugin(plugin: Plugin, removeStorage?: boolean): Promise<void>;
|
|
22
22
|
startPluginChild(pluginName: string): Promise<void>;
|
|
23
23
|
stopPluginChild(pluginName: string): Promise<void>;
|
|
24
24
|
initializePlugins(): Promise<void>;
|
|
25
|
-
installRequiredPythonEnvs
|
|
25
|
+
private installRequiredPythonEnvs;
|
|
26
26
|
private loadInstalledPlugins;
|
|
27
|
+
private restorePlugins;
|
|
27
28
|
private removeOrphanedPlugins;
|
|
28
29
|
private handleDisabledPlugins;
|
|
29
30
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PythonInstaller } from '@camera.ui/plugineer';
|
|
2
1
|
import { PluginWorker } from './worker.js';
|
|
3
2
|
import type { PluginContract } from '@camera.ui/plugineer';
|
|
4
3
|
import type { CameraExtension } from '@camera.ui/types';
|
|
@@ -20,7 +19,6 @@ export declare class Plugin {
|
|
|
20
19
|
readonly installPath: string;
|
|
21
20
|
readonly configFile: string;
|
|
22
21
|
readonly storagePath: string;
|
|
23
|
-
readonly py: PythonInstaller;
|
|
24
22
|
readonly logPath: string;
|
|
25
23
|
readonly worker: PluginWorker;
|
|
26
24
|
get contract(): PluginContract;
|
|
@@ -12,6 +12,7 @@ export declare class PluginWorker {
|
|
|
12
12
|
private configService;
|
|
13
13
|
private socketService;
|
|
14
14
|
private pluginManager;
|
|
15
|
+
private py;
|
|
15
16
|
private publisher?;
|
|
16
17
|
private subscriber?;
|
|
17
18
|
private subject;
|
|
@@ -46,8 +47,7 @@ export declare class PluginWorker {
|
|
|
46
47
|
private handleLogData;
|
|
47
48
|
private processLogEntry;
|
|
48
49
|
private writeProcessLog;
|
|
49
|
-
private
|
|
50
|
-
private createLogStream;
|
|
50
|
+
private writeHeader;
|
|
51
51
|
private closeLogStream;
|
|
52
52
|
private removeLogStream;
|
|
53
53
|
private truncateLog;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { IceServer } from '@camera.ui/types';
|
|
2
2
|
import type { Go2RtcConfig, IConfig } from './types.js';
|
|
3
3
|
export declare const PROCESS_IDENTIFIER = "--id=camera.ui";
|
|
4
|
-
export declare const APP_NAME: any;
|
|
5
4
|
export declare const DEFAULT_ICE_SERVERS: IceServer[];
|
|
6
5
|
export declare const DEFAULT_CONFIG: IConfig;
|
|
7
6
|
export declare const DEFAULT_GO2RTC_CONFIG: Go2RtcConfig;
|