@awarevue/api-types 1.0.108 → 1.0.109
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/access-control/person-presence.d.ts +4 -4
- package/dist/agent-communication/protocol.d.ts +49 -28
- package/dist/agent-communication/queries.d.ts +6 -6
- package/dist/bookmarks.d.ts +10 -10
- package/dist/device/alarm.d.ts +317 -54
- package/dist/device/alarm.js +59 -1
- package/dist/device/any-device.d.ts +39 -0
- package/dist/device/camera-lift.d.ts +44 -8
- package/dist/device/camera-lift.js +14 -1
- package/dist/device/camera.d.ts +449 -40
- package/dist/device/camera.js +89 -1
- package/dist/device/display.d.ts +416 -9
- package/dist/device/display.js +34 -1
- package/dist/device/door.d.ts +102 -17
- package/dist/device/door.js +30 -2
- package/dist/device/intercom-terminal.d.ts +2 -2
- package/dist/device/io-board.d.ts +49 -3
- package/dist/device/io-board.js +12 -1
- package/dist/device/pbx.d.ts +69 -5
- package/dist/device/pbx.js +14 -1
- package/dist/device/presence-tracker.d.ts +164 -21
- package/dist/device/presence-tracker.js +32 -3
- package/dist/device/server.d.ts +44 -7
- package/dist/device/server.js +13 -1
- package/dist/device-command.d.ts +741 -0
- package/dist/device-command.js +19 -1
- package/dist/device-event.d.ts +20 -20
- package/dist/device-import.d.ts +76 -0
- package/dist/macros.d.ts +14 -14
- package/dist/messages/device-communication.d.ts +10 -10
- package/dist/package.json +1 -1
- package/dist/primitives.d.ts +9 -0
- package/dist/primitives.js +13 -0
- package/package.json +1 -1
package/dist/device/camera.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cameraEventSchemasByKind = exports.sSceneEnded = exports.sSceneUpdated = exports.sSceneCreated = exports.sSceneData = exports.sObjectDetectionEnded = exports.sObjectDetectionUpdated = exports.sObjectDetectionStarted = exports.sObjectDetectionData = exports.sObjectLocator = exports.sBoxLocator = exports.sCameraPtzPresetSaved = exports.sCameraPresetInfo = exports.isPtzParams = exports.sCameraSpecs = exports.sStreamInfo = exports.sWebRtcPlaybackSource = exports.CAMERA = void 0;
|
|
3
|
+
exports.cameraEventSchemasByKind = exports.sSceneEnded = exports.sSceneUpdated = exports.sSceneCreated = exports.sSceneData = exports.sObjectDetectionEnded = exports.sObjectDetectionUpdated = exports.sObjectDetectionStarted = exports.sObjectDetectionData = exports.sObjectLocator = exports.sBoxLocator = exports.sCameraPtzPresetSaved = 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.sCameraPresetInfo = exports.isPtzParams = exports.sCameraSpecs = exports.sStreamInfo = exports.sWebRtcPlaybackSource = exports.CAMERA = void 0;
|
|
4
|
+
const primitives_1 = require("src/primitives");
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
6
|
exports.CAMERA = 'camera';
|
|
6
7
|
// SPECS
|
|
@@ -36,6 +37,93 @@ exports.sCameraPresetInfo = zod_1.z.object({
|
|
|
36
37
|
isDefault: zod_1.z.boolean(),
|
|
37
38
|
values: zod_1.z.unknown(),
|
|
38
39
|
});
|
|
40
|
+
exports.sCameraPresetSaveCommand = zod_1.z.object({
|
|
41
|
+
command: zod_1.z.literal('camera.preset-save'),
|
|
42
|
+
params: zod_1.z.object({
|
|
43
|
+
presetId: primitives_1.sPresetId,
|
|
44
|
+
presetInfo: exports.sCameraPresetInfo,
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
exports.sCameraPresetActivateCommand = zod_1.z.object({
|
|
48
|
+
command: zod_1.z.literal('camera.preset-activate'),
|
|
49
|
+
params: zod_1.z.object({
|
|
50
|
+
presetId: primitives_1.sPresetId,
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
exports.sCameraPresetDeleteCommand = zod_1.z.object({
|
|
54
|
+
command: zod_1.z.literal('camera.preset-delete'),
|
|
55
|
+
params: zod_1.z.object({
|
|
56
|
+
presetId: primitives_1.sPresetId,
|
|
57
|
+
assignedRef: zod_1.z.string().nullable(),
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
exports.sCameraPtzSetCommand = zod_1.z.object({
|
|
61
|
+
command: zod_1.z.literal('camera.ptz-set'),
|
|
62
|
+
params: zod_1.z.object({
|
|
63
|
+
pan: zod_1.z.number(),
|
|
64
|
+
tilt: zod_1.z.number(),
|
|
65
|
+
zoom: zod_1.z.number(),
|
|
66
|
+
}),
|
|
67
|
+
});
|
|
68
|
+
exports.sPtzDirection = zod_1.z.enum([
|
|
69
|
+
'Up',
|
|
70
|
+
'Down',
|
|
71
|
+
'Left',
|
|
72
|
+
'Right',
|
|
73
|
+
'ZoomIn',
|
|
74
|
+
'ZoomOut',
|
|
75
|
+
'UpLeft',
|
|
76
|
+
'UpRight',
|
|
77
|
+
'DownLeft',
|
|
78
|
+
'DownRight',
|
|
79
|
+
]);
|
|
80
|
+
exports.sCameraPtzMoveCommand = zod_1.z.object({
|
|
81
|
+
command: zod_1.z.literal('camera.ptz-move'),
|
|
82
|
+
params: zod_1.z.object({
|
|
83
|
+
direction: exports.sPtzDirection,
|
|
84
|
+
}),
|
|
85
|
+
});
|
|
86
|
+
exports.sCameraPtzBeginMoveCommand = zod_1.z.object({
|
|
87
|
+
command: zod_1.z.literal('camera.ptz-begin-move'),
|
|
88
|
+
params: zod_1.z.object({
|
|
89
|
+
pan: zod_1.z.number(),
|
|
90
|
+
tilt: zod_1.z.number(),
|
|
91
|
+
zoom: zod_1.z.number(),
|
|
92
|
+
}),
|
|
93
|
+
});
|
|
94
|
+
exports.sCameraPtzEndMoveCommand = zod_1.z.object({
|
|
95
|
+
command: zod_1.z.literal('camera.ptz-end-move'),
|
|
96
|
+
params: zod_1.z.object({}),
|
|
97
|
+
});
|
|
98
|
+
exports.sCameraEnableCommand = zod_1.z.object({
|
|
99
|
+
command: zod_1.z.literal('camera.enable'),
|
|
100
|
+
params: zod_1.z.object({}),
|
|
101
|
+
});
|
|
102
|
+
exports.sCameraDisableCommand = zod_1.z.object({
|
|
103
|
+
command: zod_1.z.literal('camera.disable'),
|
|
104
|
+
params: zod_1.z.object({}),
|
|
105
|
+
});
|
|
106
|
+
exports.sCameraEnableDetectionCommand = zod_1.z.object({
|
|
107
|
+
command: zod_1.z.literal('camera.enable-detection'),
|
|
108
|
+
params: zod_1.z.object({}),
|
|
109
|
+
});
|
|
110
|
+
exports.sCameraDisableDetectionCommand = zod_1.z.object({
|
|
111
|
+
command: zod_1.z.literal('camera.disable-detection'),
|
|
112
|
+
params: zod_1.z.object({}),
|
|
113
|
+
});
|
|
114
|
+
exports.cameraCommands = {
|
|
115
|
+
'camera.ptz-set': exports.sCameraPtzSetCommand,
|
|
116
|
+
'camera.ptz-move': exports.sCameraPtzMoveCommand,
|
|
117
|
+
'camera.enable': exports.sCameraEnableCommand,
|
|
118
|
+
'camera.disable': exports.sCameraDisableCommand,
|
|
119
|
+
'camera.preset-save': exports.sCameraPresetSaveCommand,
|
|
120
|
+
'camera.preset-activate': exports.sCameraPresetActivateCommand,
|
|
121
|
+
'camera.preset-delete': exports.sCameraPresetDeleteCommand,
|
|
122
|
+
'camera.ptz-begin-move': exports.sCameraPtzBeginMoveCommand,
|
|
123
|
+
'camera.ptz-end-move': exports.sCameraPtzEndMoveCommand,
|
|
124
|
+
'camera.enable-detection': exports.sCameraEnableDetectionCommand,
|
|
125
|
+
'camera.disable-detection': exports.sCameraDisableDetectionCommand,
|
|
126
|
+
};
|
|
39
127
|
// EVENTS
|
|
40
128
|
exports.sCameraPtzPresetSaved = zod_1.z.object({
|
|
41
129
|
kind: zod_1.z.literal('ptz-preset-saved'),
|
package/dist/device/display.d.ts
CHANGED
|
@@ -2,28 +2,435 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const DISPLAY: "display";
|
|
3
3
|
export declare const sDisplaySpecs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4
4
|
export type DisplaySpecs = z.infer<typeof sDisplaySpecs>;
|
|
5
|
-
export
|
|
6
|
-
type:
|
|
5
|
+
export declare const sDisplayTileItemCamera: z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"camera">;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
username: z.ZodString;
|
|
9
|
+
password: z.ZodString;
|
|
10
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
11
|
+
streamId: z.ZodString;
|
|
12
|
+
displayName: z.ZodString;
|
|
13
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
14
|
+
rtspUrl: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
resolution: string | null;
|
|
17
|
+
displayName: string;
|
|
18
|
+
streamId: string;
|
|
19
|
+
rtspUrl: string;
|
|
20
|
+
}, {
|
|
21
|
+
resolution: string | null;
|
|
22
|
+
displayName: string;
|
|
23
|
+
streamId: string;
|
|
24
|
+
rtspUrl: string;
|
|
25
|
+
}>, "many">;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
27
|
name: string;
|
|
28
|
+
type: "camera";
|
|
29
|
+
streams: {
|
|
30
|
+
resolution: string | null;
|
|
31
|
+
displayName: string;
|
|
32
|
+
streamId: string;
|
|
33
|
+
rtspUrl: string;
|
|
34
|
+
}[];
|
|
8
35
|
username: string;
|
|
9
36
|
password: string;
|
|
37
|
+
}, {
|
|
38
|
+
name: string;
|
|
39
|
+
type: "camera";
|
|
10
40
|
streams: {
|
|
41
|
+
resolution: string | null;
|
|
42
|
+
displayName: string;
|
|
11
43
|
streamId: string;
|
|
44
|
+
rtspUrl: string;
|
|
45
|
+
}[];
|
|
46
|
+
username: string;
|
|
47
|
+
password: string;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const sDisplayTileItemEmpty: z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"empty">;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
type: "empty";
|
|
53
|
+
}, {
|
|
54
|
+
type: "empty";
|
|
55
|
+
}>;
|
|
56
|
+
export declare const sDisplayTileItem: z.ZodUnion<[z.ZodObject<{
|
|
57
|
+
type: z.ZodLiteral<"camera">;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
username: z.ZodString;
|
|
60
|
+
password: z.ZodString;
|
|
61
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
62
|
+
streamId: z.ZodString;
|
|
63
|
+
displayName: z.ZodString;
|
|
64
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
65
|
+
rtspUrl: z.ZodString;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
resolution: string | null;
|
|
12
68
|
displayName: string;
|
|
69
|
+
streamId: string;
|
|
70
|
+
rtspUrl: string;
|
|
71
|
+
}, {
|
|
13
72
|
resolution: string | null;
|
|
73
|
+
displayName: string;
|
|
74
|
+
streamId: string;
|
|
75
|
+
rtspUrl: string;
|
|
76
|
+
}>, "many">;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
name: string;
|
|
79
|
+
type: "camera";
|
|
80
|
+
streams: {
|
|
81
|
+
resolution: string | null;
|
|
82
|
+
displayName: string;
|
|
83
|
+
streamId: string;
|
|
14
84
|
rtspUrl: string;
|
|
15
85
|
}[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
86
|
+
username: string;
|
|
87
|
+
password: string;
|
|
88
|
+
}, {
|
|
89
|
+
name: string;
|
|
90
|
+
type: "camera";
|
|
91
|
+
streams: {
|
|
92
|
+
resolution: string | null;
|
|
93
|
+
displayName: string;
|
|
94
|
+
streamId: string;
|
|
95
|
+
rtspUrl: string;
|
|
96
|
+
}[];
|
|
97
|
+
username: string;
|
|
98
|
+
password: string;
|
|
99
|
+
}>, z.ZodObject<{
|
|
100
|
+
type: z.ZodLiteral<"empty">;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
type: "empty";
|
|
103
|
+
}, {
|
|
104
|
+
type: "empty";
|
|
105
|
+
}>]>;
|
|
106
|
+
export type DisplayTileItemCamera = z.infer<typeof sDisplayTileItemCamera>;
|
|
107
|
+
export type DisplayTileItemEmpty = z.infer<typeof sDisplayTileItemEmpty>;
|
|
108
|
+
export type DisplayTileItem = z.infer<typeof sDisplayTileItem>;
|
|
109
|
+
export declare const sDisplaySetViewCommand: z.ZodObject<{
|
|
110
|
+
command: z.ZodLiteral<"display.set-view">;
|
|
111
|
+
params: z.ZodObject<{
|
|
112
|
+
tiles: z.ZodArray<z.ZodObject<{
|
|
113
|
+
items: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"camera">;
|
|
115
|
+
name: z.ZodString;
|
|
116
|
+
username: z.ZodString;
|
|
117
|
+
password: z.ZodString;
|
|
118
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
119
|
+
streamId: z.ZodString;
|
|
120
|
+
displayName: z.ZodString;
|
|
121
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
122
|
+
rtspUrl: z.ZodString;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
resolution: string | null;
|
|
125
|
+
displayName: string;
|
|
126
|
+
streamId: string;
|
|
127
|
+
rtspUrl: string;
|
|
128
|
+
}, {
|
|
129
|
+
resolution: string | null;
|
|
130
|
+
displayName: string;
|
|
131
|
+
streamId: string;
|
|
132
|
+
rtspUrl: string;
|
|
133
|
+
}>, "many">;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
name: string;
|
|
136
|
+
type: "camera";
|
|
137
|
+
streams: {
|
|
138
|
+
resolution: string | null;
|
|
139
|
+
displayName: string;
|
|
140
|
+
streamId: string;
|
|
141
|
+
rtspUrl: string;
|
|
142
|
+
}[];
|
|
143
|
+
username: string;
|
|
144
|
+
password: string;
|
|
145
|
+
}, {
|
|
146
|
+
name: string;
|
|
147
|
+
type: "camera";
|
|
148
|
+
streams: {
|
|
149
|
+
resolution: string | null;
|
|
150
|
+
displayName: string;
|
|
151
|
+
streamId: string;
|
|
152
|
+
rtspUrl: string;
|
|
153
|
+
}[];
|
|
154
|
+
username: string;
|
|
155
|
+
password: string;
|
|
156
|
+
}>, z.ZodObject<{
|
|
157
|
+
type: z.ZodLiteral<"empty">;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
type: "empty";
|
|
160
|
+
}, {
|
|
161
|
+
type: "empty";
|
|
162
|
+
}>]>, "many">;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
items: ({
|
|
165
|
+
name: string;
|
|
166
|
+
type: "camera";
|
|
167
|
+
streams: {
|
|
168
|
+
resolution: string | null;
|
|
169
|
+
displayName: string;
|
|
170
|
+
streamId: string;
|
|
171
|
+
rtspUrl: string;
|
|
172
|
+
}[];
|
|
173
|
+
username: string;
|
|
174
|
+
password: string;
|
|
175
|
+
} | {
|
|
176
|
+
type: "empty";
|
|
177
|
+
})[];
|
|
178
|
+
}, {
|
|
179
|
+
items: ({
|
|
180
|
+
name: string;
|
|
181
|
+
type: "camera";
|
|
182
|
+
streams: {
|
|
183
|
+
resolution: string | null;
|
|
184
|
+
displayName: string;
|
|
185
|
+
streamId: string;
|
|
186
|
+
rtspUrl: string;
|
|
187
|
+
}[];
|
|
188
|
+
username: string;
|
|
189
|
+
password: string;
|
|
190
|
+
} | {
|
|
191
|
+
type: "empty";
|
|
192
|
+
})[];
|
|
193
|
+
}>, "many">;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
tiles: {
|
|
196
|
+
items: ({
|
|
197
|
+
name: string;
|
|
198
|
+
type: "camera";
|
|
199
|
+
streams: {
|
|
200
|
+
resolution: string | null;
|
|
201
|
+
displayName: string;
|
|
202
|
+
streamId: string;
|
|
203
|
+
rtspUrl: string;
|
|
204
|
+
}[];
|
|
205
|
+
username: string;
|
|
206
|
+
password: string;
|
|
207
|
+
} | {
|
|
208
|
+
type: "empty";
|
|
209
|
+
})[];
|
|
210
|
+
}[];
|
|
211
|
+
}, {
|
|
212
|
+
tiles: {
|
|
213
|
+
items: ({
|
|
214
|
+
name: string;
|
|
215
|
+
type: "camera";
|
|
216
|
+
streams: {
|
|
217
|
+
resolution: string | null;
|
|
218
|
+
displayName: string;
|
|
219
|
+
streamId: string;
|
|
220
|
+
rtspUrl: string;
|
|
221
|
+
}[];
|
|
222
|
+
username: string;
|
|
223
|
+
password: string;
|
|
224
|
+
} | {
|
|
225
|
+
type: "empty";
|
|
226
|
+
})[];
|
|
227
|
+
}[];
|
|
228
|
+
}>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
230
|
params: {
|
|
22
231
|
tiles: {
|
|
23
|
-
items:
|
|
232
|
+
items: ({
|
|
233
|
+
name: string;
|
|
234
|
+
type: "camera";
|
|
235
|
+
streams: {
|
|
236
|
+
resolution: string | null;
|
|
237
|
+
displayName: string;
|
|
238
|
+
streamId: string;
|
|
239
|
+
rtspUrl: string;
|
|
240
|
+
}[];
|
|
241
|
+
username: string;
|
|
242
|
+
password: string;
|
|
243
|
+
} | {
|
|
244
|
+
type: "empty";
|
|
245
|
+
})[];
|
|
24
246
|
}[];
|
|
25
247
|
};
|
|
26
|
-
|
|
248
|
+
command: "display.set-view";
|
|
249
|
+
}, {
|
|
250
|
+
params: {
|
|
251
|
+
tiles: {
|
|
252
|
+
items: ({
|
|
253
|
+
name: string;
|
|
254
|
+
type: "camera";
|
|
255
|
+
streams: {
|
|
256
|
+
resolution: string | null;
|
|
257
|
+
displayName: string;
|
|
258
|
+
streamId: string;
|
|
259
|
+
rtspUrl: string;
|
|
260
|
+
}[];
|
|
261
|
+
username: string;
|
|
262
|
+
password: string;
|
|
263
|
+
} | {
|
|
264
|
+
type: "empty";
|
|
265
|
+
})[];
|
|
266
|
+
}[];
|
|
267
|
+
};
|
|
268
|
+
command: "display.set-view";
|
|
269
|
+
}>;
|
|
270
|
+
export type DisplaySetViewCommand = z.infer<typeof sDisplaySetViewCommand>;
|
|
271
|
+
export declare const displayCommands: {
|
|
272
|
+
readonly 'display.set-view': z.ZodObject<{
|
|
273
|
+
command: z.ZodLiteral<"display.set-view">;
|
|
274
|
+
params: z.ZodObject<{
|
|
275
|
+
tiles: z.ZodArray<z.ZodObject<{
|
|
276
|
+
items: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
277
|
+
type: z.ZodLiteral<"camera">;
|
|
278
|
+
name: z.ZodString;
|
|
279
|
+
username: z.ZodString;
|
|
280
|
+
password: z.ZodString;
|
|
281
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
282
|
+
streamId: z.ZodString;
|
|
283
|
+
displayName: z.ZodString;
|
|
284
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
285
|
+
rtspUrl: z.ZodString;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
resolution: string | null;
|
|
288
|
+
displayName: string;
|
|
289
|
+
streamId: string;
|
|
290
|
+
rtspUrl: string;
|
|
291
|
+
}, {
|
|
292
|
+
resolution: string | null;
|
|
293
|
+
displayName: string;
|
|
294
|
+
streamId: string;
|
|
295
|
+
rtspUrl: string;
|
|
296
|
+
}>, "many">;
|
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
|
298
|
+
name: string;
|
|
299
|
+
type: "camera";
|
|
300
|
+
streams: {
|
|
301
|
+
resolution: string | null;
|
|
302
|
+
displayName: string;
|
|
303
|
+
streamId: string;
|
|
304
|
+
rtspUrl: string;
|
|
305
|
+
}[];
|
|
306
|
+
username: string;
|
|
307
|
+
password: string;
|
|
308
|
+
}, {
|
|
309
|
+
name: string;
|
|
310
|
+
type: "camera";
|
|
311
|
+
streams: {
|
|
312
|
+
resolution: string | null;
|
|
313
|
+
displayName: string;
|
|
314
|
+
streamId: string;
|
|
315
|
+
rtspUrl: string;
|
|
316
|
+
}[];
|
|
317
|
+
username: string;
|
|
318
|
+
password: string;
|
|
319
|
+
}>, z.ZodObject<{
|
|
320
|
+
type: z.ZodLiteral<"empty">;
|
|
321
|
+
}, "strip", z.ZodTypeAny, {
|
|
322
|
+
type: "empty";
|
|
323
|
+
}, {
|
|
324
|
+
type: "empty";
|
|
325
|
+
}>]>, "many">;
|
|
326
|
+
}, "strip", z.ZodTypeAny, {
|
|
327
|
+
items: ({
|
|
328
|
+
name: string;
|
|
329
|
+
type: "camera";
|
|
330
|
+
streams: {
|
|
331
|
+
resolution: string | null;
|
|
332
|
+
displayName: string;
|
|
333
|
+
streamId: string;
|
|
334
|
+
rtspUrl: string;
|
|
335
|
+
}[];
|
|
336
|
+
username: string;
|
|
337
|
+
password: string;
|
|
338
|
+
} | {
|
|
339
|
+
type: "empty";
|
|
340
|
+
})[];
|
|
341
|
+
}, {
|
|
342
|
+
items: ({
|
|
343
|
+
name: string;
|
|
344
|
+
type: "camera";
|
|
345
|
+
streams: {
|
|
346
|
+
resolution: string | null;
|
|
347
|
+
displayName: string;
|
|
348
|
+
streamId: string;
|
|
349
|
+
rtspUrl: string;
|
|
350
|
+
}[];
|
|
351
|
+
username: string;
|
|
352
|
+
password: string;
|
|
353
|
+
} | {
|
|
354
|
+
type: "empty";
|
|
355
|
+
})[];
|
|
356
|
+
}>, "many">;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
tiles: {
|
|
359
|
+
items: ({
|
|
360
|
+
name: string;
|
|
361
|
+
type: "camera";
|
|
362
|
+
streams: {
|
|
363
|
+
resolution: string | null;
|
|
364
|
+
displayName: string;
|
|
365
|
+
streamId: string;
|
|
366
|
+
rtspUrl: string;
|
|
367
|
+
}[];
|
|
368
|
+
username: string;
|
|
369
|
+
password: string;
|
|
370
|
+
} | {
|
|
371
|
+
type: "empty";
|
|
372
|
+
})[];
|
|
373
|
+
}[];
|
|
374
|
+
}, {
|
|
375
|
+
tiles: {
|
|
376
|
+
items: ({
|
|
377
|
+
name: string;
|
|
378
|
+
type: "camera";
|
|
379
|
+
streams: {
|
|
380
|
+
resolution: string | null;
|
|
381
|
+
displayName: string;
|
|
382
|
+
streamId: string;
|
|
383
|
+
rtspUrl: string;
|
|
384
|
+
}[];
|
|
385
|
+
username: string;
|
|
386
|
+
password: string;
|
|
387
|
+
} | {
|
|
388
|
+
type: "empty";
|
|
389
|
+
})[];
|
|
390
|
+
}[];
|
|
391
|
+
}>;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
params: {
|
|
394
|
+
tiles: {
|
|
395
|
+
items: ({
|
|
396
|
+
name: string;
|
|
397
|
+
type: "camera";
|
|
398
|
+
streams: {
|
|
399
|
+
resolution: string | null;
|
|
400
|
+
displayName: string;
|
|
401
|
+
streamId: string;
|
|
402
|
+
rtspUrl: string;
|
|
403
|
+
}[];
|
|
404
|
+
username: string;
|
|
405
|
+
password: string;
|
|
406
|
+
} | {
|
|
407
|
+
type: "empty";
|
|
408
|
+
})[];
|
|
409
|
+
}[];
|
|
410
|
+
};
|
|
411
|
+
command: "display.set-view";
|
|
412
|
+
}, {
|
|
413
|
+
params: {
|
|
414
|
+
tiles: {
|
|
415
|
+
items: ({
|
|
416
|
+
name: string;
|
|
417
|
+
type: "camera";
|
|
418
|
+
streams: {
|
|
419
|
+
resolution: string | null;
|
|
420
|
+
displayName: string;
|
|
421
|
+
streamId: string;
|
|
422
|
+
rtspUrl: string;
|
|
423
|
+
}[];
|
|
424
|
+
username: string;
|
|
425
|
+
password: string;
|
|
426
|
+
} | {
|
|
427
|
+
type: "empty";
|
|
428
|
+
})[];
|
|
429
|
+
}[];
|
|
430
|
+
};
|
|
431
|
+
command: "display.set-view";
|
|
432
|
+
}>;
|
|
433
|
+
};
|
|
27
434
|
export type DisplayCommand = DisplaySetViewCommand;
|
|
28
435
|
export interface DisplayStateDto {
|
|
29
436
|
connected: Record<string, boolean>;
|
package/dist/device/display.js
CHANGED
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sDisplayUnitOfflineEvent = exports.sDisplaySpecs = exports.DISPLAY = void 0;
|
|
3
|
+
exports.sDisplayUnitOfflineEvent = exports.displayCommands = exports.sDisplaySetViewCommand = exports.sDisplayTileItem = exports.sDisplayTileItemEmpty = exports.sDisplayTileItemCamera = exports.sDisplaySpecs = exports.DISPLAY = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.DISPLAY = 'display';
|
|
6
6
|
// SPECS
|
|
7
7
|
exports.sDisplaySpecs = zod_1.z.object({});
|
|
8
|
+
// COMMANDS
|
|
9
|
+
exports.sDisplayTileItemCamera = zod_1.z.object({
|
|
10
|
+
type: zod_1.z.literal('camera'),
|
|
11
|
+
name: zod_1.z.string().nonempty(),
|
|
12
|
+
username: zod_1.z.string().nonempty(),
|
|
13
|
+
password: zod_1.z.string().nonempty(),
|
|
14
|
+
streams: zod_1.z
|
|
15
|
+
.array(zod_1.z.object({
|
|
16
|
+
streamId: zod_1.z.string().nonempty(),
|
|
17
|
+
displayName: zod_1.z.string().nonempty(),
|
|
18
|
+
resolution: zod_1.z.string().nullable(),
|
|
19
|
+
rtspUrl: zod_1.z.string().nonempty(),
|
|
20
|
+
}))
|
|
21
|
+
.min(1),
|
|
22
|
+
});
|
|
23
|
+
exports.sDisplayTileItemEmpty = zod_1.z.object({
|
|
24
|
+
type: zod_1.z.literal('empty'),
|
|
25
|
+
});
|
|
26
|
+
exports.sDisplayTileItem = zod_1.z.union([
|
|
27
|
+
exports.sDisplayTileItemCamera,
|
|
28
|
+
exports.sDisplayTileItemEmpty,
|
|
29
|
+
]);
|
|
30
|
+
exports.sDisplaySetViewCommand = zod_1.z.object({
|
|
31
|
+
command: zod_1.z.literal('display.set-view'),
|
|
32
|
+
params: zod_1.z.object({
|
|
33
|
+
tiles: zod_1.z.array(zod_1.z.object({
|
|
34
|
+
items: zod_1.z.array(exports.sDisplayTileItem),
|
|
35
|
+
})),
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
exports.displayCommands = {
|
|
39
|
+
'display.set-view': exports.sDisplaySetViewCommand,
|
|
40
|
+
};
|
|
8
41
|
// EVENTS
|
|
9
42
|
exports.sDisplayUnitOfflineEvent = zod_1.z.object({
|
|
10
43
|
kind: zod_1.z.literal('display-unit-offline'),
|