@camera.ui/browser 0.0.34 → 0.0.35
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/client/node/src/proxy/cameraDevice/cameraDevice.browser.d.ts +20 -10
- package/dist/src/api/database/types.d.ts +49 -21
- package/dist/src/api/go2rtc/api/application.d.ts +4 -3
- package/dist/src/api/go2rtc/api/config.d.ts +4 -3
- package/dist/src/api/go2rtc/api/snapshot.d.ts +4 -3
- package/dist/src/api/go2rtc/api/streams.d.ts +5 -5
- package/dist/src/api/go2rtc/index.d.ts +13 -4
- package/dist/src/api/go2rtc/queue.d.ts +10 -0
- package/dist/src/api/schemas/cameras.schema.d.ts +363 -7
- package/dist/src/api/schemas/config.schema.d.ts +3 -0
- package/dist/src/api/services/cameras.service.d.ts +17 -7
- package/dist/src/api/services/plugins.service.d.ts +2 -0
- package/dist/src/api/types/index.d.ts +22 -3
- package/dist/src/camera/index.d.ts +22 -11
- package/dist/src/camera/types.d.ts +32 -12
- package/dist/src/plugins/cameraStorage.d.ts +3 -1
- package/dist/src/plugins/index.d.ts +0 -3
- package/dist/src/plugins/plugin.d.ts +1 -1
- package/dist/src/plugins/types.d.ts +16 -6
- package/dist/src/proxy/client/cameraDevice.d.ts +9 -8
- package/dist/src/proxy/client/deviceManager.d.ts +13 -12
- package/dist/src/proxy/client/pluginsManager.d.ts +9 -12
- package/dist/src/proxy/client/queue.d.ts +8 -7
- package/dist/src/proxy/client/systemManager.d.ts +9 -9
- package/dist/src/proxy/index.d.ts +13 -7
- package/dist/src/proxy/proxies/camera.d.ts +40 -20
- package/dist/src/proxy/proxies/plugin.d.ts +5 -4
- package/dist/src/proxy/proxies/server.d.ts +4 -9
- package/dist/src/proxy/queue.d.ts +6 -9
- package/dist/src/proxy/types.d.ts +58 -87
- package/dist/src/services/config/index.d.ts +0 -1
- package/dist/src/services/config/types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -6,18 +6,105 @@ export declare const recordingsSettingsSchema: zod.ZodObject<{
|
|
|
6
6
|
}, {
|
|
7
7
|
enabled?: boolean | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export declare const coordsSchema: zod.ZodObject<{
|
|
10
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
11
|
+
points: zod.ZodTuple<[zod.ZodNumber, zod.ZodNumber], null>;
|
|
12
|
+
}, "strip", zod.ZodTypeAny, {
|
|
13
|
+
_id: string;
|
|
14
|
+
points: [number, number];
|
|
15
|
+
}, {
|
|
16
|
+
points: [number, number];
|
|
17
|
+
_id?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const regionsSchema: zod.ZodObject<{
|
|
20
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
21
|
+
coords: zod.ZodArray<zod.ZodObject<{
|
|
22
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
23
|
+
points: zod.ZodTuple<[zod.ZodNumber, zod.ZodNumber], null>;
|
|
24
|
+
}, "strip", zod.ZodTypeAny, {
|
|
25
|
+
_id: string;
|
|
26
|
+
points: [number, number];
|
|
27
|
+
}, {
|
|
28
|
+
points: [number, number];
|
|
29
|
+
_id?: string | undefined;
|
|
30
|
+
}>, "many">;
|
|
12
31
|
}, "strict", zod.ZodTypeAny, {
|
|
13
|
-
|
|
14
|
-
|
|
32
|
+
_id: string;
|
|
33
|
+
coords: {
|
|
34
|
+
_id: string;
|
|
35
|
+
points: [number, number];
|
|
36
|
+
}[];
|
|
15
37
|
}, {
|
|
16
|
-
|
|
17
|
-
|
|
38
|
+
coords: {
|
|
39
|
+
points: [number, number];
|
|
40
|
+
_id?: string | undefined;
|
|
41
|
+
}[];
|
|
42
|
+
_id?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const cameraZones: zod.ZodObject<{
|
|
45
|
+
name: zod.ZodString;
|
|
46
|
+
regions: zod.ZodArray<zod.ZodObject<{
|
|
47
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
48
|
+
coords: zod.ZodArray<zod.ZodObject<{
|
|
49
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
50
|
+
points: zod.ZodTuple<[zod.ZodNumber, zod.ZodNumber], null>;
|
|
51
|
+
}, "strip", zod.ZodTypeAny, {
|
|
52
|
+
_id: string;
|
|
53
|
+
points: [number, number];
|
|
54
|
+
}, {
|
|
55
|
+
points: [number, number];
|
|
56
|
+
_id?: string | undefined;
|
|
57
|
+
}>, "many">;
|
|
58
|
+
}, "strict", zod.ZodTypeAny, {
|
|
59
|
+
_id: string;
|
|
60
|
+
coords: {
|
|
61
|
+
_id: string;
|
|
62
|
+
points: [number, number];
|
|
63
|
+
}[];
|
|
64
|
+
}, {
|
|
65
|
+
coords: {
|
|
66
|
+
points: [number, number];
|
|
67
|
+
_id?: string | undefined;
|
|
68
|
+
}[];
|
|
69
|
+
_id?: string | undefined;
|
|
70
|
+
}>, "many">;
|
|
71
|
+
}, "strip", zod.ZodTypeAny, {
|
|
72
|
+
name: string;
|
|
73
|
+
regions: {
|
|
74
|
+
_id: string;
|
|
75
|
+
coords: {
|
|
76
|
+
_id: string;
|
|
77
|
+
points: [number, number];
|
|
78
|
+
}[];
|
|
79
|
+
}[];
|
|
80
|
+
}, {
|
|
81
|
+
name: string;
|
|
82
|
+
regions: {
|
|
83
|
+
coords: {
|
|
84
|
+
points: [number, number];
|
|
85
|
+
_id?: string | undefined;
|
|
86
|
+
}[];
|
|
87
|
+
_id?: string | undefined;
|
|
88
|
+
}[];
|
|
18
89
|
}>;
|
|
19
90
|
export declare const inputRoleSchema: zod.ZodUnion<[zod.ZodLiteral<"detect">, zod.ZodLiteral<"record">, zod.ZodLiteral<"stream">, zod.ZodLiteral<"snapshot">, zod.ZodLiteral<"none">]>;
|
|
20
91
|
export declare const inputSchema: zod.ZodObject<{
|
|
92
|
+
_id: zod.ZodEffects<zod.ZodDefault<zod.ZodString>, string, string | undefined>;
|
|
93
|
+
name: zod.ZodEffects<zod.ZodString, string, string>;
|
|
94
|
+
roles: zod.ZodEffects<zod.ZodArray<zod.ZodUnion<[zod.ZodLiteral<"detect">, zod.ZodLiteral<"record">, zod.ZodLiteral<"stream">, zod.ZodLiteral<"snapshot">, zod.ZodLiteral<"none">]>, "many">, ("detect" | "record" | "stream" | "snapshot" | "none")[], ("detect" | "record" | "stream" | "snapshot" | "none")[]>;
|
|
95
|
+
urls: zod.ZodArray<zod.ZodString, "many">;
|
|
96
|
+
}, "strict", zod.ZodTypeAny, {
|
|
97
|
+
_id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
roles: ("detect" | "record" | "stream" | "snapshot" | "none")[];
|
|
100
|
+
urls: string[];
|
|
101
|
+
}, {
|
|
102
|
+
name: string;
|
|
103
|
+
roles: ("detect" | "record" | "stream" | "snapshot" | "none")[];
|
|
104
|
+
urls: string[];
|
|
105
|
+
_id?: string | undefined;
|
|
106
|
+
}>;
|
|
107
|
+
export declare const patchInputSchema: zod.ZodObject<{
|
|
21
108
|
name: zod.ZodEffects<zod.ZodString, string, string>;
|
|
22
109
|
roles: zod.ZodEffects<zod.ZodArray<zod.ZodUnion<[zod.ZodLiteral<"detect">, zod.ZodLiteral<"record">, zod.ZodLiteral<"stream">, zod.ZodLiteral<"snapshot">, zod.ZodLiteral<"none">]>, "many">, ("detect" | "record" | "stream" | "snapshot" | "none")[], ("detect" | "record" | "stream" | "snapshot" | "none")[]>;
|
|
23
110
|
urls: zod.ZodArray<zod.ZodString, "many">;
|
|
@@ -76,10 +163,12 @@ export declare const createCameraSchema: zod.ZodObject<{
|
|
|
76
163
|
hasSiren: zod.ZodDefault<zod.ZodBoolean>;
|
|
77
164
|
model: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
|
|
78
165
|
sources: zod.ZodArray<zod.ZodObject<{
|
|
166
|
+
_id: zod.ZodEffects<zod.ZodDefault<zod.ZodString>, string, string | undefined>;
|
|
79
167
|
name: zod.ZodEffects<zod.ZodString, string, string>;
|
|
80
168
|
roles: zod.ZodEffects<zod.ZodArray<zod.ZodUnion<[zod.ZodLiteral<"detect">, zod.ZodLiteral<"record">, zod.ZodLiteral<"stream">, zod.ZodLiteral<"snapshot">, zod.ZodLiteral<"none">]>, "many">, ("detect" | "record" | "stream" | "snapshot" | "none")[], ("detect" | "record" | "stream" | "snapshot" | "none")[]>;
|
|
81
169
|
urls: zod.ZodArray<zod.ZodString, "many">;
|
|
82
170
|
}, "strict", zod.ZodTypeAny, {
|
|
171
|
+
_id: string;
|
|
83
172
|
name: string;
|
|
84
173
|
roles: ("detect" | "record" | "stream" | "snapshot" | "none")[];
|
|
85
174
|
urls: string[];
|
|
@@ -87,6 +176,7 @@ export declare const createCameraSchema: zod.ZodObject<{
|
|
|
87
176
|
name: string;
|
|
88
177
|
roles: ("detect" | "record" | "stream" | "snapshot" | "none")[];
|
|
89
178
|
urls: string[];
|
|
179
|
+
_id?: string | undefined;
|
|
90
180
|
}>, "many">;
|
|
91
181
|
extensions: zod.ZodDefault<zod.ZodObject<{
|
|
92
182
|
hub: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
@@ -127,6 +217,98 @@ export declare const createCameraSchema: zod.ZodObject<{
|
|
|
127
217
|
}, {
|
|
128
218
|
streamingModes: ("mse" | "webrtc" | "webrtc/tcp" | "mjpeg" | "hls" | "mp4")[];
|
|
129
219
|
}>>;
|
|
220
|
+
motionZones: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
|
|
221
|
+
name: zod.ZodString;
|
|
222
|
+
regions: zod.ZodArray<zod.ZodObject<{
|
|
223
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
224
|
+
coords: zod.ZodArray<zod.ZodObject<{
|
|
225
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
226
|
+
points: zod.ZodTuple<[zod.ZodNumber, zod.ZodNumber], null>;
|
|
227
|
+
}, "strip", zod.ZodTypeAny, {
|
|
228
|
+
_id: string;
|
|
229
|
+
points: [number, number];
|
|
230
|
+
}, {
|
|
231
|
+
points: [number, number];
|
|
232
|
+
_id?: string | undefined;
|
|
233
|
+
}>, "many">;
|
|
234
|
+
}, "strict", zod.ZodTypeAny, {
|
|
235
|
+
_id: string;
|
|
236
|
+
coords: {
|
|
237
|
+
_id: string;
|
|
238
|
+
points: [number, number];
|
|
239
|
+
}[];
|
|
240
|
+
}, {
|
|
241
|
+
coords: {
|
|
242
|
+
points: [number, number];
|
|
243
|
+
_id?: string | undefined;
|
|
244
|
+
}[];
|
|
245
|
+
_id?: string | undefined;
|
|
246
|
+
}>, "many">;
|
|
247
|
+
}, "strip", zod.ZodTypeAny, {
|
|
248
|
+
name: string;
|
|
249
|
+
regions: {
|
|
250
|
+
_id: string;
|
|
251
|
+
coords: {
|
|
252
|
+
_id: string;
|
|
253
|
+
points: [number, number];
|
|
254
|
+
}[];
|
|
255
|
+
}[];
|
|
256
|
+
}, {
|
|
257
|
+
name: string;
|
|
258
|
+
regions: {
|
|
259
|
+
coords: {
|
|
260
|
+
points: [number, number];
|
|
261
|
+
_id?: string | undefined;
|
|
262
|
+
}[];
|
|
263
|
+
_id?: string | undefined;
|
|
264
|
+
}[];
|
|
265
|
+
}>, "many">>;
|
|
266
|
+
objectZones: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
|
|
267
|
+
name: zod.ZodString;
|
|
268
|
+
regions: zod.ZodArray<zod.ZodObject<{
|
|
269
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
270
|
+
coords: zod.ZodArray<zod.ZodObject<{
|
|
271
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
272
|
+
points: zod.ZodTuple<[zod.ZodNumber, zod.ZodNumber], null>;
|
|
273
|
+
}, "strip", zod.ZodTypeAny, {
|
|
274
|
+
_id: string;
|
|
275
|
+
points: [number, number];
|
|
276
|
+
}, {
|
|
277
|
+
points: [number, number];
|
|
278
|
+
_id?: string | undefined;
|
|
279
|
+
}>, "many">;
|
|
280
|
+
}, "strict", zod.ZodTypeAny, {
|
|
281
|
+
_id: string;
|
|
282
|
+
coords: {
|
|
283
|
+
_id: string;
|
|
284
|
+
points: [number, number];
|
|
285
|
+
}[];
|
|
286
|
+
}, {
|
|
287
|
+
coords: {
|
|
288
|
+
points: [number, number];
|
|
289
|
+
_id?: string | undefined;
|
|
290
|
+
}[];
|
|
291
|
+
_id?: string | undefined;
|
|
292
|
+
}>, "many">;
|
|
293
|
+
}, "strip", zod.ZodTypeAny, {
|
|
294
|
+
name: string;
|
|
295
|
+
regions: {
|
|
296
|
+
_id: string;
|
|
297
|
+
coords: {
|
|
298
|
+
_id: string;
|
|
299
|
+
points: [number, number];
|
|
300
|
+
}[];
|
|
301
|
+
}[];
|
|
302
|
+
}, {
|
|
303
|
+
name: string;
|
|
304
|
+
regions: {
|
|
305
|
+
coords: {
|
|
306
|
+
points: [number, number];
|
|
307
|
+
_id?: string | undefined;
|
|
308
|
+
}[];
|
|
309
|
+
_id?: string | undefined;
|
|
310
|
+
}[];
|
|
311
|
+
}>, "many">>;
|
|
130
312
|
}, "strict", zod.ZodTypeAny, {
|
|
131
313
|
_id: string;
|
|
132
314
|
name: string;
|
|
@@ -138,6 +320,7 @@ export declare const createCameraSchema: zod.ZodObject<{
|
|
|
138
320
|
hasSiren: boolean;
|
|
139
321
|
model: string;
|
|
140
322
|
sources: {
|
|
323
|
+
_id: string;
|
|
141
324
|
name: string;
|
|
142
325
|
roles: ("detect" | "record" | "stream" | "snapshot" | "none")[];
|
|
143
326
|
urls: string[];
|
|
@@ -157,6 +340,26 @@ export declare const createCameraSchema: zod.ZodObject<{
|
|
|
157
340
|
interface: {
|
|
158
341
|
streamingModes: ("mse" | "webrtc" | "webrtc/tcp" | "mjpeg" | "hls" | "mp4")[];
|
|
159
342
|
};
|
|
343
|
+
motionZones: {
|
|
344
|
+
name: string;
|
|
345
|
+
regions: {
|
|
346
|
+
_id: string;
|
|
347
|
+
coords: {
|
|
348
|
+
_id: string;
|
|
349
|
+
points: [number, number];
|
|
350
|
+
}[];
|
|
351
|
+
}[];
|
|
352
|
+
}[];
|
|
353
|
+
objectZones: {
|
|
354
|
+
name: string;
|
|
355
|
+
regions: {
|
|
356
|
+
_id: string;
|
|
357
|
+
coords: {
|
|
358
|
+
_id: string;
|
|
359
|
+
points: [number, number];
|
|
360
|
+
}[];
|
|
361
|
+
}[];
|
|
362
|
+
}[];
|
|
160
363
|
nativeId?: string | undefined;
|
|
161
364
|
}, {
|
|
162
365
|
name: string;
|
|
@@ -164,6 +367,7 @@ export declare const createCameraSchema: zod.ZodObject<{
|
|
|
164
367
|
name: string;
|
|
165
368
|
roles: ("detect" | "record" | "stream" | "snapshot" | "none")[];
|
|
166
369
|
urls: string[];
|
|
370
|
+
_id?: string | undefined;
|
|
167
371
|
}[];
|
|
168
372
|
_id?: string | undefined;
|
|
169
373
|
nativeId?: string | undefined;
|
|
@@ -189,6 +393,26 @@ export declare const createCameraSchema: zod.ZodObject<{
|
|
|
189
393
|
interface?: {
|
|
190
394
|
streamingModes: ("mse" | "webrtc" | "webrtc/tcp" | "mjpeg" | "hls" | "mp4")[];
|
|
191
395
|
} | undefined;
|
|
396
|
+
motionZones?: {
|
|
397
|
+
name: string;
|
|
398
|
+
regions: {
|
|
399
|
+
coords: {
|
|
400
|
+
points: [number, number];
|
|
401
|
+
_id?: string | undefined;
|
|
402
|
+
}[];
|
|
403
|
+
_id?: string | undefined;
|
|
404
|
+
}[];
|
|
405
|
+
}[] | undefined;
|
|
406
|
+
objectZones?: {
|
|
407
|
+
name: string;
|
|
408
|
+
regions: {
|
|
409
|
+
coords: {
|
|
410
|
+
points: [number, number];
|
|
411
|
+
_id?: string | undefined;
|
|
412
|
+
}[];
|
|
413
|
+
_id?: string | undefined;
|
|
414
|
+
}[];
|
|
415
|
+
}[] | undefined;
|
|
192
416
|
}>;
|
|
193
417
|
export declare const patchCameraSchema: zod.ZodObject<{
|
|
194
418
|
disabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
@@ -247,6 +471,98 @@ export declare const patchCameraSchema: zod.ZodObject<{
|
|
|
247
471
|
}, {
|
|
248
472
|
enabled?: boolean | undefined;
|
|
249
473
|
}>>;
|
|
474
|
+
motionZones: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
475
|
+
name: zod.ZodString;
|
|
476
|
+
regions: zod.ZodArray<zod.ZodObject<{
|
|
477
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
478
|
+
coords: zod.ZodArray<zod.ZodObject<{
|
|
479
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
480
|
+
points: zod.ZodTuple<[zod.ZodNumber, zod.ZodNumber], null>;
|
|
481
|
+
}, "strip", zod.ZodTypeAny, {
|
|
482
|
+
_id: string;
|
|
483
|
+
points: [number, number];
|
|
484
|
+
}, {
|
|
485
|
+
points: [number, number];
|
|
486
|
+
_id?: string | undefined;
|
|
487
|
+
}>, "many">;
|
|
488
|
+
}, "strict", zod.ZodTypeAny, {
|
|
489
|
+
_id: string;
|
|
490
|
+
coords: {
|
|
491
|
+
_id: string;
|
|
492
|
+
points: [number, number];
|
|
493
|
+
}[];
|
|
494
|
+
}, {
|
|
495
|
+
coords: {
|
|
496
|
+
points: [number, number];
|
|
497
|
+
_id?: string | undefined;
|
|
498
|
+
}[];
|
|
499
|
+
_id?: string | undefined;
|
|
500
|
+
}>, "many">;
|
|
501
|
+
}, "strip", zod.ZodTypeAny, {
|
|
502
|
+
name: string;
|
|
503
|
+
regions: {
|
|
504
|
+
_id: string;
|
|
505
|
+
coords: {
|
|
506
|
+
_id: string;
|
|
507
|
+
points: [number, number];
|
|
508
|
+
}[];
|
|
509
|
+
}[];
|
|
510
|
+
}, {
|
|
511
|
+
name: string;
|
|
512
|
+
regions: {
|
|
513
|
+
coords: {
|
|
514
|
+
points: [number, number];
|
|
515
|
+
_id?: string | undefined;
|
|
516
|
+
}[];
|
|
517
|
+
_id?: string | undefined;
|
|
518
|
+
}[];
|
|
519
|
+
}>, "many">>;
|
|
520
|
+
objectZones: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
521
|
+
name: zod.ZodString;
|
|
522
|
+
regions: zod.ZodArray<zod.ZodObject<{
|
|
523
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
524
|
+
coords: zod.ZodArray<zod.ZodObject<{
|
|
525
|
+
_id: zod.ZodDefault<zod.ZodString>;
|
|
526
|
+
points: zod.ZodTuple<[zod.ZodNumber, zod.ZodNumber], null>;
|
|
527
|
+
}, "strip", zod.ZodTypeAny, {
|
|
528
|
+
_id: string;
|
|
529
|
+
points: [number, number];
|
|
530
|
+
}, {
|
|
531
|
+
points: [number, number];
|
|
532
|
+
_id?: string | undefined;
|
|
533
|
+
}>, "many">;
|
|
534
|
+
}, "strict", zod.ZodTypeAny, {
|
|
535
|
+
_id: string;
|
|
536
|
+
coords: {
|
|
537
|
+
_id: string;
|
|
538
|
+
points: [number, number];
|
|
539
|
+
}[];
|
|
540
|
+
}, {
|
|
541
|
+
coords: {
|
|
542
|
+
points: [number, number];
|
|
543
|
+
_id?: string | undefined;
|
|
544
|
+
}[];
|
|
545
|
+
_id?: string | undefined;
|
|
546
|
+
}>, "many">;
|
|
547
|
+
}, "strip", zod.ZodTypeAny, {
|
|
548
|
+
name: string;
|
|
549
|
+
regions: {
|
|
550
|
+
_id: string;
|
|
551
|
+
coords: {
|
|
552
|
+
_id: string;
|
|
553
|
+
points: [number, number];
|
|
554
|
+
}[];
|
|
555
|
+
}[];
|
|
556
|
+
}, {
|
|
557
|
+
name: string;
|
|
558
|
+
regions: {
|
|
559
|
+
coords: {
|
|
560
|
+
points: [number, number];
|
|
561
|
+
_id?: string | undefined;
|
|
562
|
+
}[];
|
|
563
|
+
_id?: string | undefined;
|
|
564
|
+
}[];
|
|
565
|
+
}>, "many">>;
|
|
250
566
|
}, "strict", zod.ZodTypeAny, {
|
|
251
567
|
disabled?: boolean | undefined;
|
|
252
568
|
model?: string | undefined;
|
|
@@ -272,6 +588,26 @@ export declare const patchCameraSchema: zod.ZodObject<{
|
|
|
272
588
|
recording?: {
|
|
273
589
|
enabled?: boolean | undefined;
|
|
274
590
|
} | undefined;
|
|
591
|
+
motionZones?: {
|
|
592
|
+
name: string;
|
|
593
|
+
regions: {
|
|
594
|
+
_id: string;
|
|
595
|
+
coords: {
|
|
596
|
+
_id: string;
|
|
597
|
+
points: [number, number];
|
|
598
|
+
}[];
|
|
599
|
+
}[];
|
|
600
|
+
}[] | undefined;
|
|
601
|
+
objectZones?: {
|
|
602
|
+
name: string;
|
|
603
|
+
regions: {
|
|
604
|
+
_id: string;
|
|
605
|
+
coords: {
|
|
606
|
+
_id: string;
|
|
607
|
+
points: [number, number];
|
|
608
|
+
}[];
|
|
609
|
+
}[];
|
|
610
|
+
}[] | undefined;
|
|
275
611
|
}, {
|
|
276
612
|
disabled?: boolean | undefined;
|
|
277
613
|
model?: string | undefined;
|
|
@@ -297,6 +633,26 @@ export declare const patchCameraSchema: zod.ZodObject<{
|
|
|
297
633
|
recording?: {
|
|
298
634
|
enabled?: boolean | undefined;
|
|
299
635
|
} | undefined;
|
|
636
|
+
motionZones?: {
|
|
637
|
+
name: string;
|
|
638
|
+
regions: {
|
|
639
|
+
coords: {
|
|
640
|
+
points: [number, number];
|
|
641
|
+
_id?: string | undefined;
|
|
642
|
+
}[];
|
|
643
|
+
_id?: string | undefined;
|
|
644
|
+
}[];
|
|
645
|
+
}[] | undefined;
|
|
646
|
+
objectZones?: {
|
|
647
|
+
name: string;
|
|
648
|
+
regions: {
|
|
649
|
+
coords: {
|
|
650
|
+
points: [number, number];
|
|
651
|
+
_id?: string | undefined;
|
|
652
|
+
}[];
|
|
653
|
+
_id?: string | undefined;
|
|
654
|
+
}[];
|
|
655
|
+
}[] | undefined;
|
|
300
656
|
}>;
|
|
301
657
|
export declare const patchExtensionsSchema: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
|
|
302
658
|
export declare const previewCameraSchema: zod.ZodObject<{
|
|
@@ -119,6 +119,7 @@ export declare const interfaceSettingsSchema: zod.ZodObject<{
|
|
|
119
119
|
}>;
|
|
120
120
|
export declare const patchConfigSchema: zod.ZodObject<{
|
|
121
121
|
port: zod.ZodDefault<zod.ZodNumber>;
|
|
122
|
+
insecurePort: zod.ZodDefault<zod.ZodNumber>;
|
|
122
123
|
tempFile: zod.ZodOptional<zod.ZodString>;
|
|
123
124
|
ssl: zod.ZodObject<{
|
|
124
125
|
certFile: zod.ZodString;
|
|
@@ -166,6 +167,7 @@ export declare const patchConfigSchema: zod.ZodObject<{
|
|
|
166
167
|
disabledPlugins?: string[] | undefined;
|
|
167
168
|
};
|
|
168
169
|
port: number;
|
|
170
|
+
insecurePort: number;
|
|
169
171
|
ssl: {
|
|
170
172
|
certFile: string;
|
|
171
173
|
keyFile: string;
|
|
@@ -190,6 +192,7 @@ export declare const patchConfigSchema: zod.ZodObject<{
|
|
|
190
192
|
disableTimestamps?: boolean | undefined;
|
|
191
193
|
};
|
|
192
194
|
port?: number | undefined;
|
|
195
|
+
insecurePort?: number | undefined;
|
|
193
196
|
tempFile?: string | undefined;
|
|
194
197
|
plugins?: {
|
|
195
198
|
sudo?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DBCamera, Camera } from '../database/types';
|
|
2
1
|
import { type CameraExtension } from '../../plugins/types';
|
|
2
|
+
import type { DBCamera, Camera, CameraZone } from '../database/types';
|
|
3
3
|
type DeepPartial<T> = T extends object ? {
|
|
4
4
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
5
5
|
} : T;
|
|
@@ -8,19 +8,23 @@ export default class CamerasService {
|
|
|
8
8
|
private api;
|
|
9
9
|
private dbs;
|
|
10
10
|
private proxy;
|
|
11
|
+
private go2rtcApi;
|
|
11
12
|
private usersService;
|
|
12
13
|
private pluginsService;
|
|
13
14
|
constructor();
|
|
14
15
|
createCamera(cameraData: DBCamera): Promise<DBCamera>;
|
|
15
|
-
createCameraSource(cameraName: string, sourceName: string, address: string): Promise<void>;
|
|
16
|
-
resetCameraSource(cameraName: string, sourceName: string): Promise<void>;
|
|
17
16
|
createTransformedCamera(cameraData: DBCamera): Promise<Camera>;
|
|
17
|
+
createZone(cameraname: string, zoneData: CameraZone, zoneType: 'motion' | 'object'): Promise<DBCamera | undefined>;
|
|
18
|
+
patchZoneByName(cameraname: string, zonename: string, zoneData: CameraZone, zoneType: 'motion' | 'object'): Promise<DBCamera | undefined>;
|
|
19
|
+
removeZoneByName(cameraname: string, zonename: string, zoneType: 'motion' | 'object'): Promise<void>;
|
|
20
|
+
createCameraSource(cameraname: string, sourceName: string, address: string): Promise<void>;
|
|
21
|
+
resetCameraSource(cameraname: string, sourceName: string): Promise<void>;
|
|
18
22
|
list(): Promise<DBCamera[]>;
|
|
19
23
|
listTransformed(): Promise<Camera[]>;
|
|
20
24
|
listByPluginId(pluginId: string): Promise<DBCamera[]>;
|
|
21
25
|
listTransformedByPluginId(pluginId: string): Promise<Camera[]>;
|
|
22
26
|
listByExtension(pluginName: string): Promise<DBCamera[]>;
|
|
23
|
-
listTransformedByExtension(pluginName: string): Promise<Camera[]>;
|
|
27
|
+
listTransformedByExtension(pluginName: string, extensions: CameraExtension[]): Promise<Camera[]>;
|
|
24
28
|
findById(id: string): Promise<DBCamera | undefined>;
|
|
25
29
|
findTransformedById(id: string): Promise<Camera | undefined>;
|
|
26
30
|
findByName(cameraname: string): Promise<DBCamera | undefined>;
|
|
@@ -28,8 +32,8 @@ export default class CamerasService {
|
|
|
28
32
|
findByPluginAndName(cameraname: string, pluginId: string): Promise<DBCamera | undefined>;
|
|
29
33
|
findTransformedByPluginAndName(cameraname: string, pluginId: string): Promise<Camera | undefined>;
|
|
30
34
|
patchCameraByName(cameraname: string, cameraData: DeepPartial<DBCamera>): Promise<DBCamera | undefined>;
|
|
31
|
-
enableExtensionByName(cameraname: string, pluginName: string,
|
|
32
|
-
disableExtensionByName(cameraname: string, pluginName: string,
|
|
35
|
+
enableExtensionByName(cameraname: string, pluginName: string, extensionType: CameraExtension): Promise<DBCamera | undefined>;
|
|
36
|
+
disableExtensionByName(cameraname: string, pluginName: string, extensionType: CameraExtension): Promise<DBCamera | undefined>;
|
|
33
37
|
addExtensionByName(cameraname: string, pluginName: string): Promise<DBCamera | undefined>;
|
|
34
38
|
removeExtensionByName(cameraname: string, pluginName: string): Promise<DBCamera | undefined>;
|
|
35
39
|
removeExtension(pluginName: string): Promise<void>;
|
|
@@ -39,8 +43,14 @@ export default class CamerasService {
|
|
|
39
43
|
removeByPluginIdAndName(cameraname: string, pluginId: string): Promise<void>;
|
|
40
44
|
removeAll(): Promise<void>;
|
|
41
45
|
transformCamera(camera: DBCamera): Camera;
|
|
46
|
+
cameraSourcesChanged(oldCamera: DBCamera, newCamera: DBCamera): boolean;
|
|
42
47
|
private addCameraSources;
|
|
43
48
|
private removeCameraSources;
|
|
44
|
-
private
|
|
49
|
+
private arraysEqual;
|
|
50
|
+
private generateWsUrls;
|
|
51
|
+
private generateRTSPUrls;
|
|
52
|
+
private generateFFmpegUrls;
|
|
53
|
+
private generatePrebufferUrls;
|
|
54
|
+
private generateWWWUrls;
|
|
45
55
|
}
|
|
46
56
|
export {};
|
|
@@ -6,6 +6,8 @@ export default class PluginsService {
|
|
|
6
6
|
private dbs;
|
|
7
7
|
private pluginManager;
|
|
8
8
|
constructor();
|
|
9
|
+
listPlugins(): Plugin[];
|
|
10
|
+
listPluginProcesses(): PluginWorker[];
|
|
9
11
|
getPluginByName(pluginName: string): Plugin | undefined;
|
|
10
12
|
getPluginById(id: string): Plugin | undefined;
|
|
11
13
|
getPluginProcessByName(pluginName: string): PluginWorker | undefined;
|
|
@@ -9,7 +9,7 @@ import type { RestoreBackupInput } from '../schemas/backup.schema';
|
|
|
9
9
|
import type { PatchGo2RtcConfigInput } from '../schemas/go2rtc.schema';
|
|
10
10
|
import type { LoggingLevel } from '../../services/config/types';
|
|
11
11
|
import type { ApplicationResponse } from '../go2rtc/types';
|
|
12
|
-
import type { DBRoles, DBCamera, DBUser, DBCamviewLayout, CameraExtensions } from '../database/types';
|
|
12
|
+
import type { DBRoles, DBCamera, DBUser, DBCamviewLayout, CameraExtensions, CameraZone } from '../database/types';
|
|
13
13
|
import type { CameraExtension, PluginContract, PluginRootSchema } from '../../plugins/types';
|
|
14
14
|
export interface BusboyFileStream extends Readable {
|
|
15
15
|
truncated: boolean;
|
|
@@ -124,8 +124,9 @@ export interface CamerasResponse {
|
|
|
124
124
|
export interface PluginExtension {
|
|
125
125
|
pluginName: string;
|
|
126
126
|
displayName: string;
|
|
127
|
-
type: CameraExtension;
|
|
127
|
+
type: CameraExtension[];
|
|
128
128
|
builtIn?: boolean;
|
|
129
|
+
externPlugin?: boolean;
|
|
129
130
|
}
|
|
130
131
|
export interface PluginExtensionConfig extends PluginExtension {
|
|
131
132
|
rootSchema?: PluginRootSchema;
|
|
@@ -232,6 +233,11 @@ export type CamerasParamsRequest = {
|
|
|
232
233
|
cameraname: string;
|
|
233
234
|
};
|
|
234
235
|
};
|
|
236
|
+
export type CameraZonesParamsRequest = {
|
|
237
|
+
Params: {
|
|
238
|
+
zonename: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
235
241
|
export type CamerasExtensionsParamsRequest = {
|
|
236
242
|
Params: {
|
|
237
243
|
cameraname: string;
|
|
@@ -241,9 +247,17 @@ export type CamerasExtensionsParamsRequest = {
|
|
|
241
247
|
};
|
|
242
248
|
export type CamerasExtensionsRequest = {
|
|
243
249
|
Querystring: {
|
|
244
|
-
type
|
|
250
|
+
type: CameraExtension;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
export type CameraZonesTypeRequest = {
|
|
254
|
+
Querystring: {
|
|
255
|
+
type: 'motion' | 'object';
|
|
245
256
|
};
|
|
246
257
|
};
|
|
258
|
+
export type CameraZoneInsertPatchRequest = {
|
|
259
|
+
Body: CameraZone;
|
|
260
|
+
};
|
|
247
261
|
export type CamerasInsertRequest = {
|
|
248
262
|
Body: CreateCameraInput;
|
|
249
263
|
};
|
|
@@ -330,6 +344,11 @@ export type BackupCreateRequest = {
|
|
|
330
344
|
localStorage: Partial<UiLocalStorage>;
|
|
331
345
|
};
|
|
332
346
|
};
|
|
347
|
+
export type StreamsParamsNameRequest = {
|
|
348
|
+
Params: {
|
|
349
|
+
id: string;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
333
352
|
export interface BackupInfo {
|
|
334
353
|
backupDirectory: string;
|
|
335
354
|
backupFile: string;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { StreamingSession } from './streaming/streaming-session';
|
|
3
|
-
import type { Camera,
|
|
3
|
+
import type { Camera, CameraSource, CameraPrebufferInput, CameraPublicProperties, CameraZone } from '../api/database/types';
|
|
4
4
|
import type { ProxyServer } from '../proxy';
|
|
5
|
-
import type { CameraDevice, BaseLogger } from './types';
|
|
5
|
+
import type { CameraDevice, BaseLogger, CameraDelegate } from './types';
|
|
6
6
|
import type { IceServer } from '../services/config/types';
|
|
7
7
|
import type { StateValues, OnSetEvent, LightState, MotionState, AudioState, ObjectState, DoorbellState, SirenState, StreamingConnectionOptions, FfmpegOptions, PrebufferType } from './types';
|
|
8
8
|
export declare class CameraDeviceHub implements CameraDevice {
|
|
9
9
|
private proxy?;
|
|
10
10
|
private cameraSubject;
|
|
11
|
+
private prebufferSubject;
|
|
11
12
|
private lightState;
|
|
12
13
|
private motionState;
|
|
13
14
|
private audioState;
|
|
@@ -21,8 +22,10 @@ export declare class CameraDeviceHub implements CameraDevice {
|
|
|
21
22
|
onDoorbellPressed: Observable<DoorbellState>;
|
|
22
23
|
onSirenDetected: Observable<SirenState>;
|
|
23
24
|
logger: BaseLogger;
|
|
25
|
+
delegate?: CameraDelegate;
|
|
24
26
|
get id(): string;
|
|
25
27
|
get nativeId(): string | undefined;
|
|
28
|
+
get pluginId(): string;
|
|
26
29
|
get disabled(): boolean;
|
|
27
30
|
get name(): string;
|
|
28
31
|
get type(): string;
|
|
@@ -34,33 +37,41 @@ export declare class CameraDeviceHub implements CameraDevice {
|
|
|
34
37
|
get hasAudioDetector(): boolean;
|
|
35
38
|
get hasObjectDetector(): boolean;
|
|
36
39
|
get hasPtz(): boolean;
|
|
37
|
-
get
|
|
40
|
+
get motionZones(): CameraZone[];
|
|
41
|
+
get objectZones(): CameraZone[];
|
|
42
|
+
get sources(): CameraSource[];
|
|
38
43
|
constructor(camera: Camera, logger?: BaseLogger, proxy?: ProxyServer);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
getStreamSource(): CameraSource;
|
|
45
|
+
getSnapshotSource(): CameraSource;
|
|
46
|
+
getRecordingSource(): CameraSource;
|
|
47
|
+
getDetectionSource(): CameraSource;
|
|
48
|
+
configureDelegate(delegate: CameraDelegate): void;
|
|
49
|
+
snapshot(prebuffer?: boolean): Promise<ArrayBuffer>;
|
|
50
|
+
setPrebufferSource(sourceIdOrName: string, address: string, type: PrebufferType): Promise<void>;
|
|
51
|
+
removePrebufferSource(sourceIdOrName: string, type: 'recording' | 'stream'): Promise<void>;
|
|
42
52
|
removePrebufferSources(): Promise<void>;
|
|
43
53
|
getFfmpegPath(): Promise<string>;
|
|
44
54
|
getIceServers(): Promise<IceServer[]>;
|
|
45
|
-
getValue<T extends keyof StateValues>(stateName: T): StateValues[T];
|
|
46
55
|
createSession(sourceName: string, options?: StreamingConnectionOptions): Promise<StreamingSession>;
|
|
47
56
|
streamVideo(sourceName: string, options: FfmpegOptions): Promise<StreamingSession>;
|
|
48
57
|
recordToFile(sourceName: string, outputPath: string, duration?: number): Promise<void>;
|
|
58
|
+
getValue<T extends keyof StateValues>(stateName: T): StateValues[T];
|
|
49
59
|
updateState<T extends keyof StateValues>(stateName: T, eventData: OnSetEvent<T>): Promise<void>;
|
|
50
60
|
onStateChange<T extends keyof StateValues>(stateName: T): Observable<{
|
|
51
61
|
newState: StateValues[T];
|
|
52
62
|
oldState: StateValues[T];
|
|
53
63
|
}>;
|
|
54
64
|
onPropertyChange<T extends keyof CameraPublicProperties>(property: T): Observable<{
|
|
55
|
-
|
|
56
|
-
|
|
65
|
+
oldData: Camera[T];
|
|
66
|
+
newData: Camera[T];
|
|
57
67
|
}>;
|
|
58
|
-
updateCamera(
|
|
59
|
-
|
|
68
|
+
updateCamera(updatedCamera: Camera): void;
|
|
69
|
+
updatePrebufferSources(sources: CameraPrebufferInput[]): void;
|
|
60
70
|
removeCamera(): void;
|
|
61
71
|
removeAllListeners(): void;
|
|
62
72
|
private createStateObservable;
|
|
63
73
|
private subscribeToCameraChanges;
|
|
74
|
+
private subscribeToSourceChanges;
|
|
64
75
|
private subscribeToStateChanges;
|
|
65
76
|
private triggerProxyEvent;
|
|
66
77
|
}
|