@awarevue/api-types 1.1.15 → 2.0.2
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-agreement.d.ts +2 -2
- package/dist/access-control/person.d.ts +4 -4
- package/dist/agent-communication/protocol.d.ts +108 -308
- package/dist/agent-communication/protocol.js +5 -8
- package/dist/agent-communication/queries.d.ts +1312 -1045
- package/dist/agent-communication/queries.js +11 -109
- package/dist/api/media.d.ts +6 -14
- package/dist/api/media.js +1 -4
- package/dist/device/alarm.d.ts +24 -24
- package/dist/device/any-device.d.ts +537 -269
- package/dist/device/any-device.js +22 -4
- package/dist/device/camera.d.ts +97 -0
- package/dist/device/camera.js +24 -1
- package/dist/device/index.d.ts +3 -1
- package/dist/device/index.js +3 -1
- package/dist/device/intercom-terminal.d.ts +4 -4
- package/dist/device/nvr-analytics-server.d.ts +307 -0
- package/dist/device/nvr-analytics-server.js +73 -0
- package/dist/device/nvr-exporter.d.ts +892 -0
- package/dist/device/nvr-exporter.js +77 -0
- package/dist/device/nvr-recorder.d.ts +2981 -0
- package/dist/device/nvr-recorder.js +47 -0
- package/dist/device/presence-tracker.d.ts +8 -8
- package/dist/device-event.d.ts +43 -19
- package/dist/device-event.js +5 -0
- package/dist/device-import.d.ts +123 -51
- package/dist/device-relation.d.ts +7 -7
- package/dist/device-relation.js +12 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/messages/web-rtc-signaling.d.ts +10 -10
- package/dist/package.json +1 -1
- package/dist/permissions.d.ts +3 -3
- package/dist/permissions.js +9 -1
- package/dist/primitives.d.ts +596 -0
- package/dist/primitives.js +13 -1
- package/dist/user.d.ts +16 -16
- package/package.json +1 -1
- package/dist/device/recorder.d.ts +0 -12
- package/dist/device/recorder.js +0 -9
- package/dist/export.d.ts +0 -30
- package/dist/export.js +0 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sEventDescription = exports.sEventVariantDescription = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = exports.sRecorderDto = exports.sDisplayDto = exports.sIntercomOperatorDto = exports.sAlarmDto = exports.sServerDto = exports.sPresenceTrackerDto = exports.sDeviceGatewayDto = exports.sPbxDto = exports.sIntercomTerminalDto = exports.sPanicButtonDto = exports.sMotionSensorDto = exports.sCameraLiftDto = exports.sIoBoardDto = exports.sReaderDto = exports.sDoorDto = exports.sCameraDto = exports.sDeviceDto = exports.sForeignDeviceInfo = exports.sDeviceMgmtInfo = exports.sPresetDto = exports.sProviderMetadata = exports.sAnyDeviceSpecs = exports.sRecorderSpecsWithType = exports.sDisplaySpecsWithType = exports.DEVICE_TYPES = void 0;
|
|
3
|
+
exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sEventDescription = exports.sEventVariantDescription = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = exports.sNvrAnalyticsServerDto = exports.sNvrExporterDto = exports.sRecorderDto = exports.sDisplayDto = exports.sIntercomOperatorDto = exports.sAlarmDto = exports.sServerDto = exports.sPresenceTrackerDto = exports.sDeviceGatewayDto = exports.sPbxDto = exports.sIntercomTerminalDto = exports.sPanicButtonDto = exports.sMotionSensorDto = exports.sCameraLiftDto = exports.sIoBoardDto = exports.sReaderDto = exports.sDoorDto = exports.sCameraDto = exports.sDeviceDto = exports.sForeignDeviceInfo = exports.sDeviceMgmtInfo = exports.sPresetDto = exports.sProviderMetadata = exports.sAnyDeviceSpecs = exports.sNvrAnalyticsServerSpecsWithType = exports.sNvrExporterSpecsWithType = exports.sRecorderSpecsWithType = exports.sDisplaySpecsWithType = exports.DEVICE_TYPES = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const camera_1 = require("./camera");
|
|
6
6
|
const door_1 = require("./door");
|
|
@@ -17,7 +17,9 @@ const device_relation_1 = require("../device-relation");
|
|
|
17
17
|
const device_gateway_1 = require("./device-gateway");
|
|
18
18
|
const presence_tracker_1 = require("./presence-tracker");
|
|
19
19
|
const display_1 = require("./display");
|
|
20
|
-
const
|
|
20
|
+
const nvr_recorder_1 = require("./nvr-recorder");
|
|
21
|
+
const nvr_exporter_1 = require("./nvr-exporter");
|
|
22
|
+
const nvr_analytics_server_1 = require("./nvr-analytics-server");
|
|
21
23
|
exports.DEVICE_TYPES = [
|
|
22
24
|
alarm_1.ALARM,
|
|
23
25
|
server_1.SERVER,
|
|
@@ -34,7 +36,9 @@ exports.DEVICE_TYPES = [
|
|
|
34
36
|
device_gateway_1.DEVICE_GATEWAY,
|
|
35
37
|
presence_tracker_1.PRESENCE_TRACKER,
|
|
36
38
|
display_1.DISPLAY,
|
|
37
|
-
|
|
39
|
+
nvr_recorder_1.NVR_RECORDER,
|
|
40
|
+
nvr_exporter_1.NVR_EXPORTER,
|
|
41
|
+
nvr_analytics_server_1.NVR_ANALYTICS_SERVER,
|
|
38
42
|
];
|
|
39
43
|
const sDeviceType = zod_1.z.enum(exports.DEVICE_TYPES);
|
|
40
44
|
const sAlarmSpecsWithType = alarm_1.sAlarmSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(alarm_1.ALARM) }));
|
|
@@ -58,7 +62,13 @@ const sPresenceTrackerSpecsWithType = zod_1.z.object({
|
|
|
58
62
|
});
|
|
59
63
|
const sReaderSpecsWithType = zod_1.z.object({ type: zod_1.z.literal('reader') });
|
|
60
64
|
exports.sDisplaySpecsWithType = zod_1.z.object({ type: zod_1.z.literal(display_1.DISPLAY) });
|
|
61
|
-
exports.sRecorderSpecsWithType =
|
|
65
|
+
exports.sRecorderSpecsWithType = nvr_recorder_1.sRecorderSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(nvr_recorder_1.NVR_RECORDER) }));
|
|
66
|
+
exports.sNvrExporterSpecsWithType = nvr_exporter_1.sExporterSpecs.merge(zod_1.z.object({
|
|
67
|
+
type: zod_1.z.literal(nvr_exporter_1.NVR_EXPORTER),
|
|
68
|
+
}));
|
|
69
|
+
exports.sNvrAnalyticsServerSpecsWithType = nvr_analytics_server_1.sAnalyticsServerSpecs.merge(zod_1.z.object({
|
|
70
|
+
type: zod_1.z.literal(nvr_analytics_server_1.NVR_ANALYTICS_SERVER),
|
|
71
|
+
}));
|
|
62
72
|
exports.sAnyDeviceSpecs = zod_1.z.discriminatedUnion('type', [
|
|
63
73
|
sAlarmSpecsWithType,
|
|
64
74
|
sCameraSpecsWithType,
|
|
@@ -76,6 +86,8 @@ exports.sAnyDeviceSpecs = zod_1.z.discriminatedUnion('type', [
|
|
|
76
86
|
sReaderSpecsWithType,
|
|
77
87
|
exports.sDisplaySpecsWithType,
|
|
78
88
|
exports.sRecorderSpecsWithType,
|
|
89
|
+
exports.sNvrExporterSpecsWithType,
|
|
90
|
+
exports.sNvrAnalyticsServerSpecsWithType,
|
|
79
91
|
]);
|
|
80
92
|
exports.sProviderMetadata = zod_1.z.object({}).catchall(zod_1.z.unknown());
|
|
81
93
|
exports.sPresetDto = zod_1.z.object({
|
|
@@ -156,6 +168,12 @@ exports.sDisplayDto = exports.sDisplaySpecsWithType
|
|
|
156
168
|
exports.sRecorderDto = exports.sRecorderSpecsWithType
|
|
157
169
|
.and(exports.sDeviceMgmtInfo)
|
|
158
170
|
.and(exports.sForeignDeviceInfo);
|
|
171
|
+
exports.sNvrExporterDto = exports.sNvrExporterSpecsWithType
|
|
172
|
+
.and(exports.sDeviceMgmtInfo)
|
|
173
|
+
.and(exports.sForeignDeviceInfo);
|
|
174
|
+
exports.sNvrAnalyticsServerDto = exports.sNvrAnalyticsServerSpecsWithType
|
|
175
|
+
.and(exports.sDeviceMgmtInfo)
|
|
176
|
+
.and(exports.sForeignDeviceInfo);
|
|
159
177
|
exports.sAddDeviceRequest = zod_1.z.object({
|
|
160
178
|
name: zod_1.z.string().nonempty(),
|
|
161
179
|
foreignRef: zod_1.z.string().nonempty(),
|
package/dist/device/camera.d.ts
CHANGED
|
@@ -1263,3 +1263,100 @@ export type SceneCreated = z.infer<typeof sSceneCreated>;
|
|
|
1263
1263
|
export type SceneUpdated = z.infer<typeof sSceneUpdated>;
|
|
1264
1264
|
export type SceneEnded = z.infer<typeof sSceneEnded>;
|
|
1265
1265
|
export type CameraEvent = CameraPtzPresetSaved | ObjectDetectionStarted | ObjectDetectionUpdated | ObjectDetectionEnded | SceneCreated | SceneUpdated | SceneEnded;
|
|
1266
|
+
export declare const QUERY_RTSP_DATA = "cctv:rtsp-data";
|
|
1267
|
+
export declare const sRtspDataArgs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
1268
|
+
export declare const sRtspDataResponse: z.ZodObject<{
|
|
1269
|
+
cameraName: z.ZodString;
|
|
1270
|
+
username: z.ZodString;
|
|
1271
|
+
password: z.ZodString;
|
|
1272
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
1273
|
+
streamId: z.ZodString;
|
|
1274
|
+
displayName: z.ZodString;
|
|
1275
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
1276
|
+
rtspUrl: z.ZodString;
|
|
1277
|
+
}, "strip", z.ZodTypeAny, {
|
|
1278
|
+
resolution: string | null;
|
|
1279
|
+
displayName: string;
|
|
1280
|
+
streamId: string;
|
|
1281
|
+
rtspUrl: string;
|
|
1282
|
+
}, {
|
|
1283
|
+
resolution: string | null;
|
|
1284
|
+
displayName: string;
|
|
1285
|
+
streamId: string;
|
|
1286
|
+
rtspUrl: string;
|
|
1287
|
+
}>, "many">;
|
|
1288
|
+
}, "strip", z.ZodTypeAny, {
|
|
1289
|
+
streams: {
|
|
1290
|
+
resolution: string | null;
|
|
1291
|
+
displayName: string;
|
|
1292
|
+
streamId: string;
|
|
1293
|
+
rtspUrl: string;
|
|
1294
|
+
}[];
|
|
1295
|
+
username: string;
|
|
1296
|
+
cameraName: string;
|
|
1297
|
+
password: string;
|
|
1298
|
+
}, {
|
|
1299
|
+
streams: {
|
|
1300
|
+
resolution: string | null;
|
|
1301
|
+
displayName: string;
|
|
1302
|
+
streamId: string;
|
|
1303
|
+
rtspUrl: string;
|
|
1304
|
+
}[];
|
|
1305
|
+
username: string;
|
|
1306
|
+
cameraName: string;
|
|
1307
|
+
password: string;
|
|
1308
|
+
}>;
|
|
1309
|
+
export type RtspDataArgs = z.infer<typeof sRtspDataArgs>;
|
|
1310
|
+
export type RtspDataResponse = z.infer<typeof sRtspDataResponse>;
|
|
1311
|
+
export declare const cameraRequestSchemas: {
|
|
1312
|
+
readonly "cctv:rtsp-data": z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
1313
|
+
};
|
|
1314
|
+
export declare const cameraResponseSchemas: {
|
|
1315
|
+
readonly "cctv:rtsp-data": z.ZodObject<{
|
|
1316
|
+
cameraName: z.ZodString;
|
|
1317
|
+
username: z.ZodString;
|
|
1318
|
+
password: z.ZodString;
|
|
1319
|
+
streams: z.ZodArray<z.ZodObject<{
|
|
1320
|
+
streamId: z.ZodString;
|
|
1321
|
+
displayName: z.ZodString;
|
|
1322
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
1323
|
+
rtspUrl: z.ZodString;
|
|
1324
|
+
}, "strip", z.ZodTypeAny, {
|
|
1325
|
+
resolution: string | null;
|
|
1326
|
+
displayName: string;
|
|
1327
|
+
streamId: string;
|
|
1328
|
+
rtspUrl: string;
|
|
1329
|
+
}, {
|
|
1330
|
+
resolution: string | null;
|
|
1331
|
+
displayName: string;
|
|
1332
|
+
streamId: string;
|
|
1333
|
+
rtspUrl: string;
|
|
1334
|
+
}>, "many">;
|
|
1335
|
+
}, "strip", z.ZodTypeAny, {
|
|
1336
|
+
streams: {
|
|
1337
|
+
resolution: string | null;
|
|
1338
|
+
displayName: string;
|
|
1339
|
+
streamId: string;
|
|
1340
|
+
rtspUrl: string;
|
|
1341
|
+
}[];
|
|
1342
|
+
username: string;
|
|
1343
|
+
cameraName: string;
|
|
1344
|
+
password: string;
|
|
1345
|
+
}, {
|
|
1346
|
+
streams: {
|
|
1347
|
+
resolution: string | null;
|
|
1348
|
+
displayName: string;
|
|
1349
|
+
streamId: string;
|
|
1350
|
+
rtspUrl: string;
|
|
1351
|
+
}[];
|
|
1352
|
+
username: string;
|
|
1353
|
+
cameraName: string;
|
|
1354
|
+
password: string;
|
|
1355
|
+
}>;
|
|
1356
|
+
};
|
|
1357
|
+
export type CameraQueryRequestMap = {
|
|
1358
|
+
[QUERY_RTSP_DATA]: RtspDataArgs;
|
|
1359
|
+
};
|
|
1360
|
+
export type CameraQueryResponseMap = {
|
|
1361
|
+
[QUERY_RTSP_DATA]: RtspDataResponse;
|
|
1362
|
+
};
|
package/dist/device/camera.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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.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;
|
|
3
|
+
exports.cameraResponseSchemas = exports.cameraRequestSchemas = exports.sRtspDataResponse = exports.sRtspDataArgs = exports.QUERY_RTSP_DATA = 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
4
|
const primitives_1 = require("../primitives");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.CAMERA = 'camera';
|
|
@@ -212,3 +212,26 @@ exports.cameraEventSchemasByKind = {
|
|
|
212
212
|
'scene-updated': exports.sSceneUpdated,
|
|
213
213
|
'scene-ended': exports.sSceneEnded,
|
|
214
214
|
};
|
|
215
|
+
// QUERIES
|
|
216
|
+
// -- RTSP DATA
|
|
217
|
+
exports.QUERY_RTSP_DATA = 'cctv:rtsp-data';
|
|
218
|
+
exports.sRtspDataArgs = zod_1.z.object({});
|
|
219
|
+
exports.sRtspDataResponse = zod_1.z.object({
|
|
220
|
+
cameraName: zod_1.z.string(),
|
|
221
|
+
username: zod_1.z.string(),
|
|
222
|
+
password: zod_1.z.string(),
|
|
223
|
+
streams: zod_1.z.array(zod_1.z.object({
|
|
224
|
+
streamId: zod_1.z.string(),
|
|
225
|
+
displayName: zod_1.z.string(),
|
|
226
|
+
resolution: zod_1.z.string().nullable(),
|
|
227
|
+
rtspUrl: zod_1.z.string(),
|
|
228
|
+
})),
|
|
229
|
+
});
|
|
230
|
+
// Dictionary of request schemas by query type
|
|
231
|
+
exports.cameraRequestSchemas = {
|
|
232
|
+
[exports.QUERY_RTSP_DATA]: exports.sRtspDataArgs,
|
|
233
|
+
};
|
|
234
|
+
// Dictionary of response schemas by query type
|
|
235
|
+
exports.cameraResponseSchemas = {
|
|
236
|
+
[exports.QUERY_RTSP_DATA]: exports.sRtspDataResponse,
|
|
237
|
+
};
|
package/dist/device/index.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export * from './alarm';
|
|
|
14
14
|
export * from './device-gateway';
|
|
15
15
|
export * from './presence-tracker';
|
|
16
16
|
export * from './display';
|
|
17
|
-
export * from './recorder';
|
|
17
|
+
export * from './nvr-recorder';
|
|
18
|
+
export * from './nvr-exporter';
|
|
19
|
+
export * from './nvr-analytics-server';
|
package/dist/device/index.js
CHANGED
|
@@ -30,4 +30,6 @@ __exportStar(require("./alarm"), exports);
|
|
|
30
30
|
__exportStar(require("./device-gateway"), exports);
|
|
31
31
|
__exportStar(require("./presence-tracker"), exports);
|
|
32
32
|
__exportStar(require("./display"), exports);
|
|
33
|
-
__exportStar(require("./recorder"), exports);
|
|
33
|
+
__exportStar(require("./nvr-recorder"), exports);
|
|
34
|
+
__exportStar(require("./nvr-exporter"), exports);
|
|
35
|
+
__exportStar(require("./nvr-analytics-server"), exports);
|
|
@@ -136,8 +136,8 @@ export declare const sCallStateChanged: z.ZodObject<{
|
|
|
136
136
|
direction: "incoming" | "outgoing";
|
|
137
137
|
kind: "call-state-changed";
|
|
138
138
|
callId: string;
|
|
139
|
-
userId?: string | undefined;
|
|
140
139
|
peer?: string | undefined;
|
|
140
|
+
userId?: string | undefined;
|
|
141
141
|
sipAccount?: string | undefined;
|
|
142
142
|
sipCallId?: string | undefined;
|
|
143
143
|
}, {
|
|
@@ -145,8 +145,8 @@ export declare const sCallStateChanged: z.ZodObject<{
|
|
|
145
145
|
direction: "incoming" | "outgoing";
|
|
146
146
|
kind: "call-state-changed";
|
|
147
147
|
callId: string;
|
|
148
|
-
userId?: string | undefined;
|
|
149
148
|
peer?: string | undefined;
|
|
149
|
+
userId?: string | undefined;
|
|
150
150
|
sipAccount?: string | undefined;
|
|
151
151
|
sipCallId?: string | undefined;
|
|
152
152
|
}>;
|
|
@@ -165,8 +165,8 @@ export declare const intercomTerminalEventSchemaByKind: {
|
|
|
165
165
|
direction: "incoming" | "outgoing";
|
|
166
166
|
kind: "call-state-changed";
|
|
167
167
|
callId: string;
|
|
168
|
-
userId?: string | undefined;
|
|
169
168
|
peer?: string | undefined;
|
|
169
|
+
userId?: string | undefined;
|
|
170
170
|
sipAccount?: string | undefined;
|
|
171
171
|
sipCallId?: string | undefined;
|
|
172
172
|
}, {
|
|
@@ -174,8 +174,8 @@ export declare const intercomTerminalEventSchemaByKind: {
|
|
|
174
174
|
direction: "incoming" | "outgoing";
|
|
175
175
|
kind: "call-state-changed";
|
|
176
176
|
callId: string;
|
|
177
|
-
userId?: string | undefined;
|
|
178
177
|
peer?: string | undefined;
|
|
178
|
+
userId?: string | undefined;
|
|
179
179
|
sipAccount?: string | undefined;
|
|
180
180
|
sipCallId?: string | undefined;
|
|
181
181
|
}>;
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const NVR_ANALYTICS_SERVER = "nvr-analytics-server";
|
|
3
|
+
export declare const sAnalyticsServerSpecs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4
|
+
export type AnalyticsServerSpecs = z.infer<typeof sAnalyticsServerSpecs>;
|
|
5
|
+
export declare const sAnalyticsServerStateDto: z.ZodObject<{
|
|
6
|
+
connected: z.ZodBoolean;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
connected: boolean;
|
|
9
|
+
}, {
|
|
10
|
+
connected: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export type AnalyticsServerStateDto = z.infer<typeof sAnalyticsServerStateDto>;
|
|
13
|
+
export declare const QUERY_MEDIA_SEARCH = "cctv:media-search";
|
|
14
|
+
export declare const sMediaSearchArgs: z.ZodObject<{
|
|
15
|
+
devices: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodAny, "many">>>;
|
|
16
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
q: z.ZodOptional<z.ZodString>;
|
|
18
|
+
similarTo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
19
|
+
label: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
+
timeFrom: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
timeTo: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
sortBy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"time_asc">, z.ZodLiteral<"time_desc">]>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
label?: string[] | undefined;
|
|
25
|
+
q?: string | undefined;
|
|
26
|
+
devices?: any[] | undefined;
|
|
27
|
+
limit?: number | undefined;
|
|
28
|
+
timeFrom?: number | undefined;
|
|
29
|
+
timeTo?: number | undefined;
|
|
30
|
+
similarTo?: string | undefined;
|
|
31
|
+
sortBy?: "time_asc" | "time_desc" | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
label?: string[] | undefined;
|
|
34
|
+
q?: string | undefined;
|
|
35
|
+
devices?: any[] | undefined;
|
|
36
|
+
limit?: number | undefined;
|
|
37
|
+
timeFrom?: number | undefined;
|
|
38
|
+
timeTo?: number | undefined;
|
|
39
|
+
similarTo?: string | undefined;
|
|
40
|
+
sortBy?: "time_asc" | "time_desc" | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const sMediaSearchMatch: z.ZodObject<{
|
|
43
|
+
relevance: z.ZodNumber;
|
|
44
|
+
providerAssignedRef: z.ZodString;
|
|
45
|
+
foreignRef: z.ZodString;
|
|
46
|
+
provider: z.ZodString;
|
|
47
|
+
probability: z.ZodNumber;
|
|
48
|
+
objectKind: z.ZodString;
|
|
49
|
+
startTime: z.ZodNumber;
|
|
50
|
+
endTime: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
endTime: number | null;
|
|
53
|
+
startTime: number;
|
|
54
|
+
objectKind: string;
|
|
55
|
+
probability: number;
|
|
56
|
+
providerAssignedRef: string;
|
|
57
|
+
foreignRef: string;
|
|
58
|
+
provider: string;
|
|
59
|
+
relevance: number;
|
|
60
|
+
}, {
|
|
61
|
+
endTime: number | null;
|
|
62
|
+
startTime: number;
|
|
63
|
+
objectKind: string;
|
|
64
|
+
probability: number;
|
|
65
|
+
providerAssignedRef: string;
|
|
66
|
+
foreignRef: string;
|
|
67
|
+
provider: string;
|
|
68
|
+
relevance: number;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const sMediaSearchResponse: z.ZodArray<z.ZodObject<{
|
|
71
|
+
relevance: z.ZodNumber;
|
|
72
|
+
providerAssignedRef: z.ZodString;
|
|
73
|
+
foreignRef: z.ZodString;
|
|
74
|
+
provider: z.ZodString;
|
|
75
|
+
probability: z.ZodNumber;
|
|
76
|
+
objectKind: z.ZodString;
|
|
77
|
+
startTime: z.ZodNumber;
|
|
78
|
+
endTime: z.ZodNullable<z.ZodNumber>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
endTime: number | null;
|
|
81
|
+
startTime: number;
|
|
82
|
+
objectKind: string;
|
|
83
|
+
probability: number;
|
|
84
|
+
providerAssignedRef: string;
|
|
85
|
+
foreignRef: string;
|
|
86
|
+
provider: string;
|
|
87
|
+
relevance: number;
|
|
88
|
+
}, {
|
|
89
|
+
endTime: number | null;
|
|
90
|
+
startTime: number;
|
|
91
|
+
objectKind: string;
|
|
92
|
+
probability: number;
|
|
93
|
+
providerAssignedRef: string;
|
|
94
|
+
foreignRef: string;
|
|
95
|
+
provider: string;
|
|
96
|
+
relevance: number;
|
|
97
|
+
}>, "many">;
|
|
98
|
+
export type MediaSearchArgs = z.infer<typeof sMediaSearchArgs>;
|
|
99
|
+
export type MediaSearchMatch = z.infer<typeof sMediaSearchMatch>;
|
|
100
|
+
export type MediaSearchResponse = z.infer<typeof sMediaSearchResponse>;
|
|
101
|
+
export declare const QUERY_SCENE_PREVIEW_CLIP = "cctv:scene-preview-clip";
|
|
102
|
+
export declare const sScenePreviewClipArgs: z.ZodObject<{
|
|
103
|
+
providerAssignedRef: z.ZodString;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
providerAssignedRef: string;
|
|
106
|
+
}, {
|
|
107
|
+
providerAssignedRef: string;
|
|
108
|
+
}>;
|
|
109
|
+
export declare const sScenePreviewClipResponse: z.ZodNullable<z.ZodObject<{
|
|
110
|
+
mimeType: z.ZodString;
|
|
111
|
+
data: z.ZodString;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
data: string;
|
|
114
|
+
mimeType: string;
|
|
115
|
+
}, {
|
|
116
|
+
data: string;
|
|
117
|
+
mimeType: string;
|
|
118
|
+
}>>;
|
|
119
|
+
export type ScenePreviewClipArgs = z.infer<typeof sScenePreviewClipArgs>;
|
|
120
|
+
export type ScenePreviewClipResponse = z.infer<typeof sScenePreviewClipResponse>;
|
|
121
|
+
export declare const QUERY_OBJECT_SNAPSHOT = "cctv:object-snapshot";
|
|
122
|
+
export declare const sObjectSnapshotArgs: z.ZodObject<{
|
|
123
|
+
providerAssignedRef: z.ZodString;
|
|
124
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
quality: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
crop: z.ZodBoolean;
|
|
127
|
+
boxes: z.ZodBoolean;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
providerAssignedRef: string;
|
|
130
|
+
crop: boolean;
|
|
131
|
+
boxes: boolean;
|
|
132
|
+
height?: number | undefined;
|
|
133
|
+
quality?: number | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
providerAssignedRef: string;
|
|
136
|
+
crop: boolean;
|
|
137
|
+
boxes: boolean;
|
|
138
|
+
height?: number | undefined;
|
|
139
|
+
quality?: number | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
export declare const sObjectSnapshotResponse: z.ZodNullable<z.ZodObject<{
|
|
142
|
+
mimeType: z.ZodString;
|
|
143
|
+
data: z.ZodString;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
data: string;
|
|
146
|
+
mimeType: string;
|
|
147
|
+
}, {
|
|
148
|
+
data: string;
|
|
149
|
+
mimeType: string;
|
|
150
|
+
}>>;
|
|
151
|
+
export type ObjectSnapshotArgs = z.infer<typeof sObjectSnapshotArgs>;
|
|
152
|
+
export type ObjectSnapshotResponse = z.infer<typeof sObjectSnapshotResponse>;
|
|
153
|
+
export declare const QUERY_OBJECT_THUMBNAIL = "cctv:object-thumbnail";
|
|
154
|
+
export declare const sObjectThumbnailArgs: z.ZodObject<{
|
|
155
|
+
providerAssignedRef: z.ZodString;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
providerAssignedRef: string;
|
|
158
|
+
}, {
|
|
159
|
+
providerAssignedRef: string;
|
|
160
|
+
}>;
|
|
161
|
+
export declare const sObjectThumbnailResponse: z.ZodNullable<z.ZodObject<{
|
|
162
|
+
mimeType: z.ZodString;
|
|
163
|
+
data: z.ZodString;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
data: string;
|
|
166
|
+
mimeType: string;
|
|
167
|
+
}, {
|
|
168
|
+
data: string;
|
|
169
|
+
mimeType: string;
|
|
170
|
+
}>>;
|
|
171
|
+
export type ObjectThumbnailArgs = z.infer<typeof sObjectThumbnailArgs>;
|
|
172
|
+
export type ObjectThumbnailResponse = z.infer<typeof sObjectThumbnailResponse>;
|
|
173
|
+
export declare const nvrAnalyticsRequestSchemas: {
|
|
174
|
+
readonly "cctv:media-search": z.ZodObject<{
|
|
175
|
+
devices: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodAny, "many">>>;
|
|
176
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
q: z.ZodOptional<z.ZodString>;
|
|
178
|
+
similarTo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
179
|
+
label: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
180
|
+
timeFrom: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
timeTo: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
sortBy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"time_asc">, z.ZodLiteral<"time_desc">]>>;
|
|
183
|
+
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
label?: string[] | undefined;
|
|
185
|
+
q?: string | undefined;
|
|
186
|
+
devices?: any[] | undefined;
|
|
187
|
+
limit?: number | undefined;
|
|
188
|
+
timeFrom?: number | undefined;
|
|
189
|
+
timeTo?: number | undefined;
|
|
190
|
+
similarTo?: string | undefined;
|
|
191
|
+
sortBy?: "time_asc" | "time_desc" | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
label?: string[] | undefined;
|
|
194
|
+
q?: string | undefined;
|
|
195
|
+
devices?: any[] | undefined;
|
|
196
|
+
limit?: number | undefined;
|
|
197
|
+
timeFrom?: number | undefined;
|
|
198
|
+
timeTo?: number | undefined;
|
|
199
|
+
similarTo?: string | undefined;
|
|
200
|
+
sortBy?: "time_asc" | "time_desc" | undefined;
|
|
201
|
+
}>;
|
|
202
|
+
readonly "cctv:scene-preview-clip": z.ZodObject<{
|
|
203
|
+
providerAssignedRef: z.ZodString;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
providerAssignedRef: string;
|
|
206
|
+
}, {
|
|
207
|
+
providerAssignedRef: string;
|
|
208
|
+
}>;
|
|
209
|
+
readonly "cctv:object-snapshot": z.ZodObject<{
|
|
210
|
+
providerAssignedRef: z.ZodString;
|
|
211
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
quality: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
crop: z.ZodBoolean;
|
|
214
|
+
boxes: z.ZodBoolean;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
providerAssignedRef: string;
|
|
217
|
+
crop: boolean;
|
|
218
|
+
boxes: boolean;
|
|
219
|
+
height?: number | undefined;
|
|
220
|
+
quality?: number | undefined;
|
|
221
|
+
}, {
|
|
222
|
+
providerAssignedRef: string;
|
|
223
|
+
crop: boolean;
|
|
224
|
+
boxes: boolean;
|
|
225
|
+
height?: number | undefined;
|
|
226
|
+
quality?: number | undefined;
|
|
227
|
+
}>;
|
|
228
|
+
readonly "cctv:object-thumbnail": z.ZodObject<{
|
|
229
|
+
providerAssignedRef: z.ZodString;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
providerAssignedRef: string;
|
|
232
|
+
}, {
|
|
233
|
+
providerAssignedRef: string;
|
|
234
|
+
}>;
|
|
235
|
+
};
|
|
236
|
+
export declare const nvrAnalyticsResponseSchemas: {
|
|
237
|
+
readonly "cctv:media-search": z.ZodArray<z.ZodObject<{
|
|
238
|
+
relevance: z.ZodNumber;
|
|
239
|
+
providerAssignedRef: z.ZodString;
|
|
240
|
+
foreignRef: z.ZodString;
|
|
241
|
+
provider: z.ZodString;
|
|
242
|
+
probability: z.ZodNumber;
|
|
243
|
+
objectKind: z.ZodString;
|
|
244
|
+
startTime: z.ZodNumber;
|
|
245
|
+
endTime: z.ZodNullable<z.ZodNumber>;
|
|
246
|
+
}, "strip", z.ZodTypeAny, {
|
|
247
|
+
endTime: number | null;
|
|
248
|
+
startTime: number;
|
|
249
|
+
objectKind: string;
|
|
250
|
+
probability: number;
|
|
251
|
+
providerAssignedRef: string;
|
|
252
|
+
foreignRef: string;
|
|
253
|
+
provider: string;
|
|
254
|
+
relevance: number;
|
|
255
|
+
}, {
|
|
256
|
+
endTime: number | null;
|
|
257
|
+
startTime: number;
|
|
258
|
+
objectKind: string;
|
|
259
|
+
probability: number;
|
|
260
|
+
providerAssignedRef: string;
|
|
261
|
+
foreignRef: string;
|
|
262
|
+
provider: string;
|
|
263
|
+
relevance: number;
|
|
264
|
+
}>, "many">;
|
|
265
|
+
readonly "cctv:scene-preview-clip": z.ZodNullable<z.ZodObject<{
|
|
266
|
+
mimeType: z.ZodString;
|
|
267
|
+
data: z.ZodString;
|
|
268
|
+
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
data: string;
|
|
270
|
+
mimeType: string;
|
|
271
|
+
}, {
|
|
272
|
+
data: string;
|
|
273
|
+
mimeType: string;
|
|
274
|
+
}>>;
|
|
275
|
+
readonly "cctv:object-snapshot": z.ZodNullable<z.ZodObject<{
|
|
276
|
+
mimeType: z.ZodString;
|
|
277
|
+
data: z.ZodString;
|
|
278
|
+
}, "strip", z.ZodTypeAny, {
|
|
279
|
+
data: string;
|
|
280
|
+
mimeType: string;
|
|
281
|
+
}, {
|
|
282
|
+
data: string;
|
|
283
|
+
mimeType: string;
|
|
284
|
+
}>>;
|
|
285
|
+
readonly "cctv:object-thumbnail": z.ZodNullable<z.ZodObject<{
|
|
286
|
+
mimeType: z.ZodString;
|
|
287
|
+
data: z.ZodString;
|
|
288
|
+
}, "strip", z.ZodTypeAny, {
|
|
289
|
+
data: string;
|
|
290
|
+
mimeType: string;
|
|
291
|
+
}, {
|
|
292
|
+
data: string;
|
|
293
|
+
mimeType: string;
|
|
294
|
+
}>>;
|
|
295
|
+
};
|
|
296
|
+
export type NvrAnalyticsQueryRequestMap = {
|
|
297
|
+
[QUERY_MEDIA_SEARCH]: MediaSearchArgs;
|
|
298
|
+
[QUERY_SCENE_PREVIEW_CLIP]: ScenePreviewClipArgs;
|
|
299
|
+
[QUERY_OBJECT_SNAPSHOT]: ObjectSnapshotArgs;
|
|
300
|
+
[QUERY_OBJECT_THUMBNAIL]: ObjectThumbnailArgs;
|
|
301
|
+
};
|
|
302
|
+
export type NvrAnalyticsQueryResponseMap = {
|
|
303
|
+
[QUERY_MEDIA_SEARCH]: MediaSearchResponse;
|
|
304
|
+
[QUERY_SCENE_PREVIEW_CLIP]: ScenePreviewClipResponse;
|
|
305
|
+
[QUERY_OBJECT_SNAPSHOT]: ObjectSnapshotResponse;
|
|
306
|
+
[QUERY_OBJECT_THUMBNAIL]: ObjectThumbnailResponse;
|
|
307
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nvrAnalyticsResponseSchemas = exports.nvrAnalyticsRequestSchemas = exports.sObjectThumbnailResponse = exports.sObjectThumbnailArgs = exports.QUERY_OBJECT_THUMBNAIL = exports.sObjectSnapshotResponse = exports.sObjectSnapshotArgs = exports.QUERY_OBJECT_SNAPSHOT = exports.sScenePreviewClipResponse = exports.sScenePreviewClipArgs = exports.QUERY_SCENE_PREVIEW_CLIP = exports.sMediaSearchResponse = exports.sMediaSearchMatch = exports.sMediaSearchArgs = exports.QUERY_MEDIA_SEARCH = exports.sAnalyticsServerStateDto = exports.sAnalyticsServerSpecs = exports.NVR_ANALYTICS_SERVER = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../primitives");
|
|
6
|
+
const api_1 = require("../api");
|
|
7
|
+
exports.NVR_ANALYTICS_SERVER = 'nvr-analytics-server';
|
|
8
|
+
exports.sAnalyticsServerSpecs = zod_1.z.object({});
|
|
9
|
+
exports.sAnalyticsServerStateDto = zod_1.z.object({
|
|
10
|
+
connected: zod_1.z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
// QUERIES
|
|
13
|
+
// -- Media Search
|
|
14
|
+
exports.QUERY_MEDIA_SEARCH = 'cctv:media-search';
|
|
15
|
+
exports.sMediaSearchArgs = zod_1.z
|
|
16
|
+
.object({
|
|
17
|
+
devices: zod_1.z.array(zod_1.z.any()).optional(),
|
|
18
|
+
limit: zod_1.z.number().nonnegative(),
|
|
19
|
+
q: zod_1.z.string(),
|
|
20
|
+
similarTo: zod_1.z.string().optional(),
|
|
21
|
+
label: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
22
|
+
timeFrom: zod_1.z.number().nonnegative(),
|
|
23
|
+
timeTo: zod_1.z.number().nonnegative(),
|
|
24
|
+
sortBy: api_1.sSortOptions,
|
|
25
|
+
})
|
|
26
|
+
.partial();
|
|
27
|
+
exports.sMediaSearchMatch = zod_1.z.object({
|
|
28
|
+
relevance: zod_1.z.number(),
|
|
29
|
+
providerAssignedRef: zod_1.z.string(),
|
|
30
|
+
foreignRef: zod_1.z.string(),
|
|
31
|
+
provider: zod_1.z.string(),
|
|
32
|
+
probability: zod_1.z.number(),
|
|
33
|
+
objectKind: zod_1.z.string(),
|
|
34
|
+
startTime: zod_1.z.number(),
|
|
35
|
+
endTime: zod_1.z.number().nullable(),
|
|
36
|
+
});
|
|
37
|
+
exports.sMediaSearchResponse = zod_1.z.array(exports.sMediaSearchMatch);
|
|
38
|
+
// -- Scene Preview Clip
|
|
39
|
+
exports.QUERY_SCENE_PREVIEW_CLIP = 'cctv:scene-preview-clip';
|
|
40
|
+
exports.sScenePreviewClipArgs = zod_1.z.object({
|
|
41
|
+
providerAssignedRef: zod_1.z.string(),
|
|
42
|
+
});
|
|
43
|
+
exports.sScenePreviewClipResponse = primitives_1.sFileResponse;
|
|
44
|
+
// -- Object Snapshot
|
|
45
|
+
exports.QUERY_OBJECT_SNAPSHOT = 'cctv:object-snapshot';
|
|
46
|
+
exports.sObjectSnapshotArgs = zod_1.z.object({
|
|
47
|
+
providerAssignedRef: zod_1.z.string(),
|
|
48
|
+
height: zod_1.z.number().optional(),
|
|
49
|
+
quality: zod_1.z.number().optional(),
|
|
50
|
+
crop: zod_1.z.boolean(),
|
|
51
|
+
boxes: zod_1.z.boolean(),
|
|
52
|
+
});
|
|
53
|
+
exports.sObjectSnapshotResponse = primitives_1.sFileResponse;
|
|
54
|
+
// -- Object Thumbnail
|
|
55
|
+
exports.QUERY_OBJECT_THUMBNAIL = 'cctv:object-thumbnail';
|
|
56
|
+
exports.sObjectThumbnailArgs = zod_1.z.object({
|
|
57
|
+
providerAssignedRef: zod_1.z.string(),
|
|
58
|
+
});
|
|
59
|
+
exports.sObjectThumbnailResponse = primitives_1.sFileResponse;
|
|
60
|
+
// Dictionary of request schemas by query type
|
|
61
|
+
exports.nvrAnalyticsRequestSchemas = {
|
|
62
|
+
[exports.QUERY_MEDIA_SEARCH]: exports.sMediaSearchArgs,
|
|
63
|
+
[exports.QUERY_SCENE_PREVIEW_CLIP]: exports.sScenePreviewClipArgs,
|
|
64
|
+
[exports.QUERY_OBJECT_SNAPSHOT]: exports.sObjectSnapshotArgs,
|
|
65
|
+
[exports.QUERY_OBJECT_THUMBNAIL]: exports.sObjectThumbnailArgs,
|
|
66
|
+
};
|
|
67
|
+
// Dictionary of response schemas by query type
|
|
68
|
+
exports.nvrAnalyticsResponseSchemas = {
|
|
69
|
+
[exports.QUERY_MEDIA_SEARCH]: exports.sMediaSearchResponse,
|
|
70
|
+
[exports.QUERY_SCENE_PREVIEW_CLIP]: exports.sScenePreviewClipResponse,
|
|
71
|
+
[exports.QUERY_OBJECT_SNAPSHOT]: exports.sObjectSnapshotResponse,
|
|
72
|
+
[exports.QUERY_OBJECT_THUMBNAIL]: exports.sObjectThumbnailResponse,
|
|
73
|
+
};
|