@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
|
@@ -9,7 +9,7 @@ import { NvrExporterCommand } from './nvr-exporter';
|
|
|
9
9
|
import { PbxCommand } from './pbx';
|
|
10
10
|
import { PresenceTrackerCommand } from './presence-tracker';
|
|
11
11
|
import { ServerCommand } from './server';
|
|
12
|
-
import { PermissionId } from '
|
|
12
|
+
import { PermissionId } from '../../permissions';
|
|
13
13
|
export type AnyDeviceCommand = ServerCommand | CameraCommand | DoorCommand | IoBoardCommand | CameraLiftCommand | AlarmCommand | IntercomTerminalCommand | PbxCommand | PresenceTrackerCommand | DisplayCommand | NvrExporterCommand;
|
|
14
14
|
export type CommandRun<TCommand extends AnyDeviceCommand = AnyDeviceCommand> = {
|
|
15
15
|
timestamp: number;
|
|
@@ -58,52 +58,52 @@ export declare const commandSchemas: {
|
|
|
58
58
|
}, "strip", import("zod").ZodTypeAny, {
|
|
59
59
|
name: string;
|
|
60
60
|
id: string;
|
|
61
|
-
isDefault: boolean;
|
|
62
|
-
assignedRef: string | null;
|
|
63
61
|
createdOn: string;
|
|
64
62
|
lastModifiedOn: string;
|
|
63
|
+
isDefault: boolean;
|
|
64
|
+
assignedRef: string | null;
|
|
65
65
|
params?: unknown;
|
|
66
66
|
}, {
|
|
67
67
|
name: string;
|
|
68
68
|
id: string;
|
|
69
|
-
isDefault: boolean;
|
|
70
|
-
assignedRef: string | null;
|
|
71
69
|
createdOn: string;
|
|
72
70
|
lastModifiedOn: string;
|
|
71
|
+
isDefault: boolean;
|
|
72
|
+
assignedRef: string | null;
|
|
73
73
|
params?: unknown;
|
|
74
74
|
}>, "many">;
|
|
75
75
|
}, "strip", import("zod").ZodTypeAny, {
|
|
76
76
|
name: string;
|
|
77
77
|
foreignRef: string;
|
|
78
|
-
provider: string;
|
|
79
|
-
providerMetadata: {} & {
|
|
80
|
-
[k: string]: unknown;
|
|
81
|
-
};
|
|
82
78
|
presets: {
|
|
83
79
|
name: string;
|
|
84
80
|
id: string;
|
|
85
|
-
isDefault: boolean;
|
|
86
|
-
assignedRef: string | null;
|
|
87
81
|
createdOn: string;
|
|
88
82
|
lastModifiedOn: string;
|
|
83
|
+
isDefault: boolean;
|
|
84
|
+
assignedRef: string | null;
|
|
89
85
|
params?: unknown;
|
|
90
86
|
}[];
|
|
91
|
-
}, {
|
|
92
|
-
name: string;
|
|
93
|
-
foreignRef: string;
|
|
94
87
|
provider: string;
|
|
95
88
|
providerMetadata: {} & {
|
|
96
89
|
[k: string]: unknown;
|
|
97
90
|
};
|
|
91
|
+
}, {
|
|
92
|
+
name: string;
|
|
93
|
+
foreignRef: string;
|
|
98
94
|
presets: {
|
|
99
95
|
name: string;
|
|
100
96
|
id: string;
|
|
101
|
-
isDefault: boolean;
|
|
102
|
-
assignedRef: string | null;
|
|
103
97
|
createdOn: string;
|
|
104
98
|
lastModifiedOn: string;
|
|
99
|
+
isDefault: boolean;
|
|
100
|
+
assignedRef: string | null;
|
|
105
101
|
params?: unknown;
|
|
106
102
|
}[];
|
|
103
|
+
provider: string;
|
|
104
|
+
providerMetadata: {} & {
|
|
105
|
+
[k: string]: unknown;
|
|
106
|
+
};
|
|
107
107
|
}>, import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
|
|
108
108
|
type: import("zod").ZodLiteral<"alarm">;
|
|
109
109
|
}, "strip", import("zod").ZodTypeAny, {
|
|
@@ -353,19 +353,19 @@ export declare const commandSchemas: {
|
|
|
353
353
|
source: string | [string, string] | ({
|
|
354
354
|
name: string;
|
|
355
355
|
foreignRef: string;
|
|
356
|
-
provider: string;
|
|
357
|
-
providerMetadata: {} & {
|
|
358
|
-
[k: string]: unknown;
|
|
359
|
-
};
|
|
360
356
|
presets: {
|
|
361
357
|
name: string;
|
|
362
358
|
id: string;
|
|
363
|
-
isDefault: boolean;
|
|
364
|
-
assignedRef: string | null;
|
|
365
359
|
createdOn: string;
|
|
366
360
|
lastModifiedOn: string;
|
|
361
|
+
isDefault: boolean;
|
|
362
|
+
assignedRef: string | null;
|
|
367
363
|
params?: unknown;
|
|
368
364
|
}[];
|
|
365
|
+
provider: string;
|
|
366
|
+
providerMetadata: {} & {
|
|
367
|
+
[k: string]: unknown;
|
|
368
|
+
};
|
|
369
369
|
} & ({
|
|
370
370
|
type: "alarm";
|
|
371
371
|
} | {
|
|
@@ -449,19 +449,19 @@ export declare const commandSchemas: {
|
|
|
449
449
|
source: string | [string, string] | ({
|
|
450
450
|
name: string;
|
|
451
451
|
foreignRef: string;
|
|
452
|
-
provider: string;
|
|
453
|
-
providerMetadata: {} & {
|
|
454
|
-
[k: string]: unknown;
|
|
455
|
-
};
|
|
456
452
|
presets: {
|
|
457
453
|
name: string;
|
|
458
454
|
id: string;
|
|
459
|
-
isDefault: boolean;
|
|
460
|
-
assignedRef: string | null;
|
|
461
455
|
createdOn: string;
|
|
462
456
|
lastModifiedOn: string;
|
|
457
|
+
isDefault: boolean;
|
|
458
|
+
assignedRef: string | null;
|
|
463
459
|
params?: unknown;
|
|
464
460
|
}[];
|
|
461
|
+
provider: string;
|
|
462
|
+
providerMetadata: {} & {
|
|
463
|
+
[k: string]: unknown;
|
|
464
|
+
};
|
|
465
465
|
} & ({
|
|
466
466
|
type: "alarm";
|
|
467
467
|
} | {
|
|
@@ -547,19 +547,19 @@ export declare const commandSchemas: {
|
|
|
547
547
|
source: string | [string, string] | ({
|
|
548
548
|
name: string;
|
|
549
549
|
foreignRef: string;
|
|
550
|
-
provider: string;
|
|
551
|
-
providerMetadata: {} & {
|
|
552
|
-
[k: string]: unknown;
|
|
553
|
-
};
|
|
554
550
|
presets: {
|
|
555
551
|
name: string;
|
|
556
552
|
id: string;
|
|
557
|
-
isDefault: boolean;
|
|
558
|
-
assignedRef: string | null;
|
|
559
553
|
createdOn: string;
|
|
560
554
|
lastModifiedOn: string;
|
|
555
|
+
isDefault: boolean;
|
|
556
|
+
assignedRef: string | null;
|
|
561
557
|
params?: unknown;
|
|
562
558
|
}[];
|
|
559
|
+
provider: string;
|
|
560
|
+
providerMetadata: {} & {
|
|
561
|
+
[k: string]: unknown;
|
|
562
|
+
};
|
|
563
563
|
} & ({
|
|
564
564
|
type: "alarm";
|
|
565
565
|
} | {
|
|
@@ -646,19 +646,19 @@ export declare const commandSchemas: {
|
|
|
646
646
|
source: string | [string, string] | ({
|
|
647
647
|
name: string;
|
|
648
648
|
foreignRef: string;
|
|
649
|
-
provider: string;
|
|
650
|
-
providerMetadata: {} & {
|
|
651
|
-
[k: string]: unknown;
|
|
652
|
-
};
|
|
653
649
|
presets: {
|
|
654
650
|
name: string;
|
|
655
651
|
id: string;
|
|
656
|
-
isDefault: boolean;
|
|
657
|
-
assignedRef: string | null;
|
|
658
652
|
createdOn: string;
|
|
659
653
|
lastModifiedOn: string;
|
|
654
|
+
isDefault: boolean;
|
|
655
|
+
assignedRef: string | null;
|
|
660
656
|
params?: unknown;
|
|
661
657
|
}[];
|
|
658
|
+
provider: string;
|
|
659
|
+
providerMetadata: {} & {
|
|
660
|
+
[k: string]: unknown;
|
|
661
|
+
};
|
|
662
662
|
} & ({
|
|
663
663
|
type: "alarm";
|
|
664
664
|
} | {
|
|
@@ -761,52 +761,52 @@ export declare const commandSchemas: {
|
|
|
761
761
|
}, "strip", import("zod").ZodTypeAny, {
|
|
762
762
|
name: string;
|
|
763
763
|
id: string;
|
|
764
|
-
isDefault: boolean;
|
|
765
|
-
assignedRef: string | null;
|
|
766
764
|
createdOn: string;
|
|
767
765
|
lastModifiedOn: string;
|
|
766
|
+
isDefault: boolean;
|
|
767
|
+
assignedRef: string | null;
|
|
768
768
|
params?: unknown;
|
|
769
769
|
}, {
|
|
770
770
|
name: string;
|
|
771
771
|
id: string;
|
|
772
|
-
isDefault: boolean;
|
|
773
|
-
assignedRef: string | null;
|
|
774
772
|
createdOn: string;
|
|
775
773
|
lastModifiedOn: string;
|
|
774
|
+
isDefault: boolean;
|
|
775
|
+
assignedRef: string | null;
|
|
776
776
|
params?: unknown;
|
|
777
777
|
}>, "many">;
|
|
778
778
|
}, "strip", import("zod").ZodTypeAny, {
|
|
779
779
|
name: string;
|
|
780
780
|
foreignRef: string;
|
|
781
|
-
provider: string;
|
|
782
|
-
providerMetadata: {} & {
|
|
783
|
-
[k: string]: unknown;
|
|
784
|
-
};
|
|
785
781
|
presets: {
|
|
786
782
|
name: string;
|
|
787
783
|
id: string;
|
|
788
|
-
isDefault: boolean;
|
|
789
|
-
assignedRef: string | null;
|
|
790
784
|
createdOn: string;
|
|
791
785
|
lastModifiedOn: string;
|
|
786
|
+
isDefault: boolean;
|
|
787
|
+
assignedRef: string | null;
|
|
792
788
|
params?: unknown;
|
|
793
789
|
}[];
|
|
794
|
-
}, {
|
|
795
|
-
name: string;
|
|
796
|
-
foreignRef: string;
|
|
797
790
|
provider: string;
|
|
798
791
|
providerMetadata: {} & {
|
|
799
792
|
[k: string]: unknown;
|
|
800
793
|
};
|
|
794
|
+
}, {
|
|
795
|
+
name: string;
|
|
796
|
+
foreignRef: string;
|
|
801
797
|
presets: {
|
|
802
798
|
name: string;
|
|
803
799
|
id: string;
|
|
804
|
-
isDefault: boolean;
|
|
805
|
-
assignedRef: string | null;
|
|
806
800
|
createdOn: string;
|
|
807
801
|
lastModifiedOn: string;
|
|
802
|
+
isDefault: boolean;
|
|
803
|
+
assignedRef: string | null;
|
|
808
804
|
params?: unknown;
|
|
809
805
|
}[];
|
|
806
|
+
provider: string;
|
|
807
|
+
providerMetadata: {} & {
|
|
808
|
+
[k: string]: unknown;
|
|
809
|
+
};
|
|
810
810
|
}>, import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
|
|
811
811
|
type: import("zod").ZodLiteral<"alarm">;
|
|
812
812
|
}, "strip", import("zod").ZodTypeAny, {
|
|
@@ -1051,23 +1051,22 @@ export declare const commandSchemas: {
|
|
|
1051
1051
|
name: import("zod").ZodString;
|
|
1052
1052
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1053
1053
|
name: string;
|
|
1054
|
-
requestId: string;
|
|
1055
1054
|
device: string | [string, string] | ({
|
|
1056
1055
|
name: string;
|
|
1057
1056
|
foreignRef: string;
|
|
1058
|
-
provider: string;
|
|
1059
|
-
providerMetadata: {} & {
|
|
1060
|
-
[k: string]: unknown;
|
|
1061
|
-
};
|
|
1062
1057
|
presets: {
|
|
1063
1058
|
name: string;
|
|
1064
1059
|
id: string;
|
|
1065
|
-
isDefault: boolean;
|
|
1066
|
-
assignedRef: string | null;
|
|
1067
1060
|
createdOn: string;
|
|
1068
1061
|
lastModifiedOn: string;
|
|
1062
|
+
isDefault: boolean;
|
|
1063
|
+
assignedRef: string | null;
|
|
1069
1064
|
params?: unknown;
|
|
1070
1065
|
}[];
|
|
1066
|
+
provider: string;
|
|
1067
|
+
providerMetadata: {} & {
|
|
1068
|
+
[k: string]: unknown;
|
|
1069
|
+
};
|
|
1071
1070
|
} & ({
|
|
1072
1071
|
type: "alarm";
|
|
1073
1072
|
} | {
|
|
@@ -1142,27 +1141,27 @@ export declare const commandSchemas: {
|
|
|
1142
1141
|
} | {
|
|
1143
1142
|
type: "system";
|
|
1144
1143
|
}));
|
|
1144
|
+
requestId: string;
|
|
1145
1145
|
timeFrom: number;
|
|
1146
1146
|
timeTo: number;
|
|
1147
1147
|
}, {
|
|
1148
1148
|
name: string;
|
|
1149
|
-
requestId: string;
|
|
1150
1149
|
device: string | [string, string] | ({
|
|
1151
1150
|
name: string;
|
|
1152
1151
|
foreignRef: string;
|
|
1153
|
-
provider: string;
|
|
1154
|
-
providerMetadata: {} & {
|
|
1155
|
-
[k: string]: unknown;
|
|
1156
|
-
};
|
|
1157
1152
|
presets: {
|
|
1158
1153
|
name: string;
|
|
1159
1154
|
id: string;
|
|
1160
|
-
isDefault: boolean;
|
|
1161
|
-
assignedRef: string | null;
|
|
1162
1155
|
createdOn: string;
|
|
1163
1156
|
lastModifiedOn: string;
|
|
1157
|
+
isDefault: boolean;
|
|
1158
|
+
assignedRef: string | null;
|
|
1164
1159
|
params?: unknown;
|
|
1165
1160
|
}[];
|
|
1161
|
+
provider: string;
|
|
1162
|
+
providerMetadata: {} & {
|
|
1163
|
+
[k: string]: unknown;
|
|
1164
|
+
};
|
|
1166
1165
|
} & ({
|
|
1167
1166
|
type: "alarm";
|
|
1168
1167
|
} | {
|
|
@@ -1237,29 +1236,29 @@ export declare const commandSchemas: {
|
|
|
1237
1236
|
} | {
|
|
1238
1237
|
type: "system";
|
|
1239
1238
|
}));
|
|
1239
|
+
requestId: string;
|
|
1240
1240
|
timeFrom: number;
|
|
1241
1241
|
timeTo: number;
|
|
1242
1242
|
}>;
|
|
1243
1243
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1244
1244
|
params: {
|
|
1245
1245
|
name: string;
|
|
1246
|
-
requestId: string;
|
|
1247
1246
|
device: string | [string, string] | ({
|
|
1248
1247
|
name: string;
|
|
1249
1248
|
foreignRef: string;
|
|
1250
|
-
provider: string;
|
|
1251
|
-
providerMetadata: {} & {
|
|
1252
|
-
[k: string]: unknown;
|
|
1253
|
-
};
|
|
1254
1249
|
presets: {
|
|
1255
1250
|
name: string;
|
|
1256
1251
|
id: string;
|
|
1257
|
-
isDefault: boolean;
|
|
1258
|
-
assignedRef: string | null;
|
|
1259
1252
|
createdOn: string;
|
|
1260
1253
|
lastModifiedOn: string;
|
|
1254
|
+
isDefault: boolean;
|
|
1255
|
+
assignedRef: string | null;
|
|
1261
1256
|
params?: unknown;
|
|
1262
1257
|
}[];
|
|
1258
|
+
provider: string;
|
|
1259
|
+
providerMetadata: {} & {
|
|
1260
|
+
[k: string]: unknown;
|
|
1261
|
+
};
|
|
1263
1262
|
} & ({
|
|
1264
1263
|
type: "alarm";
|
|
1265
1264
|
} | {
|
|
@@ -1334,6 +1333,7 @@ export declare const commandSchemas: {
|
|
|
1334
1333
|
} | {
|
|
1335
1334
|
type: "system";
|
|
1336
1335
|
}));
|
|
1336
|
+
requestId: string;
|
|
1337
1337
|
timeFrom: number;
|
|
1338
1338
|
timeTo: number;
|
|
1339
1339
|
};
|
|
@@ -1341,23 +1341,22 @@ export declare const commandSchemas: {
|
|
|
1341
1341
|
}, {
|
|
1342
1342
|
params: {
|
|
1343
1343
|
name: string;
|
|
1344
|
-
requestId: string;
|
|
1345
1344
|
device: string | [string, string] | ({
|
|
1346
1345
|
name: string;
|
|
1347
1346
|
foreignRef: string;
|
|
1348
|
-
provider: string;
|
|
1349
|
-
providerMetadata: {} & {
|
|
1350
|
-
[k: string]: unknown;
|
|
1351
|
-
};
|
|
1352
1347
|
presets: {
|
|
1353
1348
|
name: string;
|
|
1354
1349
|
id: string;
|
|
1355
|
-
isDefault: boolean;
|
|
1356
|
-
assignedRef: string | null;
|
|
1357
1350
|
createdOn: string;
|
|
1358
1351
|
lastModifiedOn: string;
|
|
1352
|
+
isDefault: boolean;
|
|
1353
|
+
assignedRef: string | null;
|
|
1359
1354
|
params?: unknown;
|
|
1360
1355
|
}[];
|
|
1356
|
+
provider: string;
|
|
1357
|
+
providerMetadata: {} & {
|
|
1358
|
+
[k: string]: unknown;
|
|
1359
|
+
};
|
|
1361
1360
|
} & ({
|
|
1362
1361
|
type: "alarm";
|
|
1363
1362
|
} | {
|
|
@@ -1432,6 +1431,7 @@ export declare const commandSchemas: {
|
|
|
1432
1431
|
} | {
|
|
1433
1432
|
type: "system";
|
|
1434
1433
|
}));
|
|
1434
|
+
requestId: string;
|
|
1435
1435
|
timeFrom: number;
|
|
1436
1436
|
timeTo: number;
|
|
1437
1437
|
};
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...
|
|
16
|
-
...
|
|
17
|
-
...
|
|
18
|
-
...
|
|
19
|
-
...
|
|
20
|
-
...
|
|
21
|
-
...
|
|
22
|
-
...display_1.displayCommands,
|
|
23
|
-
...nvr_exporter_1.nvrExporterCommandSchemas,
|
|
24
|
-
...server_1.serverCommands,
|
|
1
|
+
import { alarmCommandSchemas } from './alarm';
|
|
2
|
+
import { cameraCommands } from './camera';
|
|
3
|
+
import { cameraLiftCommands } from './camera-lift';
|
|
4
|
+
import { displayCommands } from './display';
|
|
5
|
+
import { doorCommands } from './door';
|
|
6
|
+
import { ioBoardCommands } from './io-board';
|
|
7
|
+
import { nvrExporterCommandSchemas } from './nvr-exporter';
|
|
8
|
+
import { pbxCommands } from './pbx';
|
|
9
|
+
import { presenceTrackerCommands, } from './presence-tracker';
|
|
10
|
+
import { serverCommands } from './server';
|
|
11
|
+
export const commandSchemas = {
|
|
12
|
+
...alarmCommandSchemas,
|
|
13
|
+
...cameraCommands,
|
|
14
|
+
...cameraLiftCommands,
|
|
15
|
+
...doorCommands,
|
|
16
|
+
...ioBoardCommands,
|
|
17
|
+
...pbxCommands,
|
|
18
|
+
...presenceTrackerCommands,
|
|
19
|
+
...displayCommands,
|
|
20
|
+
...nvrExporterCommandSchemas,
|
|
21
|
+
...serverCommands,
|
|
25
22
|
};
|
|
26
|
-
|
|
23
|
+
export const commandDescriptions = {
|
|
27
24
|
'camera.ptz-set': { description: 'PTZ Set', permission: 'camera:ptz' },
|
|
28
25
|
'camera.ptz-move': { description: 'PTZ Move', permission: 'camera:ptz' },
|
|
29
26
|
'camera.ptz-begin-move': {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// COMMANDS
|
|
3
|
+
export const sCameraLiftRaiseCommand = z.object({
|
|
4
|
+
command: z.literal('camera-lift.raise'),
|
|
5
|
+
params: z.object({}),
|
|
6
|
+
});
|
|
7
|
+
export const sCameraLiftLowerCommand = z.object({
|
|
8
|
+
command: z.literal('camera-lift.lower'),
|
|
9
|
+
params: z.object({}),
|
|
10
|
+
});
|
|
11
|
+
export const cameraLiftCommands = {
|
|
12
|
+
'camera-lift.raise': sCameraLiftRaiseCommand,
|
|
13
|
+
'camera-lift.lower': sCameraLiftLowerCommand,
|
|
14
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { sCameraPresetInfo, sPresetId } from '../../primitives';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const isPtzParams = (params) => typeof params.pan === 'number' &&
|
|
4
|
+
typeof params.tilt === 'number' &&
|
|
5
|
+
typeof params.zoom === 'number';
|
|
6
|
+
// COMMANDS
|
|
7
|
+
export const sCameraPresetSaveCommand = z.object({
|
|
8
|
+
command: z.literal('camera.preset-save'),
|
|
9
|
+
params: z.object({
|
|
10
|
+
presetId: sPresetId,
|
|
11
|
+
presetInfo: sCameraPresetInfo,
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
export const sCameraPresetActivateCommand = z.object({
|
|
15
|
+
command: z.literal('camera.preset-activate'),
|
|
16
|
+
params: z.object({
|
|
17
|
+
presetId: sPresetId,
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
export const sCameraPresetDeleteCommand = z.object({
|
|
21
|
+
command: z.literal('camera.preset-delete'),
|
|
22
|
+
params: z.object({
|
|
23
|
+
presetId: sPresetId,
|
|
24
|
+
assignedRef: z.string().nullable(),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
export const sCameraPtzSetCommand = z.object({
|
|
28
|
+
command: z.literal('camera.ptz-set'),
|
|
29
|
+
params: z.object({
|
|
30
|
+
pan: z.number(),
|
|
31
|
+
tilt: z.number(),
|
|
32
|
+
zoom: z.number(),
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
35
|
+
export const sPtzDirection = z.enum([
|
|
36
|
+
'Up',
|
|
37
|
+
'Down',
|
|
38
|
+
'Left',
|
|
39
|
+
'Right',
|
|
40
|
+
'ZoomIn',
|
|
41
|
+
'ZoomOut',
|
|
42
|
+
'UpLeft',
|
|
43
|
+
'UpRight',
|
|
44
|
+
'DownLeft',
|
|
45
|
+
'DownRight',
|
|
46
|
+
]);
|
|
47
|
+
export const sCameraPtzMoveCommand = z.object({
|
|
48
|
+
command: z.literal('camera.ptz-move'),
|
|
49
|
+
params: z.object({
|
|
50
|
+
direction: sPtzDirection,
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
export const sCameraPtzBeginMoveCommand = z.object({
|
|
54
|
+
command: z.literal('camera.ptz-begin-move'),
|
|
55
|
+
params: z.object({
|
|
56
|
+
pan: z.number(),
|
|
57
|
+
tilt: z.number(),
|
|
58
|
+
zoom: z.number(),
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
61
|
+
export const sCameraPtzEndMoveCommand = z.object({
|
|
62
|
+
command: z.literal('camera.ptz-end-move'),
|
|
63
|
+
params: z.object({}),
|
|
64
|
+
});
|
|
65
|
+
export const sCameraEnableCommand = z.object({
|
|
66
|
+
command: z.literal('camera.enable'),
|
|
67
|
+
params: z.object({}),
|
|
68
|
+
});
|
|
69
|
+
export const sCameraDisableCommand = z.object({
|
|
70
|
+
command: z.literal('camera.disable'),
|
|
71
|
+
params: z.object({}),
|
|
72
|
+
});
|
|
73
|
+
export const sCameraEnableDetectionCommand = z.object({
|
|
74
|
+
command: z.literal('camera.enable-detection'),
|
|
75
|
+
params: z.object({}),
|
|
76
|
+
});
|
|
77
|
+
export const sCameraDisableDetectionCommand = z.object({
|
|
78
|
+
command: z.literal('camera.disable-detection'),
|
|
79
|
+
params: z.object({}),
|
|
80
|
+
});
|
|
81
|
+
export const cameraCommands = {
|
|
82
|
+
'camera.ptz-set': sCameraPtzSetCommand,
|
|
83
|
+
'camera.ptz-move': sCameraPtzMoveCommand,
|
|
84
|
+
'camera.enable': sCameraEnableCommand,
|
|
85
|
+
'camera.disable': sCameraDisableCommand,
|
|
86
|
+
'camera.preset-save': sCameraPresetSaveCommand,
|
|
87
|
+
'camera.preset-activate': sCameraPresetActivateCommand,
|
|
88
|
+
'camera.preset-delete': sCameraPresetDeleteCommand,
|
|
89
|
+
'camera.ptz-begin-move': sCameraPtzBeginMoveCommand,
|
|
90
|
+
'camera.ptz-end-move': sCameraPtzEndMoveCommand,
|
|
91
|
+
'camera.enable-detection': sCameraEnableDetectionCommand,
|
|
92
|
+
'camera.disable-detection': sCameraDisableDetectionCommand,
|
|
93
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// COMMANDS
|
|
3
|
+
export const sDisplayTileItemCamera = z.object({
|
|
4
|
+
type: z.literal('camera'),
|
|
5
|
+
name: z.string().nonempty(),
|
|
6
|
+
username: z.string().nonempty(),
|
|
7
|
+
password: z.string().nonempty(),
|
|
8
|
+
streams: z
|
|
9
|
+
.array(z.object({
|
|
10
|
+
streamId: z.string().nonempty(),
|
|
11
|
+
displayName: z.string().nonempty(),
|
|
12
|
+
resolution: z.string().nullable(),
|
|
13
|
+
rtspUrl: z.string().nonempty(),
|
|
14
|
+
}))
|
|
15
|
+
.min(1),
|
|
16
|
+
});
|
|
17
|
+
export const sDisplayTileItemEmpty = z.object({
|
|
18
|
+
type: z.literal('empty'),
|
|
19
|
+
});
|
|
20
|
+
export const sDisplayTileItem = z.union([
|
|
21
|
+
sDisplayTileItemCamera,
|
|
22
|
+
sDisplayTileItemEmpty,
|
|
23
|
+
]);
|
|
24
|
+
export const sDisplaySetViewCommand = z.object({
|
|
25
|
+
command: z.literal('display.set-view'),
|
|
26
|
+
params: z.object({
|
|
27
|
+
tiles: z.array(z.object({
|
|
28
|
+
items: z.array(sDisplayTileItem),
|
|
29
|
+
})),
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
export const displayCommands = {
|
|
33
|
+
'display.set-view': sDisplaySetViewCommand,
|
|
34
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// COMMANDS
|
|
3
|
+
export const sDoorUnlockCommand = z.object({
|
|
4
|
+
command: z.literal('door.unlock'),
|
|
5
|
+
params: z.object({}),
|
|
6
|
+
});
|
|
7
|
+
export const sDoorLockCommand = z.object({
|
|
8
|
+
command: z.literal('door.lock'),
|
|
9
|
+
params: z.object({}),
|
|
10
|
+
});
|
|
11
|
+
export const sDoorReleaseCommand = z.object({
|
|
12
|
+
command: z.literal('door.release'),
|
|
13
|
+
params: z.object({}),
|
|
14
|
+
});
|
|
15
|
+
export const sDoorAlarmAckCommand = z.object({
|
|
16
|
+
command: z.literal('door.alarm-ack'),
|
|
17
|
+
params: z.object({}),
|
|
18
|
+
});
|
|
19
|
+
export const doorCommands = {
|
|
20
|
+
'door.unlock': sDoorUnlockCommand,
|
|
21
|
+
'door.lock': sDoorLockCommand,
|
|
22
|
+
'door.release': sDoorReleaseCommand,
|
|
23
|
+
'door.alarm-ack': sDoorAlarmAckCommand,
|
|
24
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './camera';
|
|
2
|
+
export * from './door';
|
|
3
|
+
export * from './io-board';
|
|
4
|
+
export * from './intercom-terminal';
|
|
5
|
+
export * from './server';
|
|
6
|
+
export * from './alarm';
|
|
7
|
+
export * from './presence-tracker';
|
|
8
|
+
export * from './display';
|
|
9
|
+
export * from './nvr-exporter';
|
|
10
|
+
export * from './camera-lift';
|
|
11
|
+
export * from './pbx';
|
|
12
|
+
export * from './all';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// COMMANDS
|
|
3
|
+
export const sIoBoardSetOutputCommand = z.object({
|
|
4
|
+
command: z.literal('io-board.set-output'),
|
|
5
|
+
params: z.object({
|
|
6
|
+
output: z.string().nonempty(),
|
|
7
|
+
value: z.boolean(),
|
|
8
|
+
}),
|
|
9
|
+
});
|
|
10
|
+
export const ioBoardCommands = {
|
|
11
|
+
'io-board.set-output': sIoBoardSetOutputCommand,
|
|
12
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { sDeviceParam } from '../../primitives';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
// COMMANDS
|
|
4
|
+
export const sStartExportCommand = z.object({
|
|
5
|
+
command: z.literal('nvr-exporter.start-export'),
|
|
6
|
+
params: z.object({
|
|
7
|
+
requestId: z.string().nonempty(),
|
|
8
|
+
device: sDeviceParam,
|
|
9
|
+
timeFrom: z.number().int().nonnegative(),
|
|
10
|
+
timeTo: z.number().int().nonnegative(),
|
|
11
|
+
name: z.string().nonempty(),
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
export const sDeleteExportCommand = z.object({
|
|
15
|
+
command: z.literal('nvr-exporter.delete-export'),
|
|
16
|
+
params: z.object({
|
|
17
|
+
exportId: z.string().nonempty(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
export const nvrExporterCommandSchemas = {
|
|
21
|
+
'nvr-exporter.start-export': sStartExportCommand,
|
|
22
|
+
'nvr-exporter.delete-export': sDeleteExportCommand,
|
|
23
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// COMMANDS
|
|
3
|
+
export const sPbxCallCommand = z.object({
|
|
4
|
+
command: z.literal('pbx.call'),
|
|
5
|
+
params: z.object({
|
|
6
|
+
endpoint: z.string().nonempty(),
|
|
7
|
+
soundFile: z.string().nonempty(),
|
|
8
|
+
context: z.string().optional(),
|
|
9
|
+
callerId: z.string().optional(),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
export const pbxCommands = {
|
|
13
|
+
'pbx.call': sPbxCallCommand,
|
|
14
|
+
};
|