@awarevue/api-types 2.0.145 → 2.0.147
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/api/agent-protocol/protocol.d.ts +8 -0
- package/dist/api/commands/all.d.ts +170 -1
- package/dist/api/commands/all.js +22 -0
- package/dist/api/commands/index.d.ts +1 -0
- package/dist/api/commands/index.js +1 -0
- package/dist/api/commands/nvr-analytics-server.d.ts +4 -0
- package/dist/api/commands/nvr-exporter.d.ts +4 -0
- package/dist/api/commands/nvr-recorder.d.ts +16 -0
- package/dist/api/commands/playback-server.d.ts +440 -0
- package/dist/api/commands/playback-server.js +64 -0
- package/dist/api/commands/server.d.ts +4 -0
- package/dist/api/events/all.d.ts +16 -1
- package/dist/api/events/all.js +7 -0
- package/dist/api/events/index.d.ts +1 -0
- package/dist/api/events/index.js +1 -0
- package/dist/api/events/playback-server.d.ts +35 -0
- package/dist/api/events/playback-server.js +28 -0
- package/dist/api/events/server.d.ts +8 -1
- package/dist/api/events/server.js +7 -1
- package/dist/api/queries/all.d.ts +31 -2
- package/dist/api/queries/all.js +3 -0
- package/dist/api/queries/index.d.ts +1 -0
- package/dist/api/queries/index.js +1 -0
- package/dist/api/queries/nvr-recorder.d.ts +16 -0
- package/dist/api/queries/playback-server.d.ts +72 -0
- package/dist/api/queries/playback-server.js +47 -0
- package/dist/api/rest/device.d.ts +4 -0
- package/dist/api/rest/index.d.ts +1 -0
- package/dist/api/rest/index.js +1 -0
- package/dist/api/rest/time-zone.d.ts +5 -0
- package/dist/api/rest/time-zone.js +10 -0
- package/dist/api/rest/user.d.ts +3 -3
- package/dist/objects/device/any-device.d.ts +120 -1
- package/dist/objects/device/any-device.js +11 -1
- package/dist/objects/device/device-import.d.ts +8 -0
- package/dist/objects/device/index.d.ts +1 -0
- package/dist/objects/device/index.js +1 -0
- package/dist/objects/device/playback-server.d.ts +9 -0
- package/dist/objects/device/playback-server.js +10 -0
- package/dist/objects/device/server.d.ts +1 -0
- package/dist/objects/role.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/permissions.d.ts +6 -6
- package/dist/permissions.js +2 -0
- package/dist/primitives.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sPlaybackSessionId: z.ZodString;
|
|
3
|
+
export declare const sPlaybackSessionCamera: z.ZodObject<{
|
|
4
|
+
camera: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
foreignRef: z.ZodString;
|
|
7
|
+
provider: z.ZodString;
|
|
8
|
+
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
9
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
params: z.ZodUnknown;
|
|
13
|
+
isDefault: z.ZodBoolean;
|
|
14
|
+
assignedRef: z.ZodNullable<z.ZodString>;
|
|
15
|
+
createdOn: z.ZodString;
|
|
16
|
+
lastModifiedOn: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<"alarm">;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
ptzCapable: z.ZodBoolean;
|
|
22
|
+
ptzPanSpeed: z.ZodNumber;
|
|
23
|
+
ptzTiltSpeed: z.ZodNumber;
|
|
24
|
+
ptzZoomSpeed: z.ZodNumber;
|
|
25
|
+
panMin: z.ZodNumber;
|
|
26
|
+
panMax: z.ZodNumber;
|
|
27
|
+
tiltMin: z.ZodNumber;
|
|
28
|
+
tiltMax: z.ZodNumber;
|
|
29
|
+
zoomMin: z.ZodNumber;
|
|
30
|
+
zoomMax: z.ZodNumber;
|
|
31
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
displayName: z.ZodString;
|
|
34
|
+
externalPlayerUrl: z.ZodNullable<z.ZodString>;
|
|
35
|
+
rtspUrl: z.ZodNullable<z.ZodString>;
|
|
36
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
37
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
38
|
+
lensType: z.ZodEnum<{
|
|
39
|
+
flat: "flat";
|
|
40
|
+
fisheye: "fisheye";
|
|
41
|
+
}>;
|
|
42
|
+
mountPoint: z.ZodEnum<{
|
|
43
|
+
wall: "wall";
|
|
44
|
+
ceiling: "ceiling";
|
|
45
|
+
floor: "floor";
|
|
46
|
+
}>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
defaultStreamId: z.ZodString;
|
|
49
|
+
autoSwitchStreams: z.ZodBoolean;
|
|
50
|
+
streamNaming: z.ZodEnum<{
|
|
51
|
+
cameraStreamNo: "cameraStreamNo";
|
|
52
|
+
cameraStream: "cameraStream";
|
|
53
|
+
stream: "stream";
|
|
54
|
+
}>;
|
|
55
|
+
type: z.ZodLiteral<"camera">;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
canReportOpenState: z.ZodBoolean;
|
|
58
|
+
canReportLockState: z.ZodBoolean;
|
|
59
|
+
canControlLock: z.ZodBoolean;
|
|
60
|
+
canRelease: z.ZodBoolean;
|
|
61
|
+
type: z.ZodLiteral<"door">;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
inputs: z.ZodArray<z.ZodString>;
|
|
64
|
+
outputs: z.ZodArray<z.ZodString>;
|
|
65
|
+
type: z.ZodLiteral<"io-board">;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
type: z.ZodLiteral<"camera-lift">;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
type: z.ZodLiteral<"motion-sensor">;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
type: z.ZodLiteral<"panic-button">;
|
|
74
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
+
sipUri: z.ZodString;
|
|
76
|
+
sipUser: z.ZodString;
|
|
77
|
+
sipPassword: z.ZodString;
|
|
78
|
+
sipRealm: z.ZodString;
|
|
79
|
+
remoteExtension: z.ZodString;
|
|
80
|
+
type: z.ZodLiteral<"intercom-terminal">;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
sipWsUrl: z.ZodString;
|
|
83
|
+
type: z.ZodLiteral<"pbx">;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<"server">;
|
|
86
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"intercom-operator">;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"device-gateway">;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"presence-tracker">;
|
|
92
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
+
credentialTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
94
|
+
card: "card";
|
|
95
|
+
pin: "pin";
|
|
96
|
+
fingerprint: "fingerprint";
|
|
97
|
+
face: "face";
|
|
98
|
+
retina: "retina";
|
|
99
|
+
}>>>;
|
|
100
|
+
type: z.ZodLiteral<"reader">;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
type: z.ZodLiteral<"display">;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
type: z.ZodLiteral<"nvr-recorder">;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
type: z.ZodLiteral<"nvr-exporter">;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<"playback-server">;
|
|
109
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
111
|
+
motionDetection: "motionDetection";
|
|
112
|
+
labelDetection: "labelDetection";
|
|
113
|
+
faceRecognition: "faceRecognition";
|
|
114
|
+
semanticSearch: "semanticSearch";
|
|
115
|
+
}>>;
|
|
116
|
+
type: z.ZodLiteral<"nvr-analytics-server">;
|
|
117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
118
|
+
type: z.ZodLiteral<"system">;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
type: z.ZodLiteral<"position-tracker">;
|
|
121
|
+
}, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
|
|
122
|
+
streamId: z.ZodString;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type PlaybackSessionCamera = z.infer<typeof sPlaybackSessionCamera>;
|
|
125
|
+
export declare const sOpenPlaybackSessionCommand: z.ZodObject<{
|
|
126
|
+
command: z.ZodLiteral<"playback-server.open-session">;
|
|
127
|
+
params: z.ZodObject<{
|
|
128
|
+
sessionId: z.ZodString;
|
|
129
|
+
cameras: z.ZodArray<z.ZodObject<{
|
|
130
|
+
camera: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
foreignRef: z.ZodString;
|
|
133
|
+
provider: z.ZodString;
|
|
134
|
+
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
135
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
136
|
+
id: z.ZodString;
|
|
137
|
+
name: z.ZodString;
|
|
138
|
+
params: z.ZodUnknown;
|
|
139
|
+
isDefault: z.ZodBoolean;
|
|
140
|
+
assignedRef: z.ZodNullable<z.ZodString>;
|
|
141
|
+
createdOn: z.ZodString;
|
|
142
|
+
lastModifiedOn: z.ZodString;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
145
|
+
type: z.ZodLiteral<"alarm">;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
ptzCapable: z.ZodBoolean;
|
|
148
|
+
ptzPanSpeed: z.ZodNumber;
|
|
149
|
+
ptzTiltSpeed: z.ZodNumber;
|
|
150
|
+
ptzZoomSpeed: z.ZodNumber;
|
|
151
|
+
panMin: z.ZodNumber;
|
|
152
|
+
panMax: z.ZodNumber;
|
|
153
|
+
tiltMin: z.ZodNumber;
|
|
154
|
+
tiltMax: z.ZodNumber;
|
|
155
|
+
zoomMin: z.ZodNumber;
|
|
156
|
+
zoomMax: z.ZodNumber;
|
|
157
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
displayName: z.ZodString;
|
|
160
|
+
externalPlayerUrl: z.ZodNullable<z.ZodString>;
|
|
161
|
+
rtspUrl: z.ZodNullable<z.ZodString>;
|
|
162
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
163
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
164
|
+
lensType: z.ZodEnum<{
|
|
165
|
+
flat: "flat";
|
|
166
|
+
fisheye: "fisheye";
|
|
167
|
+
}>;
|
|
168
|
+
mountPoint: z.ZodEnum<{
|
|
169
|
+
wall: "wall";
|
|
170
|
+
ceiling: "ceiling";
|
|
171
|
+
floor: "floor";
|
|
172
|
+
}>;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
defaultStreamId: z.ZodString;
|
|
175
|
+
autoSwitchStreams: z.ZodBoolean;
|
|
176
|
+
streamNaming: z.ZodEnum<{
|
|
177
|
+
cameraStreamNo: "cameraStreamNo";
|
|
178
|
+
cameraStream: "cameraStream";
|
|
179
|
+
stream: "stream";
|
|
180
|
+
}>;
|
|
181
|
+
type: z.ZodLiteral<"camera">;
|
|
182
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
183
|
+
canReportOpenState: z.ZodBoolean;
|
|
184
|
+
canReportLockState: z.ZodBoolean;
|
|
185
|
+
canControlLock: z.ZodBoolean;
|
|
186
|
+
canRelease: z.ZodBoolean;
|
|
187
|
+
type: z.ZodLiteral<"door">;
|
|
188
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
189
|
+
inputs: z.ZodArray<z.ZodString>;
|
|
190
|
+
outputs: z.ZodArray<z.ZodString>;
|
|
191
|
+
type: z.ZodLiteral<"io-board">;
|
|
192
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
193
|
+
type: z.ZodLiteral<"camera-lift">;
|
|
194
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
195
|
+
type: z.ZodLiteral<"motion-sensor">;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
+
type: z.ZodLiteral<"panic-button">;
|
|
200
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
201
|
+
sipUri: z.ZodString;
|
|
202
|
+
sipUser: z.ZodString;
|
|
203
|
+
sipPassword: z.ZodString;
|
|
204
|
+
sipRealm: z.ZodString;
|
|
205
|
+
remoteExtension: z.ZodString;
|
|
206
|
+
type: z.ZodLiteral<"intercom-terminal">;
|
|
207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
+
sipWsUrl: z.ZodString;
|
|
209
|
+
type: z.ZodLiteral<"pbx">;
|
|
210
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
211
|
+
type: z.ZodLiteral<"server">;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"intercom-operator">;
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
+
type: z.ZodLiteral<"device-gateway">;
|
|
216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
217
|
+
type: z.ZodLiteral<"presence-tracker">;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
credentialTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
220
|
+
card: "card";
|
|
221
|
+
pin: "pin";
|
|
222
|
+
fingerprint: "fingerprint";
|
|
223
|
+
face: "face";
|
|
224
|
+
retina: "retina";
|
|
225
|
+
}>>>;
|
|
226
|
+
type: z.ZodLiteral<"reader">;
|
|
227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
+
type: z.ZodLiteral<"display">;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
type: z.ZodLiteral<"nvr-recorder">;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
type: z.ZodLiteral<"nvr-exporter">;
|
|
233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
+
type: z.ZodLiteral<"playback-server">;
|
|
235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
236
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
237
|
+
motionDetection: "motionDetection";
|
|
238
|
+
labelDetection: "labelDetection";
|
|
239
|
+
faceRecognition: "faceRecognition";
|
|
240
|
+
semanticSearch: "semanticSearch";
|
|
241
|
+
}>>;
|
|
242
|
+
type: z.ZodLiteral<"nvr-analytics-server">;
|
|
243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
+
type: z.ZodLiteral<"system">;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
246
|
+
type: z.ZodLiteral<"position-tracker">;
|
|
247
|
+
}, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
|
|
248
|
+
streamId: z.ZodString;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
time: z.ZodNumber;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
export type OpenPlaybackSessionCommand = z.infer<typeof sOpenPlaybackSessionCommand>;
|
|
254
|
+
export declare const sClosePlaybackSessionCommand: z.ZodObject<{
|
|
255
|
+
command: z.ZodLiteral<"playback-server.close-session">;
|
|
256
|
+
params: z.ZodObject<{
|
|
257
|
+
sessionId: z.ZodString;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
export type ClosePlaybackSessionCommand = z.infer<typeof sClosePlaybackSessionCommand>;
|
|
261
|
+
export declare const sPlayPlaybackSessionCommand: z.ZodObject<{
|
|
262
|
+
command: z.ZodLiteral<"playback-server.play">;
|
|
263
|
+
params: z.ZodObject<{
|
|
264
|
+
sessionId: z.ZodString;
|
|
265
|
+
rate: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
}, z.core.$strip>;
|
|
268
|
+
export type PlayPlaybackSessionCommand = z.infer<typeof sPlayPlaybackSessionCommand>;
|
|
269
|
+
export declare const sPausePlaybackSessionCommand: z.ZodObject<{
|
|
270
|
+
command: z.ZodLiteral<"playback-server.pause">;
|
|
271
|
+
params: z.ZodObject<{
|
|
272
|
+
sessionId: z.ZodString;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
export type PausePlaybackSessionCommand = z.infer<typeof sPausePlaybackSessionCommand>;
|
|
276
|
+
export declare const sSeekPlaybackSessionCommand: z.ZodObject<{
|
|
277
|
+
command: z.ZodLiteral<"playback-server.seek">;
|
|
278
|
+
params: z.ZodObject<{
|
|
279
|
+
sessionId: z.ZodString;
|
|
280
|
+
time: z.ZodNumber;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
export type SeekPlaybackSessionCommand = z.infer<typeof sSeekPlaybackSessionCommand>;
|
|
284
|
+
export type PlaybackServerCommand = OpenPlaybackSessionCommand | ClosePlaybackSessionCommand | PlayPlaybackSessionCommand | PausePlaybackSessionCommand | SeekPlaybackSessionCommand;
|
|
285
|
+
export declare const playbackServerCommandSchemas: {
|
|
286
|
+
readonly 'playback-server.open-session': z.ZodObject<{
|
|
287
|
+
command: z.ZodLiteral<"playback-server.open-session">;
|
|
288
|
+
params: z.ZodObject<{
|
|
289
|
+
sessionId: z.ZodString;
|
|
290
|
+
cameras: z.ZodArray<z.ZodObject<{
|
|
291
|
+
camera: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
292
|
+
name: z.ZodString;
|
|
293
|
+
foreignRef: z.ZodString;
|
|
294
|
+
provider: z.ZodString;
|
|
295
|
+
providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
|
|
296
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
297
|
+
id: z.ZodString;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
params: z.ZodUnknown;
|
|
300
|
+
isDefault: z.ZodBoolean;
|
|
301
|
+
assignedRef: z.ZodNullable<z.ZodString>;
|
|
302
|
+
createdOn: z.ZodString;
|
|
303
|
+
lastModifiedOn: z.ZodString;
|
|
304
|
+
}, z.core.$strip>>;
|
|
305
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
306
|
+
type: z.ZodLiteral<"alarm">;
|
|
307
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
308
|
+
ptzCapable: z.ZodBoolean;
|
|
309
|
+
ptzPanSpeed: z.ZodNumber;
|
|
310
|
+
ptzTiltSpeed: z.ZodNumber;
|
|
311
|
+
ptzZoomSpeed: z.ZodNumber;
|
|
312
|
+
panMin: z.ZodNumber;
|
|
313
|
+
panMax: z.ZodNumber;
|
|
314
|
+
tiltMin: z.ZodNumber;
|
|
315
|
+
tiltMax: z.ZodNumber;
|
|
316
|
+
zoomMin: z.ZodNumber;
|
|
317
|
+
zoomMax: z.ZodNumber;
|
|
318
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
319
|
+
id: z.ZodString;
|
|
320
|
+
displayName: z.ZodString;
|
|
321
|
+
externalPlayerUrl: z.ZodNullable<z.ZodString>;
|
|
322
|
+
rtspUrl: z.ZodNullable<z.ZodString>;
|
|
323
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
324
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
325
|
+
lensType: z.ZodEnum<{
|
|
326
|
+
flat: "flat";
|
|
327
|
+
fisheye: "fisheye";
|
|
328
|
+
}>;
|
|
329
|
+
mountPoint: z.ZodEnum<{
|
|
330
|
+
wall: "wall";
|
|
331
|
+
ceiling: "ceiling";
|
|
332
|
+
floor: "floor";
|
|
333
|
+
}>;
|
|
334
|
+
}, z.core.$strip>>;
|
|
335
|
+
defaultStreamId: z.ZodString;
|
|
336
|
+
autoSwitchStreams: z.ZodBoolean;
|
|
337
|
+
streamNaming: z.ZodEnum<{
|
|
338
|
+
cameraStreamNo: "cameraStreamNo";
|
|
339
|
+
cameraStream: "cameraStream";
|
|
340
|
+
stream: "stream";
|
|
341
|
+
}>;
|
|
342
|
+
type: z.ZodLiteral<"camera">;
|
|
343
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
344
|
+
canReportOpenState: z.ZodBoolean;
|
|
345
|
+
canReportLockState: z.ZodBoolean;
|
|
346
|
+
canControlLock: z.ZodBoolean;
|
|
347
|
+
canRelease: z.ZodBoolean;
|
|
348
|
+
type: z.ZodLiteral<"door">;
|
|
349
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
350
|
+
inputs: z.ZodArray<z.ZodString>;
|
|
351
|
+
outputs: z.ZodArray<z.ZodString>;
|
|
352
|
+
type: z.ZodLiteral<"io-board">;
|
|
353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
+
type: z.ZodLiteral<"camera-lift">;
|
|
355
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"motion-sensor">;
|
|
357
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
358
|
+
type: z.ZodLiteral<"generic-sensor">;
|
|
359
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
360
|
+
type: z.ZodLiteral<"panic-button">;
|
|
361
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
362
|
+
sipUri: z.ZodString;
|
|
363
|
+
sipUser: z.ZodString;
|
|
364
|
+
sipPassword: z.ZodString;
|
|
365
|
+
sipRealm: z.ZodString;
|
|
366
|
+
remoteExtension: z.ZodString;
|
|
367
|
+
type: z.ZodLiteral<"intercom-terminal">;
|
|
368
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
369
|
+
sipWsUrl: z.ZodString;
|
|
370
|
+
type: z.ZodLiteral<"pbx">;
|
|
371
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
372
|
+
type: z.ZodLiteral<"server">;
|
|
373
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
374
|
+
type: z.ZodLiteral<"intercom-operator">;
|
|
375
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
376
|
+
type: z.ZodLiteral<"device-gateway">;
|
|
377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"presence-tracker">;
|
|
379
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
380
|
+
credentialTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
381
|
+
card: "card";
|
|
382
|
+
pin: "pin";
|
|
383
|
+
fingerprint: "fingerprint";
|
|
384
|
+
face: "face";
|
|
385
|
+
retina: "retina";
|
|
386
|
+
}>>>;
|
|
387
|
+
type: z.ZodLiteral<"reader">;
|
|
388
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
389
|
+
type: z.ZodLiteral<"display">;
|
|
390
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
391
|
+
type: z.ZodLiteral<"nvr-recorder">;
|
|
392
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
393
|
+
type: z.ZodLiteral<"nvr-exporter">;
|
|
394
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
395
|
+
type: z.ZodLiteral<"playback-server">;
|
|
396
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
397
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
398
|
+
motionDetection: "motionDetection";
|
|
399
|
+
labelDetection: "labelDetection";
|
|
400
|
+
faceRecognition: "faceRecognition";
|
|
401
|
+
semanticSearch: "semanticSearch";
|
|
402
|
+
}>>;
|
|
403
|
+
type: z.ZodLiteral<"nvr-analytics-server">;
|
|
404
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
405
|
+
type: z.ZodLiteral<"system">;
|
|
406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
+
type: z.ZodLiteral<"position-tracker">;
|
|
408
|
+
}, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
|
|
409
|
+
streamId: z.ZodString;
|
|
410
|
+
}, z.core.$strip>>;
|
|
411
|
+
time: z.ZodNumber;
|
|
412
|
+
}, z.core.$strip>;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
readonly 'playback-server.close-session': z.ZodObject<{
|
|
415
|
+
command: z.ZodLiteral<"playback-server.close-session">;
|
|
416
|
+
params: z.ZodObject<{
|
|
417
|
+
sessionId: z.ZodString;
|
|
418
|
+
}, z.core.$strip>;
|
|
419
|
+
}, z.core.$strip>;
|
|
420
|
+
readonly 'playback-server.play': z.ZodObject<{
|
|
421
|
+
command: z.ZodLiteral<"playback-server.play">;
|
|
422
|
+
params: z.ZodObject<{
|
|
423
|
+
sessionId: z.ZodString;
|
|
424
|
+
rate: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
425
|
+
}, z.core.$strip>;
|
|
426
|
+
}, z.core.$strip>;
|
|
427
|
+
readonly 'playback-server.pause': z.ZodObject<{
|
|
428
|
+
command: z.ZodLiteral<"playback-server.pause">;
|
|
429
|
+
params: z.ZodObject<{
|
|
430
|
+
sessionId: z.ZodString;
|
|
431
|
+
}, z.core.$strip>;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
readonly 'playback-server.seek': z.ZodObject<{
|
|
434
|
+
command: z.ZodLiteral<"playback-server.seek">;
|
|
435
|
+
params: z.ZodObject<{
|
|
436
|
+
sessionId: z.ZodString;
|
|
437
|
+
time: z.ZodNumber;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.playbackServerCommandSchemas = exports.sSeekPlaybackSessionCommand = exports.sPausePlaybackSessionCommand = exports.sPlayPlaybackSessionCommand = exports.sClosePlaybackSessionCommand = exports.sOpenPlaybackSessionCommand = exports.sPlaybackSessionCamera = exports.sPlaybackSessionId = void 0;
|
|
4
|
+
const primitives_1 = require("../../primitives");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
// A playback session is named by its caller, so the same name can be
|
|
7
|
+
// commanded again (idempotently) and agreed on in advance.
|
|
8
|
+
exports.sPlaybackSessionId = zod_1.z
|
|
9
|
+
.string()
|
|
10
|
+
.regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/)
|
|
11
|
+
.describe('Name of the playback session, chosen by the caller: a letter or digit, then up to 63 letters, digits, ".", "_" or "-"');
|
|
12
|
+
exports.sPlaybackSessionCamera = zod_1.z.object({
|
|
13
|
+
camera: primitives_1.sDeviceParam,
|
|
14
|
+
streamId: zod_1.z.string().nonempty(),
|
|
15
|
+
});
|
|
16
|
+
// COMMANDS
|
|
17
|
+
exports.sOpenPlaybackSessionCommand = zod_1.z.object({
|
|
18
|
+
command: zod_1.z.literal('playback-server.open-session'),
|
|
19
|
+
params: zod_1.z.object({
|
|
20
|
+
sessionId: exports.sPlaybackSessionId,
|
|
21
|
+
cameras: zod_1.z
|
|
22
|
+
.array(exports.sPlaybackSessionCamera)
|
|
23
|
+
.min(1)
|
|
24
|
+
.describe('The complete list of cameras in the session; sent for an existing session it replaces the list'),
|
|
25
|
+
time: zod_1.z
|
|
26
|
+
.number()
|
|
27
|
+
.int()
|
|
28
|
+
.positive()
|
|
29
|
+
.describe('Initial position (unix ms); applies only when the session is created'),
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
exports.sClosePlaybackSessionCommand = zod_1.z.object({
|
|
33
|
+
command: zod_1.z.literal('playback-server.close-session'),
|
|
34
|
+
params: zod_1.z.object({
|
|
35
|
+
sessionId: exports.sPlaybackSessionId,
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
exports.sPlayPlaybackSessionCommand = zod_1.z.object({
|
|
39
|
+
command: zod_1.z.literal('playback-server.play'),
|
|
40
|
+
params: zod_1.z.object({
|
|
41
|
+
sessionId: exports.sPlaybackSessionId,
|
|
42
|
+
rate: zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2)]),
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
exports.sPausePlaybackSessionCommand = zod_1.z.object({
|
|
46
|
+
command: zod_1.z.literal('playback-server.pause'),
|
|
47
|
+
params: zod_1.z.object({
|
|
48
|
+
sessionId: exports.sPlaybackSessionId,
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
exports.sSeekPlaybackSessionCommand = zod_1.z.object({
|
|
52
|
+
command: zod_1.z.literal('playback-server.seek'),
|
|
53
|
+
params: zod_1.z.object({
|
|
54
|
+
sessionId: exports.sPlaybackSessionId,
|
|
55
|
+
time: zod_1.z.number().int().positive().describe('Position (unix ms)'),
|
|
56
|
+
}),
|
|
57
|
+
});
|
|
58
|
+
exports.playbackServerCommandSchemas = {
|
|
59
|
+
'playback-server.open-session': exports.sOpenPlaybackSessionCommand,
|
|
60
|
+
'playback-server.close-session': exports.sClosePlaybackSessionCommand,
|
|
61
|
+
'playback-server.play': exports.sPlayPlaybackSessionCommand,
|
|
62
|
+
'playback-server.pause': exports.sPausePlaybackSessionCommand,
|
|
63
|
+
'playback-server.seek': exports.sSeekPlaybackSessionCommand,
|
|
64
|
+
};
|
|
@@ -111,6 +111,8 @@ export declare const sNotify: z.ZodObject<{
|
|
|
111
111
|
type: z.ZodLiteral<"nvr-recorder">;
|
|
112
112
|
}, z.core.$strip>, z.ZodObject<{
|
|
113
113
|
type: z.ZodLiteral<"nvr-exporter">;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<"playback-server">;
|
|
114
116
|
}, z.core.$strip>, z.ZodObject<{
|
|
115
117
|
capabilities: z.ZodArray<z.ZodEnum<{
|
|
116
118
|
motionDetection: "motionDetection";
|
|
@@ -250,6 +252,8 @@ export declare const serverCommands: {
|
|
|
250
252
|
type: z.ZodLiteral<"nvr-recorder">;
|
|
251
253
|
}, z.core.$strip>, z.ZodObject<{
|
|
252
254
|
type: z.ZodLiteral<"nvr-exporter">;
|
|
255
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
256
|
+
type: z.ZodLiteral<"playback-server">;
|
|
253
257
|
}, z.core.$strip>, z.ZodObject<{
|
|
254
258
|
capabilities: z.ZodArray<z.ZodEnum<{
|
|
255
259
|
motionDetection: "motionDetection";
|
package/dist/api/events/all.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { PresenceTrackerEvent } from './presence-tracker';
|
|
|
9
9
|
import { ReaderEvent } from './reader';
|
|
10
10
|
import { ServerEvent } from './server';
|
|
11
11
|
import { NvrExporterEvent } from './nvr-exporter';
|
|
12
|
+
import { PlaybackServerEvent } from './playback-server';
|
|
12
13
|
import { DeviceType } from '../../objects/device';
|
|
13
14
|
import { NotificationSeverity } from '../../primitives';
|
|
14
15
|
export declare const sDeviceCommandTriggered: z.ZodObject<{
|
|
@@ -49,7 +50,7 @@ export interface NotificationAcknowledgedEvent {
|
|
|
49
50
|
kind: 'notification-acknowledged';
|
|
50
51
|
notificationId: string;
|
|
51
52
|
}
|
|
52
|
-
export type AnyDeviceEvent = DeviceCommandTriggered | CameraEvent | DoorEvent | AlarmEvent | MotionDetectedEvent | ReaderEvent | PanicButtonEvent | DeviceConnectedEvent | DeviceDisconnectedEvent | NotificationCreatedEvent | NotificationAcknowledgedEvent | IntercomTerminalEvent | ServerEvent | PresenceTrackerEvent | IoBoardEvent | NvrExporterEvent | SensorActivatedEvent;
|
|
53
|
+
export type AnyDeviceEvent = DeviceCommandTriggered | CameraEvent | DoorEvent | AlarmEvent | MotionDetectedEvent | ReaderEvent | PanicButtonEvent | DeviceConnectedEvent | DeviceDisconnectedEvent | NotificationCreatedEvent | NotificationAcknowledgedEvent | IntercomTerminalEvent | ServerEvent | PresenceTrackerEvent | IoBoardEvent | NvrExporterEvent | PlaybackServerEvent | SensorActivatedEvent;
|
|
53
54
|
export declare const sEventHeader: z.ZodObject<{
|
|
54
55
|
id: z.ZodString;
|
|
55
56
|
timestamp: z.ZodNumber;
|
|
@@ -80,6 +81,20 @@ export declare const eventSchemaByKind: {
|
|
|
80
81
|
'sensor-activated': z.ZodObject<{
|
|
81
82
|
kind: z.ZodLiteral<"sensor-activated">;
|
|
82
83
|
}, z.core.$strip>;
|
|
84
|
+
'playback-session-opened': z.ZodObject<{
|
|
85
|
+
kind: z.ZodLiteral<"playback-session-opened">;
|
|
86
|
+
sessionId: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
'playback-session-closed': z.ZodObject<{
|
|
89
|
+
kind: z.ZodLiteral<"playback-session-closed">;
|
|
90
|
+
sessionId: z.ZodString;
|
|
91
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
'playback-session-link-issued': z.ZodObject<{
|
|
94
|
+
kind: z.ZodLiteral<"playback-session-link-issued">;
|
|
95
|
+
sessionId: z.ZodString;
|
|
96
|
+
userId: z.ZodString;
|
|
97
|
+
}, z.core.$strip>;
|
|
83
98
|
'nvr-export-started': z.ZodObject<{
|
|
84
99
|
kind: z.ZodLiteral<"nvr-export-started">;
|
|
85
100
|
exportId: z.ZodString;
|
package/dist/api/events/all.js
CHANGED
|
@@ -11,6 +11,7 @@ const panic_button_1 = require("./panic-button");
|
|
|
11
11
|
const presence_tracker_1 = require("./presence-tracker");
|
|
12
12
|
const reader_1 = require("./reader");
|
|
13
13
|
const nvr_exporter_1 = require("./nvr-exporter");
|
|
14
|
+
const playback_server_1 = require("./playback-server");
|
|
14
15
|
exports.sDeviceCommandTriggered = zod_1.z.object({
|
|
15
16
|
kind: zod_1.z.literal('device-command'),
|
|
16
17
|
userId: zod_1.z.string().nonempty().optional(),
|
|
@@ -84,6 +85,9 @@ exports.eventKindLabels = {
|
|
|
84
85
|
'door-closed': 'Door Closed',
|
|
85
86
|
'nvr-export-started': 'NVR Export Started',
|
|
86
87
|
'nvr-export-deleted': 'NVR Export Deleted',
|
|
88
|
+
'playback-session-opened': 'Playback Session Opened',
|
|
89
|
+
'playback-session-closed': 'Playback Session Closed',
|
|
90
|
+
'playback-session-link-issued': 'Playback Session Link Issued',
|
|
87
91
|
'notification-created': 'Notification Created',
|
|
88
92
|
'notification-acknowledged': 'Notification Acknowledged',
|
|
89
93
|
'user-logged-in': 'User Logged In',
|
|
@@ -91,6 +95,7 @@ exports.eventKindLabels = {
|
|
|
91
95
|
'sensor-activated': 'Sensor Activated',
|
|
92
96
|
'macro-activated': 'Macro Activated',
|
|
93
97
|
'access-path-activated': 'Access Path Activated',
|
|
98
|
+
'time-zone-changed': 'Time Zone Changed',
|
|
94
99
|
};
|
|
95
100
|
exports.eventSchemaByKind = {
|
|
96
101
|
...alarm_1.alarmEventSchemasByKind,
|
|
@@ -102,6 +107,7 @@ exports.eventSchemaByKind = {
|
|
|
102
107
|
...presence_tracker_1.presenceTrackerEventSchemaByKind,
|
|
103
108
|
...reader_1.readerEventSchemaByKind,
|
|
104
109
|
...nvr_exporter_1.nvrExporterEventSchemasByKind,
|
|
110
|
+
...playback_server_1.playbackServerEventSchemasByKind,
|
|
105
111
|
'motion-detected': exports.sMotionDetected,
|
|
106
112
|
'device-command': exports.sDeviceCommandTriggered,
|
|
107
113
|
'device-connected': exports.sDeviceConnectedEvent,
|
|
@@ -118,6 +124,7 @@ exports.eventsByDeviceType = {
|
|
|
118
124
|
'motion-sensor': ['motion-detected'],
|
|
119
125
|
'generic-sensor': ['sensor-activated'],
|
|
120
126
|
'nvr-exporter': Object.keys(nvr_exporter_1.nvrExporterEventSchemasByKind),
|
|
127
|
+
'playback-server': Object.keys(playback_server_1.playbackServerEventSchemasByKind),
|
|
121
128
|
};
|
|
122
129
|
const isDeviceEvent = (event) => {
|
|
123
130
|
if (typeof event !== 'object' || event === null)
|
package/dist/api/events/index.js
CHANGED
|
@@ -25,4 +25,5 @@ __exportStar(require("./alarm"), exports);
|
|
|
25
25
|
__exportStar(require("./presence-tracker"), exports);
|
|
26
26
|
__exportStar(require("./display"), exports);
|
|
27
27
|
__exportStar(require("./nvr-exporter"), exports);
|
|
28
|
+
__exportStar(require("./playback-server"), exports);
|
|
28
29
|
__exportStar(require("./all"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sPlaybackSessionOpened: z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"playback-session-opened">;
|
|
4
|
+
sessionId: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type PlaybackSessionOpened = z.infer<typeof sPlaybackSessionOpened>;
|
|
7
|
+
export declare const sPlaybackSessionClosed: z.ZodObject<{
|
|
8
|
+
kind: z.ZodLiteral<"playback-session-closed">;
|
|
9
|
+
sessionId: z.ZodString;
|
|
10
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type PlaybackSessionClosed = z.infer<typeof sPlaybackSessionClosed>;
|
|
13
|
+
export declare const sPlaybackSessionLinkIssued: z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"playback-session-link-issued">;
|
|
15
|
+
sessionId: z.ZodString;
|
|
16
|
+
userId: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type PlaybackSessionLinkIssued = z.infer<typeof sPlaybackSessionLinkIssued>;
|
|
19
|
+
export type PlaybackServerEvent = PlaybackSessionOpened | PlaybackSessionClosed | PlaybackSessionLinkIssued;
|
|
20
|
+
export declare const playbackServerEventSchemasByKind: {
|
|
21
|
+
readonly 'playback-session-opened': z.ZodObject<{
|
|
22
|
+
kind: z.ZodLiteral<"playback-session-opened">;
|
|
23
|
+
sessionId: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
readonly 'playback-session-closed': z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"playback-session-closed">;
|
|
27
|
+
sessionId: z.ZodString;
|
|
28
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
readonly 'playback-session-link-issued': z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"playback-session-link-issued">;
|
|
32
|
+
sessionId: z.ZodString;
|
|
33
|
+
userId: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
};
|