@awarevue/api-types 2.0.24 → 2.0.25
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.js +18 -2
- package/dist/_legacy/milestone.js +2 -1
- package/dist/_legacy/orchid.js +2 -1
- package/dist/alarm-automation.js +37 -26
- package/dist/api/agent-protocol/index.js +17 -1
- package/dist/api/agent-protocol/protocol.js +219 -212
- package/dist/api/commands/alarm.js +46 -43
- package/dist/api/commands/all.js +25 -22
- package/dist/api/commands/camera-lift.js +13 -10
- package/dist/api/commands/camera.js +65 -61
- package/dist/api/commands/display.js +27 -24
- package/dist/api/commands/door.js +21 -18
- package/dist/api/commands/index.js +28 -12
- package/dist/api/commands/intercom-terminal.js +2 -1
- package/dist/api/commands/io-board.js +11 -8
- package/dist/api/commands/nvr-exporter.js +20 -17
- package/dist/api/commands/pbx.js +13 -10
- package/dist/api/commands/presence-tracker.js +25 -22
- package/dist/api/commands/server.js +21 -18
- package/dist/api/error.js +93 -89
- package/dist/api/events/alarm.js +53 -50
- package/dist/api/events/all.js +57 -53
- package/dist/api/events/camera.js +68 -65
- package/dist/api/events/display.js +6 -3
- package/dist/api/events/door.js +60 -57
- package/dist/api/events/index.js +28 -12
- package/dist/api/events/intercom-terminal.js +16 -13
- package/dist/api/events/io-board.js +10 -7
- package/dist/api/events/nvr-exporter.js +14 -11
- package/dist/api/events/panic-button.js +8 -5
- package/dist/api/events/presence-tracker.js +29 -26
- package/dist/api/events/reader.js +11 -8
- package/dist/api/events/server.js +12 -9
- package/dist/api/index.js +25 -9
- package/dist/api/mqtt/index.js +17 -1
- package/dist/api/mqtt/payloads.js +15 -12
- package/dist/api/queries/all.js +23 -20
- package/dist/api/queries/camera.js +19 -16
- package/dist/api/queries/index.js +21 -5
- package/dist/api/queries/nvr-analytics-server.js +57 -54
- package/dist/api/queries/nvr-exporter.js +26 -23
- package/dist/api/queries/nvr-recorder.js +32 -29
- package/dist/api/rest/access-rule.js +14 -8
- package/dist/api/rest/agreement.js +6 -3
- package/dist/api/rest/alarm.js +2 -1
- package/dist/api/rest/api-keys.js +11 -8
- package/dist/api/rest/app.js +11 -8
- package/dist/api/rest/auth.js +12 -9
- package/dist/api/rest/automation.js +13 -10
- package/dist/api/rest/aware-config.js +2 -1
- package/dist/api/rest/bookmarks.js +17 -14
- package/dist/api/rest/cast.js +11 -5
- package/dist/api/rest/custom-field.js +6 -3
- package/dist/api/rest/device-event.js +2 -1
- package/dist/api/rest/device-group.js +19 -13
- package/dist/api/rest/file.js +2 -1
- package/dist/api/rest/index.js +50 -34
- package/dist/api/rest/io-device.js +21 -14
- package/dist/api/rest/layout.js +23 -17
- package/dist/api/rest/macros.js +6 -3
- package/dist/api/rest/media.js +55 -52
- package/dist/api/rest/module-config.js +2 -1
- package/dist/api/rest/notifications.js +11 -8
- package/dist/api/rest/person-agreement.js +11 -5
- package/dist/api/rest/person-presence.js +26 -23
- package/dist/api/rest/person-type.js +6 -3
- package/dist/api/rest/person.js +11 -5
- package/dist/api/rest/query.js +13 -8
- package/dist/api/rest/schedule.js +11 -8
- package/dist/api/rest/security-level.js +6 -3
- package/dist/api/rest/template.js +13 -10
- package/dist/api/rest/token-conversion.js +6 -3
- package/dist/api/rest/user.js +31 -28
- package/dist/api/rest/view.js +20 -14
- package/dist/api/rest/webrtc-playback.js +12 -6
- package/dist/api/rest/zone.js +14 -8
- package/dist/api/state/index.js +2 -1
- package/dist/api/ws/device-communication.js +46 -38
- package/dist/api/ws/index.js +21 -5
- package/dist/api/ws/notifications.js +17 -10
- package/dist/api/ws/progress.js +37 -30
- package/dist/api/ws/web-rtc-signaling.js +72 -65
- package/dist/api/ws/web-socket.js +5 -2
- package/dist/index.js +22 -6
- package/dist/objects/access-rule.js +32 -29
- package/dist/objects/agent-metadata.js +33 -30
- package/dist/objects/agreement.js +10 -7
- package/dist/objects/all.js +7 -4
- package/dist/objects/api-key.js +10 -7
- package/dist/objects/automation-rule.js +28 -25
- package/dist/objects/bookmark.js +14 -11
- package/dist/objects/credential.js +15 -9
- package/dist/objects/custom-field.js +11 -8
- package/dist/objects/device/alarm.js +6 -3
- package/dist/objects/device/any-device.js +206 -203
- package/dist/objects/device/camera-lift.js +6 -3
- package/dist/objects/device/camera.js +30 -27
- package/dist/objects/device/device-gateway.js +4 -1
- package/dist/objects/device/device-import.js +26 -23
- package/dist/objects/device/device-relation.js +16 -13
- package/dist/objects/device/display.js +6 -3
- package/dist/objects/device/door.js +10 -7
- package/dist/objects/device/index.js +38 -22
- package/dist/objects/device/intercom-operator.js +4 -1
- package/dist/objects/device/intercom-terminal.js +20 -17
- package/dist/objects/device/io-board.js +8 -5
- package/dist/objects/device/motion-sensor.js +6 -3
- package/dist/objects/device/nvr-analytics-server.js +8 -5
- package/dist/objects/device/nvr-exporter.js +9 -6
- package/dist/objects/device/nvr-recorder.js +8 -5
- package/dist/objects/device/panic-button.js +6 -3
- package/dist/objects/device/pbx.js +7 -4
- package/dist/objects/device/presence-tracker.js +4 -1
- package/dist/objects/device/reader.js +4 -1
- package/dist/objects/device/server.js +4 -1
- package/dist/objects/device/system.js +7 -4
- package/dist/objects/device-group.js +11 -8
- package/dist/objects/index.js +44 -28
- package/dist/objects/layout.js +23 -20
- package/dist/objects/macro.js +20 -17
- package/dist/objects/module-config.js +2 -1
- package/dist/objects/notification.js +15 -12
- package/dist/objects/person-agreement.js +10 -7
- package/dist/objects/person-presence.js +32 -29
- package/dist/objects/person-type.js +17 -11
- package/dist/objects/person.js +42 -39
- package/dist/objects/role.js +11 -8
- package/dist/objects/schedule.js +45 -39
- package/dist/objects/security-level.js +13 -10
- package/dist/objects/template.js +10 -7
- package/dist/objects/token-conversion.js +10 -7
- package/dist/objects/user.js +14 -11
- package/dist/objects/view.js +53 -50
- package/dist/objects/world-object.js +8 -5
- package/dist/objects/zone.js +16 -13
- package/dist/package.json +1 -1
- package/dist/permissions.js +149 -146
- package/dist/primitives.js +30 -27
- package/package.json +1 -1
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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");
|
|
3
6
|
// COMMANDS
|
|
4
|
-
|
|
5
|
-
command: z.literal('alarm.arm'),
|
|
6
|
-
params: z.object({
|
|
7
|
-
deviceId: sDeviceId,
|
|
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,
|
|
8
11
|
}),
|
|
9
12
|
});
|
|
10
|
-
|
|
11
|
-
command: z.literal('alarm.disarm'),
|
|
12
|
-
params: z.object({
|
|
13
|
-
deviceId: sDeviceId,
|
|
14
|
-
duration: sDuration.optional().describe('Duration in milliseconds'),
|
|
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'),
|
|
15
18
|
}),
|
|
16
19
|
});
|
|
17
|
-
|
|
18
|
-
command: z.literal('alarm.bypass'),
|
|
19
|
-
params: z.object({
|
|
20
|
-
deviceId: sDeviceId,
|
|
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,
|
|
21
24
|
}),
|
|
22
25
|
});
|
|
23
|
-
|
|
24
|
-
command: z.literal('alarm.unbypass'),
|
|
25
|
-
params: z.object({
|
|
26
|
-
deviceId: sDeviceId,
|
|
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,
|
|
27
30
|
}),
|
|
28
31
|
});
|
|
29
|
-
|
|
30
|
-
command: z.literal('alarm.arm-all'),
|
|
31
|
-
params: z.object({}),
|
|
32
|
+
exports.sArmAllCommand = zod_1.z.object({
|
|
33
|
+
command: zod_1.z.literal('alarm.arm-all'),
|
|
34
|
+
params: zod_1.z.object({}),
|
|
32
35
|
});
|
|
33
|
-
|
|
34
|
-
command: z.literal('alarm.disarm-all'),
|
|
35
|
-
params: z.object({
|
|
36
|
-
duration: sDuration.optional().describe('Duration in milliseconds'),
|
|
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'),
|
|
37
40
|
}),
|
|
38
41
|
});
|
|
39
|
-
|
|
40
|
-
command: z.literal('alarm.acknowledge'),
|
|
41
|
-
params: z.object({}),
|
|
42
|
+
exports.sAcknowledgeCommand = zod_1.z.object({
|
|
43
|
+
command: zod_1.z.literal('alarm.acknowledge'),
|
|
44
|
+
params: zod_1.z.object({}),
|
|
42
45
|
});
|
|
43
|
-
|
|
44
|
-
command: z.literal('alarm.set-trigger'),
|
|
45
|
-
params: z.object({
|
|
46
|
-
event: sDeviceEvent,
|
|
47
|
-
onlyIfArmed: z.boolean().describe('Set only if the device is armed'),
|
|
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'),
|
|
48
51
|
}),
|
|
49
52
|
});
|
|
50
|
-
|
|
51
|
-
'alarm.arm': sArmCommand,
|
|
52
|
-
'alarm.disarm': sDisarmCommand,
|
|
53
|
-
'alarm.arm-all': sArmAllCommand,
|
|
54
|
-
'alarm.disarm-all': sDisarmAllCommand,
|
|
55
|
-
'alarm.acknowledge': sAcknowledgeCommand,
|
|
56
|
-
'alarm.set-trigger': sSetTriggerCommand,
|
|
57
|
-
'alarm.bypass': sBypassCommand,
|
|
58
|
-
'alarm.unbypass': sUnbypassCommand,
|
|
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,
|
|
59
62
|
};
|
package/dist/api/commands/all.js
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...
|
|
16
|
-
...
|
|
17
|
-
...
|
|
18
|
-
...
|
|
19
|
-
...
|
|
20
|
-
...
|
|
21
|
-
...
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commandDescriptions = exports.commandSchemas = void 0;
|
|
4
|
+
const alarm_1 = require("./alarm");
|
|
5
|
+
const camera_1 = require("./camera");
|
|
6
|
+
const camera_lift_1 = require("./camera-lift");
|
|
7
|
+
const display_1 = require("./display");
|
|
8
|
+
const door_1 = require("./door");
|
|
9
|
+
const io_board_1 = require("./io-board");
|
|
10
|
+
const nvr_exporter_1 = require("./nvr-exporter");
|
|
11
|
+
const pbx_1 = require("./pbx");
|
|
12
|
+
const presence_tracker_1 = require("./presence-tracker");
|
|
13
|
+
const server_1 = require("./server");
|
|
14
|
+
exports.commandSchemas = {
|
|
15
|
+
...alarm_1.alarmCommandSchemas,
|
|
16
|
+
...camera_1.cameraCommands,
|
|
17
|
+
...camera_lift_1.cameraLiftCommands,
|
|
18
|
+
...door_1.doorCommands,
|
|
19
|
+
...io_board_1.ioBoardCommands,
|
|
20
|
+
...pbx_1.pbxCommands,
|
|
21
|
+
...presence_tracker_1.presenceTrackerCommands,
|
|
22
|
+
...display_1.displayCommands,
|
|
23
|
+
...nvr_exporter_1.nvrExporterCommandSchemas,
|
|
24
|
+
...server_1.serverCommands,
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
exports.commandDescriptions = {
|
|
24
27
|
'camera.ptz-set': { description: 'PTZ Set', permission: 'camera:ptz' },
|
|
25
28
|
'camera.ptz-move': { description: 'PTZ Move', permission: 'camera:ptz' },
|
|
26
29
|
'camera.ptz-begin-move': {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
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");
|
|
2
5
|
// COMMANDS
|
|
3
|
-
|
|
4
|
-
command: z.literal('camera-lift.raise'),
|
|
5
|
-
params: z.object({}),
|
|
6
|
+
exports.sCameraLiftRaiseCommand = zod_1.z.object({
|
|
7
|
+
command: zod_1.z.literal('camera-lift.raise'),
|
|
8
|
+
params: zod_1.z.object({}),
|
|
6
9
|
});
|
|
7
|
-
|
|
8
|
-
command: z.literal('camera-lift.lower'),
|
|
9
|
-
params: z.object({}),
|
|
10
|
+
exports.sCameraLiftLowerCommand = zod_1.z.object({
|
|
11
|
+
command: zod_1.z.literal('camera-lift.lower'),
|
|
12
|
+
params: zod_1.z.object({}),
|
|
10
13
|
});
|
|
11
|
-
|
|
12
|
-
'camera-lift.raise': sCameraLiftRaiseCommand,
|
|
13
|
-
'camera-lift.lower': sCameraLiftLowerCommand,
|
|
14
|
+
exports.cameraLiftCommands = {
|
|
15
|
+
'camera-lift.raise': exports.sCameraLiftRaiseCommand,
|
|
16
|
+
'camera-lift.lower': exports.sCameraLiftLowerCommand,
|
|
14
17
|
};
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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' &&
|
|
4
7
|
typeof params.tilt === 'number' &&
|
|
5
8
|
typeof params.zoom === 'number';
|
|
9
|
+
exports.isPtzParams = isPtzParams;
|
|
6
10
|
// COMMANDS
|
|
7
|
-
|
|
8
|
-
command: z.literal('camera.preset-save'),
|
|
9
|
-
params: z.object({
|
|
10
|
-
presetId: sPresetId,
|
|
11
|
-
presetInfo: sCameraPresetInfo,
|
|
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,
|
|
12
16
|
}),
|
|
13
17
|
});
|
|
14
|
-
|
|
15
|
-
command: z.literal('camera.preset-activate'),
|
|
16
|
-
params: z.object({
|
|
17
|
-
presetId: sPresetId,
|
|
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,
|
|
18
22
|
}),
|
|
19
23
|
});
|
|
20
|
-
|
|
21
|
-
command: z.literal('camera.preset-delete'),
|
|
22
|
-
params: z.object({
|
|
23
|
-
presetId: sPresetId,
|
|
24
|
-
assignedRef: z.string().nullable(),
|
|
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(),
|
|
25
29
|
}),
|
|
26
30
|
});
|
|
27
|
-
|
|
28
|
-
command: z.literal('camera.ptz-set'),
|
|
29
|
-
params: z.object({
|
|
30
|
-
pan: z.number(),
|
|
31
|
-
tilt: z.number(),
|
|
32
|
-
zoom: z.number(),
|
|
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(),
|
|
33
37
|
}),
|
|
34
38
|
});
|
|
35
|
-
|
|
39
|
+
exports.sPtzDirection = zod_1.z.enum([
|
|
36
40
|
'Up',
|
|
37
41
|
'Down',
|
|
38
42
|
'Left',
|
|
@@ -44,50 +48,50 @@ export const sPtzDirection = z.enum([
|
|
|
44
48
|
'DownLeft',
|
|
45
49
|
'DownRight',
|
|
46
50
|
]);
|
|
47
|
-
|
|
48
|
-
command: z.literal('camera.ptz-move'),
|
|
49
|
-
params: z.object({
|
|
50
|
-
direction: sPtzDirection,
|
|
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,
|
|
51
55
|
}),
|
|
52
56
|
});
|
|
53
|
-
|
|
54
|
-
command: z.literal('camera.ptz-begin-move'),
|
|
55
|
-
params: z.object({
|
|
56
|
-
pan: z.number(),
|
|
57
|
-
tilt: z.number(),
|
|
58
|
-
zoom: z.number(),
|
|
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(),
|
|
59
63
|
}),
|
|
60
64
|
});
|
|
61
|
-
|
|
62
|
-
command: z.literal('camera.ptz-end-move'),
|
|
63
|
-
params: z.object({}),
|
|
65
|
+
exports.sCameraPtzEndMoveCommand = zod_1.z.object({
|
|
66
|
+
command: zod_1.z.literal('camera.ptz-end-move'),
|
|
67
|
+
params: zod_1.z.object({}),
|
|
64
68
|
});
|
|
65
|
-
|
|
66
|
-
command: z.literal('camera.enable'),
|
|
67
|
-
params: z.object({}),
|
|
69
|
+
exports.sCameraEnableCommand = zod_1.z.object({
|
|
70
|
+
command: zod_1.z.literal('camera.enable'),
|
|
71
|
+
params: zod_1.z.object({}),
|
|
68
72
|
});
|
|
69
|
-
|
|
70
|
-
command: z.literal('camera.disable'),
|
|
71
|
-
params: z.object({}),
|
|
73
|
+
exports.sCameraDisableCommand = zod_1.z.object({
|
|
74
|
+
command: zod_1.z.literal('camera.disable'),
|
|
75
|
+
params: zod_1.z.object({}),
|
|
72
76
|
});
|
|
73
|
-
|
|
74
|
-
command: z.literal('camera.enable-detection'),
|
|
75
|
-
params: z.object({}),
|
|
77
|
+
exports.sCameraEnableDetectionCommand = zod_1.z.object({
|
|
78
|
+
command: zod_1.z.literal('camera.enable-detection'),
|
|
79
|
+
params: zod_1.z.object({}),
|
|
76
80
|
});
|
|
77
|
-
|
|
78
|
-
command: z.literal('camera.disable-detection'),
|
|
79
|
-
params: z.object({}),
|
|
81
|
+
exports.sCameraDisableDetectionCommand = zod_1.z.object({
|
|
82
|
+
command: zod_1.z.literal('camera.disable-detection'),
|
|
83
|
+
params: zod_1.z.object({}),
|
|
80
84
|
});
|
|
81
|
-
|
|
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,
|
|
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,
|
|
93
97
|
};
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
|
|
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");
|
|
2
5
|
// COMMANDS
|
|
3
|
-
|
|
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(),
|
|
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(),
|
|
14
17
|
}))
|
|
15
18
|
.min(1),
|
|
16
19
|
});
|
|
17
|
-
|
|
18
|
-
type: z.literal('empty'),
|
|
20
|
+
exports.sDisplayTileItemEmpty = zod_1.z.object({
|
|
21
|
+
type: zod_1.z.literal('empty'),
|
|
19
22
|
});
|
|
20
|
-
|
|
21
|
-
sDisplayTileItemCamera,
|
|
22
|
-
sDisplayTileItemEmpty,
|
|
23
|
+
exports.sDisplayTileItem = zod_1.z.union([
|
|
24
|
+
exports.sDisplayTileItemCamera,
|
|
25
|
+
exports.sDisplayTileItemEmpty,
|
|
23
26
|
]);
|
|
24
|
-
|
|
25
|
-
command: z.literal('display.set-view'),
|
|
26
|
-
params: z.object({
|
|
27
|
-
tiles: z.array(z.object({
|
|
28
|
-
items: z.array(sDisplayTileItem),
|
|
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),
|
|
29
32
|
})),
|
|
30
33
|
}),
|
|
31
34
|
});
|
|
32
|
-
|
|
33
|
-
'display.set-view': sDisplaySetViewCommand,
|
|
35
|
+
exports.displayCommands = {
|
|
36
|
+
'display.set-view': exports.sDisplaySetViewCommand,
|
|
34
37
|
};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
|
|
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");
|
|
2
5
|
// COMMANDS
|
|
3
|
-
|
|
4
|
-
command: z.literal('door.unlock'),
|
|
5
|
-
params: z.object({}),
|
|
6
|
+
exports.sDoorUnlockCommand = zod_1.z.object({
|
|
7
|
+
command: zod_1.z.literal('door.unlock'),
|
|
8
|
+
params: zod_1.z.object({}),
|
|
6
9
|
});
|
|
7
|
-
|
|
8
|
-
command: z.literal('door.lock'),
|
|
9
|
-
params: z.object({}),
|
|
10
|
+
exports.sDoorLockCommand = zod_1.z.object({
|
|
11
|
+
command: zod_1.z.literal('door.lock'),
|
|
12
|
+
params: zod_1.z.object({}),
|
|
10
13
|
});
|
|
11
|
-
|
|
12
|
-
command: z.literal('door.release'),
|
|
13
|
-
params: z.object({}),
|
|
14
|
+
exports.sDoorReleaseCommand = zod_1.z.object({
|
|
15
|
+
command: zod_1.z.literal('door.release'),
|
|
16
|
+
params: zod_1.z.object({}),
|
|
14
17
|
});
|
|
15
|
-
|
|
16
|
-
command: z.literal('door.alarm-ack'),
|
|
17
|
-
params: z.object({}),
|
|
18
|
+
exports.sDoorAlarmAckCommand = zod_1.z.object({
|
|
19
|
+
command: zod_1.z.literal('door.alarm-ack'),
|
|
20
|
+
params: zod_1.z.object({}),
|
|
18
21
|
});
|
|
19
|
-
|
|
20
|
-
'door.unlock': sDoorUnlockCommand,
|
|
21
|
-
'door.lock': sDoorLockCommand,
|
|
22
|
-
'door.release': sDoorReleaseCommand,
|
|
23
|
-
'door.alarm-ack': sDoorAlarmAckCommand,
|
|
22
|
+
exports.doorCommands = {
|
|
23
|
+
'door.unlock': exports.sDoorUnlockCommand,
|
|
24
|
+
'door.lock': exports.sDoorLockCommand,
|
|
25
|
+
'door.release': exports.sDoorReleaseCommand,
|
|
26
|
+
'door.alarm-ack': exports.sDoorAlarmAckCommand,
|
|
24
27
|
};
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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,12 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ioBoardCommands = exports.sIoBoardSetOutputCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
2
5
|
// COMMANDS
|
|
3
|
-
|
|
4
|
-
command: z.literal('io-board.set-output'),
|
|
5
|
-
params: z.object({
|
|
6
|
-
output: z.string().nonempty(),
|
|
7
|
-
value: z.boolean(),
|
|
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(),
|
|
8
11
|
}),
|
|
9
12
|
});
|
|
10
|
-
|
|
11
|
-
'io-board.set-output': sIoBoardSetOutputCommand,
|
|
13
|
+
exports.ioBoardCommands = {
|
|
14
|
+
'io-board.set-output': exports.sIoBoardSetOutputCommand,
|
|
12
15
|
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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");
|
|
3
6
|
// COMMANDS
|
|
4
|
-
|
|
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(),
|
|
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(),
|
|
12
15
|
}),
|
|
13
16
|
});
|
|
14
|
-
|
|
15
|
-
command: z.literal('nvr-exporter.delete-export'),
|
|
16
|
-
params: z.object({
|
|
17
|
-
exportId: z.string().nonempty(),
|
|
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(),
|
|
18
21
|
}),
|
|
19
22
|
});
|
|
20
|
-
|
|
21
|
-
'nvr-exporter.start-export': sStartExportCommand,
|
|
22
|
-
'nvr-exporter.delete-export': sDeleteExportCommand,
|
|
23
|
+
exports.nvrExporterCommandSchemas = {
|
|
24
|
+
'nvr-exporter.start-export': exports.sStartExportCommand,
|
|
25
|
+
'nvr-exporter.delete-export': exports.sDeleteExportCommand,
|
|
23
26
|
};
|
package/dist/api/commands/pbx.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pbxCommands = exports.sPbxCallCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
2
5
|
// COMMANDS
|
|
3
|
-
|
|
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(),
|
|
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(),
|
|
10
13
|
}),
|
|
11
14
|
});
|
|
12
|
-
|
|
13
|
-
'pbx.call': sPbxCallCommand,
|
|
15
|
+
exports.pbxCommands = {
|
|
16
|
+
'pbx.call': exports.sPbxCallCommand,
|
|
14
17
|
};
|