@awarevue/api-types 2.0.138 → 2.0.139
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/api/agent-protocol/protocol.d.ts +1 -0
- package/dist/api/commands/all.d.ts +1 -0
- package/dist/api/commands/nvr-recorder.d.ts +2 -0
- package/dist/api/commands/nvr-recorder.js +2 -0
- package/dist/api/rest/device.d.ts +7 -0
- package/dist/objects/device/any-device.d.ts +66 -0
- package/dist/objects/device/any-device.js +20 -1
- package/dist/objects/device/camera.d.ts +13 -0
- package/dist/objects/device/camera.js +15 -1
- package/dist/objects/device/device-import.d.ts +4 -0
- package/dist/objects/device/device-relation.d.ts +17 -0
- package/dist/objects/device/device-relation.js +23 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -798,6 +798,7 @@ export declare const commandSchemas: {
|
|
|
798
798
|
rtspUrl: import("zod").ZodString;
|
|
799
799
|
retentionHours: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
800
800
|
prebufferSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
801
|
+
isRecording: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
801
802
|
}, import("zod/v4/core").$strip>;
|
|
802
803
|
}, import("zod/v4/core").$strip>;
|
|
803
804
|
readonly 'nvr-recorder.unmount-stream': import("zod").ZodObject<{
|
|
@@ -122,6 +122,7 @@ export declare const sMountStreamCommand: z.ZodObject<{
|
|
|
122
122
|
rtspUrl: z.ZodString;
|
|
123
123
|
retentionHours: z.ZodOptional<z.ZodNumber>;
|
|
124
124
|
prebufferSeconds: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
isRecording: z.ZodOptional<z.ZodBoolean>;
|
|
125
126
|
}, z.core.$strip>;
|
|
126
127
|
}, z.core.$strip>;
|
|
127
128
|
export type MountStreamCommand = z.infer<typeof sMountStreamCommand>;
|
|
@@ -863,6 +864,7 @@ export declare const nvrRecorderCommandSchemas: {
|
|
|
863
864
|
rtspUrl: z.ZodString;
|
|
864
865
|
retentionHours: z.ZodOptional<z.ZodNumber>;
|
|
865
866
|
prebufferSeconds: z.ZodOptional<z.ZodNumber>;
|
|
867
|
+
isRecording: z.ZodOptional<z.ZodBoolean>;
|
|
866
868
|
}, z.core.$strip>;
|
|
867
869
|
}, z.core.$strip>;
|
|
868
870
|
readonly 'nvr-recorder.unmount-stream': z.ZodObject<{
|
|
@@ -12,6 +12,8 @@ exports.sMountStreamCommand = zod_1.z.object({
|
|
|
12
12
|
rtspUrl: zod_1.z.string().nonempty(),
|
|
13
13
|
retentionHours: zod_1.z.number().int().positive().optional(),
|
|
14
14
|
prebufferSeconds: zod_1.z.number().int().nonnegative().optional(),
|
|
15
|
+
/** Whether the stream should be recording once mounted. Absent means true. */
|
|
16
|
+
isRecording: zod_1.z.boolean().optional(),
|
|
15
17
|
}),
|
|
16
18
|
});
|
|
17
19
|
exports.sUnmountStreamCommand = zod_1.z.object({
|
|
@@ -31,6 +31,7 @@ export declare const sAddDeviceRequest: z.ZodObject<{
|
|
|
31
31
|
isReadBy: "isReadBy";
|
|
32
32
|
isIngestedBy: "isIngestedBy";
|
|
33
33
|
ingests: "ingests";
|
|
34
|
+
is: "is";
|
|
34
35
|
}>;
|
|
35
36
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
36
37
|
type: z.ZodEnum<{
|
|
@@ -91,6 +92,7 @@ export declare const sUpdateDeviceRequest: z.ZodObject<{
|
|
|
91
92
|
isReadBy: "isReadBy";
|
|
92
93
|
isIngestedBy: "isIngestedBy";
|
|
93
94
|
ingests: "ingests";
|
|
95
|
+
is: "is";
|
|
94
96
|
}>;
|
|
95
97
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
96
98
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -132,6 +134,7 @@ export declare const sApplyDeviceChangesRequest: z.ZodObject<{
|
|
|
132
134
|
isReadBy: "isReadBy";
|
|
133
135
|
isIngestedBy: "isIngestedBy";
|
|
134
136
|
ingests: "ingests";
|
|
137
|
+
is: "is";
|
|
135
138
|
}>;
|
|
136
139
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
137
140
|
type: z.ZodEnum<{
|
|
@@ -192,6 +195,7 @@ export declare const sApplyDeviceChangesRequest: z.ZodObject<{
|
|
|
192
195
|
isReadBy: "isReadBy";
|
|
193
196
|
isIngestedBy: "isIngestedBy";
|
|
194
197
|
ingests: "ingests";
|
|
198
|
+
is: "is";
|
|
195
199
|
}>;
|
|
196
200
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
197
201
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -223,6 +227,7 @@ export declare const sApplyDeviceChangesRequest: z.ZodObject<{
|
|
|
223
227
|
isReadBy: "isReadBy";
|
|
224
228
|
isIngestedBy: "isIngestedBy";
|
|
225
229
|
ingests: "ingests";
|
|
230
|
+
is: "is";
|
|
226
231
|
}>;
|
|
227
232
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
228
233
|
action: z.ZodEnum<{
|
|
@@ -291,6 +296,7 @@ export declare const sSetUnsetRelationRequest: z.ZodObject<{
|
|
|
291
296
|
isReadBy: "isReadBy";
|
|
292
297
|
isIngestedBy: "isIngestedBy";
|
|
293
298
|
ingests: "ingests";
|
|
299
|
+
is: "is";
|
|
294
300
|
}>;
|
|
295
301
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
296
302
|
export type AddDeviceRequest = z.infer<typeof sAddDeviceRequest>;
|
|
@@ -448,6 +454,7 @@ export declare const sPendingDeviceWrite: z.ZodObject<{
|
|
|
448
454
|
isReadBy: "isReadBy";
|
|
449
455
|
isIngestedBy: "isIngestedBy";
|
|
450
456
|
ingests: "ingests";
|
|
457
|
+
is: "is";
|
|
451
458
|
}>;
|
|
452
459
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
453
460
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -215,6 +215,7 @@ export declare const sDeviceMgmtInfo: z.ZodObject<{
|
|
|
215
215
|
isReadBy: "isReadBy";
|
|
216
216
|
isIngestedBy: "isIngestedBy";
|
|
217
217
|
ingests: "ingests";
|
|
218
|
+
is: "is";
|
|
218
219
|
}>;
|
|
219
220
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
220
221
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -368,6 +369,7 @@ export declare const sDeviceDto: z.ZodIntersection<z.ZodIntersection<z.ZodDiscri
|
|
|
368
369
|
isReadBy: "isReadBy";
|
|
369
370
|
isIngestedBy: "isIngestedBy";
|
|
370
371
|
ingests: "ingests";
|
|
372
|
+
is: "is";
|
|
371
373
|
}>;
|
|
372
374
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
373
375
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -455,6 +457,7 @@ export declare const sCameraDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject
|
|
|
455
457
|
isReadBy: "isReadBy";
|
|
456
458
|
isIngestedBy: "isIngestedBy";
|
|
457
459
|
ingests: "ingests";
|
|
460
|
+
is: "is";
|
|
458
461
|
}>;
|
|
459
462
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
460
463
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -512,6 +515,7 @@ export declare const sDoorDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
|
512
515
|
isReadBy: "isReadBy";
|
|
513
516
|
isIngestedBy: "isIngestedBy";
|
|
514
517
|
ingests: "ingests";
|
|
518
|
+
is: "is";
|
|
515
519
|
}>;
|
|
516
520
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
517
521
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -572,6 +576,7 @@ export declare const sReaderDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject
|
|
|
572
576
|
isReadBy: "isReadBy";
|
|
573
577
|
isIngestedBy: "isIngestedBy";
|
|
574
578
|
ingests: "ingests";
|
|
579
|
+
is: "is";
|
|
575
580
|
}>;
|
|
576
581
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
577
582
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -627,6 +632,7 @@ export declare const sIoBoardDto: z.ZodIntersection<z.ZodIntersection<z.ZodObjec
|
|
|
627
632
|
isReadBy: "isReadBy";
|
|
628
633
|
isIngestedBy: "isIngestedBy";
|
|
629
634
|
ingests: "ingests";
|
|
635
|
+
is: "is";
|
|
630
636
|
}>;
|
|
631
637
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
632
638
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -680,6 +686,7 @@ export declare const sCameraLiftDto: z.ZodIntersection<z.ZodIntersection<z.ZodOb
|
|
|
680
686
|
isReadBy: "isReadBy";
|
|
681
687
|
isIngestedBy: "isIngestedBy";
|
|
682
688
|
ingests: "ingests";
|
|
689
|
+
is: "is";
|
|
683
690
|
}>;
|
|
684
691
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
685
692
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -733,6 +740,7 @@ export declare const sMotionSensorDto: z.ZodIntersection<z.ZodIntersection<z.Zod
|
|
|
733
740
|
isReadBy: "isReadBy";
|
|
734
741
|
isIngestedBy: "isIngestedBy";
|
|
735
742
|
ingests: "ingests";
|
|
743
|
+
is: "is";
|
|
736
744
|
}>;
|
|
737
745
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
738
746
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -786,6 +794,7 @@ export declare const sGenericSensorDto: z.ZodIntersection<z.ZodIntersection<z.Zo
|
|
|
786
794
|
isReadBy: "isReadBy";
|
|
787
795
|
isIngestedBy: "isIngestedBy";
|
|
788
796
|
ingests: "ingests";
|
|
797
|
+
is: "is";
|
|
789
798
|
}>;
|
|
790
799
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
791
800
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -839,6 +848,7 @@ export declare const sPanicButtonDto: z.ZodIntersection<z.ZodIntersection<z.ZodO
|
|
|
839
848
|
isReadBy: "isReadBy";
|
|
840
849
|
isIngestedBy: "isIngestedBy";
|
|
841
850
|
ingests: "ingests";
|
|
851
|
+
is: "is";
|
|
842
852
|
}>;
|
|
843
853
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
844
854
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -897,6 +907,7 @@ export declare const sIntercomTerminalDto: z.ZodIntersection<z.ZodIntersection<z
|
|
|
897
907
|
isReadBy: "isReadBy";
|
|
898
908
|
isIngestedBy: "isIngestedBy";
|
|
899
909
|
ingests: "ingests";
|
|
910
|
+
is: "is";
|
|
900
911
|
}>;
|
|
901
912
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
902
913
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -951,6 +962,7 @@ export declare const sPbxDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
|
951
962
|
isReadBy: "isReadBy";
|
|
952
963
|
isIngestedBy: "isIngestedBy";
|
|
953
964
|
ingests: "ingests";
|
|
965
|
+
is: "is";
|
|
954
966
|
}>;
|
|
955
967
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
956
968
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1004,6 +1016,7 @@ export declare const sDeviceGatewayDto: z.ZodIntersection<z.ZodIntersection<z.Zo
|
|
|
1004
1016
|
isReadBy: "isReadBy";
|
|
1005
1017
|
isIngestedBy: "isIngestedBy";
|
|
1006
1018
|
ingests: "ingests";
|
|
1019
|
+
is: "is";
|
|
1007
1020
|
}>;
|
|
1008
1021
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1009
1022
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1057,6 +1070,7 @@ export declare const sPresenceTrackerDto: z.ZodIntersection<z.ZodIntersection<z.
|
|
|
1057
1070
|
isReadBy: "isReadBy";
|
|
1058
1071
|
isIngestedBy: "isIngestedBy";
|
|
1059
1072
|
ingests: "ingests";
|
|
1073
|
+
is: "is";
|
|
1060
1074
|
}>;
|
|
1061
1075
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1062
1076
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1110,6 +1124,7 @@ export declare const sServerDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject
|
|
|
1110
1124
|
isReadBy: "isReadBy";
|
|
1111
1125
|
isIngestedBy: "isIngestedBy";
|
|
1112
1126
|
ingests: "ingests";
|
|
1127
|
+
is: "is";
|
|
1113
1128
|
}>;
|
|
1114
1129
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1115
1130
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1163,6 +1178,7 @@ export declare const sAlarmDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject<
|
|
|
1163
1178
|
isReadBy: "isReadBy";
|
|
1164
1179
|
isIngestedBy: "isIngestedBy";
|
|
1165
1180
|
ingests: "ingests";
|
|
1181
|
+
is: "is";
|
|
1166
1182
|
}>;
|
|
1167
1183
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1168
1184
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1216,6 +1232,7 @@ export declare const sIntercomOperatorDto: z.ZodIntersection<z.ZodIntersection<z
|
|
|
1216
1232
|
isReadBy: "isReadBy";
|
|
1217
1233
|
isIngestedBy: "isIngestedBy";
|
|
1218
1234
|
ingests: "ingests";
|
|
1235
|
+
is: "is";
|
|
1219
1236
|
}>;
|
|
1220
1237
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1221
1238
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1269,6 +1286,7 @@ export declare const sDisplayDto: z.ZodIntersection<z.ZodIntersection<z.ZodObjec
|
|
|
1269
1286
|
isReadBy: "isReadBy";
|
|
1270
1287
|
isIngestedBy: "isIngestedBy";
|
|
1271
1288
|
ingests: "ingests";
|
|
1289
|
+
is: "is";
|
|
1272
1290
|
}>;
|
|
1273
1291
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1274
1292
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1322,6 +1340,7 @@ export declare const sRecorderDto: z.ZodIntersection<z.ZodIntersection<z.ZodObje
|
|
|
1322
1340
|
isReadBy: "isReadBy";
|
|
1323
1341
|
isIngestedBy: "isIngestedBy";
|
|
1324
1342
|
ingests: "ingests";
|
|
1343
|
+
is: "is";
|
|
1325
1344
|
}>;
|
|
1326
1345
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1327
1346
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1375,6 +1394,7 @@ export declare const sNvrExporterDto: z.ZodIntersection<z.ZodIntersection<z.ZodO
|
|
|
1375
1394
|
isReadBy: "isReadBy";
|
|
1376
1395
|
isIngestedBy: "isIngestedBy";
|
|
1377
1396
|
ingests: "ingests";
|
|
1397
|
+
is: "is";
|
|
1378
1398
|
}>;
|
|
1379
1399
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1380
1400
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1434,6 +1454,7 @@ export declare const sNvrAnalyticsServerDto: z.ZodIntersection<z.ZodIntersection
|
|
|
1434
1454
|
isReadBy: "isReadBy";
|
|
1435
1455
|
isIngestedBy: "isIngestedBy";
|
|
1436
1456
|
ingests: "ingests";
|
|
1457
|
+
is: "is";
|
|
1437
1458
|
}>;
|
|
1438
1459
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1439
1460
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1487,6 +1508,7 @@ export declare const sSystemDeviceDto: z.ZodIntersection<z.ZodIntersection<z.Zod
|
|
|
1487
1508
|
isReadBy: "isReadBy";
|
|
1488
1509
|
isIngestedBy: "isIngestedBy";
|
|
1489
1510
|
ingests: "ingests";
|
|
1511
|
+
is: "is";
|
|
1490
1512
|
}>;
|
|
1491
1513
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1492
1514
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1540,6 +1562,7 @@ export declare const sPositionTrackerDto: z.ZodIntersection<z.ZodIntersection<z.
|
|
|
1540
1562
|
isReadBy: "isReadBy";
|
|
1541
1563
|
isIngestedBy: "isIngestedBy";
|
|
1542
1564
|
ingests: "ingests";
|
|
1565
|
+
is: "is";
|
|
1543
1566
|
}>;
|
|
1544
1567
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1545
1568
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1661,6 +1684,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
1661
1684
|
isReadBy: "isReadBy";
|
|
1662
1685
|
isIngestedBy: "isIngestedBy";
|
|
1663
1686
|
ingests: "ingests";
|
|
1687
|
+
is: "is";
|
|
1664
1688
|
}>;
|
|
1665
1689
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1666
1690
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1748,6 +1772,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
1748
1772
|
isReadBy: "isReadBy";
|
|
1749
1773
|
isIngestedBy: "isIngestedBy";
|
|
1750
1774
|
ingests: "ingests";
|
|
1775
|
+
is: "is";
|
|
1751
1776
|
}>;
|
|
1752
1777
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1753
1778
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1805,6 +1830,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
1805
1830
|
isReadBy: "isReadBy";
|
|
1806
1831
|
isIngestedBy: "isIngestedBy";
|
|
1807
1832
|
ingests: "ingests";
|
|
1833
|
+
is: "is";
|
|
1808
1834
|
}>;
|
|
1809
1835
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1810
1836
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1865,6 +1891,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
1865
1891
|
isReadBy: "isReadBy";
|
|
1866
1892
|
isIngestedBy: "isIngestedBy";
|
|
1867
1893
|
ingests: "ingests";
|
|
1894
|
+
is: "is";
|
|
1868
1895
|
}>;
|
|
1869
1896
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1870
1897
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1920,6 +1947,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
1920
1947
|
isReadBy: "isReadBy";
|
|
1921
1948
|
isIngestedBy: "isIngestedBy";
|
|
1922
1949
|
ingests: "ingests";
|
|
1950
|
+
is: "is";
|
|
1923
1951
|
}>;
|
|
1924
1952
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1925
1953
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -1973,6 +2001,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
1973
2001
|
isReadBy: "isReadBy";
|
|
1974
2002
|
isIngestedBy: "isIngestedBy";
|
|
1975
2003
|
ingests: "ingests";
|
|
2004
|
+
is: "is";
|
|
1976
2005
|
}>;
|
|
1977
2006
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
1978
2007
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2026,6 +2055,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2026
2055
|
isReadBy: "isReadBy";
|
|
2027
2056
|
isIngestedBy: "isIngestedBy";
|
|
2028
2057
|
ingests: "ingests";
|
|
2058
|
+
is: "is";
|
|
2029
2059
|
}>;
|
|
2030
2060
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2031
2061
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2079,6 +2109,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2079
2109
|
isReadBy: "isReadBy";
|
|
2080
2110
|
isIngestedBy: "isIngestedBy";
|
|
2081
2111
|
ingests: "ingests";
|
|
2112
|
+
is: "is";
|
|
2082
2113
|
}>;
|
|
2083
2114
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2084
2115
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2132,6 +2163,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2132
2163
|
isReadBy: "isReadBy";
|
|
2133
2164
|
isIngestedBy: "isIngestedBy";
|
|
2134
2165
|
ingests: "ingests";
|
|
2166
|
+
is: "is";
|
|
2135
2167
|
}>;
|
|
2136
2168
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2137
2169
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2185,6 +2217,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2185
2217
|
isReadBy: "isReadBy";
|
|
2186
2218
|
isIngestedBy: "isIngestedBy";
|
|
2187
2219
|
ingests: "ingests";
|
|
2220
|
+
is: "is";
|
|
2188
2221
|
}>;
|
|
2189
2222
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2190
2223
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2243,6 +2276,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2243
2276
|
isReadBy: "isReadBy";
|
|
2244
2277
|
isIngestedBy: "isIngestedBy";
|
|
2245
2278
|
ingests: "ingests";
|
|
2279
|
+
is: "is";
|
|
2246
2280
|
}>;
|
|
2247
2281
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2248
2282
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2297,6 +2331,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2297
2331
|
isReadBy: "isReadBy";
|
|
2298
2332
|
isIngestedBy: "isIngestedBy";
|
|
2299
2333
|
ingests: "ingests";
|
|
2334
|
+
is: "is";
|
|
2300
2335
|
}>;
|
|
2301
2336
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2302
2337
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2350,6 +2385,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2350
2385
|
isReadBy: "isReadBy";
|
|
2351
2386
|
isIngestedBy: "isIngestedBy";
|
|
2352
2387
|
ingests: "ingests";
|
|
2388
|
+
is: "is";
|
|
2353
2389
|
}>;
|
|
2354
2390
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2355
2391
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2403,6 +2439,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2403
2439
|
isReadBy: "isReadBy";
|
|
2404
2440
|
isIngestedBy: "isIngestedBy";
|
|
2405
2441
|
ingests: "ingests";
|
|
2442
|
+
is: "is";
|
|
2406
2443
|
}>;
|
|
2407
2444
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2408
2445
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2456,6 +2493,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2456
2493
|
isReadBy: "isReadBy";
|
|
2457
2494
|
isIngestedBy: "isIngestedBy";
|
|
2458
2495
|
ingests: "ingests";
|
|
2496
|
+
is: "is";
|
|
2459
2497
|
}>;
|
|
2460
2498
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2461
2499
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2509,6 +2547,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2509
2547
|
isReadBy: "isReadBy";
|
|
2510
2548
|
isIngestedBy: "isIngestedBy";
|
|
2511
2549
|
ingests: "ingests";
|
|
2550
|
+
is: "is";
|
|
2512
2551
|
}>;
|
|
2513
2552
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2514
2553
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2562,6 +2601,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2562
2601
|
isReadBy: "isReadBy";
|
|
2563
2602
|
isIngestedBy: "isIngestedBy";
|
|
2564
2603
|
ingests: "ingests";
|
|
2604
|
+
is: "is";
|
|
2565
2605
|
}>;
|
|
2566
2606
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2567
2607
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2615,6 +2655,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2615
2655
|
isReadBy: "isReadBy";
|
|
2616
2656
|
isIngestedBy: "isIngestedBy";
|
|
2617
2657
|
ingests: "ingests";
|
|
2658
|
+
is: "is";
|
|
2618
2659
|
}>;
|
|
2619
2660
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2620
2661
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2674,6 +2715,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2674
2715
|
isReadBy: "isReadBy";
|
|
2675
2716
|
isIngestedBy: "isIngestedBy";
|
|
2676
2717
|
ingests: "ingests";
|
|
2718
|
+
is: "is";
|
|
2677
2719
|
}>;
|
|
2678
2720
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2679
2721
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2727,6 +2769,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2727
2769
|
isReadBy: "isReadBy";
|
|
2728
2770
|
isIngestedBy: "isIngestedBy";
|
|
2729
2771
|
ingests: "ingests";
|
|
2772
|
+
is: "is";
|
|
2730
2773
|
}>;
|
|
2731
2774
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2732
2775
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2780,6 +2823,7 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2780
2823
|
isReadBy: "isReadBy";
|
|
2781
2824
|
isIngestedBy: "isIngestedBy";
|
|
2782
2825
|
ingests: "ingests";
|
|
2826
|
+
is: "is";
|
|
2783
2827
|
}>;
|
|
2784
2828
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2785
2829
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -2793,3 +2837,25 @@ export declare const deviceDtoSchemaMap: {
|
|
|
2793
2837
|
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
2794
2838
|
}, z.core.$strip>>;
|
|
2795
2839
|
};
|
|
2840
|
+
/**
|
|
2841
|
+
* Desired whole-device configuration by device type. Each type declares its
|
|
2842
|
+
* own `s<Type>Config` in full next to its specs and state; a type not listed
|
|
2843
|
+
* here has nothing configurable yet and its `is` relation must stay empty.
|
|
2844
|
+
*
|
|
2845
|
+
* Optionality is applied here, once, to the whole object rather than to each
|
|
2846
|
+
* key: the `is` relation may be missing altogether, and a key it does not
|
|
2847
|
+
* carry is "unmanaged" -- nothing is planned for it and clients show the
|
|
2848
|
+
* actual state -- which is how existing deployments migrate without a backfill.
|
|
2849
|
+
*/
|
|
2850
|
+
export declare const deviceConfigSchemaMap: {
|
|
2851
|
+
readonly camera: z.ZodObject<{
|
|
2852
|
+
privacyMode: z.ZodBoolean;
|
|
2853
|
+
}, z.core.$strip>;
|
|
2854
|
+
};
|
|
2855
|
+
/** Given a device type, the type of its `is` relation data (every key optional). */
|
|
2856
|
+
export type DeviceConfigMap = {
|
|
2857
|
+
[T in DeviceType]: T extends keyof typeof deviceConfigSchemaMap ? Partial<z.infer<(typeof deviceConfigSchemaMap)[T]>> : Record<string, never>;
|
|
2858
|
+
};
|
|
2859
|
+
export type AnyDeviceConfig = DeviceConfigMap[DeviceType];
|
|
2860
|
+
/** The schema an `is` relation's data must satisfy, chosen by the owning device's type. */
|
|
2861
|
+
export declare const deviceConfigSchema: (type: DeviceType) => z.ZodObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deviceDtoSchemaMap = exports.sEventDescription = exports.sEventVariantDescription = exports.sPositionTrackerDto = exports.sSystemDeviceDto = exports.sNvrAnalyticsServerDto = exports.sNvrExporterDto = exports.sRecorderDto = exports.sDisplayDto = exports.sIntercomOperatorDto = exports.sAlarmDto = exports.sServerDto = exports.sPresenceTrackerDto = exports.sDeviceGatewayDto = exports.sPbxDto = exports.sIntercomTerminalDto = exports.sPanicButtonDto = exports.sGenericSensorDto = exports.sMotionSensorDto = exports.sCameraLiftDto = exports.sIoBoardDto = exports.sReaderDto = exports.sDoorDto = exports.sCameraDto = exports.sDeviceDto = exports.sForeignDeviceInfo = exports.sDeviceMgmtInfo = exports.sPresetDto = exports.sProviderMetadata = exports.sAnyDeviceSpecs = exports.sSystemDeviceSpecsWithType = exports.sNvrAnalyticsServerSpecsWithType = exports.sNvrExporterSpecsWithType = exports.sRecorderSpecsWithType = exports.sDisplaySpecsWithType = exports.sDeviceType = exports.DEVICE_TYPES = void 0;
|
|
3
|
+
exports.deviceConfigSchema = exports.deviceConfigSchemaMap = exports.deviceDtoSchemaMap = exports.sEventDescription = exports.sEventVariantDescription = exports.sPositionTrackerDto = exports.sSystemDeviceDto = exports.sNvrAnalyticsServerDto = exports.sNvrExporterDto = exports.sRecorderDto = exports.sDisplayDto = exports.sIntercomOperatorDto = exports.sAlarmDto = exports.sServerDto = exports.sPresenceTrackerDto = exports.sDeviceGatewayDto = exports.sPbxDto = exports.sIntercomTerminalDto = exports.sPanicButtonDto = exports.sGenericSensorDto = exports.sMotionSensorDto = exports.sCameraLiftDto = exports.sIoBoardDto = exports.sReaderDto = exports.sDoorDto = exports.sCameraDto = exports.sDeviceDto = exports.sForeignDeviceInfo = exports.sDeviceMgmtInfo = exports.sPresetDto = exports.sProviderMetadata = exports.sAnyDeviceSpecs = exports.sSystemDeviceSpecsWithType = exports.sNvrAnalyticsServerSpecsWithType = exports.sNvrExporterSpecsWithType = exports.sRecorderSpecsWithType = exports.sDisplaySpecsWithType = exports.sDeviceType = exports.DEVICE_TYPES = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const camera_1 = require("./camera");
|
|
6
6
|
const door_1 = require("./door");
|
|
@@ -253,3 +253,22 @@ exports.deviceDtoSchemaMap = {
|
|
|
253
253
|
[system_1.SYSTEM]: exports.sSystemDeviceDto,
|
|
254
254
|
[position_tracker_1.POSITION_TRACKER]: exports.sPositionTrackerDto,
|
|
255
255
|
};
|
|
256
|
+
// CONFIG (the `is` self relation)
|
|
257
|
+
/**
|
|
258
|
+
* Desired whole-device configuration by device type. Each type declares its
|
|
259
|
+
* own `s<Type>Config` in full next to its specs and state; a type not listed
|
|
260
|
+
* here has nothing configurable yet and its `is` relation must stay empty.
|
|
261
|
+
*
|
|
262
|
+
* Optionality is applied here, once, to the whole object rather than to each
|
|
263
|
+
* key: the `is` relation may be missing altogether, and a key it does not
|
|
264
|
+
* carry is "unmanaged" -- nothing is planned for it and clients show the
|
|
265
|
+
* actual state -- which is how existing deployments migrate without a backfill.
|
|
266
|
+
*/
|
|
267
|
+
exports.deviceConfigSchemaMap = {
|
|
268
|
+
[camera_1.CAMERA]: camera_1.sCameraConfig,
|
|
269
|
+
};
|
|
270
|
+
const sEmptyDeviceConfig = zod_1.z.object({});
|
|
271
|
+
/** The schema an `is` relation's data must satisfy, chosen by the owning device's type. */
|
|
272
|
+
const deviceConfigSchema = (type) => (exports.deviceConfigSchemaMap[type] ??
|
|
273
|
+
sEmptyDeviceConfig).partial();
|
|
274
|
+
exports.deviceConfigSchema = deviceConfigSchema;
|
|
@@ -58,6 +58,19 @@ export declare const sCameraSpecs: z.ZodObject<{
|
|
|
58
58
|
}, z.core.$strip>;
|
|
59
59
|
export type WebRtcPlaybackSource = z.infer<typeof sWebRtcPlaybackSource>;
|
|
60
60
|
export type CameraSpecs = z.infer<typeof sCameraSpecs>;
|
|
61
|
+
/**
|
|
62
|
+
* What we WANT for the camera as a whole, carried on its own `is` relation.
|
|
63
|
+
*
|
|
64
|
+
* Specs describe what a camera is (discovery may rewrite them) and state
|
|
65
|
+
* reports what the outside world says is the case; this is the desired value
|
|
66
|
+
* the changeset pipeline converges the world towards. Declared in full here;
|
|
67
|
+
* `deviceConfigSchema` makes the whole object partial, because the relation
|
|
68
|
+
* may be missing and any key absent from it is "unmanaged".
|
|
69
|
+
*/
|
|
70
|
+
export declare const sCameraConfig: z.ZodObject<{
|
|
71
|
+
privacyMode: z.ZodBoolean;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type CameraConfig = z.infer<typeof sCameraConfig>;
|
|
61
74
|
export declare const sMotionDetectionConfiguration: z.ZodObject<{
|
|
62
75
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
63
76
|
fps: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sCameraState = exports.sRecordingState = exports.sRecorderStreamStateDto = exports.sAnalyticsConfigData = exports.sAiCapability = exports.sAiStreamConfiguration = exports.sAiSemanticSearchConfiguration = exports.sAiFaceRecognitionConfiguration = exports.sAiDetectionConfiguration = exports.sAiLabelConfiguration = exports.sMotionDetectionConfiguration = exports.sCameraSpecs = exports.sStreamInfo = exports.sWebRtcPlaybackSource = exports.CAMERA = void 0;
|
|
3
|
+
exports.sCameraState = exports.sRecordingState = exports.sRecorderStreamStateDto = exports.sAnalyticsConfigData = exports.sAiCapability = exports.sAiStreamConfiguration = exports.sAiSemanticSearchConfiguration = exports.sAiFaceRecognitionConfiguration = exports.sAiDetectionConfiguration = exports.sAiLabelConfiguration = exports.sMotionDetectionConfiguration = exports.sCameraConfig = exports.sCameraSpecs = exports.sStreamInfo = exports.sWebRtcPlaybackSource = exports.CAMERA = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CAMERA = 'camera';
|
|
6
6
|
// SPECS
|
|
@@ -35,6 +35,20 @@ exports.sCameraSpecs = zod_1.z.object({
|
|
|
35
35
|
autoSwitchStreams: zod_1.z.boolean(),
|
|
36
36
|
streamNaming: zod_1.z.enum(['cameraStreamNo', 'cameraStream', 'stream']),
|
|
37
37
|
});
|
|
38
|
+
// CONFIG
|
|
39
|
+
/**
|
|
40
|
+
* What we WANT for the camera as a whole, carried on its own `is` relation.
|
|
41
|
+
*
|
|
42
|
+
* Specs describe what a camera is (discovery may rewrite them) and state
|
|
43
|
+
* reports what the outside world says is the case; this is the desired value
|
|
44
|
+
* the changeset pipeline converges the world towards. Declared in full here;
|
|
45
|
+
* `deviceConfigSchema` makes the whole object partial, because the relation
|
|
46
|
+
* may be missing and any key absent from it is "unmanaged".
|
|
47
|
+
*/
|
|
48
|
+
exports.sCameraConfig = zod_1.z.object({
|
|
49
|
+
/** Privacy mode on: feed hidden, streams unmounted, recording paused. */
|
|
50
|
+
privacyMode: zod_1.z.boolean(),
|
|
51
|
+
});
|
|
38
52
|
// STATE
|
|
39
53
|
exports.sMotionDetectionConfiguration = zod_1.z.object({
|
|
40
54
|
threshold: zod_1.z.number().min(0).max(1).optional(),
|
|
@@ -248,6 +248,7 @@ export declare const sDeviceDiscoveryDto: z.ZodObject<{
|
|
|
248
248
|
isReadBy: "isReadBy";
|
|
249
249
|
isIngestedBy: "isIngestedBy";
|
|
250
250
|
ingests: "ingests";
|
|
251
|
+
is: "is";
|
|
251
252
|
}>;
|
|
252
253
|
}, z.core.$catchall<z.ZodUnknown>>, z.ZodObject<{
|
|
253
254
|
provider: z.ZodString;
|
|
@@ -279,6 +280,7 @@ export declare const sRelationDeltaDto: z.ZodObject<{
|
|
|
279
280
|
isReadBy: "isReadBy";
|
|
280
281
|
isIngestedBy: "isIngestedBy";
|
|
281
282
|
ingests: "ingests";
|
|
283
|
+
is: "is";
|
|
282
284
|
}>;
|
|
283
285
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
284
286
|
action: z.ZodEnum<{
|
|
@@ -543,6 +545,7 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
543
545
|
isReadBy: "isReadBy";
|
|
544
546
|
isIngestedBy: "isIngestedBy";
|
|
545
547
|
ingests: "ingests";
|
|
548
|
+
is: "is";
|
|
546
549
|
}>;
|
|
547
550
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
548
551
|
groups: z.ZodArray<z.ZodString>;
|
|
@@ -581,6 +584,7 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
581
584
|
isReadBy: "isReadBy";
|
|
582
585
|
isIngestedBy: "isIngestedBy";
|
|
583
586
|
ingests: "ingests";
|
|
587
|
+
is: "is";
|
|
584
588
|
}>;
|
|
585
589
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
586
590
|
action: z.ZodEnum<{
|
|
@@ -21,7 +21,14 @@ export declare const sDeviceRelationKind: z.ZodEnum<{
|
|
|
21
21
|
isReadBy: "isReadBy";
|
|
22
22
|
isIngestedBy: "isIngestedBy";
|
|
23
23
|
ingests: "ingests";
|
|
24
|
+
is: "is";
|
|
24
25
|
}>;
|
|
26
|
+
/**
|
|
27
|
+
* `kind === 'is'` if and only if `leftId === rightId`. Enforced by the
|
|
28
|
+
* server (and a database constraint); not expressed here because the
|
|
29
|
+
* relation as seen from one side (`sDeviceRelationSide`) does not know its
|
|
30
|
+
* owner's id.
|
|
31
|
+
*/
|
|
25
32
|
export declare const sDeviceRelationDto: z.ZodObject<{
|
|
26
33
|
leftId: z.ZodString;
|
|
27
34
|
rightId: z.ZodString;
|
|
@@ -47,6 +54,7 @@ export declare const sDeviceRelationDto: z.ZodObject<{
|
|
|
47
54
|
isReadBy: "isReadBy";
|
|
48
55
|
isIngestedBy: "isIngestedBy";
|
|
49
56
|
ingests: "ingests";
|
|
57
|
+
is: "is";
|
|
50
58
|
}>;
|
|
51
59
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
52
60
|
export declare const sDeviceRelationSide: z.ZodObject<{
|
|
@@ -73,6 +81,7 @@ export declare const sDeviceRelationSide: z.ZodObject<{
|
|
|
73
81
|
isReadBy: "isReadBy";
|
|
74
82
|
isIngestedBy: "isIngestedBy";
|
|
75
83
|
ingests: "ingests";
|
|
84
|
+
is: "is";
|
|
76
85
|
}>;
|
|
77
86
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
78
87
|
export type DeviceRelationKind = z.infer<typeof sDeviceRelationKind>;
|
|
@@ -83,11 +92,13 @@ export type DeviceRelationSide = z.infer<typeof sDeviceRelationSide>;
|
|
|
83
92
|
export declare const sStreamRecorderSettings: z.ZodObject<{
|
|
84
93
|
retentionHours: z.ZodOptional<z.ZodNumber>;
|
|
85
94
|
prebufferSeconds: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
86
96
|
}, z.core.$strip>;
|
|
87
97
|
export declare const sRecordingRelationData: z.ZodObject<{
|
|
88
98
|
streams: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
89
99
|
retentionHours: z.ZodOptional<z.ZodNumber>;
|
|
90
100
|
prebufferSeconds: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
91
102
|
}, z.core.$strip>>;
|
|
92
103
|
}, z.core.$strip>;
|
|
93
104
|
export type StreamRecorderSettings = z.infer<typeof sStreamRecorderSettings>;
|
|
@@ -129,6 +140,12 @@ export interface DeviceRelationDataMap {
|
|
|
129
140
|
isReadBy: Record<string, never>;
|
|
130
141
|
ingests: AiInferenceRelationData;
|
|
131
142
|
isIngestedBy: AiInferenceRelationData;
|
|
143
|
+
/**
|
|
144
|
+
* Shaped by the owning device's type, which a kind-keyed map cannot know:
|
|
145
|
+
* `DeviceConfigMap[T]` is the precise type and `deviceConfigSchema(type)`
|
|
146
|
+
* the schema to validate with (any-device.ts).
|
|
147
|
+
*/
|
|
148
|
+
is: Record<string, unknown>;
|
|
132
149
|
}
|
|
133
150
|
/** Runtime map: relation kind → Zod schema for its data. */
|
|
134
151
|
export declare const sDeviceRelationDataMap: {
|
|
@@ -25,7 +25,20 @@ exports.sDeviceRelationKind = zod_1.z.enum([
|
|
|
25
25
|
'isReadBy',
|
|
26
26
|
'isIngestedBy',
|
|
27
27
|
'ingests',
|
|
28
|
+
/**
|
|
29
|
+
* The self relation: a device's relation to itself, and the only kind that
|
|
30
|
+
* may have both ends on one device. Its data is the device's desired
|
|
31
|
+
* whole-device configuration, shaped by the device's type (see
|
|
32
|
+
* `deviceConfigSchema` in any-device.ts).
|
|
33
|
+
*/
|
|
34
|
+
'is',
|
|
28
35
|
]);
|
|
36
|
+
/**
|
|
37
|
+
* `kind === 'is'` if and only if `leftId === rightId`. Enforced by the
|
|
38
|
+
* server (and a database constraint); not expressed here because the
|
|
39
|
+
* relation as seen from one side (`sDeviceRelationSide`) does not know its
|
|
40
|
+
* owner's id.
|
|
41
|
+
*/
|
|
29
42
|
exports.sDeviceRelationDto = zod_1.z
|
|
30
43
|
.object({
|
|
31
44
|
leftId: zod_1.z.string(),
|
|
@@ -61,6 +74,7 @@ exports.relationKinds = {
|
|
|
61
74
|
isReadBy: 'isReadBy',
|
|
62
75
|
ingests: 'ingests',
|
|
63
76
|
isIngestedBy: 'isIngestedBy',
|
|
77
|
+
is: 'is',
|
|
64
78
|
};
|
|
65
79
|
exports.inverseRelationKinds = {
|
|
66
80
|
attachedTo: 'attachedTo',
|
|
@@ -84,11 +98,18 @@ exports.inverseRelationKinds = {
|
|
|
84
98
|
isReadBy: 'reads',
|
|
85
99
|
ingests: 'isIngestedBy',
|
|
86
100
|
isIngestedBy: 'ingests',
|
|
101
|
+
is: 'is',
|
|
87
102
|
};
|
|
88
103
|
// RECORDING RELATION DATA
|
|
89
104
|
exports.sStreamRecorderSettings = zod_1.z.object({
|
|
90
105
|
retentionHours: zod_1.z.number().int().positive().optional(),
|
|
91
106
|
prebufferSeconds: zod_1.z.number().int().nonnegative().optional(),
|
|
107
|
+
/**
|
|
108
|
+
* Whether we WANT this stream recorded. Absent means true, which is what
|
|
109
|
+
* every binding written before this key existed has always meant; the
|
|
110
|
+
* recorder's own `isRecording` state says whether it actually is.
|
|
111
|
+
*/
|
|
112
|
+
enabled: zod_1.z.boolean().optional(),
|
|
92
113
|
});
|
|
93
114
|
exports.sRecordingRelationData = zod_1.z.object({
|
|
94
115
|
streams: zod_1.z.record(zod_1.z.string(), exports.sStreamRecorderSettings),
|
|
@@ -127,4 +148,6 @@ exports.sDeviceRelationDataMap = {
|
|
|
127
148
|
isReadBy: sEmptyRelationData,
|
|
128
149
|
ingests: exports.sAiInferenceRelationData,
|
|
129
150
|
isIngestedBy: exports.sAiInferenceRelationData,
|
|
151
|
+
// Validate with deviceConfigSchema(device.type) instead; see DeviceRelationDataMap.
|
|
152
|
+
is: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
130
153
|
};
|
package/dist/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.139",
|
|
8
8
|
"description": "Common types between backend, agent(s) and frontend(s)",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.139",
|
|
8
8
|
"description": "Common types between backend, agent(s) and frontend(s)",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|