@awarevue/api-types 2.0.13 → 2.0.15

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.
Files changed (135) hide show
  1. package/dist/access-control/access-rule.d.ts +6 -6
  2. package/dist/access-control/person.d.ts +6 -6
  3. package/dist/access-control/schedule.d.ts +2 -2
  4. package/dist/access-control/zone.d.ts +4 -4
  5. package/dist/agent-communication/index.d.ts +0 -1
  6. package/dist/agent-communication/index.js +0 -1
  7. package/dist/agent-communication/protocol.d.ts +170 -170
  8. package/dist/alarm-automation.d.ts +1 -1
  9. package/dist/api/alarm.d.ts +1 -1
  10. package/dist/api/media.d.ts +8 -8
  11. package/dist/bookmarks.d.ts +2 -2
  12. package/dist/cast.d.ts +2 -2
  13. package/dist/commands/alarm.d.ts +312 -0
  14. package/dist/commands/alarm.js +62 -0
  15. package/dist/{device-command.d.ts → commands/all.d.ts} +650 -19
  16. package/dist/{device-command.js → commands/all.js} +11 -9
  17. package/dist/commands/camera-lift.d.ts +46 -0
  18. package/dist/commands/camera-lift.js +17 -0
  19. package/dist/commands/camera.d.ts +478 -0
  20. package/dist/commands/camera.js +97 -0
  21. package/dist/commands/display.d.ts +431 -0
  22. package/dist/commands/display.js +37 -0
  23. package/dist/commands/door.d.ts +88 -0
  24. package/dist/commands/door.js +27 -0
  25. package/dist/commands/index.d.ts +12 -0
  26. package/dist/commands/index.js +28 -0
  27. package/dist/commands/intercom-terminal.d.ts +40 -0
  28. package/dist/{device/reader/commands.js → commands/intercom-terminal.js} +1 -0
  29. package/dist/commands/io-board.d.ts +55 -0
  30. package/dist/commands/io-board.js +15 -0
  31. package/dist/commands/nvr-exporter.d.ts +1262 -0
  32. package/dist/commands/nvr-exporter.js +26 -0
  33. package/dist/commands/pbx.d.ts +75 -0
  34. package/dist/commands/pbx.js +17 -0
  35. package/dist/commands/presence-tracker.d.ts +167 -0
  36. package/dist/commands/presence-tracker.js +33 -0
  37. package/dist/commands/server.d.ts +1272 -0
  38. package/dist/commands/server.js +27 -0
  39. package/dist/device/alarm.d.ts +0 -530
  40. package/dist/device/alarm.js +1 -110
  41. package/dist/device/any-device.d.ts +88 -88
  42. package/dist/device/camera-lift.d.ts +0 -45
  43. package/dist/device/camera-lift.js +1 -14
  44. package/dist/device/camera.d.ts +0 -1248
  45. package/dist/device/camera.js +1 -204
  46. package/dist/device/device-gateway.d.ts +0 -2
  47. package/dist/device/device-gateway.js +1 -0
  48. package/dist/device/display.d.ts +0 -438
  49. package/dist/device/display.js +1 -39
  50. package/dist/device/door.d.ts +0 -306
  51. package/dist/device/door.js +1 -82
  52. package/dist/device/index.d.ts +1 -1
  53. package/dist/device/index.js +1 -1
  54. package/dist/device/intercom-operator.js +0 -1
  55. package/dist/device/intercom-terminal.d.ts +0 -101
  56. package/dist/device/intercom-terminal.js +3 -55
  57. package/dist/device/io-board.d.ts +0 -84
  58. package/dist/device/io-board.js +1 -21
  59. package/dist/device/motion-sensor.js +0 -1
  60. package/dist/device/nvr-analytics-server.d.ts +0 -295
  61. package/dist/device/nvr-analytics-server.js +1 -65
  62. package/dist/device/nvr-exporter.d.ts +0 -1436
  63. package/dist/device/nvr-exporter.js +1 -72
  64. package/dist/device/nvr-recorder.d.ts +0 -2633
  65. package/dist/device/nvr-recorder.js +1 -39
  66. package/dist/device/panic-button.d.ts +0 -18
  67. package/dist/device/panic-button.js +1 -8
  68. package/dist/device/pbx.d.ts +0 -74
  69. package/dist/device/pbx.js +1 -16
  70. package/dist/device/presence-tracker.d.ts +0 -302
  71. package/dist/device/presence-tracker.js +1 -59
  72. package/dist/device/server.d.ts +0 -1336
  73. package/dist/device/server.js +1 -37
  74. package/dist/device/system.d.ts +0 -42
  75. package/dist/device/system.js +1 -13
  76. package/dist/device-event.d.ts +1 -721
  77. package/dist/device-event.js +0 -110
  78. package/dist/device-group.d.ts +2 -2
  79. package/dist/device-import.d.ts +8 -8
  80. package/dist/events/alarm.d.ts +220 -0
  81. package/dist/events/alarm.js +55 -0
  82. package/dist/events/all.d.ts +700 -0
  83. package/dist/events/all.js +109 -0
  84. package/dist/events/camera.d.ts +661 -0
  85. package/dist/events/camera.js +87 -0
  86. package/dist/events/display.d.ts +9 -0
  87. package/dist/events/display.js +9 -0
  88. package/dist/events/door.d.ts +220 -0
  89. package/dist/events/door.js +62 -0
  90. package/dist/events/index.d.ts +12 -0
  91. package/dist/events/index.js +28 -0
  92. package/dist/events/intercom-terminal.d.ts +61 -0
  93. package/dist/events/intercom-terminal.js +19 -0
  94. package/dist/events/io-board.d.ts +31 -0
  95. package/dist/events/io-board.js +13 -0
  96. package/dist/events/nvr-exporter.d.ts +52 -0
  97. package/dist/events/nvr-exporter.js +21 -0
  98. package/dist/events/panic-button.d.ts +19 -0
  99. package/dist/events/panic-button.js +11 -0
  100. package/dist/events/presence-tracker.d.ts +136 -0
  101. package/dist/events/presence-tracker.js +33 -0
  102. package/dist/events/server.d.ts +65 -0
  103. package/dist/events/server.js +15 -0
  104. package/dist/index.d.ts +4 -1
  105. package/dist/index.js +4 -1
  106. package/dist/layout.d.ts +8 -8
  107. package/dist/macros.d.ts +14 -14
  108. package/dist/messages/device-communication.d.ts +2 -2
  109. package/dist/messages/notifications.d.ts +2 -2
  110. package/dist/messages/web-rtc-signaling.d.ts +10 -10
  111. package/dist/notifications.d.ts +4 -4
  112. package/dist/package.json +1 -1
  113. package/dist/primitives.d.ts +16 -0
  114. package/dist/primitives.js +13 -1
  115. package/dist/{agent-communication/queries.d.ts → queries/all.d.ts} +12 -10
  116. package/dist/queries/all.js +21 -0
  117. package/dist/queries/camera.d.ts +98 -0
  118. package/dist/queries/camera.js +27 -0
  119. package/dist/queries/index.d.ts +5 -0
  120. package/dist/{device/reader → queries}/index.js +5 -3
  121. package/dist/queries/nvr-analytics-server.d.ts +296 -0
  122. package/dist/queries/nvr-analytics-server.js +68 -0
  123. package/dist/queries/nvr-exporter.d.ts +125 -0
  124. package/dist/queries/nvr-exporter.js +36 -0
  125. package/dist/queries/nvr-recorder.d.ts +2634 -0
  126. package/dist/queries/nvr-recorder.js +42 -0
  127. package/dist/user.d.ts +4 -4
  128. package/package.json +1 -1
  129. package/dist/agent-communication/queries.js +0 -19
  130. package/dist/device/reader/commands.d.ts +0 -1
  131. package/dist/device/reader/index.d.ts +0 -3
  132. /package/dist/device/{reader/specs.d.ts → reader.d.ts} +0 -0
  133. /package/dist/device/{reader/specs.js → reader.js} +0 -0
  134. /package/dist/{device/reader/events.d.ts → events/reader.d.ts} +0 -0
  135. /package/dist/{device/reader/events.js → events/reader.js} +0 -0
@@ -1,15 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.commandDescriptions = exports.commandSchemas = void 0;
4
- const alarm_1 = require("./device/alarm");
5
- const camera_1 = require("./device/camera");
6
- const camera_lift_1 = require("./device/camera-lift");
7
- const display_1 = require("./device/display");
8
- const door_1 = require("./device/door");
9
- const io_board_1 = require("./device/io-board");
10
- const nvr_exporter_1 = require("./device/nvr-exporter");
11
- const pbx_1 = require("./device/pbx");
12
- const presence_tracker_1 = require("./device/presence-tracker");
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");
13
14
  exports.commandSchemas = {
14
15
  ...alarm_1.alarmCommandSchemas,
15
16
  ...camera_1.cameraCommands,
@@ -20,6 +21,7 @@ exports.commandSchemas = {
20
21
  ...presence_tracker_1.presenceTrackerCommands,
21
22
  ...display_1.displayCommands,
22
23
  ...nvr_exporter_1.nvrExporterCommandSchemas,
24
+ ...server_1.serverCommands,
23
25
  };
24
26
  exports.commandDescriptions = {
25
27
  'camera.ptz-set': { description: 'PTZ Set', permission: 'camera:ptz' },
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ export declare const sCameraLiftRaiseCommand: z.ZodObject<{
3
+ command: z.ZodLiteral<"camera-lift.raise">;
4
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ params: {};
7
+ command: "camera-lift.raise";
8
+ }, {
9
+ params: {};
10
+ command: "camera-lift.raise";
11
+ }>;
12
+ export type CameraLiftRaiseCommand = z.infer<typeof sCameraLiftRaiseCommand>;
13
+ export declare const sCameraLiftLowerCommand: z.ZodObject<{
14
+ command: z.ZodLiteral<"camera-lift.lower">;
15
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ params: {};
18
+ command: "camera-lift.lower";
19
+ }, {
20
+ params: {};
21
+ command: "camera-lift.lower";
22
+ }>;
23
+ export type CameraLiftLowerCommand = z.infer<typeof sCameraLiftLowerCommand>;
24
+ export type CameraLiftCommand = CameraLiftRaiseCommand | CameraLiftLowerCommand;
25
+ export declare const cameraLiftCommands: {
26
+ readonly 'camera-lift.raise': z.ZodObject<{
27
+ command: z.ZodLiteral<"camera-lift.raise">;
28
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ params: {};
31
+ command: "camera-lift.raise";
32
+ }, {
33
+ params: {};
34
+ command: "camera-lift.raise";
35
+ }>;
36
+ readonly 'camera-lift.lower': z.ZodObject<{
37
+ command: z.ZodLiteral<"camera-lift.lower">;
38
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ params: {};
41
+ command: "camera-lift.lower";
42
+ }, {
43
+ params: {};
44
+ command: "camera-lift.lower";
45
+ }>;
46
+ };
@@ -0,0 +1,17 @@
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
+ };
@@ -0,0 +1,478 @@
1
+ import { z } from 'zod';
2
+ export declare const isPtzParams: (params: any) => params is {
3
+ pan: number;
4
+ tilt: number;
5
+ zoom: number;
6
+ };
7
+ export declare const sCameraPresetSaveCommand: z.ZodObject<{
8
+ command: z.ZodLiteral<"camera.preset-save">;
9
+ params: z.ZodObject<{
10
+ presetId: z.ZodString;
11
+ presetInfo: z.ZodObject<{
12
+ name: z.ZodString;
13
+ isDefault: z.ZodBoolean;
14
+ values: z.ZodUnknown;
15
+ }, "strip", z.ZodTypeAny, {
16
+ name: string;
17
+ isDefault: boolean;
18
+ values?: unknown;
19
+ }, {
20
+ name: string;
21
+ isDefault: boolean;
22
+ values?: unknown;
23
+ }>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ presetId: string;
26
+ presetInfo: {
27
+ name: string;
28
+ isDefault: boolean;
29
+ values?: unknown;
30
+ };
31
+ }, {
32
+ presetId: string;
33
+ presetInfo: {
34
+ name: string;
35
+ isDefault: boolean;
36
+ values?: unknown;
37
+ };
38
+ }>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ params: {
41
+ presetId: string;
42
+ presetInfo: {
43
+ name: string;
44
+ isDefault: boolean;
45
+ values?: unknown;
46
+ };
47
+ };
48
+ command: "camera.preset-save";
49
+ }, {
50
+ params: {
51
+ presetId: string;
52
+ presetInfo: {
53
+ name: string;
54
+ isDefault: boolean;
55
+ values?: unknown;
56
+ };
57
+ };
58
+ command: "camera.preset-save";
59
+ }>;
60
+ export type CameraPresetSaveCommand = z.infer<typeof sCameraPresetSaveCommand>;
61
+ export declare const sCameraPresetActivateCommand: z.ZodObject<{
62
+ command: z.ZodLiteral<"camera.preset-activate">;
63
+ params: z.ZodObject<{
64
+ presetId: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ presetId: string;
67
+ }, {
68
+ presetId: string;
69
+ }>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ params: {
72
+ presetId: string;
73
+ };
74
+ command: "camera.preset-activate";
75
+ }, {
76
+ params: {
77
+ presetId: string;
78
+ };
79
+ command: "camera.preset-activate";
80
+ }>;
81
+ export type CameraPresetActivateCommand = z.infer<typeof sCameraPresetActivateCommand>;
82
+ export declare const sCameraPresetDeleteCommand: z.ZodObject<{
83
+ command: z.ZodLiteral<"camera.preset-delete">;
84
+ params: z.ZodObject<{
85
+ presetId: z.ZodString;
86
+ assignedRef: z.ZodNullable<z.ZodString>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ assignedRef: string | null;
89
+ presetId: string;
90
+ }, {
91
+ assignedRef: string | null;
92
+ presetId: string;
93
+ }>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ params: {
96
+ assignedRef: string | null;
97
+ presetId: string;
98
+ };
99
+ command: "camera.preset-delete";
100
+ }, {
101
+ params: {
102
+ assignedRef: string | null;
103
+ presetId: string;
104
+ };
105
+ command: "camera.preset-delete";
106
+ }>;
107
+ export type CameraPresetDeleteCommand = z.infer<typeof sCameraPresetDeleteCommand>;
108
+ export declare const sCameraPtzSetCommand: z.ZodObject<{
109
+ command: z.ZodLiteral<"camera.ptz-set">;
110
+ params: z.ZodObject<{
111
+ pan: z.ZodNumber;
112
+ tilt: z.ZodNumber;
113
+ zoom: z.ZodNumber;
114
+ }, "strip", z.ZodTypeAny, {
115
+ pan: number;
116
+ zoom: number;
117
+ tilt: number;
118
+ }, {
119
+ pan: number;
120
+ zoom: number;
121
+ tilt: number;
122
+ }>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ params: {
125
+ pan: number;
126
+ zoom: number;
127
+ tilt: number;
128
+ };
129
+ command: "camera.ptz-set";
130
+ }, {
131
+ params: {
132
+ pan: number;
133
+ zoom: number;
134
+ tilt: number;
135
+ };
136
+ command: "camera.ptz-set";
137
+ }>;
138
+ export type CameraPtzSetCommand = z.infer<typeof sCameraPtzSetCommand>;
139
+ export declare const sPtzDirection: z.ZodEnum<["Up", "Down", "Left", "Right", "ZoomIn", "ZoomOut", "UpLeft", "UpRight", "DownLeft", "DownRight"]>;
140
+ export type PtzDirection = z.infer<typeof sPtzDirection>;
141
+ export declare const sCameraPtzMoveCommand: z.ZodObject<{
142
+ command: z.ZodLiteral<"camera.ptz-move">;
143
+ params: z.ZodObject<{
144
+ direction: z.ZodEnum<["Up", "Down", "Left", "Right", "ZoomIn", "ZoomOut", "UpLeft", "UpRight", "DownLeft", "DownRight"]>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
147
+ }, {
148
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
149
+ }>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ params: {
152
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
153
+ };
154
+ command: "camera.ptz-move";
155
+ }, {
156
+ params: {
157
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
158
+ };
159
+ command: "camera.ptz-move";
160
+ }>;
161
+ export type CameraPtzMoveCommand = z.infer<typeof sCameraPtzMoveCommand>;
162
+ export declare const sCameraPtzBeginMoveCommand: z.ZodObject<{
163
+ command: z.ZodLiteral<"camera.ptz-begin-move">;
164
+ params: z.ZodObject<{
165
+ pan: z.ZodNumber;
166
+ tilt: z.ZodNumber;
167
+ zoom: z.ZodNumber;
168
+ }, "strip", z.ZodTypeAny, {
169
+ pan: number;
170
+ zoom: number;
171
+ tilt: number;
172
+ }, {
173
+ pan: number;
174
+ zoom: number;
175
+ tilt: number;
176
+ }>;
177
+ }, "strip", z.ZodTypeAny, {
178
+ params: {
179
+ pan: number;
180
+ zoom: number;
181
+ tilt: number;
182
+ };
183
+ command: "camera.ptz-begin-move";
184
+ }, {
185
+ params: {
186
+ pan: number;
187
+ zoom: number;
188
+ tilt: number;
189
+ };
190
+ command: "camera.ptz-begin-move";
191
+ }>;
192
+ export type CameraPtzBeginMoveCommand = z.infer<typeof sCameraPtzBeginMoveCommand>;
193
+ export declare const sCameraPtzEndMoveCommand: z.ZodObject<{
194
+ command: z.ZodLiteral<"camera.ptz-end-move">;
195
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ params: {};
198
+ command: "camera.ptz-end-move";
199
+ }, {
200
+ params: {};
201
+ command: "camera.ptz-end-move";
202
+ }>;
203
+ export type CameraPtzEndMoveCommand = z.infer<typeof sCameraPtzEndMoveCommand>;
204
+ export declare const sCameraEnableCommand: z.ZodObject<{
205
+ command: z.ZodLiteral<"camera.enable">;
206
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ params: {};
209
+ command: "camera.enable";
210
+ }, {
211
+ params: {};
212
+ command: "camera.enable";
213
+ }>;
214
+ export type CameraEnableCommand = z.infer<typeof sCameraEnableCommand>;
215
+ export declare const sCameraDisableCommand: z.ZodObject<{
216
+ command: z.ZodLiteral<"camera.disable">;
217
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ params: {};
220
+ command: "camera.disable";
221
+ }, {
222
+ params: {};
223
+ command: "camera.disable";
224
+ }>;
225
+ export type CameraDisableCommand = z.infer<typeof sCameraDisableCommand>;
226
+ export declare const sCameraEnableDetectionCommand: z.ZodObject<{
227
+ command: z.ZodLiteral<"camera.enable-detection">;
228
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
229
+ }, "strip", z.ZodTypeAny, {
230
+ params: {};
231
+ command: "camera.enable-detection";
232
+ }, {
233
+ params: {};
234
+ command: "camera.enable-detection";
235
+ }>;
236
+ export type CameraEnableDetectionCommand = z.infer<typeof sCameraEnableDetectionCommand>;
237
+ export declare const sCameraDisableDetectionCommand: z.ZodObject<{
238
+ command: z.ZodLiteral<"camera.disable-detection">;
239
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ params: {};
242
+ command: "camera.disable-detection";
243
+ }, {
244
+ params: {};
245
+ command: "camera.disable-detection";
246
+ }>;
247
+ export type CameraDisableDetectionCommand = z.infer<typeof sCameraDisableDetectionCommand>;
248
+ export declare const cameraCommands: {
249
+ readonly 'camera.ptz-set': z.ZodObject<{
250
+ command: z.ZodLiteral<"camera.ptz-set">;
251
+ params: z.ZodObject<{
252
+ pan: z.ZodNumber;
253
+ tilt: z.ZodNumber;
254
+ zoom: z.ZodNumber;
255
+ }, "strip", z.ZodTypeAny, {
256
+ pan: number;
257
+ zoom: number;
258
+ tilt: number;
259
+ }, {
260
+ pan: number;
261
+ zoom: number;
262
+ tilt: number;
263
+ }>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ params: {
266
+ pan: number;
267
+ zoom: number;
268
+ tilt: number;
269
+ };
270
+ command: "camera.ptz-set";
271
+ }, {
272
+ params: {
273
+ pan: number;
274
+ zoom: number;
275
+ tilt: number;
276
+ };
277
+ command: "camera.ptz-set";
278
+ }>;
279
+ readonly 'camera.ptz-move': z.ZodObject<{
280
+ command: z.ZodLiteral<"camera.ptz-move">;
281
+ params: z.ZodObject<{
282
+ direction: z.ZodEnum<["Up", "Down", "Left", "Right", "ZoomIn", "ZoomOut", "UpLeft", "UpRight", "DownLeft", "DownRight"]>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
285
+ }, {
286
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
287
+ }>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ params: {
290
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
291
+ };
292
+ command: "camera.ptz-move";
293
+ }, {
294
+ params: {
295
+ direction: "Up" | "Down" | "Left" | "Right" | "ZoomIn" | "ZoomOut" | "UpLeft" | "UpRight" | "DownLeft" | "DownRight";
296
+ };
297
+ command: "camera.ptz-move";
298
+ }>;
299
+ readonly 'camera.enable': z.ZodObject<{
300
+ command: z.ZodLiteral<"camera.enable">;
301
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ params: {};
304
+ command: "camera.enable";
305
+ }, {
306
+ params: {};
307
+ command: "camera.enable";
308
+ }>;
309
+ readonly 'camera.disable': z.ZodObject<{
310
+ command: z.ZodLiteral<"camera.disable">;
311
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ params: {};
314
+ command: "camera.disable";
315
+ }, {
316
+ params: {};
317
+ command: "camera.disable";
318
+ }>;
319
+ readonly 'camera.preset-save': z.ZodObject<{
320
+ command: z.ZodLiteral<"camera.preset-save">;
321
+ params: z.ZodObject<{
322
+ presetId: z.ZodString;
323
+ presetInfo: z.ZodObject<{
324
+ name: z.ZodString;
325
+ isDefault: z.ZodBoolean;
326
+ values: z.ZodUnknown;
327
+ }, "strip", z.ZodTypeAny, {
328
+ name: string;
329
+ isDefault: boolean;
330
+ values?: unknown;
331
+ }, {
332
+ name: string;
333
+ isDefault: boolean;
334
+ values?: unknown;
335
+ }>;
336
+ }, "strip", z.ZodTypeAny, {
337
+ presetId: string;
338
+ presetInfo: {
339
+ name: string;
340
+ isDefault: boolean;
341
+ values?: unknown;
342
+ };
343
+ }, {
344
+ presetId: string;
345
+ presetInfo: {
346
+ name: string;
347
+ isDefault: boolean;
348
+ values?: unknown;
349
+ };
350
+ }>;
351
+ }, "strip", z.ZodTypeAny, {
352
+ params: {
353
+ presetId: string;
354
+ presetInfo: {
355
+ name: string;
356
+ isDefault: boolean;
357
+ values?: unknown;
358
+ };
359
+ };
360
+ command: "camera.preset-save";
361
+ }, {
362
+ params: {
363
+ presetId: string;
364
+ presetInfo: {
365
+ name: string;
366
+ isDefault: boolean;
367
+ values?: unknown;
368
+ };
369
+ };
370
+ command: "camera.preset-save";
371
+ }>;
372
+ readonly 'camera.preset-activate': z.ZodObject<{
373
+ command: z.ZodLiteral<"camera.preset-activate">;
374
+ params: z.ZodObject<{
375
+ presetId: z.ZodString;
376
+ }, "strip", z.ZodTypeAny, {
377
+ presetId: string;
378
+ }, {
379
+ presetId: string;
380
+ }>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ params: {
383
+ presetId: string;
384
+ };
385
+ command: "camera.preset-activate";
386
+ }, {
387
+ params: {
388
+ presetId: string;
389
+ };
390
+ command: "camera.preset-activate";
391
+ }>;
392
+ readonly 'camera.preset-delete': z.ZodObject<{
393
+ command: z.ZodLiteral<"camera.preset-delete">;
394
+ params: z.ZodObject<{
395
+ presetId: z.ZodString;
396
+ assignedRef: z.ZodNullable<z.ZodString>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ assignedRef: string | null;
399
+ presetId: string;
400
+ }, {
401
+ assignedRef: string | null;
402
+ presetId: string;
403
+ }>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ params: {
406
+ assignedRef: string | null;
407
+ presetId: string;
408
+ };
409
+ command: "camera.preset-delete";
410
+ }, {
411
+ params: {
412
+ assignedRef: string | null;
413
+ presetId: string;
414
+ };
415
+ command: "camera.preset-delete";
416
+ }>;
417
+ readonly 'camera.ptz-begin-move': z.ZodObject<{
418
+ command: z.ZodLiteral<"camera.ptz-begin-move">;
419
+ params: z.ZodObject<{
420
+ pan: z.ZodNumber;
421
+ tilt: z.ZodNumber;
422
+ zoom: z.ZodNumber;
423
+ }, "strip", z.ZodTypeAny, {
424
+ pan: number;
425
+ zoom: number;
426
+ tilt: number;
427
+ }, {
428
+ pan: number;
429
+ zoom: number;
430
+ tilt: number;
431
+ }>;
432
+ }, "strip", z.ZodTypeAny, {
433
+ params: {
434
+ pan: number;
435
+ zoom: number;
436
+ tilt: number;
437
+ };
438
+ command: "camera.ptz-begin-move";
439
+ }, {
440
+ params: {
441
+ pan: number;
442
+ zoom: number;
443
+ tilt: number;
444
+ };
445
+ command: "camera.ptz-begin-move";
446
+ }>;
447
+ readonly 'camera.ptz-end-move': z.ZodObject<{
448
+ command: z.ZodLiteral<"camera.ptz-end-move">;
449
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
450
+ }, "strip", z.ZodTypeAny, {
451
+ params: {};
452
+ command: "camera.ptz-end-move";
453
+ }, {
454
+ params: {};
455
+ command: "camera.ptz-end-move";
456
+ }>;
457
+ readonly 'camera.enable-detection': z.ZodObject<{
458
+ command: z.ZodLiteral<"camera.enable-detection">;
459
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
460
+ }, "strip", z.ZodTypeAny, {
461
+ params: {};
462
+ command: "camera.enable-detection";
463
+ }, {
464
+ params: {};
465
+ command: "camera.enable-detection";
466
+ }>;
467
+ readonly 'camera.disable-detection': z.ZodObject<{
468
+ command: z.ZodLiteral<"camera.disable-detection">;
469
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ params: {};
472
+ command: "camera.disable-detection";
473
+ }, {
474
+ params: {};
475
+ command: "camera.disable-detection";
476
+ }>;
477
+ };
478
+ export type CameraCommand = CameraPtzSetCommand | CameraPtzMoveCommand | CameraEnableCommand | CameraDisableCommand | CameraPresetSaveCommand | CameraPresetActivateCommand | CameraPresetDeleteCommand | CameraPtzBeginMoveCommand | CameraPtzEndMoveCommand | CameraEnableDetectionCommand | CameraDisableDetectionCommand;
@@ -0,0 +1,97 @@
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
+ };