@awarevue/api-types 2.0.104 → 2.0.106
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 +8 -0
- package/dist/api/commands/all.d.ts +14 -0
- package/dist/api/commands/nvr-analytics-server.d.ts +4 -0
- package/dist/api/commands/nvr-exporter.d.ts +4 -0
- package/dist/api/commands/nvr-recorder.d.ts +16 -0
- package/dist/api/commands/server.d.ts +4 -0
- package/dist/api/events/all.d.ts +8 -1
- package/dist/api/events/all.js +7 -1
- package/dist/api/queries/all.d.ts +6 -0
- package/dist/api/queries/nvr-recorder.d.ts +12 -0
- package/dist/api/rest/device.d.ts +1 -0
- package/dist/api/state/index.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/objects/device/any-device.d.ts +113 -1
- package/dist/objects/device/any-device.js +11 -1
- package/dist/objects/device/device-import.d.ts +8 -0
- package/dist/objects/device/generic-sensor.d.ts +8 -0
- package/dist/objects/device/generic-sensor.js +7 -0
- package/dist/objects/device/index.d.ts +1 -0
- package/dist/objects/device/index.js +1 -0
- package/dist/package.json +1 -1
- package/dist/primitives.d.ts +4 -0
- package/package.json +1 -1
|
@@ -209,6 +209,8 @@ export declare const sRunCommandRq: z.ZodObject<{
|
|
|
209
209
|
type: z.ZodLiteral<"camera-lift">;
|
|
210
210
|
}, z.core.$strip>, z.ZodObject<{
|
|
211
211
|
type: z.ZodLiteral<"motion-sensor">;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
212
214
|
}, z.core.$strip>, z.ZodObject<{
|
|
213
215
|
type: z.ZodLiteral<"panic-button">;
|
|
214
216
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -343,6 +345,8 @@ export declare const sQueryRq: z.ZodObject<{
|
|
|
343
345
|
type: z.ZodLiteral<"camera-lift">;
|
|
344
346
|
}, z.core.$strip>, z.ZodObject<{
|
|
345
347
|
type: z.ZodLiteral<"motion-sensor">;
|
|
348
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
349
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
346
350
|
}, z.core.$strip>, z.ZodObject<{
|
|
347
351
|
type: z.ZodLiteral<"panic-button">;
|
|
348
352
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -481,6 +485,8 @@ export declare const sPushFile: z.ZodObject<{
|
|
|
481
485
|
type: z.ZodLiteral<"camera-lift">;
|
|
482
486
|
}, z.core.$strip>, z.ZodObject<{
|
|
483
487
|
type: z.ZodLiteral<"motion-sensor">;
|
|
488
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
489
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
484
490
|
}, z.core.$strip>, z.ZodObject<{
|
|
485
491
|
type: z.ZodLiteral<"panic-button">;
|
|
486
492
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -630,6 +636,8 @@ export declare const sGetAvailableDevicesRs: z.ZodObject<{
|
|
|
630
636
|
type: z.ZodLiteral<"camera-lift">;
|
|
631
637
|
}, z.core.$strip>, z.ZodObject<{
|
|
632
638
|
type: z.ZodLiteral<"motion-sensor">;
|
|
639
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
640
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
633
641
|
}, z.core.$strip>, z.ZodObject<{
|
|
634
642
|
type: z.ZodLiteral<"panic-button">;
|
|
635
643
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -105,6 +105,8 @@ export declare const commandSchemas: {
|
|
|
105
105
|
type: import("zod").ZodLiteral<"camera-lift">;
|
|
106
106
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
107
107
|
type: import("zod").ZodLiteral<"motion-sensor">;
|
|
108
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
109
|
+
type: import("zod").ZodLiteral<"generic-sensor">;
|
|
108
110
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
109
111
|
type: import("zod").ZodLiteral<"panic-button">;
|
|
110
112
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -242,6 +244,8 @@ export declare const commandSchemas: {
|
|
|
242
244
|
type: import("zod").ZodLiteral<"camera-lift">;
|
|
243
245
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
244
246
|
type: import("zod").ZodLiteral<"motion-sensor">;
|
|
247
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
248
|
+
type: import("zod").ZodLiteral<"generic-sensor">;
|
|
245
249
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
246
250
|
type: import("zod").ZodLiteral<"panic-button">;
|
|
247
251
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -395,6 +399,8 @@ export declare const commandSchemas: {
|
|
|
395
399
|
type: import("zod").ZodLiteral<"camera-lift">;
|
|
396
400
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
397
401
|
type: import("zod").ZodLiteral<"motion-sensor">;
|
|
402
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
403
|
+
type: import("zod").ZodLiteral<"generic-sensor">;
|
|
398
404
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
399
405
|
type: import("zod").ZodLiteral<"panic-button">;
|
|
400
406
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -533,6 +539,8 @@ export declare const commandSchemas: {
|
|
|
533
539
|
type: import("zod").ZodLiteral<"camera-lift">;
|
|
534
540
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
535
541
|
type: import("zod").ZodLiteral<"motion-sensor">;
|
|
542
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
543
|
+
type: import("zod").ZodLiteral<"generic-sensor">;
|
|
536
544
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
537
545
|
type: import("zod").ZodLiteral<"panic-button">;
|
|
538
546
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -662,6 +670,8 @@ export declare const commandSchemas: {
|
|
|
662
670
|
type: import("zod").ZodLiteral<"camera-lift">;
|
|
663
671
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
664
672
|
type: import("zod").ZodLiteral<"motion-sensor">;
|
|
673
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
674
|
+
type: import("zod").ZodLiteral<"generic-sensor">;
|
|
665
675
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
666
676
|
type: import("zod").ZodLiteral<"panic-button">;
|
|
667
677
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -791,6 +801,8 @@ export declare const commandSchemas: {
|
|
|
791
801
|
type: import("zod").ZodLiteral<"camera-lift">;
|
|
792
802
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
793
803
|
type: import("zod").ZodLiteral<"motion-sensor">;
|
|
804
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
805
|
+
type: import("zod").ZodLiteral<"generic-sensor">;
|
|
794
806
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
795
807
|
type: import("zod").ZodLiteral<"panic-button">;
|
|
796
808
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -923,6 +935,8 @@ export declare const commandSchemas: {
|
|
|
923
935
|
type: import("zod").ZodLiteral<"camera-lift">;
|
|
924
936
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
925
937
|
type: import("zod").ZodLiteral<"motion-sensor">;
|
|
938
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
939
|
+
type: import("zod").ZodLiteral<"generic-sensor">;
|
|
926
940
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
927
941
|
type: import("zod").ZodLiteral<"panic-button">;
|
|
928
942
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -79,6 +79,8 @@ export declare const sSetStreamAnalyticsCommand: z.ZodObject<{
|
|
|
79
79
|
type: z.ZodLiteral<"camera-lift">;
|
|
80
80
|
}, z.core.$strip>, z.ZodObject<{
|
|
81
81
|
type: z.ZodLiteral<"motion-sensor">;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
82
84
|
}, z.core.$strip>, z.ZodObject<{
|
|
83
85
|
type: z.ZodLiteral<"panic-button">;
|
|
84
86
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -234,6 +236,8 @@ export declare const nvrAnalyticsServerCommandSchemas: {
|
|
|
234
236
|
type: z.ZodLiteral<"camera-lift">;
|
|
235
237
|
}, z.core.$strip>, z.ZodObject<{
|
|
236
238
|
type: z.ZodLiteral<"motion-sensor">;
|
|
239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
237
241
|
}, z.core.$strip>, z.ZodObject<{
|
|
238
242
|
type: z.ZodLiteral<"panic-button">;
|
|
239
243
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -80,6 +80,8 @@ export declare const sStartExportCommand: z.ZodObject<{
|
|
|
80
80
|
type: z.ZodLiteral<"camera-lift">;
|
|
81
81
|
}, z.core.$strip>, z.ZodObject<{
|
|
82
82
|
type: z.ZodLiteral<"motion-sensor">;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
83
85
|
}, z.core.$strip>, z.ZodObject<{
|
|
84
86
|
type: z.ZodLiteral<"panic-button">;
|
|
85
87
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -223,6 +225,8 @@ export declare const nvrExporterCommandSchemas: {
|
|
|
223
225
|
type: z.ZodLiteral<"camera-lift">;
|
|
224
226
|
}, z.core.$strip>, z.ZodObject<{
|
|
225
227
|
type: z.ZodLiteral<"motion-sensor">;
|
|
228
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
229
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
226
230
|
}, z.core.$strip>, z.ZodObject<{
|
|
227
231
|
type: z.ZodLiteral<"panic-button">;
|
|
228
232
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -79,6 +79,8 @@ export declare const sMountStreamCommand: z.ZodObject<{
|
|
|
79
79
|
type: z.ZodLiteral<"camera-lift">;
|
|
80
80
|
}, z.core.$strip>, z.ZodObject<{
|
|
81
81
|
type: z.ZodLiteral<"motion-sensor">;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
82
84
|
}, z.core.$strip>, z.ZodObject<{
|
|
83
85
|
type: z.ZodLiteral<"panic-button">;
|
|
84
86
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -212,6 +214,8 @@ export declare const sUnmountStreamCommand: z.ZodObject<{
|
|
|
212
214
|
type: z.ZodLiteral<"camera-lift">;
|
|
213
215
|
}, z.core.$strip>, z.ZodObject<{
|
|
214
216
|
type: z.ZodLiteral<"motion-sensor">;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
215
219
|
}, z.core.$strip>, z.ZodObject<{
|
|
216
220
|
type: z.ZodLiteral<"panic-button">;
|
|
217
221
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -342,6 +346,8 @@ export declare const sStartRecordingCommand: z.ZodObject<{
|
|
|
342
346
|
type: z.ZodLiteral<"camera-lift">;
|
|
343
347
|
}, z.core.$strip>, z.ZodObject<{
|
|
344
348
|
type: z.ZodLiteral<"motion-sensor">;
|
|
349
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
350
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
345
351
|
}, z.core.$strip>, z.ZodObject<{
|
|
346
352
|
type: z.ZodLiteral<"panic-button">;
|
|
347
353
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -472,6 +478,8 @@ export declare const sStopRecordingCommand: z.ZodObject<{
|
|
|
472
478
|
type: z.ZodLiteral<"camera-lift">;
|
|
473
479
|
}, z.core.$strip>, z.ZodObject<{
|
|
474
480
|
type: z.ZodLiteral<"motion-sensor">;
|
|
481
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
482
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
475
483
|
}, z.core.$strip>, z.ZodObject<{
|
|
476
484
|
type: z.ZodLiteral<"panic-button">;
|
|
477
485
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -604,6 +612,8 @@ export declare const nvrRecorderCommandSchemas: {
|
|
|
604
612
|
type: z.ZodLiteral<"camera-lift">;
|
|
605
613
|
}, z.core.$strip>, z.ZodObject<{
|
|
606
614
|
type: z.ZodLiteral<"motion-sensor">;
|
|
615
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
616
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
607
617
|
}, z.core.$strip>, z.ZodObject<{
|
|
608
618
|
type: z.ZodLiteral<"panic-button">;
|
|
609
619
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -733,6 +743,8 @@ export declare const nvrRecorderCommandSchemas: {
|
|
|
733
743
|
type: z.ZodLiteral<"camera-lift">;
|
|
734
744
|
}, z.core.$strip>, z.ZodObject<{
|
|
735
745
|
type: z.ZodLiteral<"motion-sensor">;
|
|
746
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
747
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
736
748
|
}, z.core.$strip>, z.ZodObject<{
|
|
737
749
|
type: z.ZodLiteral<"panic-button">;
|
|
738
750
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -862,6 +874,8 @@ export declare const nvrRecorderCommandSchemas: {
|
|
|
862
874
|
type: z.ZodLiteral<"camera-lift">;
|
|
863
875
|
}, z.core.$strip>, z.ZodObject<{
|
|
864
876
|
type: z.ZodLiteral<"motion-sensor">;
|
|
877
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
878
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
865
879
|
}, z.core.$strip>, z.ZodObject<{
|
|
866
880
|
type: z.ZodLiteral<"panic-button">;
|
|
867
881
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -994,6 +1008,8 @@ export declare const nvrRecorderCommandSchemas: {
|
|
|
994
1008
|
type: z.ZodLiteral<"camera-lift">;
|
|
995
1009
|
}, z.core.$strip>, z.ZodObject<{
|
|
996
1010
|
type: z.ZodLiteral<"motion-sensor">;
|
|
1011
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1012
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
997
1013
|
}, z.core.$strip>, z.ZodObject<{
|
|
998
1014
|
type: z.ZodLiteral<"panic-button">;
|
|
999
1015
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -85,6 +85,8 @@ export declare const sNotify: z.ZodObject<{
|
|
|
85
85
|
type: z.ZodLiteral<"camera-lift">;
|
|
86
86
|
}, z.core.$strip>, z.ZodObject<{
|
|
87
87
|
type: z.ZodLiteral<"motion-sensor">;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
88
90
|
}, z.core.$strip>, z.ZodObject<{
|
|
89
91
|
type: z.ZodLiteral<"panic-button">;
|
|
90
92
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -231,6 +233,8 @@ export declare const serverCommands: {
|
|
|
231
233
|
type: z.ZodLiteral<"camera-lift">;
|
|
232
234
|
}, z.core.$strip>, z.ZodObject<{
|
|
233
235
|
type: z.ZodLiteral<"motion-sensor">;
|
|
236
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
237
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
234
238
|
}, z.core.$strip>, z.ZodObject<{
|
|
235
239
|
type: z.ZodLiteral<"panic-button">;
|
|
236
240
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/api/events/all.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export declare const sMotionDetected: z.ZodObject<{
|
|
|
22
22
|
kind: z.ZodLiteral<"motion-detected">;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
24
|
export type MotionDetectedEvent = z.infer<typeof sMotionDetected>;
|
|
25
|
+
export declare const sSensorActivated: z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"sensor-activated">;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type SensorActivatedEvent = z.infer<typeof sSensorActivated>;
|
|
25
29
|
export declare const sDeviceConnectedEvent: z.ZodObject<{
|
|
26
30
|
kind: z.ZodLiteral<"device-connected">;
|
|
27
31
|
clientId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -45,7 +49,7 @@ export interface NotificationAcknowledgedEvent {
|
|
|
45
49
|
kind: 'notification-acknowledged';
|
|
46
50
|
notificationId: string;
|
|
47
51
|
}
|
|
48
|
-
export type AnyDeviceEvent = DeviceCommandTriggered | CameraEvent | DoorEvent | AlarmEvent | MotionDetectedEvent | ReaderEvent | PanicButtonEvent | DeviceConnectedEvent | DeviceDisconnectedEvent | NotificationCreatedEvent | NotificationAcknowledgedEvent | IntercomTerminalEvent | ServerEvent | PresenceTrackerEvent | IoBoardEvent | NvrExporterEvent;
|
|
52
|
+
export type AnyDeviceEvent = DeviceCommandTriggered | CameraEvent | DoorEvent | AlarmEvent | MotionDetectedEvent | ReaderEvent | PanicButtonEvent | DeviceConnectedEvent | DeviceDisconnectedEvent | NotificationCreatedEvent | NotificationAcknowledgedEvent | IntercomTerminalEvent | ServerEvent | PresenceTrackerEvent | IoBoardEvent | NvrExporterEvent | SensorActivatedEvent;
|
|
49
53
|
export declare const sEventHeader: z.ZodObject<{
|
|
50
54
|
id: z.ZodString;
|
|
51
55
|
timestamp: z.ZodNumber;
|
|
@@ -73,6 +77,9 @@ export declare const eventSchemaByKind: {
|
|
|
73
77
|
kind: z.ZodLiteral<"device-disconnected">;
|
|
74
78
|
clientId: z.ZodOptional<z.ZodNumber>;
|
|
75
79
|
}, z.core.$strip>;
|
|
80
|
+
'sensor-activated': z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"sensor-activated">;
|
|
82
|
+
}, z.core.$strip>;
|
|
76
83
|
'nvr-export-started': z.ZodObject<{
|
|
77
84
|
kind: z.ZodLiteral<"nvr-export-started">;
|
|
78
85
|
exportId: z.ZodString;
|
package/dist/api/events/all.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDeviceEvent = exports.eventsByDeviceType = exports.eventSchemaByKind = exports.eventKindLabels = exports.sEventHeader = exports.sDeviceDisconnectedEvent = exports.sDeviceConnectedEvent = exports.sMotionDetected = exports.sDeviceCommandTriggered = void 0;
|
|
3
|
+
exports.isDeviceEvent = exports.eventsByDeviceType = exports.eventSchemaByKind = exports.eventKindLabels = exports.sEventHeader = exports.sDeviceDisconnectedEvent = exports.sDeviceConnectedEvent = exports.sSensorActivated = exports.sMotionDetected = exports.sDeviceCommandTriggered = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const alarm_1 = require("./alarm");
|
|
6
6
|
const camera_1 = require("./camera");
|
|
@@ -20,6 +20,9 @@ exports.sDeviceCommandTriggered = zod_1.z.object({
|
|
|
20
20
|
exports.sMotionDetected = zod_1.z.object({
|
|
21
21
|
kind: zod_1.z.literal('motion-detected'),
|
|
22
22
|
});
|
|
23
|
+
exports.sSensorActivated = zod_1.z.object({
|
|
24
|
+
kind: zod_1.z.literal('sensor-activated'),
|
|
25
|
+
});
|
|
23
26
|
exports.sDeviceConnectedEvent = zod_1.z.object({
|
|
24
27
|
kind: zod_1.z.literal('device-connected'),
|
|
25
28
|
clientId: zod_1.z.number().int().positive().optional(),
|
|
@@ -83,6 +86,7 @@ exports.eventKindLabels = {
|
|
|
83
86
|
'notification-acknowledged': 'Notification Acknowledged',
|
|
84
87
|
'user-logged-in': 'User Logged In',
|
|
85
88
|
'user-logged-out': 'User Logged Out',
|
|
89
|
+
'sensor-activated': 'Sensor Activated',
|
|
86
90
|
};
|
|
87
91
|
exports.eventSchemaByKind = {
|
|
88
92
|
...alarm_1.alarmEventSchemasByKind,
|
|
@@ -98,6 +102,7 @@ exports.eventSchemaByKind = {
|
|
|
98
102
|
'device-command': exports.sDeviceCommandTriggered,
|
|
99
103
|
'device-connected': exports.sDeviceConnectedEvent,
|
|
100
104
|
'device-disconnected': exports.sDeviceDisconnectedEvent,
|
|
105
|
+
'sensor-activated': exports.sSensorActivated,
|
|
101
106
|
};
|
|
102
107
|
exports.eventsByDeviceType = {
|
|
103
108
|
camera: [
|
|
@@ -110,6 +115,7 @@ exports.eventsByDeviceType = {
|
|
|
110
115
|
'presence-tracker': Object.keys(presence_tracker_1.presenceTrackerEventSchemaByKind),
|
|
111
116
|
reader: Object.keys(reader_1.readerEventSchemaByKind),
|
|
112
117
|
'motion-sensor': ['motion-detected'],
|
|
118
|
+
'generic-sensor': ['sensor-activated'],
|
|
113
119
|
'nvr-exporter': Object.keys(nvr_exporter_1.nvrExporterEventSchemasByKind),
|
|
114
120
|
};
|
|
115
121
|
const isDeviceEvent = (event) => {
|
|
@@ -150,6 +150,8 @@ export declare const requestSchemasByType: {
|
|
|
150
150
|
type: z.ZodLiteral<"camera-lift">;
|
|
151
151
|
}, z.core.$strip>, z.ZodObject<{
|
|
152
152
|
type: z.ZodLiteral<"motion-sensor">;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
153
155
|
}, z.core.$strip>, z.ZodObject<{
|
|
154
156
|
type: z.ZodLiteral<"panic-button">;
|
|
155
157
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -278,6 +280,8 @@ export declare const requestSchemasByType: {
|
|
|
278
280
|
type: z.ZodLiteral<"camera-lift">;
|
|
279
281
|
}, z.core.$strip>, z.ZodObject<{
|
|
280
282
|
type: z.ZodLiteral<"motion-sensor">;
|
|
283
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
281
285
|
}, z.core.$strip>, z.ZodObject<{
|
|
282
286
|
type: z.ZodLiteral<"panic-button">;
|
|
283
287
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -406,6 +410,8 @@ export declare const requestSchemasByType: {
|
|
|
406
410
|
type: z.ZodLiteral<"camera-lift">;
|
|
407
411
|
}, z.core.$strip>, z.ZodObject<{
|
|
408
412
|
type: z.ZodLiteral<"motion-sensor">;
|
|
413
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
414
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
409
415
|
}, z.core.$strip>, z.ZodObject<{
|
|
410
416
|
type: z.ZodLiteral<"panic-button">;
|
|
411
417
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -78,6 +78,8 @@ export declare const sRecordingsByTimeRangeArgs: z.ZodObject<{
|
|
|
78
78
|
type: z.ZodLiteral<"camera-lift">;
|
|
79
79
|
}, z.core.$strip>, z.ZodObject<{
|
|
80
80
|
type: z.ZodLiteral<"motion-sensor">;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
81
83
|
}, z.core.$strip>, z.ZodObject<{
|
|
82
84
|
type: z.ZodLiteral<"panic-button">;
|
|
83
85
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -215,6 +217,8 @@ export declare const sPreviewImageArgs: z.ZodObject<{
|
|
|
215
217
|
type: z.ZodLiteral<"camera-lift">;
|
|
216
218
|
}, z.core.$strip>, z.ZodObject<{
|
|
217
219
|
type: z.ZodLiteral<"motion-sensor">;
|
|
220
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
221
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
218
222
|
}, z.core.$strip>, z.ZodObject<{
|
|
219
223
|
type: z.ZodLiteral<"panic-button">;
|
|
220
224
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -350,6 +354,8 @@ export declare const sCameraLatestFrameArgs: z.ZodObject<{
|
|
|
350
354
|
type: z.ZodLiteral<"camera-lift">;
|
|
351
355
|
}, z.core.$strip>, z.ZodObject<{
|
|
352
356
|
type: z.ZodLiteral<"motion-sensor">;
|
|
357
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
358
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
353
359
|
}, z.core.$strip>, z.ZodObject<{
|
|
354
360
|
type: z.ZodLiteral<"panic-button">;
|
|
355
361
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -485,6 +491,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
485
491
|
type: z.ZodLiteral<"camera-lift">;
|
|
486
492
|
}, z.core.$strip>, z.ZodObject<{
|
|
487
493
|
type: z.ZodLiteral<"motion-sensor">;
|
|
494
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
495
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
488
496
|
}, z.core.$strip>, z.ZodObject<{
|
|
489
497
|
type: z.ZodLiteral<"panic-button">;
|
|
490
498
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -613,6 +621,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
613
621
|
type: z.ZodLiteral<"camera-lift">;
|
|
614
622
|
}, z.core.$strip>, z.ZodObject<{
|
|
615
623
|
type: z.ZodLiteral<"motion-sensor">;
|
|
624
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
625
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
616
626
|
}, z.core.$strip>, z.ZodObject<{
|
|
617
627
|
type: z.ZodLiteral<"panic-button">;
|
|
618
628
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -741,6 +751,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
741
751
|
type: z.ZodLiteral<"camera-lift">;
|
|
742
752
|
}, z.core.$strip>, z.ZodObject<{
|
|
743
753
|
type: z.ZodLiteral<"motion-sensor">;
|
|
754
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
755
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
744
756
|
}, z.core.$strip>, z.ZodObject<{
|
|
745
757
|
type: z.ZodLiteral<"panic-button">;
|
|
746
758
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GenericSensorStateDto } from '../../objects/device/generic-sensor';
|
|
1
2
|
import { AlarmStateDto } from '../../objects/device/alarm';
|
|
2
3
|
import { CameraStateDto } from '../../objects/device/camera';
|
|
3
4
|
import { CameraLiftStateDto } from '../../objects/device/camera-lift';
|
|
@@ -7,4 +8,4 @@ import { IntercomTerminalStateDto } from '../../objects/device/intercom-terminal
|
|
|
7
8
|
import { IoBoardStateDto } from '../../objects/device/io-board';
|
|
8
9
|
import { MotionSensorStateDto } from '../../objects/device/motion-sensor';
|
|
9
10
|
import { PanicButtonStateDto } from '../../objects/device/panic-button';
|
|
10
|
-
export type DeviceStateDto = CameraStateDto | DoorStateDto | AlarmStateDto | IoBoardStateDto | CameraLiftStateDto | MotionSensorStateDto | PanicButtonStateDto | IntercomTerminalStateDto | IntercomOperatorStateDto;
|
|
11
|
+
export type DeviceStateDto = CameraStateDto | DoorStateDto | AlarmStateDto | IoBoardStateDto | CameraLiftStateDto | MotionSensorStateDto | GenericSensorStateDto | PanicButtonStateDto | IntercomTerminalStateDto | IntercomOperatorStateDto;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./permissions"), exports);
|
|
|
19
19
|
__exportStar(require("./alarm-automation"), exports);
|
|
20
20
|
__exportStar(require("./objects"), exports);
|
|
21
21
|
__exportStar(require("./primitives"), exports);
|
|
22
|
+
__exportStar(require("./primitives/credential-type"), exports);
|
|
22
23
|
__exportStar(require("./_legacy"), exports);
|
|
@@ -17,7 +17,8 @@ import { NVR_RECORDER } from './nvr-recorder';
|
|
|
17
17
|
import { NVR_EXPORTER } from './nvr-exporter';
|
|
18
18
|
import { NVR_ANALYTICS_SERVER } from './nvr-analytics-server';
|
|
19
19
|
import { SYSTEM } from './system';
|
|
20
|
-
|
|
20
|
+
import { GENERIC_SENSOR } from '../..';
|
|
21
|
+
export declare const DEVICE_TYPES: readonly ["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "generic-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "system"];
|
|
21
22
|
export declare const sDeviceType: z.ZodEnum<{
|
|
22
23
|
camera: "camera";
|
|
23
24
|
door: "door";
|
|
@@ -30,6 +31,7 @@ export declare const sDeviceType: z.ZodEnum<{
|
|
|
30
31
|
pbx: "pbx";
|
|
31
32
|
alarm: "alarm";
|
|
32
33
|
display: "display";
|
|
34
|
+
"generic-sensor": "generic-sensor";
|
|
33
35
|
server: "server";
|
|
34
36
|
"device-gateway": "device-gateway";
|
|
35
37
|
"presence-tracker": "presence-tracker";
|
|
@@ -123,6 +125,8 @@ export declare const sAnyDeviceSpecs: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
123
125
|
type: z.ZodLiteral<"camera-lift">;
|
|
124
126
|
}, z.core.$strip>, z.ZodObject<{
|
|
125
127
|
type: z.ZodLiteral<"motion-sensor">;
|
|
128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
126
130
|
}, z.core.$strip>, z.ZodObject<{
|
|
127
131
|
type: z.ZodLiteral<"panic-button">;
|
|
128
132
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -293,6 +297,8 @@ export declare const sDeviceDto: z.ZodIntersection<z.ZodIntersection<z.ZodDiscri
|
|
|
293
297
|
type: z.ZodLiteral<"camera-lift">;
|
|
294
298
|
}, z.core.$strip>, z.ZodObject<{
|
|
295
299
|
type: z.ZodLiteral<"motion-sensor">;
|
|
300
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
301
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
296
302
|
}, z.core.$strip>, z.ZodObject<{
|
|
297
303
|
type: z.ZodLiteral<"panic-button">;
|
|
298
304
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -758,6 +764,58 @@ export declare const sMotionSensorDto: z.ZodIntersection<z.ZodIntersection<z.Zod
|
|
|
758
764
|
provider: z.ZodString;
|
|
759
765
|
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
760
766
|
}, z.core.$strip>>;
|
|
767
|
+
export declare const sGenericSensorDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
768
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
769
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
770
|
+
id: z.ZodString;
|
|
771
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
772
|
+
id: z.ZodString;
|
|
773
|
+
name: z.ZodString;
|
|
774
|
+
params: z.ZodUnknown;
|
|
775
|
+
isDefault: z.ZodBoolean;
|
|
776
|
+
assignedRef: z.ZodNullable<z.ZodString>;
|
|
777
|
+
createdOn: z.ZodString;
|
|
778
|
+
lastModifiedOn: z.ZodString;
|
|
779
|
+
}, z.core.$strip>>;
|
|
780
|
+
providerAssignedName: z.ZodString;
|
|
781
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
782
|
+
tags: z.ZodArray<z.ZodString>;
|
|
783
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
784
|
+
id: z.ZodString;
|
|
785
|
+
kind: z.ZodEnum<{
|
|
786
|
+
attachedTo: "attachedTo";
|
|
787
|
+
parent: "parent";
|
|
788
|
+
child: "child";
|
|
789
|
+
holds: "holds";
|
|
790
|
+
isHeldBy: "isHeldBy";
|
|
791
|
+
observes: "observes";
|
|
792
|
+
isObservedBy: "isObservedBy";
|
|
793
|
+
sendsInputTo: "sendsInputTo";
|
|
794
|
+
receivesInputFrom: "receivesInputFrom";
|
|
795
|
+
sendsOutputTo: "sendsOutputTo";
|
|
796
|
+
receivesOutputFrom: "receivesOutputFrom";
|
|
797
|
+
unlocks: "unlocks";
|
|
798
|
+
isUnlockedBy: "isUnlockedBy";
|
|
799
|
+
controls: "controls";
|
|
800
|
+
isControlledBy: "isControlledBy";
|
|
801
|
+
records: "records";
|
|
802
|
+
isRecordedBy: "isRecordedBy";
|
|
803
|
+
reads: "reads";
|
|
804
|
+
isReadBy: "isReadBy";
|
|
805
|
+
isIngestedBy: "isIngestedBy";
|
|
806
|
+
ingests: "ingests";
|
|
807
|
+
}>;
|
|
808
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
809
|
+
groups: z.ZodArray<z.ZodString>;
|
|
810
|
+
enabled: z.ZodBoolean;
|
|
811
|
+
createdOn: z.ZodString;
|
|
812
|
+
lastModifiedOn: z.ZodString;
|
|
813
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
814
|
+
name: z.ZodString;
|
|
815
|
+
foreignRef: z.ZodString;
|
|
816
|
+
provider: z.ZodString;
|
|
817
|
+
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
818
|
+
}, z.core.$strip>>;
|
|
761
819
|
export declare const sPanicButtonDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
762
820
|
type: z.ZodLiteral<"panic-button">;
|
|
763
821
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1467,6 +1525,7 @@ export type ReaderDto = z.infer<typeof sReaderDto>;
|
|
|
1467
1525
|
export type IoBoardDto = z.infer<typeof sIoBoardDto>;
|
|
1468
1526
|
export type CameraLiftDto = z.infer<typeof sCameraLiftDto>;
|
|
1469
1527
|
export type MotionSensorDto = z.infer<typeof sMotionSensorDto>;
|
|
1528
|
+
export type GenericSensorDto = z.infer<typeof sGenericSensorDto>;
|
|
1470
1529
|
export type PanicButtonDto = z.infer<typeof sPanicButtonDto>;
|
|
1471
1530
|
export type IntercomTerminalDto = z.infer<typeof sIntercomTerminalDto>;
|
|
1472
1531
|
export type PbxDto = z.infer<typeof sPbxDto>;
|
|
@@ -1505,6 +1564,7 @@ export interface DeviceTypeToDtoMap {
|
|
|
1505
1564
|
[NVR_EXPORTER]: NvrExporterDto;
|
|
1506
1565
|
[NVR_ANALYTICS_SERVER]: NvrAnalyticsServerDto;
|
|
1507
1566
|
[SYSTEM]: SystemDeviceDto;
|
|
1567
|
+
[GENERIC_SENSOR]: GenericSensorDto;
|
|
1508
1568
|
}
|
|
1509
1569
|
/** Given a device type, resolves to the corresponding Dto type. */
|
|
1510
1570
|
export type DeviceDtoFor<T extends DeviceType> = DeviceTypeToDtoMap[T];
|
|
@@ -1932,6 +1992,58 @@ export declare const deviceDtoSchemaMap: {
|
|
|
1932
1992
|
provider: z.ZodString;
|
|
1933
1993
|
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
1934
1994
|
}, z.core.$strip>>;
|
|
1995
|
+
readonly "generic-sensor": z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
1996
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
1997
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1998
|
+
id: z.ZodString;
|
|
1999
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
2000
|
+
id: z.ZodString;
|
|
2001
|
+
name: z.ZodString;
|
|
2002
|
+
params: z.ZodUnknown;
|
|
2003
|
+
isDefault: z.ZodBoolean;
|
|
2004
|
+
assignedRef: z.ZodNullable<z.ZodString>;
|
|
2005
|
+
createdOn: z.ZodString;
|
|
2006
|
+
lastModifiedOn: z.ZodString;
|
|
2007
|
+
}, z.core.$strip>>;
|
|
2008
|
+
providerAssignedName: z.ZodString;
|
|
2009
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
2010
|
+
tags: z.ZodArray<z.ZodString>;
|
|
2011
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
2012
|
+
id: z.ZodString;
|
|
2013
|
+
kind: z.ZodEnum<{
|
|
2014
|
+
attachedTo: "attachedTo";
|
|
2015
|
+
parent: "parent";
|
|
2016
|
+
child: "child";
|
|
2017
|
+
holds: "holds";
|
|
2018
|
+
isHeldBy: "isHeldBy";
|
|
2019
|
+
observes: "observes";
|
|
2020
|
+
isObservedBy: "isObservedBy";
|
|
2021
|
+
sendsInputTo: "sendsInputTo";
|
|
2022
|
+
receivesInputFrom: "receivesInputFrom";
|
|
2023
|
+
sendsOutputTo: "sendsOutputTo";
|
|
2024
|
+
receivesOutputFrom: "receivesOutputFrom";
|
|
2025
|
+
unlocks: "unlocks";
|
|
2026
|
+
isUnlockedBy: "isUnlockedBy";
|
|
2027
|
+
controls: "controls";
|
|
2028
|
+
isControlledBy: "isControlledBy";
|
|
2029
|
+
records: "records";
|
|
2030
|
+
isRecordedBy: "isRecordedBy";
|
|
2031
|
+
reads: "reads";
|
|
2032
|
+
isReadBy: "isReadBy";
|
|
2033
|
+
isIngestedBy: "isIngestedBy";
|
|
2034
|
+
ingests: "ingests";
|
|
2035
|
+
}>;
|
|
2036
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2037
|
+
groups: z.ZodArray<z.ZodString>;
|
|
2038
|
+
enabled: z.ZodBoolean;
|
|
2039
|
+
createdOn: z.ZodString;
|
|
2040
|
+
lastModifiedOn: z.ZodString;
|
|
2041
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
2042
|
+
name: z.ZodString;
|
|
2043
|
+
foreignRef: z.ZodString;
|
|
2044
|
+
provider: z.ZodString;
|
|
2045
|
+
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
2046
|
+
}, z.core.$strip>>;
|
|
1935
2047
|
readonly "panic-button": z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
1936
2048
|
type: z.ZodLiteral<"panic-button">;
|
|
1937
2049
|
}, z.core.$strip>, 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.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.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.deviceDtoSchemaMap = exports.sEventDescription = exports.sEventVariantDescription = 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");
|
|
@@ -22,6 +22,7 @@ const nvr_exporter_1 = require("./nvr-exporter");
|
|
|
22
22
|
const nvr_analytics_server_1 = require("./nvr-analytics-server");
|
|
23
23
|
const system_1 = require("./system");
|
|
24
24
|
const reader_1 = require("./reader");
|
|
25
|
+
const __1 = require("../..");
|
|
25
26
|
exports.DEVICE_TYPES = [
|
|
26
27
|
alarm_1.ALARM,
|
|
27
28
|
server_1.SERVER,
|
|
@@ -31,6 +32,7 @@ exports.DEVICE_TYPES = [
|
|
|
31
32
|
io_board_1.IO_BOARD,
|
|
32
33
|
camera_lift_1.CAMERA_LIFT,
|
|
33
34
|
motion_sensor_1.MOTION_SENSOR,
|
|
35
|
+
__1.GENERIC_SENSOR,
|
|
34
36
|
panic_button_1.PANIC_BUTTON,
|
|
35
37
|
intercom_operator_1.INTERCOM_OPERATOR,
|
|
36
38
|
intercom_terminal_1.INTERCOM_TERMINAL,
|
|
@@ -56,6 +58,9 @@ const sCameraLiftSpecsWithType = camera_lift_1.sCameraLiftSpecs.extend({
|
|
|
56
58
|
const sMotionSensorSpecsWithType = motion_sensor_1.sMotionSensorSpecs.extend({
|
|
57
59
|
type: zod_1.z.literal(motion_sensor_1.MOTION_SENSOR),
|
|
58
60
|
});
|
|
61
|
+
const sGenericSensorSpecsWithType = __1.sGenericSensorSpecs.extend({
|
|
62
|
+
type: zod_1.z.literal(__1.GENERIC_SENSOR),
|
|
63
|
+
});
|
|
59
64
|
const sPanicButtonSpecsWithType = panic_button_1.sPanicButtonSpecs.extend({
|
|
60
65
|
type: zod_1.z.literal(panic_button_1.PANIC_BUTTON),
|
|
61
66
|
});
|
|
@@ -96,6 +101,7 @@ exports.sAnyDeviceSpecs = zod_1.z.discriminatedUnion('type', [
|
|
|
96
101
|
sIoBoardSpecsWithType,
|
|
97
102
|
sCameraLiftSpecsWithType,
|
|
98
103
|
sMotionSensorSpecsWithType,
|
|
104
|
+
sGenericSensorSpecsWithType,
|
|
99
105
|
sPanicButtonSpecsWithType,
|
|
100
106
|
sIntercomTerminalSpecsWithType,
|
|
101
107
|
sPbxSpecsWithType,
|
|
@@ -159,6 +165,9 @@ exports.sCameraLiftDto = sCameraLiftSpecsWithType
|
|
|
159
165
|
exports.sMotionSensorDto = sMotionSensorSpecsWithType
|
|
160
166
|
.and(exports.sDeviceMgmtInfo)
|
|
161
167
|
.and(exports.sForeignDeviceInfo);
|
|
168
|
+
exports.sGenericSensorDto = sGenericSensorSpecsWithType
|
|
169
|
+
.and(exports.sDeviceMgmtInfo)
|
|
170
|
+
.and(exports.sForeignDeviceInfo);
|
|
162
171
|
exports.sPanicButtonDto = sPanicButtonSpecsWithType
|
|
163
172
|
.and(exports.sDeviceMgmtInfo)
|
|
164
173
|
.and(exports.sForeignDeviceInfo);
|
|
@@ -219,6 +228,7 @@ exports.deviceDtoSchemaMap = {
|
|
|
219
228
|
[io_board_1.IO_BOARD]: exports.sIoBoardDto,
|
|
220
229
|
[camera_lift_1.CAMERA_LIFT]: exports.sCameraLiftDto,
|
|
221
230
|
[motion_sensor_1.MOTION_SENSOR]: exports.sMotionSensorDto,
|
|
231
|
+
[__1.GENERIC_SENSOR]: exports.sGenericSensorDto,
|
|
222
232
|
[panic_button_1.PANIC_BUTTON]: exports.sPanicButtonDto,
|
|
223
233
|
[intercom_operator_1.INTERCOM_OPERATOR]: exports.sIntercomOperatorDto,
|
|
224
234
|
[intercom_terminal_1.INTERCOM_TERMINAL]: exports.sIntercomTerminalDto,
|
|
@@ -70,6 +70,8 @@ export declare const sImportedDevice: z.ZodIntersection<z.ZodIntersection<z.ZodO
|
|
|
70
70
|
type: z.ZodLiteral<"camera-lift">;
|
|
71
71
|
}, z.core.$strip>, z.ZodObject<{
|
|
72
72
|
type: z.ZodLiteral<"motion-sensor">;
|
|
73
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
73
75
|
}, z.core.$strip>, z.ZodObject<{
|
|
74
76
|
type: z.ZodLiteral<"panic-button">;
|
|
75
77
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -191,6 +193,8 @@ export declare const sDeviceDiscoveryDto: z.ZodObject<{
|
|
|
191
193
|
type: z.ZodLiteral<"camera-lift">;
|
|
192
194
|
}, z.core.$strip>, z.ZodObject<{
|
|
193
195
|
type: z.ZodLiteral<"motion-sensor">;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
194
198
|
}, z.core.$strip>, z.ZodObject<{
|
|
195
199
|
type: z.ZodLiteral<"panic-button">;
|
|
196
200
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -373,6 +377,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
373
377
|
type: z.ZodLiteral<"camera-lift">;
|
|
374
378
|
}, z.core.$strip>, z.ZodObject<{
|
|
375
379
|
type: z.ZodLiteral<"motion-sensor">;
|
|
380
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
381
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
376
382
|
}, z.core.$strip>, z.ZodObject<{
|
|
377
383
|
type: z.ZodLiteral<"panic-button">;
|
|
378
384
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -487,6 +493,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
487
493
|
type: z.ZodLiteral<"camera-lift">;
|
|
488
494
|
}, z.core.$strip>, z.ZodObject<{
|
|
489
495
|
type: z.ZodLiteral<"motion-sensor">;
|
|
496
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
497
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
490
498
|
}, z.core.$strip>, z.ZodObject<{
|
|
491
499
|
type: z.ZodLiteral<"panic-button">;
|
|
492
500
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GENERIC_SENSOR: "generic-sensor";
|
|
3
|
+
export declare const sGenericSensorSpecs: z.ZodObject<{}, z.core.$strip>;
|
|
4
|
+
export type GenericSensorSpecs = z.infer<typeof sGenericSensorSpecs>;
|
|
5
|
+
export interface GenericSensorStateDto {
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
connected: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sGenericSensorSpecs = exports.GENERIC_SENSOR = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.GENERIC_SENSOR = 'generic-sensor';
|
|
6
|
+
// SPECS
|
|
7
|
+
exports.sGenericSensorSpecs = zod_1.z.object({});
|
|
@@ -7,6 +7,7 @@ export * from './reader';
|
|
|
7
7
|
export * from './io-board';
|
|
8
8
|
export * from './camera-lift';
|
|
9
9
|
export * from './motion-sensor';
|
|
10
|
+
export * from './generic-sensor';
|
|
10
11
|
export * from './intercom-operator';
|
|
11
12
|
export * from './intercom-terminal';
|
|
12
13
|
export * from './panic-button';
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./reader"), exports);
|
|
|
23
23
|
__exportStar(require("./io-board"), exports);
|
|
24
24
|
__exportStar(require("./camera-lift"), exports);
|
|
25
25
|
__exportStar(require("./motion-sensor"), exports);
|
|
26
|
+
__exportStar(require("./generic-sensor"), exports);
|
|
26
27
|
__exportStar(require("./intercom-operator"), exports);
|
|
27
28
|
__exportStar(require("./intercom-terminal"), exports);
|
|
28
29
|
__exportStar(require("./panic-button"), exports);
|
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.106",
|
|
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/dist/primitives.d.ts
CHANGED
|
@@ -102,6 +102,8 @@ export declare const sAgentDeviceInfo: z.ZodIntersection<z.ZodObject<{
|
|
|
102
102
|
type: z.ZodLiteral<"camera-lift">;
|
|
103
103
|
}, z.core.$strip>, z.ZodObject<{
|
|
104
104
|
type: z.ZodLiteral<"motion-sensor">;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
105
107
|
}, z.core.$strip>, z.ZodObject<{
|
|
106
108
|
type: z.ZodLiteral<"panic-button">;
|
|
107
109
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -227,6 +229,8 @@ export declare const sDeviceParam: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodInt
|
|
|
227
229
|
type: z.ZodLiteral<"camera-lift">;
|
|
228
230
|
}, z.core.$strip>, z.ZodObject<{
|
|
229
231
|
type: z.ZodLiteral<"motion-sensor">;
|
|
232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
230
234
|
}, z.core.$strip>, z.ZodObject<{
|
|
231
235
|
type: z.ZodLiteral<"panic-button">;
|
|
232
236
|
}, z.core.$strip>, z.ZodObject<{
|
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.106",
|
|
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",
|