@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.
Files changed (74) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +1 -2
  3. package/dist/types/packages/client/browser/src/types.d.ts +1 -1
  4. package/dist/types/packages/client/browser/src/utils.d.ts +1 -1
  5. package/dist/types/packages/plugineer/src/polyglot/node/camera/index.d.ts +3 -3
  6. package/dist/types/packages/plugineer/src/polyglot/node/plugins/schema.d.ts +2 -14
  7. package/dist/types/packages/plugineer/src/polyglot/node/plugins/types.d.ts +3 -2
  8. package/dist/types/packages/types/src/index.d.ts +75 -29
  9. package/dist/types/server/src/api/controllers/api.controller.d.ts +7 -0
  10. package/dist/types/server/src/api/controllers/auth.controller.d.ts +16 -0
  11. package/dist/types/server/src/api/controllers/backup.controller.d.ts +10 -0
  12. package/dist/types/server/src/api/controllers/cameras.controller.d.ts +38 -0
  13. package/dist/types/server/src/api/controllers/config.controller.d.ts +14 -0
  14. package/dist/types/server/src/api/controllers/files.controller.d.ts +8 -0
  15. package/dist/types/server/src/api/controllers/frameWorkers.controller.d.ts +11 -0
  16. package/dist/types/server/src/api/controllers/plugins.controller.d.ts +48 -0
  17. package/dist/types/server/src/api/controllers/system.controller.d.ts +23 -0
  18. package/dist/types/server/src/api/controllers/users.controller.d.ts +28 -0
  19. package/dist/types/server/src/api/database/index.d.ts +3 -4
  20. package/dist/types/server/src/api/database/types.d.ts +4 -14
  21. package/dist/types/server/src/api/go2rtc/api/streams.d.ts +2 -1
  22. package/dist/types/server/src/api/go2rtc/index.d.ts +1 -0
  23. package/dist/types/server/src/api/go2rtc/types.d.ts +6 -6
  24. package/dist/types/server/src/api/index.d.ts +22 -0
  25. package/dist/types/server/src/api/middlewares/authPermission.middleware.d.ts +5 -0
  26. package/dist/types/server/src/api/middlewares/authValidation.middleware.d.ts +4 -0
  27. package/dist/types/server/src/api/middlewares/pagination.middleware.d.ts +3 -0
  28. package/dist/types/server/src/api/middlewares/socketAuth.middleware.d.ts +1 -1
  29. package/dist/types/server/src/api/plugins/header.plugin.d.ts +2 -0
  30. package/dist/types/server/src/api/plugins/socket.plugin.d.ts +11 -0
  31. package/dist/types/server/src/api/plugins/system.plugin.d.ts +20 -0
  32. package/dist/types/server/src/api/plugins/useragent.plugin.d.ts +8 -0
  33. package/dist/types/server/src/api/routes/api.routes.d.ts +2 -0
  34. package/dist/types/server/src/api/routes/auth.routes.d.ts +2 -0
  35. package/dist/types/server/src/api/routes/backup.routes.d.ts +2 -0
  36. package/dist/types/server/src/api/routes/cameras.routes.d.ts +2 -0
  37. package/dist/types/server/src/api/routes/config.routes.d.ts +2 -0
  38. package/dist/types/server/src/api/routes/files.routes.d.ts +2 -0
  39. package/dist/types/server/src/api/routes/frameWorkers.routes.d.ts +2 -0
  40. package/dist/types/server/src/api/routes/index.d.ts +6 -0
  41. package/dist/types/server/src/api/routes/plugins.routes.d.ts +2 -0
  42. package/dist/types/server/src/api/routes/system.routes.d.ts +2 -0
  43. package/dist/types/server/src/api/routes/users.routes.d.ts +2 -0
  44. package/dist/types/server/src/api/schemas/backup.schema.d.ts +94 -1
  45. package/dist/types/server/src/api/schemas/cameras.schema.d.ts +16 -16
  46. package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +4 -4
  47. package/dist/types/server/src/api/schemas/plugins.schema.d.ts +3 -3
  48. package/dist/types/server/src/api/schemas/system.schema.d.ts +8 -0
  49. package/dist/types/server/src/api/schemas/users.schema.d.ts +35 -35
  50. package/dist/types/server/src/api/services/backup.service.d.ts +11 -0
  51. package/dist/types/server/src/api/services/cameras.service.d.ts +2 -4
  52. package/dist/types/server/src/api/services/plugins.service.d.ts +16 -4
  53. package/dist/types/server/src/api/services/system.service.d.ts +6 -0
  54. package/dist/types/server/src/api/types/index.d.ts +121 -121
  55. package/dist/types/server/src/api/utils/cameraSource.d.ts +6 -2
  56. package/dist/types/server/src/api/utils/cert.d.ts +11 -0
  57. package/dist/types/server/src/api/utils/fetch.d.ts +1 -2
  58. package/dist/types/server/src/api/utils/moveFiles.d.ts +4 -0
  59. package/dist/types/server/src/api/utils/parse.d.ts +1 -1
  60. package/dist/types/server/src/api/websocket/nsp/logs.d.ts +3 -1
  61. package/dist/types/server/src/api/websocket/nsp/main.d.ts +2 -0
  62. package/dist/types/server/src/api/websocket/types.d.ts +3 -9
  63. package/dist/types/server/src/camera/controller.d.ts +5 -9
  64. package/dist/types/server/src/camera/frameWorker.d.ts +1 -2
  65. package/dist/types/server/src/main.d.ts +25 -0
  66. package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +2 -2
  67. package/dist/types/server/src/plugins/index.d.ts +3 -2
  68. package/dist/types/server/src/plugins/plugin.d.ts +0 -2
  69. package/dist/types/server/src/plugins/worker.d.ts +2 -2
  70. package/dist/types/server/src/services/config/constants.d.ts +0 -1
  71. package/dist/types/server/src/services/config/index.d.ts +2 -1
  72. package/dist/types/server/src/services/config/types.d.ts +3 -10
  73. package/dist/types/server/src/types.d.ts +24 -0
  74. package/package.json +15 -16
@@ -181,214 +181,232 @@ export interface PaginationQuery {
181
181
  page?: number;
182
182
  pageSize?: number;
183
183
  }
184
- export type PaginationRequest = {
184
+ export interface PaginationRequest {
185
185
  Querystring: PaginationQuery;
186
- };
187
- export type AuthParamsRequest = {
186
+ }
187
+ export interface AuthParamsRequest {
188
188
  Params: {
189
189
  id: string;
190
190
  username?: string;
191
191
  };
192
- };
193
- export type AuthLoginRequest = {
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 type AuthNewLoginRequest = {
199
+ }
200
+ export interface AuthNewLoginRequest {
201
201
  Body: LoginUserInput;
202
- };
203
- export type AuthRefreshRequest = {
202
+ }
203
+ export interface AuthRefreshRequest {
204
204
  Body: {
205
205
  refresh_token: string;
206
206
  };
207
- };
208
- export type AuthTokensRequest = {
207
+ }
208
+ export interface AuthTokensRequest {
209
209
  Querystring: {
210
210
  clientData?: boolean;
211
211
  };
212
- };
213
- export type CamerasParamsRequest = {
212
+ }
213
+ export interface CamerasParamsRequest {
214
214
  Params: {
215
215
  cameraname: string;
216
216
  };
217
- };
218
- export type CameraSnapshotQueryRequest = {
217
+ }
218
+ export interface CameraSnapshotQueryRequest {
219
219
  Querystring: {
220
220
  forceNew?: boolean;
221
221
  };
222
- };
223
- export type CameraSourceParamsRequest = {
222
+ }
223
+ export interface CameraSourceParamsRequest {
224
224
  Params: {
225
225
  sourcename: string;
226
226
  };
227
- };
228
- export type CamerasParamsIdRequest = {
227
+ }
228
+ export interface CamerasParamsIdRequest {
229
229
  Params: {
230
230
  cameraid: string;
231
231
  };
232
- };
233
- export type CameraZonesParamsRequest = {
232
+ }
233
+ export interface CameraZonesParamsRequest {
234
234
  Params: {
235
235
  zonename: string;
236
236
  };
237
- };
238
- export type CamerasExtensionsParamsRequest = {
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 type CamerasExtensionsRequest = {
244
+ }
245
+ export interface CamerasExtensionsRequest {
246
246
  Querystring: {
247
247
  type: CameraExtension;
248
248
  };
249
- };
250
- export type CameraZoneInsertPatchRequest = {
249
+ }
250
+ export interface CameraZoneInsertPatchRequest {
251
251
  Body: CameraZone;
252
- };
253
- export type CamerasInsertRequest = {
252
+ }
253
+ export interface CamerasInsertRequest {
254
254
  Body: CreateCameraInput;
255
- };
256
- export type CamerasPreviewRequest = {
255
+ }
256
+ export interface CamerasPreviewRequest {
257
257
  Body: PreviewCameraInput;
258
- };
259
- export type CamerasPatchRequest = {
258
+ }
259
+ export interface CamerasPatchRequest {
260
260
  Body: PatchCameraInput;
261
- };
262
- export type ExtensionsPatchRequest = {
261
+ }
262
+ export interface ExtensionsPatchRequest {
263
263
  Body: Record<string, any>;
264
- };
265
- export type ExtensionsSubmitRequest = {
264
+ }
265
+ export interface ExtensionsSubmitRequest {
266
266
  Body: {
267
267
  configPath: string;
268
268
  };
269
- };
270
- export type ConfigRequest = {
269
+ }
270
+ export interface ConfigRequest {
271
271
  Querystring: {
272
272
  json?: boolean;
273
273
  };
274
- };
275
- export type ConfigPatchRequest = {
274
+ }
275
+ export interface ConfigPatchRequest {
276
276
  Body: PatchConfigInput;
277
- };
278
- export type Go2RtcConfigPatchRequest = {
277
+ }
278
+ export interface Go2RtcConfigPatchRequest {
279
279
  Body: PatchGo2RtcConfigInput;
280
- };
281
- export type FilesParamsRequest = {
280
+ }
281
+ export interface FilesParamsRequest {
282
282
  Params: {
283
283
  file: string;
284
284
  };
285
- };
286
- export type PluginsParamsIdRequest = {
285
+ }
286
+ export interface PluginsParamsIdRequest {
287
287
  Params: {
288
288
  pluginid: string;
289
289
  };
290
- };
291
- export type PluginsParamsNameRequest = {
290
+ }
291
+ export interface PluginsParamsNameRequest {
292
292
  Params: {
293
293
  scope?: string;
294
294
  pluginname: string;
295
295
  };
296
- };
297
- export type FrameWorkerParamsNameRequest = {
296
+ }
297
+ export interface FrameWorkerParamsNameRequest {
298
298
  Params: {
299
299
  frameworkername: string;
300
300
  };
301
- };
302
- export type PluginsParamsRemoveRequest = {
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 type PluginsQueryRequest = {
311
+ export interface PluginsQueryRequest {
312
312
  Querystring: PluginsQuery;
313
- };
314
- export type PluginsInsertRequest = {
313
+ }
314
+ export interface PluginsInsertRequest {
315
315
  Body: {
316
316
  pluginname: string;
317
317
  pluginversion?: string;
318
318
  };
319
- };
320
- export type PluginsConfigPatchRequest = {
319
+ }
320
+ export interface PluginsConfigPatchRequest {
321
321
  Body: Record<string, any>;
322
- };
323
- export type PluginsActionRequest = {
322
+ }
323
+ export interface PluginsActionRequest {
324
324
  Body: {
325
325
  actionId: string;
326
326
  payload: any;
327
327
  };
328
- };
329
- export type PluginsDetectMotionRequest = {
328
+ }
329
+ export interface PluginsDetectMotionRequest {
330
330
  Body: DetectMotionInput;
331
- };
332
- export type PluginsDetectObjectRequest = {
331
+ }
332
+ export interface PluginsDetectObjectRequest {
333
333
  Body: DetectObjectInput;
334
- };
335
- export type PluginsDetectAudioRequest = {
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 type PluginsInterfaceQuery = {
341
+ export interface PluginsInterfaceQuery {
342
342
  Querystring: {
343
343
  type: PluginsInterfaceQueryType;
344
344
  };
345
- };
346
- export type UsersParamsRequest = {
345
+ }
346
+ export interface UsersParamsRequest {
347
347
  Params: {
348
348
  username: string;
349
349
  };
350
- };
351
- export type UsersInsertRequest = {
350
+ }
351
+ export interface UsersInsertRequest {
352
352
  Body: CreateUserInput & {
353
353
  avatar: string;
354
354
  };
355
- };
356
- export type UsersPatchRequest = {
355
+ }
356
+ export interface UsersPatchRequest {
357
357
  Body: PatchUserInput & {
358
358
  avatar: string;
359
359
  };
360
- };
361
- export type SystemPatchRequest = {
360
+ }
361
+ export interface SystemPatchRequest {
362
362
  Body: PatchSystemInput;
363
- };
364
- export type ViewsParamsRequest = {
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 type ViewsInsertRequest = {
373
+ }
374
+ export interface ViewsInsertRequest {
370
375
  Body: CreateViewInput;
371
- };
372
- export type ViewsPatchRequest = {
376
+ }
377
+ export interface ViewsPatchRequest {
373
378
  Body: PatchViewInput;
374
- };
375
- export type ShortcutParamsRequest = {
379
+ }
380
+ export interface ShortcutParamsRequest {
376
381
  Params: {
377
382
  shortcutid: string;
378
383
  };
379
- };
380
- export type ShortcutInsertRequest = {
384
+ }
385
+ export interface ShortcutInsertRequest {
381
386
  Body: CreateShortcutInput;
382
- };
383
- export type ShortcutPatchRequest = {
387
+ }
388
+ export interface ShortcutPatchRequest {
384
389
  Body: PatchShortcutInput;
385
- };
386
- export type BackupCreateRequest = {
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 type BackupRestoreRequest = {
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
- [key: string]: string;
475
- };
476
- dependencies?: {
477
- [key: string]: string;
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, CameraRoles } from '@camera.ui/types';
2
- export declare const generateInternalCameraSources: (cameraName: string, sourceName: string, roles: CameraRoles[]) => CameraInputSettings[];
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 const fetchWithTimeout: (url: string, options?: RequestInit) => Promise<Response>;
2
- export default fetchWithTimeout;
1
+ export declare function fetchWithTimeout(url: string, options?: RequestInit): Promise<Response>;
@@ -0,0 +1,4 @@
1
+ export interface MoveOptions {
2
+ overwrite?: boolean;
3
+ }
4
+ export declare function moveFiles(source: string, destination: string, options?: MoveOptions): Promise<void>;
@@ -1,2 +1,2 @@
1
1
  import type { JwtTokenDecoded } from '../types/index.js';
2
- export declare const parseJwt: (access_token: string) => JwtTokenDecoded;
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 nativeTail?;
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
  }
@@ -3,5 +3,7 @@ import type { SocketNsp } from '../types.js';
3
3
  export declare class MainNamespace {
4
4
  nsp: Namespace;
5
5
  nspName: SocketNsp;
6
+ private cameraui;
6
7
  constructor(io: Server);
8
+ getStatus(payload: any, callback?: Function): Promise<'loading' | 'ready'>;
7
9
  }
@@ -23,12 +23,8 @@ export interface ServerProcesses {
23
23
  go2rtc: ProcessInfo[];
24
24
  nats: ProcessInfo[];
25
25
  }
26
- export interface WorkerProcessInfo {
27
- [key: string]: ProcessInfo;
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 interface WorkerRuntime {
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
- private logStream?;
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 getAudioCodecProperties;
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 restartWorker;
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(): Promise<void>;
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 internalLog;
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;