@awarevue/api-types 2.0.21 → 2.0.23
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/_legacy/index.d.ts +2 -0
- package/dist/_legacy/index.js +2 -0
- package/dist/_legacy/milestone.js +1 -0
- package/dist/_legacy/orchid.js +1 -0
- package/dist/alarm-automation.d.ts +3 -3
- package/dist/alarm-automation.js +26 -37
- package/dist/api/agent-protocol/index.d.ts +1 -0
- package/dist/api/agent-protocol/index.js +1 -0
- package/dist/{agent-communication → api/agent-protocol}/protocol.d.ts +412 -598
- package/dist/api/agent-protocol/protocol.js +382 -0
- package/dist/api/commands/alarm.js +59 -0
- package/dist/{commands → api/commands}/all.d.ts +83 -83
- package/dist/{commands → api/commands}/all.js +22 -25
- package/dist/api/commands/camera-lift.js +14 -0
- package/dist/api/commands/camera.js +93 -0
- package/dist/api/commands/display.js +34 -0
- package/dist/api/commands/door.js +24 -0
- package/dist/api/commands/index.js +12 -0
- package/dist/api/commands/intercom-terminal.js +2 -0
- package/dist/api/commands/io-board.js +12 -0
- package/dist/api/commands/nvr-exporter.js +23 -0
- package/dist/api/commands/pbx.js +14 -0
- package/dist/api/commands/presence-tracker.js +30 -0
- package/dist/api/commands/server.js +24 -0
- package/dist/api/error.js +181 -0
- package/dist/api/events/alarm.js +52 -0
- package/dist/{events → api/events}/all.d.ts +8 -8
- package/dist/api/events/all.js +124 -0
- package/dist/api/events/camera.js +84 -0
- package/dist/api/events/display.js +6 -0
- package/dist/api/events/door.js +59 -0
- package/dist/api/events/index.js +12 -0
- package/dist/api/events/intercom-terminal.js +16 -0
- package/dist/api/events/io-board.js +10 -0
- package/dist/api/events/nvr-exporter.js +18 -0
- package/dist/api/events/panic-button.js +8 -0
- package/dist/api/events/presence-tracker.js +30 -0
- package/dist/api/events/reader.js +10 -0
- package/dist/{events → api/events}/server.d.ts +5 -5
- package/dist/api/events/server.js +12 -0
- package/dist/api/index.d.ts +9 -4
- package/dist/api/index.js +9 -20
- package/dist/api/mqtt/index.d.ts +1 -0
- package/dist/api/mqtt/index.js +1 -0
- package/dist/api/mqtt/payloads.js +18 -0
- package/dist/api/queries/all.js +25 -0
- package/dist/api/queries/camera.js +24 -0
- package/dist/api/queries/index.js +5 -0
- package/dist/api/queries/nvr-analytics-server.js +73 -0
- package/dist/api/queries/nvr-exporter.js +33 -0
- package/dist/api/queries/nvr-recorder.js +39 -0
- package/dist/api/rest/access-rule.d.ts +117 -0
- package/dist/api/rest/access-rule.js +10 -0
- package/dist/{access-control → api/rest}/agreement.d.ts +0 -20
- package/dist/api/rest/agreement.js +7 -0
- package/dist/api/rest/alarm.js +1 -0
- package/dist/{api-keys.d.ts → api/rest/api-keys.d.ts} +0 -20
- package/dist/api/rest/api-keys.js +11 -0
- package/dist/api/rest/app.js +9 -0
- package/dist/api/rest/auth.js +16 -0
- package/dist/{automation.d.ts → api/rest/automation.d.ts} +0 -217
- package/dist/api/rest/automation.js +14 -0
- package/dist/api/rest/aware-config.js +1 -0
- package/dist/{bookmarks.d.ts → api/rest/bookmarks.d.ts} +0 -49
- package/dist/api/rest/bookmarks.js +18 -0
- package/dist/api/rest/cast.js +7 -0
- package/dist/{custom-field.d.ts → api/rest/custom-field.d.ts} +1 -19
- package/dist/api/rest/custom-field.js +3 -0
- package/dist/{device-event.d.ts → api/rest/device-event.d.ts} +1 -1
- package/dist/api/rest/device-event.js +1 -0
- package/dist/{device-group.d.ts → api/rest/device-group.d.ts} +0 -23
- package/dist/api/rest/device-group.js +17 -0
- package/dist/api/rest/file.js +1 -0
- package/dist/api/rest/index.d.ts +34 -0
- package/dist/api/rest/index.js +34 -0
- package/dist/{device-factory.d.ts → api/rest/io-device.d.ts} +1 -1
- package/dist/api/rest/io-device.js +19 -0
- package/dist/{layout.d.ts → api/rest/layout.d.ts} +6 -107
- package/dist/api/rest/layout.js +19 -0
- package/dist/{macros.d.ts → api/rest/macros.d.ts} +0 -82
- package/dist/api/rest/macros.js +8 -0
- package/dist/api/rest/media.js +65 -0
- package/dist/api/rest/module-config.d.ts +19 -0
- package/dist/api/rest/module-config.js +1 -0
- package/dist/api/rest/notifications.d.ts +21 -0
- package/dist/api/rest/notifications.js +9 -0
- package/dist/api/rest/person-agreement.d.ts +15 -0
- package/dist/api/rest/person-agreement.js +6 -0
- package/dist/api/rest/person-presence.d.ts +72 -0
- package/dist/api/rest/person-presence.js +29 -0
- package/dist/{access-control → api/rest}/person-type.d.ts +1 -33
- package/dist/api/rest/person-type.js +8 -0
- package/dist/api/rest/person.d.ts +128 -0
- package/dist/api/rest/person.js +8 -0
- package/dist/api/{query.js → rest/query.js} +8 -13
- package/dist/api/rest/schedule.d.ts +249 -0
- package/dist/api/rest/schedule.js +9 -0
- package/dist/{security-level.d.ts → api/rest/security-level.d.ts} +0 -29
- package/dist/api/rest/security-level.js +5 -0
- package/dist/{template.d.ts → api/rest/template.d.ts} +1 -18
- package/dist/api/rest/template.js +12 -0
- package/dist/{token-conversion.d.ts → api/rest/token-conversion.d.ts} +0 -22
- package/dist/api/rest/token-conversion.js +5 -0
- package/dist/{user.d.ts → api/rest/user.d.ts} +10 -60
- package/dist/api/rest/user.js +32 -0
- package/dist/api/rest/view.d.ts +397 -0
- package/dist/api/rest/view.js +16 -0
- package/dist/api/rest/webrtc-playback.js +8 -0
- package/dist/{access-control → api/rest}/zone.d.ts +0 -29
- package/dist/api/rest/zone.js +10 -0
- package/dist/api/state/index.d.ts +10 -0
- package/dist/api/state/index.js +1 -0
- package/dist/api/ws/device-communication.js +55 -0
- package/dist/api/ws/index.js +5 -0
- package/dist/api/ws/notifications.js +20 -0
- package/dist/api/ws/progress.js +44 -0
- package/dist/api/ws/web-rtc-signaling.js +92 -0
- package/dist/api/ws/web-socket.js +2 -0
- package/dist/index.d.ts +1 -36
- package/dist/index.js +6 -57
- package/dist/{access-control → objects}/access-rule.d.ts +9 -78
- package/dist/objects/access-rule.js +36 -0
- package/dist/objects/agent-metadata.d.ts +192 -0
- package/dist/objects/agent-metadata.js +49 -0
- package/dist/objects/agreement.d.ts +21 -0
- package/dist/objects/agreement.js +8 -0
- package/dist/{objects.d.ts → objects/all.d.ts} +18 -11
- package/dist/{objects.js → objects/all.js} +4 -7
- package/dist/objects/api-key.d.ts +21 -0
- package/dist/objects/api-key.js +8 -0
- package/dist/objects/automation-rule.d.ts +218 -0
- package/dist/objects/automation-rule.js +51 -0
- package/dist/objects/bookmark.d.ts +50 -0
- package/dist/objects/bookmark.js +13 -0
- package/dist/objects/credential.js +11 -0
- package/dist/objects/custom-field.d.ts +20 -0
- package/dist/objects/custom-field.js +14 -0
- package/dist/{device → objects/device}/alarm.js +3 -6
- package/dist/{device → objects/device}/any-device.d.ts +510 -510
- package/dist/objects/device/any-device.js +239 -0
- package/dist/objects/device/camera-lift.js +4 -0
- package/dist/objects/device/camera.js +32 -0
- package/dist/objects/device/device-gateway.js +2 -0
- package/dist/{device-import.d.ts → objects/device/device-import.d.ts} +44 -44
- package/dist/objects/device/device-import.js +30 -0
- package/dist/{device-relation.js → objects/device/device-relation.js} +13 -16
- package/dist/objects/device/display.js +4 -0
- package/dist/objects/device/door.js +9 -0
- package/dist/{device → objects/device}/index.d.ts +2 -0
- package/dist/objects/device/index.js +22 -0
- package/dist/objects/device/intercom-operator.js +1 -0
- package/dist/objects/device/intercom-terminal.js +23 -0
- package/dist/objects/device/io-board.js +7 -0
- package/dist/objects/device/motion-sensor.js +4 -0
- package/dist/objects/device/nvr-analytics-server.js +6 -0
- package/dist/objects/device/nvr-exporter.js +7 -0
- package/dist/objects/device/nvr-recorder.js +6 -0
- package/dist/objects/device/panic-button.js +4 -0
- package/dist/objects/device/pbx.js +6 -0
- package/dist/objects/device/presence-tracker.js +1 -0
- package/dist/objects/device/reader.js +1 -0
- package/dist/{device → objects/device}/server.d.ts +1 -1
- package/dist/objects/device/server.js +1 -0
- package/dist/objects/device/system.js +6 -0
- package/dist/objects/device-group.d.ts +24 -0
- package/dist/objects/device-group.js +9 -0
- package/dist/objects/index.d.ts +27 -0
- package/dist/objects/index.js +27 -0
- package/dist/objects/layout.d.ts +102 -0
- package/dist/objects/layout.js +22 -0
- package/dist/objects/macro.d.ts +83 -0
- package/dist/objects/macro.js +22 -0
- package/dist/{module-config.d.ts → objects/module-config.d.ts} +1 -18
- package/dist/objects/module-config.js +1 -0
- package/dist/{notifications.d.ts → objects/notification.d.ts} +0 -20
- package/dist/objects/notification.js +13 -0
- package/dist/{access-control → objects}/person-agreement.d.ts +1 -15
- package/dist/objects/person-agreement.js +8 -0
- package/dist/{access-control → objects}/person-presence.d.ts +2 -73
- package/dist/objects/person-presence.js +35 -0
- package/dist/objects/person-type.d.ts +33 -0
- package/dist/objects/person-type.js +16 -0
- package/dist/{access-control → objects}/person.d.ts +74 -140
- package/dist/objects/person.js +42 -0
- package/dist/objects/role.d.ts +21 -0
- package/dist/objects/role.js +15 -0
- package/dist/{access-control → objects}/schedule.d.ts +4 -129
- package/dist/objects/schedule.js +53 -0
- package/dist/objects/security-level.d.ts +30 -0
- package/dist/objects/security-level.js +11 -0
- package/dist/objects/template.d.ts +20 -0
- package/dist/objects/template.js +8 -0
- package/dist/objects/token-conversion.d.ts +23 -0
- package/dist/objects/token-conversion.js +8 -0
- package/dist/objects/user.d.ts +31 -0
- package/dist/objects/user.js +12 -0
- package/dist/{view.d.ts → objects/view.d.ts} +3 -399
- package/dist/objects/view.js +64 -0
- package/dist/{world-objects.js → objects/world-object.js} +9 -8
- package/dist/objects/zone.d.ts +41 -0
- package/dist/objects/zone.js +15 -0
- package/dist/package.json +1 -1
- package/dist/permissions.js +146 -149
- package/dist/primitives.d.ts +30 -30
- package/dist/primitives.js +27 -30
- package/package.json +1 -1
- package/dist/access-control/access-rule.js +0 -49
- package/dist/access-control/agreement.js +0 -20
- package/dist/access-control/credential.js +0 -17
- package/dist/access-control/index.d.ts +0 -9
- package/dist/access-control/index.js +0 -25
- package/dist/access-control/person-agreement.js +0 -19
- package/dist/access-control/person-presence.js +0 -66
- package/dist/access-control/person-type.js +0 -29
- package/dist/access-control/person.js +0 -53
- package/dist/access-control/schedule.js +0 -65
- package/dist/access-control/zone.js +0 -28
- package/dist/agent-communication/index.d.ts +0 -2
- package/dist/agent-communication/index.js +0 -18
- package/dist/agent-communication/mqtt-payloads.js +0 -21
- package/dist/agent-communication/protocol.js +0 -434
- package/dist/api/alarm.js +0 -2
- package/dist/api/auth.js +0 -19
- package/dist/api/media.js +0 -68
- package/dist/api-keys.js +0 -21
- package/dist/app.js +0 -12
- package/dist/automation.js +0 -66
- package/dist/aware-config.js +0 -2
- package/dist/bookmarks.js +0 -32
- package/dist/cast.js +0 -13
- package/dist/commands/alarm.js +0 -62
- package/dist/commands/camera-lift.js +0 -17
- package/dist/commands/camera.js +0 -97
- package/dist/commands/display.js +0 -37
- package/dist/commands/door.js +0 -27
- package/dist/commands/index.js +0 -28
- package/dist/commands/intercom-terminal.js +0 -3
- package/dist/commands/io-board.js +0 -15
- package/dist/commands/nvr-exporter.js +0 -26
- package/dist/commands/pbx.js +0 -17
- package/dist/commands/presence-tracker.js +0 -33
- package/dist/commands/server.js +0 -27
- package/dist/custom-field.js +0 -19
- package/dist/device/any-device.js +0 -242
- package/dist/device/camera-lift.js +0 -7
- package/dist/device/camera.js +0 -35
- package/dist/device/device-gateway.js +0 -5
- package/dist/device/display.js +0 -7
- package/dist/device/door.js +0 -12
- package/dist/device/index.js +0 -36
- package/dist/device/intercom-operator.js +0 -4
- package/dist/device/intercom-terminal.js +0 -26
- package/dist/device/io-board.js +0 -10
- package/dist/device/motion-sensor.js +0 -7
- package/dist/device/nvr-analytics-server.js +0 -9
- package/dist/device/nvr-exporter.js +0 -10
- package/dist/device/nvr-recorder.js +0 -9
- package/dist/device/panic-button.js +0 -7
- package/dist/device/pbx.js +0 -9
- package/dist/device/presence-tracker.js +0 -4
- package/dist/device/reader.js +0 -4
- package/dist/device/server.js +0 -4
- package/dist/device/system.js +0 -9
- package/dist/device-event.js +0 -2
- package/dist/device-factory.js +0 -26
- package/dist/device-group.js +0 -31
- package/dist/device-import.js +0 -33
- package/dist/device-state.d.ts +0 -10
- package/dist/device-state.js +0 -2
- package/dist/error.js +0 -185
- package/dist/events/alarm.js +0 -55
- package/dist/events/all.js +0 -128
- package/dist/events/camera.js +0 -87
- package/dist/events/display.js +0 -9
- package/dist/events/door.js +0 -62
- package/dist/events/index.js +0 -28
- package/dist/events/intercom-terminal.js +0 -19
- package/dist/events/io-board.js +0 -13
- package/dist/events/nvr-exporter.js +0 -21
- package/dist/events/panic-button.js +0 -11
- package/dist/events/presence-tracker.js +0 -33
- package/dist/events/reader.js +0 -13
- package/dist/events/server.js +0 -15
- package/dist/file.js +0 -2
- package/dist/layout.js +0 -45
- package/dist/macros.js +0 -32
- package/dist/messages/device-communication.js +0 -63
- package/dist/messages/index.js +0 -21
- package/dist/messages/notifications.js +0 -27
- package/dist/messages/progress.js +0 -51
- package/dist/messages/web-rtc-signaling.js +0 -99
- package/dist/messages/web-socket.js +0 -5
- package/dist/milestone.js +0 -2
- package/dist/module-config.js +0 -2
- package/dist/notifications.js +0 -23
- package/dist/orchid.js +0 -2
- package/dist/queries/all.js +0 -28
- package/dist/queries/camera.js +0 -27
- package/dist/queries/index.js +0 -21
- package/dist/queries/nvr-analytics-server.js +0 -76
- package/dist/queries/nvr-exporter.js +0 -36
- package/dist/queries/nvr-recorder.js +0 -42
- package/dist/security-level.js +0 -18
- package/dist/template.js +0 -21
- package/dist/token-conversion.js +0 -15
- package/dist/user.js +0 -57
- package/dist/view.js +0 -84
- package/dist/webrtc-playback.js +0 -14
- package/dist/{milestone.d.ts → _legacy/milestone.d.ts} +0 -0
- package/dist/{orchid.d.ts → _legacy/orchid.d.ts} +0 -0
- package/dist/{commands → api/commands}/alarm.d.ts +0 -0
- package/dist/{commands → api/commands}/camera-lift.d.ts +0 -0
- package/dist/{commands → api/commands}/camera.d.ts +0 -0
- package/dist/{commands → api/commands}/display.d.ts +0 -0
- package/dist/{commands → api/commands}/door.d.ts +0 -0
- package/dist/{commands → api/commands}/index.d.ts +0 -0
- package/dist/{commands → api/commands}/intercom-terminal.d.ts +0 -0
- package/dist/{commands → api/commands}/io-board.d.ts +0 -0
- package/dist/{commands → api/commands}/nvr-exporter.d.ts +86 -86
- package/dist/{commands → api/commands}/pbx.d.ts +0 -0
- package/dist/{commands → api/commands}/presence-tracker.d.ts +0 -0
- package/dist/{commands → api/commands}/server.d.ts +78 -78
- package/dist/{error.d.ts → api/error.d.ts} +0 -0
- package/dist/{events → api/events}/alarm.d.ts +0 -0
- package/dist/{events → api/events}/camera.d.ts +0 -0
- package/dist/{events → api/events}/display.d.ts +0 -0
- package/dist/{events → api/events}/door.d.ts +0 -0
- package/dist/{events → api/events}/index.d.ts +0 -0
- package/dist/{events → api/events}/intercom-terminal.d.ts +0 -0
- package/dist/{events → api/events}/io-board.d.ts +0 -0
- package/dist/{events → api/events}/nvr-exporter.d.ts +4 -4
- package/dist/{events → api/events}/panic-button.d.ts +0 -0
- package/dist/{events → api/events}/presence-tracker.d.ts +8 -8
- package/dist/{events → api/events}/reader.d.ts +0 -0
- package/dist/{agent-communication/mqtt-payloads.d.ts → api/mqtt/payloads.d.ts} +0 -0
- package/dist/{queries → api/queries}/all.d.ts +83 -83
- package/dist/{queries → api/queries}/camera.d.ts +0 -0
- package/dist/{queries → api/queries}/index.d.ts +0 -0
- package/dist/{queries → api/queries}/nvr-analytics-server.d.ts +4 -4
- package/dist/{queries → api/queries}/nvr-exporter.d.ts +0 -0
- package/dist/{queries → api/queries}/nvr-recorder.d.ts +162 -162
- package/dist/api/{alarm.d.ts → rest/alarm.d.ts} +0 -0
- package/dist/{app.d.ts → api/rest/app.d.ts} +0 -0
- package/dist/api/{auth.d.ts → rest/auth.d.ts} +0 -0
- package/dist/{aware-config.d.ts → api/rest/aware-config.d.ts} +0 -0
- package/dist/{cast.d.ts → api/rest/cast.d.ts} +0 -0
- package/dist/{file.d.ts → api/rest/file.d.ts} +0 -0
- package/dist/api/{media.d.ts → rest/media.d.ts} +2 -2
- /package/dist/api/{query.d.ts → rest/query.d.ts} +0 -0
- /package/dist/{webrtc-playback.d.ts → api/rest/webrtc-playback.d.ts} +0 -0
- /package/dist/{messages → api/ws}/device-communication.d.ts +0 -0
- /package/dist/{messages → api/ws}/index.d.ts +0 -0
- /package/dist/{messages → api/ws}/notifications.d.ts +0 -0
- /package/dist/{messages → api/ws}/progress.d.ts +0 -0
- /package/dist/{messages → api/ws}/web-rtc-signaling.d.ts +0 -0
- /package/dist/{messages → api/ws}/web-socket.d.ts +0 -0
- /package/dist/{access-control → objects}/credential.d.ts +0 -0
- /package/dist/{device → objects/device}/alarm.d.ts +0 -0
- /package/dist/{device → objects/device}/camera-lift.d.ts +0 -0
- /package/dist/{device → objects/device}/camera.d.ts +0 -0
- /package/dist/{device → objects/device}/device-gateway.d.ts +0 -0
- /package/dist/{device-relation.d.ts → objects/device/device-relation.d.ts} +0 -0
- /package/dist/{device → objects/device}/display.d.ts +0 -0
- /package/dist/{device → objects/device}/door.d.ts +0 -0
- /package/dist/{device → objects/device}/intercom-operator.d.ts +0 -0
- /package/dist/{device → objects/device}/intercom-terminal.d.ts +0 -0
- /package/dist/{device → objects/device}/io-board.d.ts +0 -0
- /package/dist/{device → objects/device}/motion-sensor.d.ts +0 -0
- /package/dist/{device → objects/device}/nvr-analytics-server.d.ts +0 -0
- /package/dist/{device → objects/device}/nvr-exporter.d.ts +0 -0
- /package/dist/{device → objects/device}/nvr-recorder.d.ts +0 -0
- /package/dist/{device → objects/device}/panic-button.d.ts +0 -0
- /package/dist/{device → objects/device}/pbx.d.ts +0 -0
- /package/dist/{device → objects/device}/presence-tracker.d.ts +0 -0
- /package/dist/{device → objects/device}/reader.d.ts +0 -0
- /package/dist/{device → objects/device}/system.d.ts +0 -0
- /package/dist/{world-objects.d.ts → objects/world-object.d.ts} +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CAMERA, sCameraSpecs } from './camera';
|
|
3
|
+
import { DOOR, sDoorSpecs } from './door';
|
|
4
|
+
import { IO_BOARD, sIoBoardSpecs } from './io-board';
|
|
5
|
+
import { CAMERA_LIFT, sCameraLiftSpecs } from './camera-lift';
|
|
6
|
+
import { MOTION_SENSOR, sMotionSensorSpecs } from './motion-sensor';
|
|
7
|
+
import { PANIC_BUTTON, sPanicButtonSpecs } from './panic-button';
|
|
8
|
+
import { INTERCOM_OPERATOR } from './intercom-operator';
|
|
9
|
+
import { INTERCOM_TERMINAL, sIntercomTerminalSpecs } from './intercom-terminal';
|
|
10
|
+
import { PBX, sPbxSpecs } from './pbx';
|
|
11
|
+
import { SERVER } from './server';
|
|
12
|
+
import { ALARM, sAlarmSpecs } from './alarm';
|
|
13
|
+
import { sDeviceRelationDto, sDeviceRelationSide } from './device-relation';
|
|
14
|
+
import { DEVICE_GATEWAY } from './device-gateway';
|
|
15
|
+
import { PRESENCE_TRACKER } from './presence-tracker';
|
|
16
|
+
import { DISPLAY } from './display';
|
|
17
|
+
import { NVR_RECORDER, sRecorderSpecs } from './nvr-recorder';
|
|
18
|
+
import { NVR_EXPORTER, sExporterSpecs } from './nvr-exporter';
|
|
19
|
+
import { NVR_ANALYTICS_SERVER, sAnalyticsServerSpecs, } from './nvr-analytics-server';
|
|
20
|
+
import { SYSTEM, sSystemDeviceSpecs } from './system';
|
|
21
|
+
export const DEVICE_TYPES = [
|
|
22
|
+
ALARM,
|
|
23
|
+
SERVER,
|
|
24
|
+
CAMERA,
|
|
25
|
+
DOOR,
|
|
26
|
+
'reader',
|
|
27
|
+
IO_BOARD,
|
|
28
|
+
CAMERA_LIFT,
|
|
29
|
+
MOTION_SENSOR,
|
|
30
|
+
PANIC_BUTTON,
|
|
31
|
+
INTERCOM_OPERATOR,
|
|
32
|
+
INTERCOM_TERMINAL,
|
|
33
|
+
PBX,
|
|
34
|
+
DEVICE_GATEWAY,
|
|
35
|
+
PRESENCE_TRACKER,
|
|
36
|
+
DISPLAY,
|
|
37
|
+
NVR_RECORDER,
|
|
38
|
+
NVR_EXPORTER,
|
|
39
|
+
NVR_ANALYTICS_SERVER,
|
|
40
|
+
SYSTEM,
|
|
41
|
+
];
|
|
42
|
+
const sDeviceType = z.enum(DEVICE_TYPES);
|
|
43
|
+
const sAlarmSpecsWithType = sAlarmSpecs.merge(z.object({ type: z.literal(ALARM) }));
|
|
44
|
+
const sCameraSpecsWithType = sCameraSpecs.merge(z.object({ type: z.literal(CAMERA) }));
|
|
45
|
+
const sDoorSpecsWithType = sDoorSpecs.merge(z.object({ type: z.literal(DOOR) }));
|
|
46
|
+
const sIoBoardSpecsWithType = sIoBoardSpecs.merge(z.object({ type: z.literal(IO_BOARD) }));
|
|
47
|
+
const sCameraLiftSpecsWithType = sCameraLiftSpecs.merge(z.object({ type: z.literal(CAMERA_LIFT) }));
|
|
48
|
+
const sMotionSensorSpecsWithType = sMotionSensorSpecs.merge(z.object({ type: z.literal(MOTION_SENSOR) }));
|
|
49
|
+
const sPanicButtonSpecsWithType = sPanicButtonSpecs.merge(z.object({ type: z.literal(PANIC_BUTTON) }));
|
|
50
|
+
const sIntercomTerminalSpecsWithType = sIntercomTerminalSpecs.merge(z.object({ type: z.literal(INTERCOM_TERMINAL) }));
|
|
51
|
+
const sPbxSpecsWithType = sPbxSpecs.merge(z.object({ type: z.literal(PBX) }));
|
|
52
|
+
const sServerSpecsWithType = z.object({ type: z.literal(SERVER) });
|
|
53
|
+
const sIntercomOperatorSpecsWithType = z.object({
|
|
54
|
+
type: z.literal(INTERCOM_OPERATOR),
|
|
55
|
+
});
|
|
56
|
+
const sDeviceGatewaySpecsWithType = z.object({
|
|
57
|
+
type: z.literal(DEVICE_GATEWAY),
|
|
58
|
+
});
|
|
59
|
+
const sPresenceTrackerSpecsWithType = z.object({
|
|
60
|
+
type: z.literal(PRESENCE_TRACKER),
|
|
61
|
+
});
|
|
62
|
+
const sReaderSpecsWithType = z.object({ type: z.literal('reader') });
|
|
63
|
+
export const sDisplaySpecsWithType = z.object({ type: z.literal(DISPLAY) });
|
|
64
|
+
export const sRecorderSpecsWithType = sRecorderSpecs.merge(z.object({ type: z.literal(NVR_RECORDER) }));
|
|
65
|
+
export const sNvrExporterSpecsWithType = sExporterSpecs.merge(z.object({
|
|
66
|
+
type: z.literal(NVR_EXPORTER),
|
|
67
|
+
}));
|
|
68
|
+
export const sNvrAnalyticsServerSpecsWithType = sAnalyticsServerSpecs.merge(z.object({
|
|
69
|
+
type: z.literal(NVR_ANALYTICS_SERVER),
|
|
70
|
+
}));
|
|
71
|
+
export const sSystemDeviceSpecsWithType = z
|
|
72
|
+
.object({ type: z.literal(SYSTEM) })
|
|
73
|
+
.merge(sSystemDeviceSpecs);
|
|
74
|
+
export const sAnyDeviceSpecs = z.discriminatedUnion('type', [
|
|
75
|
+
sAlarmSpecsWithType,
|
|
76
|
+
sCameraSpecsWithType,
|
|
77
|
+
sDoorSpecsWithType,
|
|
78
|
+
sIoBoardSpecsWithType,
|
|
79
|
+
sCameraLiftSpecsWithType,
|
|
80
|
+
sMotionSensorSpecsWithType,
|
|
81
|
+
sPanicButtonSpecsWithType,
|
|
82
|
+
sIntercomTerminalSpecsWithType,
|
|
83
|
+
sPbxSpecsWithType,
|
|
84
|
+
sServerSpecsWithType,
|
|
85
|
+
sIntercomOperatorSpecsWithType,
|
|
86
|
+
sDeviceGatewaySpecsWithType,
|
|
87
|
+
sPresenceTrackerSpecsWithType,
|
|
88
|
+
sReaderSpecsWithType,
|
|
89
|
+
sDisplaySpecsWithType,
|
|
90
|
+
sRecorderSpecsWithType,
|
|
91
|
+
sNvrExporterSpecsWithType,
|
|
92
|
+
sNvrAnalyticsServerSpecsWithType,
|
|
93
|
+
sSystemDeviceSpecsWithType,
|
|
94
|
+
]);
|
|
95
|
+
export const sProviderMetadata = z.object({}).catchall(z.unknown());
|
|
96
|
+
export const sPresetDto = z.object({
|
|
97
|
+
id: z.string(),
|
|
98
|
+
name: z.string(),
|
|
99
|
+
params: z.unknown(),
|
|
100
|
+
isDefault: z.boolean(),
|
|
101
|
+
assignedRef: z.string().nullable(),
|
|
102
|
+
createdOn: z.string().datetime(),
|
|
103
|
+
lastModifiedOn: z.string().datetime(),
|
|
104
|
+
});
|
|
105
|
+
export const sDeviceMgmtInfo = z.object({
|
|
106
|
+
id: z.string(),
|
|
107
|
+
presets: z.array(sPresetDto),
|
|
108
|
+
providerAssignedName: z.string().nonempty(),
|
|
109
|
+
notes: z.string().nullable(),
|
|
110
|
+
tags: z.array(z.string()),
|
|
111
|
+
relations: z.array(sDeviceRelationSide),
|
|
112
|
+
groups: z.array(z.string()),
|
|
113
|
+
enabled: z.boolean(),
|
|
114
|
+
createdOn: z.string().datetime(),
|
|
115
|
+
lastModifiedOn: z.string().datetime(),
|
|
116
|
+
});
|
|
117
|
+
export const sForeignDeviceInfo = z.object({
|
|
118
|
+
name: z.string(),
|
|
119
|
+
foreignRef: z.string(),
|
|
120
|
+
provider: z.string(),
|
|
121
|
+
providerMetadata: sProviderMetadata,
|
|
122
|
+
});
|
|
123
|
+
export const sDeviceDto = sAnyDeviceSpecs
|
|
124
|
+
.and(sDeviceMgmtInfo)
|
|
125
|
+
.and(sForeignDeviceInfo);
|
|
126
|
+
export const sCameraDto = sCameraSpecsWithType
|
|
127
|
+
.and(sDeviceMgmtInfo)
|
|
128
|
+
.and(sForeignDeviceInfo);
|
|
129
|
+
export const sDoorDto = sDoorSpecsWithType
|
|
130
|
+
.and(sDeviceMgmtInfo)
|
|
131
|
+
.and(sForeignDeviceInfo);
|
|
132
|
+
export const sReaderDto = sReaderSpecsWithType
|
|
133
|
+
.and(sDeviceMgmtInfo)
|
|
134
|
+
.and(sForeignDeviceInfo);
|
|
135
|
+
export const sIoBoardDto = sIoBoardSpecsWithType
|
|
136
|
+
.and(sDeviceMgmtInfo)
|
|
137
|
+
.and(sForeignDeviceInfo);
|
|
138
|
+
export const sCameraLiftDto = sCameraLiftSpecsWithType
|
|
139
|
+
.and(sDeviceMgmtInfo)
|
|
140
|
+
.and(sForeignDeviceInfo);
|
|
141
|
+
export const sMotionSensorDto = sMotionSensorSpecsWithType
|
|
142
|
+
.and(sDeviceMgmtInfo)
|
|
143
|
+
.and(sForeignDeviceInfo);
|
|
144
|
+
export const sPanicButtonDto = sPanicButtonSpecsWithType
|
|
145
|
+
.and(sDeviceMgmtInfo)
|
|
146
|
+
.and(sForeignDeviceInfo);
|
|
147
|
+
export const sIntercomTerminalDto = sIntercomTerminalSpecsWithType
|
|
148
|
+
.and(sDeviceMgmtInfo)
|
|
149
|
+
.and(sForeignDeviceInfo);
|
|
150
|
+
export const sPbxDto = sPbxSpecsWithType
|
|
151
|
+
.and(sDeviceMgmtInfo)
|
|
152
|
+
.and(sForeignDeviceInfo);
|
|
153
|
+
export const sDeviceGatewayDto = sDeviceGatewaySpecsWithType
|
|
154
|
+
.and(sDeviceMgmtInfo)
|
|
155
|
+
.and(sForeignDeviceInfo);
|
|
156
|
+
export const sPresenceTrackerDto = sPresenceTrackerSpecsWithType
|
|
157
|
+
.and(sDeviceMgmtInfo)
|
|
158
|
+
.and(sForeignDeviceInfo);
|
|
159
|
+
export const sServerDto = sServerSpecsWithType
|
|
160
|
+
.and(sDeviceMgmtInfo)
|
|
161
|
+
.and(sForeignDeviceInfo);
|
|
162
|
+
export const sAlarmDto = sAlarmSpecsWithType
|
|
163
|
+
.and(sDeviceMgmtInfo)
|
|
164
|
+
.and(sForeignDeviceInfo);
|
|
165
|
+
export const sIntercomOperatorDto = sIntercomOperatorSpecsWithType
|
|
166
|
+
.and(sDeviceMgmtInfo)
|
|
167
|
+
.and(sForeignDeviceInfo);
|
|
168
|
+
export const sDisplayDto = sDisplaySpecsWithType
|
|
169
|
+
.and(sDeviceMgmtInfo)
|
|
170
|
+
.and(sForeignDeviceInfo);
|
|
171
|
+
export const sRecorderDto = sRecorderSpecsWithType
|
|
172
|
+
.and(sDeviceMgmtInfo)
|
|
173
|
+
.and(sForeignDeviceInfo);
|
|
174
|
+
export const sNvrExporterDto = sNvrExporterSpecsWithType
|
|
175
|
+
.and(sDeviceMgmtInfo)
|
|
176
|
+
.and(sForeignDeviceInfo);
|
|
177
|
+
export const sNvrAnalyticsServerDto = sNvrAnalyticsServerSpecsWithType
|
|
178
|
+
.and(sDeviceMgmtInfo)
|
|
179
|
+
.and(sForeignDeviceInfo);
|
|
180
|
+
export const sSystemDeviceDto = sSystemDeviceSpecsWithType
|
|
181
|
+
.and(sDeviceMgmtInfo)
|
|
182
|
+
.and(sForeignDeviceInfo);
|
|
183
|
+
export const sAddDeviceRequest = z.object({
|
|
184
|
+
name: z.string().nonempty(),
|
|
185
|
+
foreignRef: z.string().nonempty(),
|
|
186
|
+
notes: z.string().nullable(),
|
|
187
|
+
provider: z.string().nonempty(),
|
|
188
|
+
providerMetadata: sProviderMetadata,
|
|
189
|
+
tags: z.array(z.string().nonempty()),
|
|
190
|
+
relations: z.array(sDeviceRelationSide),
|
|
191
|
+
type: sDeviceType,
|
|
192
|
+
specs: z.object({}).catchall(z.unknown()).optional(),
|
|
193
|
+
});
|
|
194
|
+
export const sUpdateDeviceRequest = z.object({
|
|
195
|
+
id: z.string().nonempty(),
|
|
196
|
+
name: z.string().optional(),
|
|
197
|
+
notes: z.string().nullable().optional(),
|
|
198
|
+
providerMetadata: z.object({}).catchall(z.unknown()).optional(),
|
|
199
|
+
specs: z.object({}).catchall(z.unknown()).optional(),
|
|
200
|
+
tags: z.array(z.string()).optional(),
|
|
201
|
+
relations: z.array(sDeviceRelationSide).optional(),
|
|
202
|
+
enabled: z.boolean().optional(),
|
|
203
|
+
});
|
|
204
|
+
export const sOverrideDeviceSpecsRequest = z.object({
|
|
205
|
+
id: z.string(),
|
|
206
|
+
specs: z.object({}).catchall(z.unknown()),
|
|
207
|
+
});
|
|
208
|
+
export const sAddDevicePresetRequest = z.object({
|
|
209
|
+
name: z.string().nonempty(),
|
|
210
|
+
params: z.object({}).catchall(z.unknown()),
|
|
211
|
+
assignedRef: z.string().nullable(),
|
|
212
|
+
isDefault: z.boolean(),
|
|
213
|
+
deviceId: z.string().nonempty(),
|
|
214
|
+
});
|
|
215
|
+
export const sUpdateDevicePresetRequest = z.object({
|
|
216
|
+
name: z.string().optional(),
|
|
217
|
+
isDefault: z.boolean().optional(),
|
|
218
|
+
assignedRef: z.string().nullable().optional(),
|
|
219
|
+
deviceId: z.string().nonempty(),
|
|
220
|
+
presetId: z.string().nonempty(),
|
|
221
|
+
});
|
|
222
|
+
export const sRemoveDevicePresetRequest = z.object({
|
|
223
|
+
deviceId: z.string().nonempty(),
|
|
224
|
+
presetId: z.string().nonempty(),
|
|
225
|
+
});
|
|
226
|
+
export const sEventVariantDescription = z.object({
|
|
227
|
+
name: z.string().describe('The name of the variant'),
|
|
228
|
+
label: z.string().describe('A human-readable label for the variant'),
|
|
229
|
+
});
|
|
230
|
+
export const sEventDescription = z.object({
|
|
231
|
+
kind: z.string().describe('The kind of event'),
|
|
232
|
+
label: z.string().describe('A human-readable label for the event'),
|
|
233
|
+
variants: z
|
|
234
|
+
.array(sEventVariantDescription)
|
|
235
|
+
.optional()
|
|
236
|
+
.describe('Possible variants derived from event data'),
|
|
237
|
+
});
|
|
238
|
+
export const sGetEventCatalogResponse = z.array(sEventDescription);
|
|
239
|
+
export const sSetUnsetRelationRequest = sDeviceRelationDto;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const CAMERA = 'camera';
|
|
3
|
+
// SPECS
|
|
4
|
+
export const sWebRtcPlaybackSource = z
|
|
5
|
+
.object({
|
|
6
|
+
kind: z.string(),
|
|
7
|
+
})
|
|
8
|
+
.and(z.record(z.unknown()));
|
|
9
|
+
export const sStreamInfo = z.object({
|
|
10
|
+
id: z.string().nonempty(),
|
|
11
|
+
displayName: z.string().nonempty(),
|
|
12
|
+
externalPlayerUrl: z.string().nullable(),
|
|
13
|
+
rtspUrl: z.string().nonempty(),
|
|
14
|
+
});
|
|
15
|
+
export const sCameraSpecs = z.object({
|
|
16
|
+
lensType: z.enum(['flat', 'fisheye']),
|
|
17
|
+
mountPoint: z.enum(['wall', 'ceiling', 'floor']),
|
|
18
|
+
ptzCapable: z.boolean(),
|
|
19
|
+
ptzPanSpeed: z.number(),
|
|
20
|
+
ptzTiltSpeed: z.number(),
|
|
21
|
+
ptzZoomSpeed: z.number(),
|
|
22
|
+
panMin: z.number().min(-1).max(1),
|
|
23
|
+
panMax: z.number().min(-1).max(1),
|
|
24
|
+
tiltMin: z.number().min(-1).max(1),
|
|
25
|
+
tiltMax: z.number().min(-1).max(1),
|
|
26
|
+
zoomMin: z.number().min(0).max(1),
|
|
27
|
+
zoomMax: z.number().min(0).max(1),
|
|
28
|
+
recordingCapable: z.boolean(),
|
|
29
|
+
webrtcPlaybackSource: sWebRtcPlaybackSource.nullable(),
|
|
30
|
+
streams: z.array(sStreamInfo),
|
|
31
|
+
defaultStreamId: z.string().nonempty(),
|
|
32
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { DeviceDto } from './device';
|
|
2
|
+
import { DeviceDto } from './any-device';
|
|
3
3
|
import { DeviceRelationDto } from './device-relation';
|
|
4
4
|
export declare const sImportedDevice: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
5
5
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1275,18 +1275,18 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1275
1275
|
}, "strip", z.ZodTypeAny, {
|
|
1276
1276
|
name: string;
|
|
1277
1277
|
id: string;
|
|
1278
|
-
isDefault: boolean;
|
|
1279
|
-
assignedRef: string | null;
|
|
1280
1278
|
createdOn: string;
|
|
1281
1279
|
lastModifiedOn: string;
|
|
1280
|
+
isDefault: boolean;
|
|
1281
|
+
assignedRef: string | null;
|
|
1282
1282
|
params?: unknown;
|
|
1283
1283
|
}, {
|
|
1284
1284
|
name: string;
|
|
1285
1285
|
id: string;
|
|
1286
|
-
isDefault: boolean;
|
|
1287
|
-
assignedRef: string | null;
|
|
1288
1286
|
createdOn: string;
|
|
1289
1287
|
lastModifiedOn: string;
|
|
1288
|
+
isDefault: boolean;
|
|
1289
|
+
assignedRef: string | null;
|
|
1290
1290
|
params?: unknown;
|
|
1291
1291
|
}>, "many">;
|
|
1292
1292
|
providerAssignedName: z.ZodString;
|
|
@@ -1309,47 +1309,47 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1309
1309
|
}, "strip", z.ZodTypeAny, {
|
|
1310
1310
|
groups: string[];
|
|
1311
1311
|
id: string;
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1316
|
-
}, z.ZodUnknown, "strip">[];
|
|
1312
|
+
createdOn: string;
|
|
1313
|
+
lastModifiedOn: string;
|
|
1314
|
+
enabled: boolean;
|
|
1317
1315
|
presets: {
|
|
1318
1316
|
name: string;
|
|
1319
1317
|
id: string;
|
|
1320
|
-
isDefault: boolean;
|
|
1321
|
-
assignedRef: string | null;
|
|
1322
1318
|
createdOn: string;
|
|
1323
1319
|
lastModifiedOn: string;
|
|
1320
|
+
isDefault: boolean;
|
|
1321
|
+
assignedRef: string | null;
|
|
1324
1322
|
params?: unknown;
|
|
1325
1323
|
}[];
|
|
1326
|
-
createdOn: string;
|
|
1327
|
-
lastModifiedOn: string;
|
|
1328
1324
|
providerAssignedName: string;
|
|
1329
1325
|
notes: string | null;
|
|
1330
|
-
enabled: boolean;
|
|
1331
|
-
}, {
|
|
1332
|
-
groups: string[];
|
|
1333
|
-
id: string;
|
|
1334
1326
|
tags: string[];
|
|
1335
|
-
relations: z.
|
|
1327
|
+
relations: z.objectOutputType<{
|
|
1336
1328
|
id: z.ZodString;
|
|
1337
1329
|
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1338
1330
|
}, z.ZodUnknown, "strip">[];
|
|
1331
|
+
}, {
|
|
1332
|
+
groups: string[];
|
|
1333
|
+
id: string;
|
|
1334
|
+
createdOn: string;
|
|
1335
|
+
lastModifiedOn: string;
|
|
1336
|
+
enabled: boolean;
|
|
1339
1337
|
presets: {
|
|
1340
1338
|
name: string;
|
|
1341
1339
|
id: string;
|
|
1342
|
-
isDefault: boolean;
|
|
1343
|
-
assignedRef: string | null;
|
|
1344
1340
|
createdOn: string;
|
|
1345
1341
|
lastModifiedOn: string;
|
|
1342
|
+
isDefault: boolean;
|
|
1343
|
+
assignedRef: string | null;
|
|
1346
1344
|
params?: unknown;
|
|
1347
1345
|
}[];
|
|
1348
|
-
createdOn: string;
|
|
1349
|
-
lastModifiedOn: string;
|
|
1350
1346
|
providerAssignedName: string;
|
|
1351
1347
|
notes: string | null;
|
|
1352
|
-
|
|
1348
|
+
tags: string[];
|
|
1349
|
+
relations: z.objectInputType<{
|
|
1350
|
+
id: z.ZodString;
|
|
1351
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1352
|
+
}, z.ZodUnknown, "strip">[];
|
|
1353
1353
|
}>>, z.ZodObject<{
|
|
1354
1354
|
name: z.ZodString;
|
|
1355
1355
|
foreignRef: z.ZodString;
|
|
@@ -1470,25 +1470,25 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1470
1470
|
}) & {
|
|
1471
1471
|
groups: string[];
|
|
1472
1472
|
id: string;
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1477
|
-
}, z.ZodUnknown, "strip">[];
|
|
1473
|
+
createdOn: string;
|
|
1474
|
+
lastModifiedOn: string;
|
|
1475
|
+
enabled: boolean;
|
|
1478
1476
|
presets: {
|
|
1479
1477
|
name: string;
|
|
1480
1478
|
id: string;
|
|
1481
|
-
isDefault: boolean;
|
|
1482
|
-
assignedRef: string | null;
|
|
1483
1479
|
createdOn: string;
|
|
1484
1480
|
lastModifiedOn: string;
|
|
1481
|
+
isDefault: boolean;
|
|
1482
|
+
assignedRef: string | null;
|
|
1485
1483
|
params?: unknown;
|
|
1486
1484
|
}[];
|
|
1487
|
-
createdOn: string;
|
|
1488
|
-
lastModifiedOn: string;
|
|
1489
1485
|
providerAssignedName: string;
|
|
1490
1486
|
notes: string | null;
|
|
1491
|
-
|
|
1487
|
+
tags: string[];
|
|
1488
|
+
relations: z.objectOutputType<{
|
|
1489
|
+
id: z.ZodString;
|
|
1490
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1491
|
+
}, z.ZodUnknown, "strip">[];
|
|
1492
1492
|
}) & {
|
|
1493
1493
|
name: string;
|
|
1494
1494
|
foreignRef: string;
|
|
@@ -1671,25 +1671,25 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1671
1671
|
}) & {
|
|
1672
1672
|
groups: string[];
|
|
1673
1673
|
id: string;
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1678
|
-
}, z.ZodUnknown, "strip">[];
|
|
1674
|
+
createdOn: string;
|
|
1675
|
+
lastModifiedOn: string;
|
|
1676
|
+
enabled: boolean;
|
|
1679
1677
|
presets: {
|
|
1680
1678
|
name: string;
|
|
1681
1679
|
id: string;
|
|
1682
|
-
isDefault: boolean;
|
|
1683
|
-
assignedRef: string | null;
|
|
1684
1680
|
createdOn: string;
|
|
1685
1681
|
lastModifiedOn: string;
|
|
1682
|
+
isDefault: boolean;
|
|
1683
|
+
assignedRef: string | null;
|
|
1686
1684
|
params?: unknown;
|
|
1687
1685
|
}[];
|
|
1688
|
-
createdOn: string;
|
|
1689
|
-
lastModifiedOn: string;
|
|
1690
1686
|
providerAssignedName: string;
|
|
1691
1687
|
notes: string | null;
|
|
1692
|
-
|
|
1688
|
+
tags: string[];
|
|
1689
|
+
relations: z.objectInputType<{
|
|
1690
|
+
id: z.ZodString;
|
|
1691
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1692
|
+
}, z.ZodUnknown, "strip">[];
|
|
1693
1693
|
}) & {
|
|
1694
1694
|
name: string;
|
|
1695
1695
|
foreignRef: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { sAnyDeviceSpecs, sDeviceDto, sForeignDeviceInfo, } from './any-device';
|
|
3
|
+
import { sDeviceRelationDto } from './device-relation';
|
|
4
|
+
export const sImportedDevice = z
|
|
5
|
+
.object({
|
|
6
|
+
tags: z.array(z.string()).optional(),
|
|
7
|
+
})
|
|
8
|
+
.and(sForeignDeviceInfo)
|
|
9
|
+
.and(sAnyDeviceSpecs);
|
|
10
|
+
export const sDuplicateDevice = z.object({
|
|
11
|
+
name: z.string(),
|
|
12
|
+
refs: z.array(z.string()),
|
|
13
|
+
});
|
|
14
|
+
export const sDeviceDiscoveryDto = z.object({
|
|
15
|
+
devices: z.array(sImportedDevice),
|
|
16
|
+
relations: z.array(sDeviceRelationDto.and(z.object({ provider: z.string() }))),
|
|
17
|
+
});
|
|
18
|
+
export const sDeviceGetChangesDto = z.object({
|
|
19
|
+
added: z.array(sImportedDevice),
|
|
20
|
+
updated: z.array(z
|
|
21
|
+
.object({
|
|
22
|
+
id: z.string(),
|
|
23
|
+
provider: z.string(),
|
|
24
|
+
foreignRef: z.string(),
|
|
25
|
+
})
|
|
26
|
+
.catchall(z.unknown())),
|
|
27
|
+
removed: z.array(sDeviceDto),
|
|
28
|
+
relations: z.array(sDeviceRelationDto),
|
|
29
|
+
duplicates: z.array(sDuplicateDevice),
|
|
30
|
+
});
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.inverseRelationKinds = exports.relationKinds = exports.sDeviceRelationSide = exports.sDeviceRelationDto = exports.sDeviceRelationKind = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.sDeviceRelationKind = zod_1.z.enum([
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const sDeviceRelationKind = z.enum([
|
|
6
3
|
'attachedTo',
|
|
7
4
|
'parent',
|
|
8
5
|
'child',
|
|
@@ -23,20 +20,20 @@ exports.sDeviceRelationKind = zod_1.z.enum([
|
|
|
23
20
|
'reads',
|
|
24
21
|
'isReadBy',
|
|
25
22
|
]);
|
|
26
|
-
|
|
23
|
+
export const sDeviceRelationDto = z
|
|
27
24
|
.object({
|
|
28
|
-
leftId:
|
|
29
|
-
rightId:
|
|
30
|
-
kind:
|
|
25
|
+
leftId: z.string(),
|
|
26
|
+
rightId: z.string(),
|
|
27
|
+
kind: sDeviceRelationKind,
|
|
31
28
|
})
|
|
32
|
-
.catchall(
|
|
33
|
-
|
|
29
|
+
.catchall(z.unknown());
|
|
30
|
+
export const sDeviceRelationSide = z
|
|
34
31
|
.object({
|
|
35
|
-
id:
|
|
36
|
-
kind:
|
|
32
|
+
id: z.string(),
|
|
33
|
+
kind: sDeviceRelationKind,
|
|
37
34
|
})
|
|
38
|
-
.catchall(
|
|
39
|
-
|
|
35
|
+
.catchall(z.unknown());
|
|
36
|
+
export const relationKinds = {
|
|
40
37
|
attachedTo: 'attachedTo',
|
|
41
38
|
parent: 'parent',
|
|
42
39
|
child: 'child',
|
|
@@ -57,7 +54,7 @@ exports.relationKinds = {
|
|
|
57
54
|
reads: 'reads',
|
|
58
55
|
isReadBy: 'isReadBy',
|
|
59
56
|
};
|
|
60
|
-
|
|
57
|
+
export const inverseRelationKinds = {
|
|
61
58
|
attachedTo: 'attachedTo',
|
|
62
59
|
parent: 'child',
|
|
63
60
|
child: 'parent',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './camera';
|
|
2
|
+
export * from './door';
|
|
3
|
+
export * from './any-device';
|
|
4
|
+
export * from './device-import';
|
|
5
|
+
export * from './device-relation';
|
|
6
|
+
export * from './reader';
|
|
7
|
+
export * from './io-board';
|
|
8
|
+
export * from './camera-lift';
|
|
9
|
+
export * from './motion-sensor';
|
|
10
|
+
export * from './intercom-operator';
|
|
11
|
+
export * from './intercom-terminal';
|
|
12
|
+
export * from './panic-button';
|
|
13
|
+
export * from './pbx';
|
|
14
|
+
export * from './server';
|
|
15
|
+
export * from './alarm';
|
|
16
|
+
export * from './device-gateway';
|
|
17
|
+
export * from './presence-tracker';
|
|
18
|
+
export * from './display';
|
|
19
|
+
export * from './nvr-recorder';
|
|
20
|
+
export * from './nvr-exporter';
|
|
21
|
+
export * from './nvr-analytics-server';
|
|
22
|
+
export * from './system';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const INTERCOM_OPERATOR = 'intercom-operator';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const INTERCOM_TERMINAL = 'intercom-terminal';
|
|
3
|
+
// SPECS
|
|
4
|
+
export const sIntercomTerminalSpecs = z.object({
|
|
5
|
+
sipUri: z.string(),
|
|
6
|
+
sipUser: z.string(),
|
|
7
|
+
sipPassword: z.string(),
|
|
8
|
+
sipRealm: z.string(),
|
|
9
|
+
remoteExtension: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export const sAddIntercomTerminal = z.object({
|
|
12
|
+
name: z.string(),
|
|
13
|
+
foreignRef: z.string(),
|
|
14
|
+
specs: sIntercomTerminalSpecs,
|
|
15
|
+
});
|
|
16
|
+
// STATE
|
|
17
|
+
const sCallState = z.enum(['connecting', 'connected', 'ringing', 'terminated']);
|
|
18
|
+
export const sIntercomTerminalState = z.object({
|
|
19
|
+
callState: sCallState.nullable(),
|
|
20
|
+
connected: z.boolean(),
|
|
21
|
+
callId: z.string().nullable(),
|
|
22
|
+
peer: z.string().nullable(),
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PRESENCE_TRACKER = 'presence-tracker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const READER = 'reader';
|