@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
package/dist/commands/alarm.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.alarmCommandSchemas = exports.sSetTriggerCommand = exports.sAcknowledgeCommand = exports.sDisarmAllCommand = exports.sArmAllCommand = exports.sUnbypassCommand = exports.sBypassCommand = exports.sDisarmCommand = exports.sArmCommand = void 0;
|
|
4
|
-
const primitives_1 = require("../primitives");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
// COMMANDS
|
|
7
|
-
exports.sArmCommand = zod_1.z.object({
|
|
8
|
-
command: zod_1.z.literal('alarm.arm'),
|
|
9
|
-
params: zod_1.z.object({
|
|
10
|
-
deviceId: primitives_1.sDeviceId,
|
|
11
|
-
}),
|
|
12
|
-
});
|
|
13
|
-
exports.sDisarmCommand = zod_1.z.object({
|
|
14
|
-
command: zod_1.z.literal('alarm.disarm'),
|
|
15
|
-
params: zod_1.z.object({
|
|
16
|
-
deviceId: primitives_1.sDeviceId,
|
|
17
|
-
duration: primitives_1.sDuration.optional().describe('Duration in milliseconds'),
|
|
18
|
-
}),
|
|
19
|
-
});
|
|
20
|
-
exports.sBypassCommand = zod_1.z.object({
|
|
21
|
-
command: zod_1.z.literal('alarm.bypass'),
|
|
22
|
-
params: zod_1.z.object({
|
|
23
|
-
deviceId: primitives_1.sDeviceId,
|
|
24
|
-
}),
|
|
25
|
-
});
|
|
26
|
-
exports.sUnbypassCommand = zod_1.z.object({
|
|
27
|
-
command: zod_1.z.literal('alarm.unbypass'),
|
|
28
|
-
params: zod_1.z.object({
|
|
29
|
-
deviceId: primitives_1.sDeviceId,
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
32
|
-
exports.sArmAllCommand = zod_1.z.object({
|
|
33
|
-
command: zod_1.z.literal('alarm.arm-all'),
|
|
34
|
-
params: zod_1.z.object({}),
|
|
35
|
-
});
|
|
36
|
-
exports.sDisarmAllCommand = zod_1.z.object({
|
|
37
|
-
command: zod_1.z.literal('alarm.disarm-all'),
|
|
38
|
-
params: zod_1.z.object({
|
|
39
|
-
duration: primitives_1.sDuration.optional().describe('Duration in milliseconds'),
|
|
40
|
-
}),
|
|
41
|
-
});
|
|
42
|
-
exports.sAcknowledgeCommand = zod_1.z.object({
|
|
43
|
-
command: zod_1.z.literal('alarm.acknowledge'),
|
|
44
|
-
params: zod_1.z.object({}),
|
|
45
|
-
});
|
|
46
|
-
exports.sSetTriggerCommand = zod_1.z.object({
|
|
47
|
-
command: zod_1.z.literal('alarm.set-trigger'),
|
|
48
|
-
params: zod_1.z.object({
|
|
49
|
-
event: primitives_1.sDeviceEvent,
|
|
50
|
-
onlyIfArmed: zod_1.z.boolean().describe('Set only if the device is armed'),
|
|
51
|
-
}),
|
|
52
|
-
});
|
|
53
|
-
exports.alarmCommandSchemas = {
|
|
54
|
-
'alarm.arm': exports.sArmCommand,
|
|
55
|
-
'alarm.disarm': exports.sDisarmCommand,
|
|
56
|
-
'alarm.arm-all': exports.sArmAllCommand,
|
|
57
|
-
'alarm.disarm-all': exports.sDisarmAllCommand,
|
|
58
|
-
'alarm.acknowledge': exports.sAcknowledgeCommand,
|
|
59
|
-
'alarm.set-trigger': exports.sSetTriggerCommand,
|
|
60
|
-
'alarm.bypass': exports.sBypassCommand,
|
|
61
|
-
'alarm.unbypass': exports.sUnbypassCommand,
|
|
62
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cameraLiftCommands = exports.sCameraLiftLowerCommand = exports.sCameraLiftRaiseCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
// COMMANDS
|
|
6
|
-
exports.sCameraLiftRaiseCommand = zod_1.z.object({
|
|
7
|
-
command: zod_1.z.literal('camera-lift.raise'),
|
|
8
|
-
params: zod_1.z.object({}),
|
|
9
|
-
});
|
|
10
|
-
exports.sCameraLiftLowerCommand = zod_1.z.object({
|
|
11
|
-
command: zod_1.z.literal('camera-lift.lower'),
|
|
12
|
-
params: zod_1.z.object({}),
|
|
13
|
-
});
|
|
14
|
-
exports.cameraLiftCommands = {
|
|
15
|
-
'camera-lift.raise': exports.sCameraLiftRaiseCommand,
|
|
16
|
-
'camera-lift.lower': exports.sCameraLiftLowerCommand,
|
|
17
|
-
};
|
package/dist/commands/camera.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cameraCommands = exports.sCameraDisableDetectionCommand = exports.sCameraEnableDetectionCommand = exports.sCameraDisableCommand = exports.sCameraEnableCommand = exports.sCameraPtzEndMoveCommand = exports.sCameraPtzBeginMoveCommand = exports.sCameraPtzMoveCommand = exports.sPtzDirection = exports.sCameraPtzSetCommand = exports.sCameraPresetDeleteCommand = exports.sCameraPresetActivateCommand = exports.sCameraPresetSaveCommand = exports.isPtzParams = void 0;
|
|
4
|
-
const primitives_1 = require("../primitives");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
const isPtzParams = (params) => typeof params.pan === 'number' &&
|
|
7
|
-
typeof params.tilt === 'number' &&
|
|
8
|
-
typeof params.zoom === 'number';
|
|
9
|
-
exports.isPtzParams = isPtzParams;
|
|
10
|
-
// COMMANDS
|
|
11
|
-
exports.sCameraPresetSaveCommand = zod_1.z.object({
|
|
12
|
-
command: zod_1.z.literal('camera.preset-save'),
|
|
13
|
-
params: zod_1.z.object({
|
|
14
|
-
presetId: primitives_1.sPresetId,
|
|
15
|
-
presetInfo: primitives_1.sCameraPresetInfo,
|
|
16
|
-
}),
|
|
17
|
-
});
|
|
18
|
-
exports.sCameraPresetActivateCommand = zod_1.z.object({
|
|
19
|
-
command: zod_1.z.literal('camera.preset-activate'),
|
|
20
|
-
params: zod_1.z.object({
|
|
21
|
-
presetId: primitives_1.sPresetId,
|
|
22
|
-
}),
|
|
23
|
-
});
|
|
24
|
-
exports.sCameraPresetDeleteCommand = zod_1.z.object({
|
|
25
|
-
command: zod_1.z.literal('camera.preset-delete'),
|
|
26
|
-
params: zod_1.z.object({
|
|
27
|
-
presetId: primitives_1.sPresetId,
|
|
28
|
-
assignedRef: zod_1.z.string().nullable(),
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
exports.sCameraPtzSetCommand = zod_1.z.object({
|
|
32
|
-
command: zod_1.z.literal('camera.ptz-set'),
|
|
33
|
-
params: zod_1.z.object({
|
|
34
|
-
pan: zod_1.z.number(),
|
|
35
|
-
tilt: zod_1.z.number(),
|
|
36
|
-
zoom: zod_1.z.number(),
|
|
37
|
-
}),
|
|
38
|
-
});
|
|
39
|
-
exports.sPtzDirection = zod_1.z.enum([
|
|
40
|
-
'Up',
|
|
41
|
-
'Down',
|
|
42
|
-
'Left',
|
|
43
|
-
'Right',
|
|
44
|
-
'ZoomIn',
|
|
45
|
-
'ZoomOut',
|
|
46
|
-
'UpLeft',
|
|
47
|
-
'UpRight',
|
|
48
|
-
'DownLeft',
|
|
49
|
-
'DownRight',
|
|
50
|
-
]);
|
|
51
|
-
exports.sCameraPtzMoveCommand = zod_1.z.object({
|
|
52
|
-
command: zod_1.z.literal('camera.ptz-move'),
|
|
53
|
-
params: zod_1.z.object({
|
|
54
|
-
direction: exports.sPtzDirection,
|
|
55
|
-
}),
|
|
56
|
-
});
|
|
57
|
-
exports.sCameraPtzBeginMoveCommand = zod_1.z.object({
|
|
58
|
-
command: zod_1.z.literal('camera.ptz-begin-move'),
|
|
59
|
-
params: zod_1.z.object({
|
|
60
|
-
pan: zod_1.z.number(),
|
|
61
|
-
tilt: zod_1.z.number(),
|
|
62
|
-
zoom: zod_1.z.number(),
|
|
63
|
-
}),
|
|
64
|
-
});
|
|
65
|
-
exports.sCameraPtzEndMoveCommand = zod_1.z.object({
|
|
66
|
-
command: zod_1.z.literal('camera.ptz-end-move'),
|
|
67
|
-
params: zod_1.z.object({}),
|
|
68
|
-
});
|
|
69
|
-
exports.sCameraEnableCommand = zod_1.z.object({
|
|
70
|
-
command: zod_1.z.literal('camera.enable'),
|
|
71
|
-
params: zod_1.z.object({}),
|
|
72
|
-
});
|
|
73
|
-
exports.sCameraDisableCommand = zod_1.z.object({
|
|
74
|
-
command: zod_1.z.literal('camera.disable'),
|
|
75
|
-
params: zod_1.z.object({}),
|
|
76
|
-
});
|
|
77
|
-
exports.sCameraEnableDetectionCommand = zod_1.z.object({
|
|
78
|
-
command: zod_1.z.literal('camera.enable-detection'),
|
|
79
|
-
params: zod_1.z.object({}),
|
|
80
|
-
});
|
|
81
|
-
exports.sCameraDisableDetectionCommand = zod_1.z.object({
|
|
82
|
-
command: zod_1.z.literal('camera.disable-detection'),
|
|
83
|
-
params: zod_1.z.object({}),
|
|
84
|
-
});
|
|
85
|
-
exports.cameraCommands = {
|
|
86
|
-
'camera.ptz-set': exports.sCameraPtzSetCommand,
|
|
87
|
-
'camera.ptz-move': exports.sCameraPtzMoveCommand,
|
|
88
|
-
'camera.enable': exports.sCameraEnableCommand,
|
|
89
|
-
'camera.disable': exports.sCameraDisableCommand,
|
|
90
|
-
'camera.preset-save': exports.sCameraPresetSaveCommand,
|
|
91
|
-
'camera.preset-activate': exports.sCameraPresetActivateCommand,
|
|
92
|
-
'camera.preset-delete': exports.sCameraPresetDeleteCommand,
|
|
93
|
-
'camera.ptz-begin-move': exports.sCameraPtzBeginMoveCommand,
|
|
94
|
-
'camera.ptz-end-move': exports.sCameraPtzEndMoveCommand,
|
|
95
|
-
'camera.enable-detection': exports.sCameraEnableDetectionCommand,
|
|
96
|
-
'camera.disable-detection': exports.sCameraDisableDetectionCommand,
|
|
97
|
-
};
|
package/dist/commands/display.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.displayCommands = exports.sDisplaySetViewCommand = exports.sDisplayTileItem = exports.sDisplayTileItemEmpty = exports.sDisplayTileItemCamera = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
// COMMANDS
|
|
6
|
-
exports.sDisplayTileItemCamera = zod_1.z.object({
|
|
7
|
-
type: zod_1.z.literal('camera'),
|
|
8
|
-
name: zod_1.z.string().nonempty(),
|
|
9
|
-
username: zod_1.z.string().nonempty(),
|
|
10
|
-
password: zod_1.z.string().nonempty(),
|
|
11
|
-
streams: zod_1.z
|
|
12
|
-
.array(zod_1.z.object({
|
|
13
|
-
streamId: zod_1.z.string().nonempty(),
|
|
14
|
-
displayName: zod_1.z.string().nonempty(),
|
|
15
|
-
resolution: zod_1.z.string().nullable(),
|
|
16
|
-
rtspUrl: zod_1.z.string().nonempty(),
|
|
17
|
-
}))
|
|
18
|
-
.min(1),
|
|
19
|
-
});
|
|
20
|
-
exports.sDisplayTileItemEmpty = zod_1.z.object({
|
|
21
|
-
type: zod_1.z.literal('empty'),
|
|
22
|
-
});
|
|
23
|
-
exports.sDisplayTileItem = zod_1.z.union([
|
|
24
|
-
exports.sDisplayTileItemCamera,
|
|
25
|
-
exports.sDisplayTileItemEmpty,
|
|
26
|
-
]);
|
|
27
|
-
exports.sDisplaySetViewCommand = zod_1.z.object({
|
|
28
|
-
command: zod_1.z.literal('display.set-view'),
|
|
29
|
-
params: zod_1.z.object({
|
|
30
|
-
tiles: zod_1.z.array(zod_1.z.object({
|
|
31
|
-
items: zod_1.z.array(exports.sDisplayTileItem),
|
|
32
|
-
})),
|
|
33
|
-
}),
|
|
34
|
-
});
|
|
35
|
-
exports.displayCommands = {
|
|
36
|
-
'display.set-view': exports.sDisplaySetViewCommand,
|
|
37
|
-
};
|
package/dist/commands/door.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.doorCommands = exports.sDoorAlarmAckCommand = exports.sDoorReleaseCommand = exports.sDoorLockCommand = exports.sDoorUnlockCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
// COMMANDS
|
|
6
|
-
exports.sDoorUnlockCommand = zod_1.z.object({
|
|
7
|
-
command: zod_1.z.literal('door.unlock'),
|
|
8
|
-
params: zod_1.z.object({}),
|
|
9
|
-
});
|
|
10
|
-
exports.sDoorLockCommand = zod_1.z.object({
|
|
11
|
-
command: zod_1.z.literal('door.lock'),
|
|
12
|
-
params: zod_1.z.object({}),
|
|
13
|
-
});
|
|
14
|
-
exports.sDoorReleaseCommand = zod_1.z.object({
|
|
15
|
-
command: zod_1.z.literal('door.release'),
|
|
16
|
-
params: zod_1.z.object({}),
|
|
17
|
-
});
|
|
18
|
-
exports.sDoorAlarmAckCommand = zod_1.z.object({
|
|
19
|
-
command: zod_1.z.literal('door.alarm-ack'),
|
|
20
|
-
params: zod_1.z.object({}),
|
|
21
|
-
});
|
|
22
|
-
exports.doorCommands = {
|
|
23
|
-
'door.unlock': exports.sDoorUnlockCommand,
|
|
24
|
-
'door.lock': exports.sDoorLockCommand,
|
|
25
|
-
'door.release': exports.sDoorReleaseCommand,
|
|
26
|
-
'door.alarm-ack': exports.sDoorAlarmAckCommand,
|
|
27
|
-
};
|
package/dist/commands/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./camera"), exports);
|
|
18
|
-
__exportStar(require("./door"), exports);
|
|
19
|
-
__exportStar(require("./io-board"), exports);
|
|
20
|
-
__exportStar(require("./intercom-terminal"), exports);
|
|
21
|
-
__exportStar(require("./server"), exports);
|
|
22
|
-
__exportStar(require("./alarm"), exports);
|
|
23
|
-
__exportStar(require("./presence-tracker"), exports);
|
|
24
|
-
__exportStar(require("./display"), exports);
|
|
25
|
-
__exportStar(require("./nvr-exporter"), exports);
|
|
26
|
-
__exportStar(require("./camera-lift"), exports);
|
|
27
|
-
__exportStar(require("./pbx"), exports);
|
|
28
|
-
__exportStar(require("./all"), exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ioBoardCommands = exports.sIoBoardSetOutputCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
// COMMANDS
|
|
6
|
-
exports.sIoBoardSetOutputCommand = zod_1.z.object({
|
|
7
|
-
command: zod_1.z.literal('io-board.set-output'),
|
|
8
|
-
params: zod_1.z.object({
|
|
9
|
-
output: zod_1.z.string().nonempty(),
|
|
10
|
-
value: zod_1.z.boolean(),
|
|
11
|
-
}),
|
|
12
|
-
});
|
|
13
|
-
exports.ioBoardCommands = {
|
|
14
|
-
'io-board.set-output': exports.sIoBoardSetOutputCommand,
|
|
15
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nvrExporterCommandSchemas = exports.sDeleteExportCommand = exports.sStartExportCommand = void 0;
|
|
4
|
-
const primitives_1 = require("../primitives");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
// COMMANDS
|
|
7
|
-
exports.sStartExportCommand = zod_1.z.object({
|
|
8
|
-
command: zod_1.z.literal('nvr-exporter.start-export'),
|
|
9
|
-
params: zod_1.z.object({
|
|
10
|
-
requestId: zod_1.z.string().nonempty(),
|
|
11
|
-
device: primitives_1.sDeviceParam,
|
|
12
|
-
timeFrom: zod_1.z.number().int().nonnegative(),
|
|
13
|
-
timeTo: zod_1.z.number().int().nonnegative(),
|
|
14
|
-
name: zod_1.z.string().nonempty(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
exports.sDeleteExportCommand = zod_1.z.object({
|
|
18
|
-
command: zod_1.z.literal('nvr-exporter.delete-export'),
|
|
19
|
-
params: zod_1.z.object({
|
|
20
|
-
exportId: zod_1.z.string().nonempty(),
|
|
21
|
-
}),
|
|
22
|
-
});
|
|
23
|
-
exports.nvrExporterCommandSchemas = {
|
|
24
|
-
'nvr-exporter.start-export': exports.sStartExportCommand,
|
|
25
|
-
'nvr-exporter.delete-export': exports.sDeleteExportCommand,
|
|
26
|
-
};
|
package/dist/commands/pbx.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pbxCommands = exports.sPbxCallCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
// COMMANDS
|
|
6
|
-
exports.sPbxCallCommand = zod_1.z.object({
|
|
7
|
-
command: zod_1.z.literal('pbx.call'),
|
|
8
|
-
params: zod_1.z.object({
|
|
9
|
-
endpoint: zod_1.z.string().nonempty(),
|
|
10
|
-
soundFile: zod_1.z.string().nonempty(),
|
|
11
|
-
context: zod_1.z.string().optional(),
|
|
12
|
-
callerId: zod_1.z.string().optional(),
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
exports.pbxCommands = {
|
|
16
|
-
'pbx.call': exports.sPbxCallCommand,
|
|
17
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.presenceTrackerCommands = exports.sTogglePresenceCommand = exports.sCheckOutPersonCommand = exports.sCheckInPersonCommand = void 0;
|
|
4
|
-
const primitives_1 = require("../primitives");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
// COMMANDS
|
|
7
|
-
exports.sCheckInPersonCommand = zod_1.z.object({
|
|
8
|
-
command: zod_1.z.literal('presence-tracker.check-in'),
|
|
9
|
-
params: zod_1.z.object({
|
|
10
|
-
personId: primitives_1.sPersonId,
|
|
11
|
-
zoneId: primitives_1.sZoneId.nullable(),
|
|
12
|
-
}),
|
|
13
|
-
});
|
|
14
|
-
exports.sCheckOutPersonCommand = zod_1.z.object({
|
|
15
|
-
command: zod_1.z.literal('presence-tracker.check-out'),
|
|
16
|
-
params: zod_1.z.object({
|
|
17
|
-
personId: primitives_1.sPersonId,
|
|
18
|
-
zoneId: primitives_1.sZoneId.nullable(),
|
|
19
|
-
leave: zod_1.z.boolean(),
|
|
20
|
-
}),
|
|
21
|
-
});
|
|
22
|
-
exports.sTogglePresenceCommand = zod_1.z.object({
|
|
23
|
-
command: zod_1.z.literal('presence-tracker.toggle-presence'),
|
|
24
|
-
params: zod_1.z.object({
|
|
25
|
-
personId: primitives_1.sPersonId,
|
|
26
|
-
zoneId: primitives_1.sZoneId.nullable(),
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
29
|
-
exports.presenceTrackerCommands = {
|
|
30
|
-
'presence-tracker.check-in': exports.sCheckInPersonCommand,
|
|
31
|
-
'presence-tracker.check-out': exports.sCheckOutPersonCommand,
|
|
32
|
-
'presence-tracker.toggle-presence': exports.sTogglePresenceCommand,
|
|
33
|
-
};
|
package/dist/commands/server.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.serverCommands = exports.sNotify = exports.sRunMacroCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const primitives_1 = require("../primitives");
|
|
6
|
-
// COMMANDS
|
|
7
|
-
exports.sRunMacroCommand = zod_1.z.object({
|
|
8
|
-
command: zod_1.z.literal('server.run-macro'),
|
|
9
|
-
params: zod_1.z.object({
|
|
10
|
-
macroId: primitives_1.sMacroId,
|
|
11
|
-
}),
|
|
12
|
-
});
|
|
13
|
-
exports.sNotify = zod_1.z.object({
|
|
14
|
-
command: zod_1.z.literal('server.notify'),
|
|
15
|
-
params: zod_1.z.object({
|
|
16
|
-
source: primitives_1.sDeviceParam,
|
|
17
|
-
message: zod_1.z.string().nonempty(),
|
|
18
|
-
severity: primitives_1.sNotificationSeverity,
|
|
19
|
-
metadata: zod_1.z.record(zod_1.z.unknown()),
|
|
20
|
-
notificationRef: zod_1.z.string().nonempty().nullable(),
|
|
21
|
-
recipientId: zod_1.z.string().nonempty().nullable(),
|
|
22
|
-
}),
|
|
23
|
-
});
|
|
24
|
-
exports.serverCommands = {
|
|
25
|
-
'server.run-macro': exports.sRunMacroCommand,
|
|
26
|
-
'server.notify': exports.sNotify,
|
|
27
|
-
};
|
package/dist/custom-field.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sUpdateCustomFieldRequest = exports.sAddCustomFieldRequest = exports.sCustomFieldDto = exports.CustomFieldExtendsTypeEnum = exports.CustomFieldTypeEnum = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.CustomFieldTypeEnum = zod_1.z.enum([
|
|
6
|
-
'string',
|
|
7
|
-
'number',
|
|
8
|
-
'boolean',
|
|
9
|
-
'date',
|
|
10
|
-
]);
|
|
11
|
-
exports.CustomFieldExtendsTypeEnum = zod_1.z.enum(['person']);
|
|
12
|
-
exports.sCustomFieldDto = zod_1.z.object({
|
|
13
|
-
id: zod_1.z.string().uuid(),
|
|
14
|
-
name: zod_1.z.string().min(1).max(64),
|
|
15
|
-
type: exports.CustomFieldTypeEnum,
|
|
16
|
-
extendsType: exports.CustomFieldExtendsTypeEnum,
|
|
17
|
-
});
|
|
18
|
-
exports.sAddCustomFieldRequest = exports.sCustomFieldDto.omit({ id: true });
|
|
19
|
-
exports.sUpdateCustomFieldRequest = exports.sAddCustomFieldRequest.partial();
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sEventDescription = exports.sEventVariantDescription = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = 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.DEVICE_TYPES = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const camera_1 = require("./camera");
|
|
6
|
-
const door_1 = require("./door");
|
|
7
|
-
const io_board_1 = require("./io-board");
|
|
8
|
-
const camera_lift_1 = require("./camera-lift");
|
|
9
|
-
const motion_sensor_1 = require("./motion-sensor");
|
|
10
|
-
const panic_button_1 = require("./panic-button");
|
|
11
|
-
const intercom_operator_1 = require("./intercom-operator");
|
|
12
|
-
const intercom_terminal_1 = require("./intercom-terminal");
|
|
13
|
-
const pbx_1 = require("./pbx");
|
|
14
|
-
const server_1 = require("./server");
|
|
15
|
-
const alarm_1 = require("./alarm");
|
|
16
|
-
const device_relation_1 = require("../device-relation");
|
|
17
|
-
const device_gateway_1 = require("./device-gateway");
|
|
18
|
-
const presence_tracker_1 = require("./presence-tracker");
|
|
19
|
-
const display_1 = require("./display");
|
|
20
|
-
const nvr_recorder_1 = require("./nvr-recorder");
|
|
21
|
-
const nvr_exporter_1 = require("./nvr-exporter");
|
|
22
|
-
const nvr_analytics_server_1 = require("./nvr-analytics-server");
|
|
23
|
-
const system_1 = require("./system");
|
|
24
|
-
exports.DEVICE_TYPES = [
|
|
25
|
-
alarm_1.ALARM,
|
|
26
|
-
server_1.SERVER,
|
|
27
|
-
camera_1.CAMERA,
|
|
28
|
-
door_1.DOOR,
|
|
29
|
-
'reader',
|
|
30
|
-
io_board_1.IO_BOARD,
|
|
31
|
-
camera_lift_1.CAMERA_LIFT,
|
|
32
|
-
motion_sensor_1.MOTION_SENSOR,
|
|
33
|
-
panic_button_1.PANIC_BUTTON,
|
|
34
|
-
intercom_operator_1.INTERCOM_OPERATOR,
|
|
35
|
-
intercom_terminal_1.INTERCOM_TERMINAL,
|
|
36
|
-
pbx_1.PBX,
|
|
37
|
-
device_gateway_1.DEVICE_GATEWAY,
|
|
38
|
-
presence_tracker_1.PRESENCE_TRACKER,
|
|
39
|
-
display_1.DISPLAY,
|
|
40
|
-
nvr_recorder_1.NVR_RECORDER,
|
|
41
|
-
nvr_exporter_1.NVR_EXPORTER,
|
|
42
|
-
nvr_analytics_server_1.NVR_ANALYTICS_SERVER,
|
|
43
|
-
system_1.SYSTEM,
|
|
44
|
-
];
|
|
45
|
-
const sDeviceType = zod_1.z.enum(exports.DEVICE_TYPES);
|
|
46
|
-
const sAlarmSpecsWithType = alarm_1.sAlarmSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(alarm_1.ALARM) }));
|
|
47
|
-
const sCameraSpecsWithType = camera_1.sCameraSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(camera_1.CAMERA) }));
|
|
48
|
-
const sDoorSpecsWithType = door_1.sDoorSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(door_1.DOOR) }));
|
|
49
|
-
const sIoBoardSpecsWithType = io_board_1.sIoBoardSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(io_board_1.IO_BOARD) }));
|
|
50
|
-
const sCameraLiftSpecsWithType = camera_lift_1.sCameraLiftSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(camera_lift_1.CAMERA_LIFT) }));
|
|
51
|
-
const sMotionSensorSpecsWithType = motion_sensor_1.sMotionSensorSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(motion_sensor_1.MOTION_SENSOR) }));
|
|
52
|
-
const sPanicButtonSpecsWithType = panic_button_1.sPanicButtonSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(panic_button_1.PANIC_BUTTON) }));
|
|
53
|
-
const sIntercomTerminalSpecsWithType = intercom_terminal_1.sIntercomTerminalSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(intercom_terminal_1.INTERCOM_TERMINAL) }));
|
|
54
|
-
const sPbxSpecsWithType = pbx_1.sPbxSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(pbx_1.PBX) }));
|
|
55
|
-
const sServerSpecsWithType = zod_1.z.object({ type: zod_1.z.literal(server_1.SERVER) });
|
|
56
|
-
const sIntercomOperatorSpecsWithType = zod_1.z.object({
|
|
57
|
-
type: zod_1.z.literal(intercom_operator_1.INTERCOM_OPERATOR),
|
|
58
|
-
});
|
|
59
|
-
const sDeviceGatewaySpecsWithType = zod_1.z.object({
|
|
60
|
-
type: zod_1.z.literal(device_gateway_1.DEVICE_GATEWAY),
|
|
61
|
-
});
|
|
62
|
-
const sPresenceTrackerSpecsWithType = zod_1.z.object({
|
|
63
|
-
type: zod_1.z.literal(presence_tracker_1.PRESENCE_TRACKER),
|
|
64
|
-
});
|
|
65
|
-
const sReaderSpecsWithType = zod_1.z.object({ type: zod_1.z.literal('reader') });
|
|
66
|
-
exports.sDisplaySpecsWithType = zod_1.z.object({ type: zod_1.z.literal(display_1.DISPLAY) });
|
|
67
|
-
exports.sRecorderSpecsWithType = nvr_recorder_1.sRecorderSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(nvr_recorder_1.NVR_RECORDER) }));
|
|
68
|
-
exports.sNvrExporterSpecsWithType = nvr_exporter_1.sExporterSpecs.merge(zod_1.z.object({
|
|
69
|
-
type: zod_1.z.literal(nvr_exporter_1.NVR_EXPORTER),
|
|
70
|
-
}));
|
|
71
|
-
exports.sNvrAnalyticsServerSpecsWithType = nvr_analytics_server_1.sAnalyticsServerSpecs.merge(zod_1.z.object({
|
|
72
|
-
type: zod_1.z.literal(nvr_analytics_server_1.NVR_ANALYTICS_SERVER),
|
|
73
|
-
}));
|
|
74
|
-
exports.sSystemDeviceSpecsWithType = zod_1.z
|
|
75
|
-
.object({ type: zod_1.z.literal(system_1.SYSTEM) })
|
|
76
|
-
.merge(system_1.sSystemDeviceSpecs);
|
|
77
|
-
exports.sAnyDeviceSpecs = zod_1.z.discriminatedUnion('type', [
|
|
78
|
-
sAlarmSpecsWithType,
|
|
79
|
-
sCameraSpecsWithType,
|
|
80
|
-
sDoorSpecsWithType,
|
|
81
|
-
sIoBoardSpecsWithType,
|
|
82
|
-
sCameraLiftSpecsWithType,
|
|
83
|
-
sMotionSensorSpecsWithType,
|
|
84
|
-
sPanicButtonSpecsWithType,
|
|
85
|
-
sIntercomTerminalSpecsWithType,
|
|
86
|
-
sPbxSpecsWithType,
|
|
87
|
-
sServerSpecsWithType,
|
|
88
|
-
sIntercomOperatorSpecsWithType,
|
|
89
|
-
sDeviceGatewaySpecsWithType,
|
|
90
|
-
sPresenceTrackerSpecsWithType,
|
|
91
|
-
sReaderSpecsWithType,
|
|
92
|
-
exports.sDisplaySpecsWithType,
|
|
93
|
-
exports.sRecorderSpecsWithType,
|
|
94
|
-
exports.sNvrExporterSpecsWithType,
|
|
95
|
-
exports.sNvrAnalyticsServerSpecsWithType,
|
|
96
|
-
exports.sSystemDeviceSpecsWithType,
|
|
97
|
-
]);
|
|
98
|
-
exports.sProviderMetadata = zod_1.z.object({}).catchall(zod_1.z.unknown());
|
|
99
|
-
exports.sPresetDto = zod_1.z.object({
|
|
100
|
-
id: zod_1.z.string(),
|
|
101
|
-
name: zod_1.z.string(),
|
|
102
|
-
params: zod_1.z.unknown(),
|
|
103
|
-
isDefault: zod_1.z.boolean(),
|
|
104
|
-
assignedRef: zod_1.z.string().nullable(),
|
|
105
|
-
createdOn: zod_1.z.string().datetime(),
|
|
106
|
-
lastModifiedOn: zod_1.z.string().datetime(),
|
|
107
|
-
});
|
|
108
|
-
exports.sDeviceMgmtInfo = zod_1.z.object({
|
|
109
|
-
id: zod_1.z.string(),
|
|
110
|
-
presets: zod_1.z.array(exports.sPresetDto),
|
|
111
|
-
providerAssignedName: zod_1.z.string().nonempty(),
|
|
112
|
-
notes: zod_1.z.string().nullable(),
|
|
113
|
-
tags: zod_1.z.array(zod_1.z.string()),
|
|
114
|
-
relations: zod_1.z.array(device_relation_1.sDeviceRelationSide),
|
|
115
|
-
groups: zod_1.z.array(zod_1.z.string()),
|
|
116
|
-
enabled: zod_1.z.boolean(),
|
|
117
|
-
createdOn: zod_1.z.string().datetime(),
|
|
118
|
-
lastModifiedOn: zod_1.z.string().datetime(),
|
|
119
|
-
});
|
|
120
|
-
exports.sForeignDeviceInfo = zod_1.z.object({
|
|
121
|
-
name: zod_1.z.string(),
|
|
122
|
-
foreignRef: zod_1.z.string(),
|
|
123
|
-
provider: zod_1.z.string(),
|
|
124
|
-
providerMetadata: exports.sProviderMetadata,
|
|
125
|
-
});
|
|
126
|
-
exports.sDeviceDto = exports.sAnyDeviceSpecs
|
|
127
|
-
.and(exports.sDeviceMgmtInfo)
|
|
128
|
-
.and(exports.sForeignDeviceInfo);
|
|
129
|
-
exports.sCameraDto = sCameraSpecsWithType
|
|
130
|
-
.and(exports.sDeviceMgmtInfo)
|
|
131
|
-
.and(exports.sForeignDeviceInfo);
|
|
132
|
-
exports.sDoorDto = sDoorSpecsWithType
|
|
133
|
-
.and(exports.sDeviceMgmtInfo)
|
|
134
|
-
.and(exports.sForeignDeviceInfo);
|
|
135
|
-
exports.sReaderDto = sReaderSpecsWithType
|
|
136
|
-
.and(exports.sDeviceMgmtInfo)
|
|
137
|
-
.and(exports.sForeignDeviceInfo);
|
|
138
|
-
exports.sIoBoardDto = sIoBoardSpecsWithType
|
|
139
|
-
.and(exports.sDeviceMgmtInfo)
|
|
140
|
-
.and(exports.sForeignDeviceInfo);
|
|
141
|
-
exports.sCameraLiftDto = sCameraLiftSpecsWithType
|
|
142
|
-
.and(exports.sDeviceMgmtInfo)
|
|
143
|
-
.and(exports.sForeignDeviceInfo);
|
|
144
|
-
exports.sMotionSensorDto = sMotionSensorSpecsWithType
|
|
145
|
-
.and(exports.sDeviceMgmtInfo)
|
|
146
|
-
.and(exports.sForeignDeviceInfo);
|
|
147
|
-
exports.sPanicButtonDto = sPanicButtonSpecsWithType
|
|
148
|
-
.and(exports.sDeviceMgmtInfo)
|
|
149
|
-
.and(exports.sForeignDeviceInfo);
|
|
150
|
-
exports.sIntercomTerminalDto = sIntercomTerminalSpecsWithType
|
|
151
|
-
.and(exports.sDeviceMgmtInfo)
|
|
152
|
-
.and(exports.sForeignDeviceInfo);
|
|
153
|
-
exports.sPbxDto = sPbxSpecsWithType
|
|
154
|
-
.and(exports.sDeviceMgmtInfo)
|
|
155
|
-
.and(exports.sForeignDeviceInfo);
|
|
156
|
-
exports.sDeviceGatewayDto = sDeviceGatewaySpecsWithType
|
|
157
|
-
.and(exports.sDeviceMgmtInfo)
|
|
158
|
-
.and(exports.sForeignDeviceInfo);
|
|
159
|
-
exports.sPresenceTrackerDto = sPresenceTrackerSpecsWithType
|
|
160
|
-
.and(exports.sDeviceMgmtInfo)
|
|
161
|
-
.and(exports.sForeignDeviceInfo);
|
|
162
|
-
exports.sServerDto = sServerSpecsWithType
|
|
163
|
-
.and(exports.sDeviceMgmtInfo)
|
|
164
|
-
.and(exports.sForeignDeviceInfo);
|
|
165
|
-
exports.sAlarmDto = sAlarmSpecsWithType
|
|
166
|
-
.and(exports.sDeviceMgmtInfo)
|
|
167
|
-
.and(exports.sForeignDeviceInfo);
|
|
168
|
-
exports.sIntercomOperatorDto = sIntercomOperatorSpecsWithType
|
|
169
|
-
.and(exports.sDeviceMgmtInfo)
|
|
170
|
-
.and(exports.sForeignDeviceInfo);
|
|
171
|
-
exports.sDisplayDto = exports.sDisplaySpecsWithType
|
|
172
|
-
.and(exports.sDeviceMgmtInfo)
|
|
173
|
-
.and(exports.sForeignDeviceInfo);
|
|
174
|
-
exports.sRecorderDto = exports.sRecorderSpecsWithType
|
|
175
|
-
.and(exports.sDeviceMgmtInfo)
|
|
176
|
-
.and(exports.sForeignDeviceInfo);
|
|
177
|
-
exports.sNvrExporterDto = exports.sNvrExporterSpecsWithType
|
|
178
|
-
.and(exports.sDeviceMgmtInfo)
|
|
179
|
-
.and(exports.sForeignDeviceInfo);
|
|
180
|
-
exports.sNvrAnalyticsServerDto = exports.sNvrAnalyticsServerSpecsWithType
|
|
181
|
-
.and(exports.sDeviceMgmtInfo)
|
|
182
|
-
.and(exports.sForeignDeviceInfo);
|
|
183
|
-
exports.sSystemDeviceDto = exports.sSystemDeviceSpecsWithType
|
|
184
|
-
.and(exports.sDeviceMgmtInfo)
|
|
185
|
-
.and(exports.sForeignDeviceInfo);
|
|
186
|
-
exports.sAddDeviceRequest = zod_1.z.object({
|
|
187
|
-
name: zod_1.z.string().nonempty(),
|
|
188
|
-
foreignRef: zod_1.z.string().nonempty(),
|
|
189
|
-
notes: zod_1.z.string().nullable(),
|
|
190
|
-
provider: zod_1.z.string().nonempty(),
|
|
191
|
-
providerMetadata: exports.sProviderMetadata,
|
|
192
|
-
tags: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
193
|
-
relations: zod_1.z.array(device_relation_1.sDeviceRelationSide),
|
|
194
|
-
type: sDeviceType,
|
|
195
|
-
specs: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
|
|
196
|
-
});
|
|
197
|
-
exports.sUpdateDeviceRequest = zod_1.z.object({
|
|
198
|
-
id: zod_1.z.string().nonempty(),
|
|
199
|
-
name: zod_1.z.string().optional(),
|
|
200
|
-
notes: zod_1.z.string().nullable().optional(),
|
|
201
|
-
providerMetadata: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
|
|
202
|
-
specs: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
|
|
203
|
-
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
204
|
-
relations: zod_1.z.array(device_relation_1.sDeviceRelationSide).optional(),
|
|
205
|
-
enabled: zod_1.z.boolean().optional(),
|
|
206
|
-
});
|
|
207
|
-
exports.sOverrideDeviceSpecsRequest = zod_1.z.object({
|
|
208
|
-
id: zod_1.z.string(),
|
|
209
|
-
specs: zod_1.z.object({}).catchall(zod_1.z.unknown()),
|
|
210
|
-
});
|
|
211
|
-
exports.sAddDevicePresetRequest = zod_1.z.object({
|
|
212
|
-
name: zod_1.z.string().nonempty(),
|
|
213
|
-
params: zod_1.z.object({}).catchall(zod_1.z.unknown()),
|
|
214
|
-
assignedRef: zod_1.z.string().nullable(),
|
|
215
|
-
isDefault: zod_1.z.boolean(),
|
|
216
|
-
deviceId: zod_1.z.string().nonempty(),
|
|
217
|
-
});
|
|
218
|
-
exports.sUpdateDevicePresetRequest = zod_1.z.object({
|
|
219
|
-
name: zod_1.z.string().optional(),
|
|
220
|
-
isDefault: zod_1.z.boolean().optional(),
|
|
221
|
-
assignedRef: zod_1.z.string().nullable().optional(),
|
|
222
|
-
deviceId: zod_1.z.string().nonempty(),
|
|
223
|
-
presetId: zod_1.z.string().nonempty(),
|
|
224
|
-
});
|
|
225
|
-
exports.sRemoveDevicePresetRequest = zod_1.z.object({
|
|
226
|
-
deviceId: zod_1.z.string().nonempty(),
|
|
227
|
-
presetId: zod_1.z.string().nonempty(),
|
|
228
|
-
});
|
|
229
|
-
exports.sEventVariantDescription = zod_1.z.object({
|
|
230
|
-
name: zod_1.z.string().describe('The name of the variant'),
|
|
231
|
-
label: zod_1.z.string().describe('A human-readable label for the variant'),
|
|
232
|
-
});
|
|
233
|
-
exports.sEventDescription = zod_1.z.object({
|
|
234
|
-
kind: zod_1.z.string().describe('The kind of event'),
|
|
235
|
-
label: zod_1.z.string().describe('A human-readable label for the event'),
|
|
236
|
-
variants: zod_1.z
|
|
237
|
-
.array(exports.sEventVariantDescription)
|
|
238
|
-
.optional()
|
|
239
|
-
.describe('Possible variants derived from event data'),
|
|
240
|
-
});
|
|
241
|
-
exports.sGetEventCatalogResponse = zod_1.z.array(exports.sEventDescription);
|
|
242
|
-
exports.sSetUnsetRelationRequest = device_relation_1.sDeviceRelationDto;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sCameraLiftSpecs = exports.CAMERA_LIFT = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.CAMERA_LIFT = 'camera-lift';
|
|
6
|
-
// SPECS
|
|
7
|
-
exports.sCameraLiftSpecs = zod_1.z.object({});
|