@awarevue/api-types 2.0.23 → 2.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_legacy/index.js +18 -2
- package/dist/_legacy/milestone.js +2 -1
- package/dist/_legacy/orchid.js +2 -1
- package/dist/alarm-automation.js +37 -26
- package/dist/api/agent-protocol/index.js +17 -1
- package/dist/api/agent-protocol/protocol.js +219 -212
- package/dist/api/commands/alarm.js +46 -43
- package/dist/api/commands/all.js +25 -22
- package/dist/api/commands/camera-lift.js +13 -10
- package/dist/api/commands/camera.js +65 -61
- package/dist/api/commands/display.js +27 -24
- package/dist/api/commands/door.js +21 -18
- package/dist/api/commands/index.js +28 -12
- package/dist/api/commands/intercom-terminal.js +2 -1
- package/dist/api/commands/io-board.js +11 -8
- package/dist/api/commands/nvr-exporter.js +20 -17
- package/dist/api/commands/pbx.js +13 -10
- package/dist/api/commands/presence-tracker.js +25 -22
- package/dist/api/commands/server.js +21 -18
- package/dist/api/error.js +93 -89
- package/dist/api/events/alarm.js +53 -50
- package/dist/api/events/all.js +57 -53
- package/dist/api/events/camera.js +68 -65
- package/dist/api/events/display.js +6 -3
- package/dist/api/events/door.js +60 -57
- package/dist/api/events/index.js +28 -12
- package/dist/api/events/intercom-terminal.js +16 -13
- package/dist/api/events/io-board.js +10 -7
- package/dist/api/events/nvr-exporter.js +14 -11
- package/dist/api/events/panic-button.js +8 -5
- package/dist/api/events/presence-tracker.js +29 -26
- package/dist/api/events/reader.js +11 -8
- package/dist/api/events/server.js +12 -9
- package/dist/api/index.js +25 -9
- package/dist/api/mqtt/index.js +17 -1
- package/dist/api/mqtt/payloads.js +15 -12
- package/dist/api/queries/all.js +23 -20
- package/dist/api/queries/camera.js +19 -16
- package/dist/api/queries/index.js +21 -5
- package/dist/api/queries/nvr-analytics-server.js +57 -54
- package/dist/api/queries/nvr-exporter.js +26 -23
- package/dist/api/queries/nvr-recorder.js +32 -29
- package/dist/api/rest/access-rule.js +14 -8
- package/dist/api/rest/agreement.js +6 -3
- package/dist/api/rest/alarm.js +2 -1
- package/dist/api/rest/api-keys.js +11 -8
- package/dist/api/rest/app.js +11 -8
- package/dist/api/rest/auth.js +12 -9
- package/dist/api/rest/automation.js +13 -10
- package/dist/api/rest/aware-config.js +2 -1
- package/dist/api/rest/bookmarks.js +17 -14
- package/dist/api/rest/cast.js +11 -5
- package/dist/api/rest/custom-field.js +6 -3
- package/dist/api/rest/device-event.js +2 -1
- package/dist/api/rest/device-group.js +19 -13
- package/dist/api/rest/file.js +2 -1
- package/dist/api/rest/index.js +50 -34
- package/dist/api/rest/io-device.js +21 -14
- package/dist/api/rest/layout.js +23 -17
- package/dist/api/rest/macros.js +6 -3
- package/dist/api/rest/media.js +55 -52
- package/dist/api/rest/module-config.js +2 -1
- package/dist/api/rest/notifications.js +11 -8
- package/dist/api/rest/person-agreement.js +11 -5
- package/dist/api/rest/person-presence.js +26 -23
- package/dist/api/rest/person-type.js +6 -3
- package/dist/api/rest/person.js +11 -5
- package/dist/api/rest/query.js +13 -8
- package/dist/api/rest/schedule.js +11 -8
- package/dist/api/rest/security-level.js +6 -3
- package/dist/api/rest/template.js +13 -10
- package/dist/api/rest/token-conversion.js +6 -3
- package/dist/api/rest/user.js +31 -28
- package/dist/api/rest/view.js +20 -14
- package/dist/api/rest/webrtc-playback.js +12 -6
- package/dist/api/rest/zone.js +14 -8
- package/dist/api/state/index.js +2 -1
- package/dist/api/ws/device-communication.js +46 -38
- package/dist/api/ws/index.js +21 -5
- package/dist/api/ws/notifications.js +17 -10
- package/dist/api/ws/progress.js +37 -30
- package/dist/api/ws/web-rtc-signaling.js +72 -65
- package/dist/api/ws/web-socket.js +5 -2
- package/dist/index.js +22 -6
- package/dist/objects/access-rule.js +32 -29
- package/dist/objects/agent-metadata.js +33 -30
- package/dist/objects/agreement.js +10 -7
- package/dist/objects/all.js +7 -4
- package/dist/objects/api-key.js +10 -7
- package/dist/objects/automation-rule.js +28 -25
- package/dist/objects/bookmark.js +14 -11
- package/dist/objects/credential.js +15 -9
- package/dist/objects/custom-field.js +11 -8
- package/dist/objects/device/alarm.js +6 -3
- package/dist/objects/device/any-device.js +206 -203
- package/dist/objects/device/camera-lift.js +6 -3
- package/dist/objects/device/camera.js +30 -27
- package/dist/objects/device/device-gateway.js +4 -1
- package/dist/objects/device/device-import.js +26 -23
- package/dist/objects/device/device-relation.js +16 -13
- package/dist/objects/device/display.js +6 -3
- package/dist/objects/device/door.js +10 -7
- package/dist/objects/device/index.js +38 -22
- package/dist/objects/device/intercom-operator.js +4 -1
- package/dist/objects/device/intercom-terminal.js +20 -17
- package/dist/objects/device/io-board.js +8 -5
- package/dist/objects/device/motion-sensor.js +6 -3
- package/dist/objects/device/nvr-analytics-server.js +8 -5
- package/dist/objects/device/nvr-exporter.js +9 -6
- package/dist/objects/device/nvr-recorder.js +8 -5
- package/dist/objects/device/panic-button.js +6 -3
- package/dist/objects/device/pbx.js +7 -4
- package/dist/objects/device/presence-tracker.js +4 -1
- package/dist/objects/device/reader.js +4 -1
- package/dist/objects/device/server.js +4 -1
- package/dist/objects/device/system.js +7 -4
- package/dist/objects/device-group.js +11 -8
- package/dist/objects/index.d.ts +1 -0
- package/dist/objects/index.js +44 -27
- package/dist/objects/layout.js +23 -20
- package/dist/objects/macro.js +20 -17
- package/dist/objects/module-config.js +2 -1
- package/dist/objects/notification.js +15 -12
- package/dist/objects/person-agreement.js +10 -7
- package/dist/objects/person-presence.js +32 -29
- package/dist/objects/person-type.js +17 -11
- package/dist/objects/person.js +42 -39
- package/dist/objects/role.js +11 -8
- package/dist/objects/schedule.js +45 -39
- package/dist/objects/security-level.js +13 -10
- package/dist/objects/template.js +10 -7
- package/dist/objects/token-conversion.js +10 -7
- package/dist/objects/user.js +14 -11
- package/dist/objects/view.js +53 -50
- package/dist/objects/world-object.js +8 -5
- package/dist/objects/zone.js +16 -13
- package/dist/package.json +1 -1
- package/dist/permissions.js +149 -146
- package/dist/primitives.js +30 -27
- package/package.json +1 -1
package/dist/api/queries/all.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.responseSchemasByType = exports.requestSchemasByType = exports.sEventCapsQueryResponse = exports.QUERY_EVENT_CAPS = exports.sEventCapsQueryArgs = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const camera_1 = require("./camera");
|
|
6
|
+
const nvr_analytics_server_1 = require("./nvr-analytics-server");
|
|
7
|
+
const nvr_exporter_1 = require("./nvr-exporter");
|
|
8
|
+
const nvr_recorder_1 = require("./nvr-recorder");
|
|
6
9
|
// queries that apply to all devices
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
exports.sEventCapsQueryArgs = zod_1.z.object({});
|
|
11
|
+
exports.QUERY_EVENT_CAPS = 'device:event-caps';
|
|
12
|
+
exports.sEventCapsQueryResponse = zod_1.z.array(zod_1.z.string());
|
|
10
13
|
// Dictionary of request schemas by query type
|
|
11
|
-
|
|
12
|
-
...nvrRecorderRequestSchemas,
|
|
13
|
-
...nvrExporterRequestSchemas,
|
|
14
|
-
...nvrAnalyticsRequestSchemas,
|
|
15
|
-
...cameraRequestSchemas,
|
|
16
|
-
[QUERY_EVENT_CAPS]: sEventCapsQueryArgs,
|
|
14
|
+
exports.requestSchemasByType = {
|
|
15
|
+
...nvr_recorder_1.nvrRecorderRequestSchemas,
|
|
16
|
+
...nvr_exporter_1.nvrExporterRequestSchemas,
|
|
17
|
+
...nvr_analytics_server_1.nvrAnalyticsRequestSchemas,
|
|
18
|
+
...camera_1.cameraRequestSchemas,
|
|
19
|
+
[exports.QUERY_EVENT_CAPS]: exports.sEventCapsQueryArgs,
|
|
17
20
|
};
|
|
18
21
|
// Dictionary of response schemas by query type
|
|
19
|
-
|
|
20
|
-
...nvrRecorderResponseSchemas,
|
|
21
|
-
...nvrExporterResponseSchemas,
|
|
22
|
-
...nvrAnalyticsResponseSchemas,
|
|
23
|
-
...cameraResponseSchemas,
|
|
24
|
-
[QUERY_EVENT_CAPS]: sEventCapsQueryResponse,
|
|
22
|
+
exports.responseSchemasByType = {
|
|
23
|
+
...nvr_recorder_1.nvrRecorderResponseSchemas,
|
|
24
|
+
...nvr_exporter_1.nvrExporterResponseSchemas,
|
|
25
|
+
...nvr_analytics_server_1.nvrAnalyticsResponseSchemas,
|
|
26
|
+
...camera_1.cameraResponseSchemas,
|
|
27
|
+
[exports.QUERY_EVENT_CAPS]: exports.sEventCapsQueryResponse,
|
|
25
28
|
};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cameraResponseSchemas = exports.cameraRequestSchemas = exports.sRtspDataResponse = exports.sRtspDataArgs = exports.QUERY_RTSP_DATA = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
2
5
|
// QUERIES
|
|
3
6
|
// -- RTSP DATA
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
cameraName: z.string(),
|
|
8
|
-
username: z.string(),
|
|
9
|
-
password: z.string(),
|
|
10
|
-
streams: z.array(z.object({
|
|
11
|
-
streamId: z.string(),
|
|
12
|
-
displayName: z.string(),
|
|
13
|
-
resolution: z.string().nullable(),
|
|
14
|
-
rtspUrl: z.string(),
|
|
7
|
+
exports.QUERY_RTSP_DATA = 'cctv:rtsp-data';
|
|
8
|
+
exports.sRtspDataArgs = zod_1.z.object({});
|
|
9
|
+
exports.sRtspDataResponse = zod_1.z.object({
|
|
10
|
+
cameraName: zod_1.z.string(),
|
|
11
|
+
username: zod_1.z.string(),
|
|
12
|
+
password: zod_1.z.string(),
|
|
13
|
+
streams: zod_1.z.array(zod_1.z.object({
|
|
14
|
+
streamId: zod_1.z.string(),
|
|
15
|
+
displayName: zod_1.z.string(),
|
|
16
|
+
resolution: zod_1.z.string().nullable(),
|
|
17
|
+
rtspUrl: zod_1.z.string(),
|
|
15
18
|
})),
|
|
16
19
|
});
|
|
17
20
|
// Dictionary of request schemas by query type
|
|
18
|
-
|
|
19
|
-
[QUERY_RTSP_DATA]: sRtspDataArgs,
|
|
21
|
+
exports.cameraRequestSchemas = {
|
|
22
|
+
[exports.QUERY_RTSP_DATA]: exports.sRtspDataArgs,
|
|
20
23
|
};
|
|
21
24
|
// Dictionary of response schemas by query type
|
|
22
|
-
|
|
23
|
-
[QUERY_RTSP_DATA]: sRtspDataResponse,
|
|
25
|
+
exports.cameraResponseSchemas = {
|
|
26
|
+
[exports.QUERY_RTSP_DATA]: exports.sRtspDataResponse,
|
|
24
27
|
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./camera"), exports);
|
|
18
|
+
__exportStar(require("./nvr-analytics-server"), exports);
|
|
19
|
+
__exportStar(require("./nvr-exporter"), exports);
|
|
20
|
+
__exportStar(require("./nvr-recorder"), exports);
|
|
21
|
+
__exportStar(require("./all"), exports);
|
|
@@ -1,73 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nvrAnalyticsResponseSchemas = exports.nvrAnalyticsRequestSchemas = exports.sObjectLabelResponse = exports.sObjectLabelsArgs = exports.QUERY_OBJECT_LABELS = 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 = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../../primitives");
|
|
6
|
+
const media_1 = require("../rest/media");
|
|
4
7
|
// QUERIES
|
|
5
8
|
// -- Media Search
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
exports.QUERY_MEDIA_SEARCH = 'cctv:media-search';
|
|
10
|
+
exports.sMediaSearchArgs = zod_1.z
|
|
8
11
|
.object({
|
|
9
|
-
devices: z.array(z.any()).optional(),
|
|
10
|
-
limit: z.number().nonnegative(),
|
|
11
|
-
q: z.string(),
|
|
12
|
-
similarTo: z.string().optional(),
|
|
13
|
-
label: z.array(z.string().nonempty()),
|
|
14
|
-
timeFrom: z.number().nonnegative(),
|
|
15
|
-
timeTo: z.number().nonnegative(),
|
|
16
|
-
sortBy: sSortOptions,
|
|
12
|
+
devices: zod_1.z.array(zod_1.z.any()).optional(),
|
|
13
|
+
limit: zod_1.z.number().nonnegative(),
|
|
14
|
+
q: zod_1.z.string(),
|
|
15
|
+
similarTo: zod_1.z.string().optional(),
|
|
16
|
+
label: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
17
|
+
timeFrom: zod_1.z.number().nonnegative(),
|
|
18
|
+
timeTo: zod_1.z.number().nonnegative(),
|
|
19
|
+
sortBy: media_1.sSortOptions,
|
|
17
20
|
})
|
|
18
21
|
.partial();
|
|
19
|
-
|
|
20
|
-
relevance: z.number(),
|
|
21
|
-
providerAssignedRef: z.string(),
|
|
22
|
-
foreignRef: z.string(),
|
|
23
|
-
provider: z.string(),
|
|
24
|
-
probability: z.number(),
|
|
25
|
-
objectKind: z.string(),
|
|
26
|
-
startTime: z.number(),
|
|
27
|
-
endTime: z.number().nullable(),
|
|
22
|
+
exports.sMediaSearchMatch = zod_1.z.object({
|
|
23
|
+
relevance: zod_1.z.number(),
|
|
24
|
+
providerAssignedRef: zod_1.z.string(),
|
|
25
|
+
foreignRef: zod_1.z.string(),
|
|
26
|
+
provider: zod_1.z.string(),
|
|
27
|
+
probability: zod_1.z.number(),
|
|
28
|
+
objectKind: zod_1.z.string(),
|
|
29
|
+
startTime: zod_1.z.number(),
|
|
30
|
+
endTime: zod_1.z.number().nullable(),
|
|
28
31
|
});
|
|
29
|
-
|
|
32
|
+
exports.sMediaSearchResponse = zod_1.z.array(exports.sMediaSearchMatch);
|
|
30
33
|
// -- Scene Preview Clip
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
providerAssignedRef: z.string(),
|
|
34
|
+
exports.QUERY_SCENE_PREVIEW_CLIP = 'cctv:scene-preview-clip';
|
|
35
|
+
exports.sScenePreviewClipArgs = zod_1.z.object({
|
|
36
|
+
providerAssignedRef: zod_1.z.string(),
|
|
34
37
|
});
|
|
35
|
-
|
|
38
|
+
exports.sScenePreviewClipResponse = primitives_1.sFileResponse;
|
|
36
39
|
// -- Object Snapshot
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
providerAssignedRef: z.string(),
|
|
40
|
-
height: z.number().optional(),
|
|
41
|
-
quality: z.number().optional(),
|
|
42
|
-
crop: z.boolean(),
|
|
43
|
-
boxes: z.boolean(),
|
|
40
|
+
exports.QUERY_OBJECT_SNAPSHOT = 'cctv:object-snapshot';
|
|
41
|
+
exports.sObjectSnapshotArgs = zod_1.z.object({
|
|
42
|
+
providerAssignedRef: zod_1.z.string(),
|
|
43
|
+
height: zod_1.z.number().optional(),
|
|
44
|
+
quality: zod_1.z.number().optional(),
|
|
45
|
+
crop: zod_1.z.boolean(),
|
|
46
|
+
boxes: zod_1.z.boolean(),
|
|
44
47
|
});
|
|
45
|
-
|
|
48
|
+
exports.sObjectSnapshotResponse = primitives_1.sFileResponse;
|
|
46
49
|
// -- Object Thumbnail
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
providerAssignedRef: z.string(),
|
|
50
|
+
exports.QUERY_OBJECT_THUMBNAIL = 'cctv:object-thumbnail';
|
|
51
|
+
exports.sObjectThumbnailArgs = zod_1.z.object({
|
|
52
|
+
providerAssignedRef: zod_1.z.string(),
|
|
50
53
|
});
|
|
51
|
-
|
|
54
|
+
exports.sObjectThumbnailResponse = primitives_1.sFileResponse;
|
|
52
55
|
// -- Object Labels
|
|
53
|
-
|
|
56
|
+
exports.QUERY_OBJECT_LABELS = 'cctv:object-labels';
|
|
54
57
|
// (No args or response schema defined for this query in the provided code)
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
exports.sObjectLabelsArgs = zod_1.z.object({});
|
|
59
|
+
exports.sObjectLabelResponse = zod_1.z.array(zod_1.z.string());
|
|
57
60
|
// SCHEMA DICTIONARIES AND TYPE MAPS
|
|
58
61
|
// Dictionary of request schemas by query type
|
|
59
|
-
|
|
60
|
-
[QUERY_MEDIA_SEARCH]: sMediaSearchArgs,
|
|
61
|
-
[QUERY_SCENE_PREVIEW_CLIP]: sScenePreviewClipArgs,
|
|
62
|
-
[QUERY_OBJECT_SNAPSHOT]: sObjectSnapshotArgs,
|
|
63
|
-
[QUERY_OBJECT_THUMBNAIL]: sObjectThumbnailArgs,
|
|
64
|
-
[QUERY_OBJECT_LABELS]: sObjectLabelsArgs,
|
|
62
|
+
exports.nvrAnalyticsRequestSchemas = {
|
|
63
|
+
[exports.QUERY_MEDIA_SEARCH]: exports.sMediaSearchArgs,
|
|
64
|
+
[exports.QUERY_SCENE_PREVIEW_CLIP]: exports.sScenePreviewClipArgs,
|
|
65
|
+
[exports.QUERY_OBJECT_SNAPSHOT]: exports.sObjectSnapshotArgs,
|
|
66
|
+
[exports.QUERY_OBJECT_THUMBNAIL]: exports.sObjectThumbnailArgs,
|
|
67
|
+
[exports.QUERY_OBJECT_LABELS]: exports.sObjectLabelsArgs,
|
|
65
68
|
};
|
|
66
69
|
// Dictionary of response schemas by query type
|
|
67
|
-
|
|
68
|
-
[QUERY_MEDIA_SEARCH]: sMediaSearchResponse,
|
|
69
|
-
[QUERY_SCENE_PREVIEW_CLIP]: sScenePreviewClipResponse,
|
|
70
|
-
[QUERY_OBJECT_SNAPSHOT]: sObjectSnapshotResponse,
|
|
71
|
-
[QUERY_OBJECT_THUMBNAIL]: sObjectThumbnailResponse,
|
|
72
|
-
[QUERY_OBJECT_LABELS]: sObjectLabelResponse,
|
|
70
|
+
exports.nvrAnalyticsResponseSchemas = {
|
|
71
|
+
[exports.QUERY_MEDIA_SEARCH]: exports.sMediaSearchResponse,
|
|
72
|
+
[exports.QUERY_SCENE_PREVIEW_CLIP]: exports.sScenePreviewClipResponse,
|
|
73
|
+
[exports.QUERY_OBJECT_SNAPSHOT]: exports.sObjectSnapshotResponse,
|
|
74
|
+
[exports.QUERY_OBJECT_THUMBNAIL]: exports.sObjectThumbnailResponse,
|
|
75
|
+
[exports.QUERY_OBJECT_LABELS]: exports.sObjectLabelResponse,
|
|
73
76
|
};
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nvrExporterResponseSchemas = exports.nvrExporterRequestSchemas = exports.sGetExportsResponse = exports.sExportItem = exports.sGetExportsArgs = exports.QUERY_GET_EXPORTS = exports.sGetExportLinkResponse = exports.sGetExportLinkArgs = exports.QUERY_GET_EXPORT_LINK = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
2
5
|
// QUERIES
|
|
3
6
|
// -- Get Export Link
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exportId: z.string().nonempty(),
|
|
7
|
+
exports.QUERY_GET_EXPORT_LINK = 'cctv:get-export-link';
|
|
8
|
+
exports.sGetExportLinkArgs = zod_1.z.object({
|
|
9
|
+
exportId: zod_1.z.string().nonempty(),
|
|
7
10
|
});
|
|
8
|
-
|
|
9
|
-
exportLink: z.string().url(),
|
|
11
|
+
exports.sGetExportLinkResponse = zod_1.z.object({
|
|
12
|
+
exportLink: zod_1.z.string().url(),
|
|
10
13
|
});
|
|
11
14
|
// -- Get Exports
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
name: z.string().nonempty(),
|
|
16
|
-
endTime: z.number().int().nonnegative(),
|
|
17
|
-
startTime: z.number().int().nonnegative(),
|
|
18
|
-
id: z.string().nonempty(),
|
|
19
|
-
status: z.string().nonempty(),
|
|
20
|
-
size: z.string().nonempty().optional(),
|
|
21
|
-
expires: z.number().int().nonnegative().optional(),
|
|
15
|
+
exports.QUERY_GET_EXPORTS = 'cctv:get-exports';
|
|
16
|
+
exports.sGetExportsArgs = zod_1.z.object({});
|
|
17
|
+
exports.sExportItem = zod_1.z.object({
|
|
18
|
+
name: zod_1.z.string().nonempty(),
|
|
19
|
+
endTime: zod_1.z.number().int().nonnegative(),
|
|
20
|
+
startTime: zod_1.z.number().int().nonnegative(),
|
|
21
|
+
id: zod_1.z.string().nonempty(),
|
|
22
|
+
status: zod_1.z.string().nonempty(),
|
|
23
|
+
size: zod_1.z.string().nonempty().optional(),
|
|
24
|
+
expires: zod_1.z.number().int().nonnegative().optional(),
|
|
22
25
|
});
|
|
23
|
-
|
|
26
|
+
exports.sGetExportsResponse = zod_1.z.array(exports.sExportItem);
|
|
24
27
|
// Dictionary of request schemas by query type
|
|
25
|
-
|
|
26
|
-
[QUERY_GET_EXPORT_LINK]: sGetExportLinkArgs,
|
|
27
|
-
[QUERY_GET_EXPORTS]: sGetExportsArgs,
|
|
28
|
+
exports.nvrExporterRequestSchemas = {
|
|
29
|
+
[exports.QUERY_GET_EXPORT_LINK]: exports.sGetExportLinkArgs,
|
|
30
|
+
[exports.QUERY_GET_EXPORTS]: exports.sGetExportsArgs,
|
|
28
31
|
};
|
|
29
32
|
// Dictionary of response schemas by query type
|
|
30
|
-
|
|
31
|
-
[QUERY_GET_EXPORT_LINK]: sGetExportLinkResponse,
|
|
32
|
-
[QUERY_GET_EXPORTS]: sGetExportsResponse,
|
|
33
|
+
exports.nvrExporterResponseSchemas = {
|
|
34
|
+
[exports.QUERY_GET_EXPORT_LINK]: exports.sGetExportLinkResponse,
|
|
35
|
+
[exports.QUERY_GET_EXPORTS]: exports.sGetExportsResponse,
|
|
33
36
|
};
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nvrRecorderResponseSchemas = exports.nvrRecorderRequestSchemas = exports.sCameraLatestFrameResponse = exports.sCameraLatestFrameArgs = exports.QUERY_CAMERA_LATEST_FRAME = exports.sPreviewImageResponse = exports.sPreviewImageArgs = exports.QUERY_PREVIEW_IMAGE = exports.sRecordingsResponse = exports.sRecordingsByTimeRangeArgs = exports.QUERY_RECORDINGS_BY_TIME_RANGE = void 0;
|
|
4
|
+
const primitives_1 = require("../../primitives");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const media_1 = require("../rest/media");
|
|
4
7
|
// QUERIES
|
|
5
8
|
// -- Recordings by Time Range
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
device: sDeviceParam,
|
|
9
|
-
timeFrom: z.number(),
|
|
10
|
-
timeTo: z.number(),
|
|
9
|
+
exports.QUERY_RECORDINGS_BY_TIME_RANGE = 'cctv:recordings-by-time-range';
|
|
10
|
+
exports.sRecordingsByTimeRangeArgs = zod_1.z.object({
|
|
11
|
+
device: primitives_1.sDeviceParam,
|
|
12
|
+
timeFrom: zod_1.z.number(),
|
|
13
|
+
timeTo: zod_1.z.number(),
|
|
11
14
|
});
|
|
12
|
-
|
|
15
|
+
exports.sRecordingsResponse = zod_1.z.array(media_1.sRecordingSequence);
|
|
13
16
|
// -- Preview Image
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
device: sDeviceParam,
|
|
17
|
-
time: z.number(),
|
|
18
|
-
height: z.number(),
|
|
17
|
+
exports.QUERY_PREVIEW_IMAGE = 'cctv:preview-image';
|
|
18
|
+
exports.sPreviewImageArgs = zod_1.z.object({
|
|
19
|
+
device: primitives_1.sDeviceParam,
|
|
20
|
+
time: zod_1.z.number(),
|
|
21
|
+
height: zod_1.z.number(),
|
|
19
22
|
});
|
|
20
|
-
|
|
23
|
+
exports.sPreviewImageResponse = primitives_1.sFileResponse;
|
|
21
24
|
// -- Camera Latest Frame
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
device: sDeviceParam,
|
|
25
|
-
width: z.number(),
|
|
26
|
-
height: z.number(),
|
|
25
|
+
exports.QUERY_CAMERA_LATEST_FRAME = 'cctv:latest-frame';
|
|
26
|
+
exports.sCameraLatestFrameArgs = zod_1.z.object({
|
|
27
|
+
device: primitives_1.sDeviceParam,
|
|
28
|
+
width: zod_1.z.number(),
|
|
29
|
+
height: zod_1.z.number(),
|
|
27
30
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
[QUERY_RECORDINGS_BY_TIME_RANGE]: sRecordingsByTimeRangeArgs,
|
|
31
|
-
[QUERY_PREVIEW_IMAGE]: sPreviewImageArgs,
|
|
32
|
-
[QUERY_CAMERA_LATEST_FRAME]: sCameraLatestFrameArgs,
|
|
31
|
+
exports.sCameraLatestFrameResponse = primitives_1.sFileResponse;
|
|
32
|
+
exports.nvrRecorderRequestSchemas = {
|
|
33
|
+
[exports.QUERY_RECORDINGS_BY_TIME_RANGE]: exports.sRecordingsByTimeRangeArgs,
|
|
34
|
+
[exports.QUERY_PREVIEW_IMAGE]: exports.sPreviewImageArgs,
|
|
35
|
+
[exports.QUERY_CAMERA_LATEST_FRAME]: exports.sCameraLatestFrameArgs,
|
|
33
36
|
};
|
|
34
37
|
// Dictionary of response schemas by query type
|
|
35
|
-
|
|
36
|
-
[QUERY_RECORDINGS_BY_TIME_RANGE]: sRecordingsResponse,
|
|
37
|
-
[QUERY_PREVIEW_IMAGE]: sPreviewImageResponse,
|
|
38
|
-
[QUERY_CAMERA_LATEST_FRAME]: sCameraLatestFrameResponse,
|
|
38
|
+
exports.nvrRecorderResponseSchemas = {
|
|
39
|
+
[exports.QUERY_RECORDINGS_BY_TIME_RANGE]: exports.sRecordingsResponse,
|
|
40
|
+
[exports.QUERY_PREVIEW_IMAGE]: exports.sPreviewImageResponse,
|
|
41
|
+
[exports.QUERY_CAMERA_LATEST_FRAME]: exports.sCameraLatestFrameResponse,
|
|
39
42
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sRemoveMemberFromAccessRuleRequest = exports.sAddMemberToAccessRuleRequest = exports.sUpdateAccessRuleRequest = exports.sCreateAccessRuleRequest = void 0;
|
|
7
|
+
const access_rule_1 = require("../../objects/access-rule");
|
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
|
9
|
+
exports.sCreateAccessRuleRequest = access_rule_1.sAccessRuleProps;
|
|
10
|
+
exports.sUpdateAccessRuleRequest = exports.sCreateAccessRuleRequest.partial();
|
|
11
|
+
exports.sAddMemberToAccessRuleRequest = zod_1.default.object({
|
|
12
|
+
personId: zod_1.default.string().nonempty().describe('Person ID'),
|
|
7
13
|
});
|
|
8
|
-
|
|
9
|
-
personId:
|
|
14
|
+
exports.sRemoveMemberFromAccessRuleRequest = zod_1.default.object({
|
|
15
|
+
personId: zod_1.default.string().nonempty().describe('Person ID'),
|
|
10
16
|
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sUpdateAgreementRequest = exports.sCreateAgreementRequest = void 0;
|
|
4
|
+
const agreement_1 = require("../../objects/agreement");
|
|
5
|
+
exports.sCreateAgreementRequest = agreement_1.sAgreementDto.omit({
|
|
3
6
|
id: true,
|
|
4
7
|
createdOn: true,
|
|
5
8
|
lastModifiedOn: true,
|
|
6
9
|
});
|
|
7
|
-
|
|
10
|
+
exports.sUpdateAgreementRequest = exports.sCreateAgreementRequest.partial();
|
package/dist/api/rest/alarm.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sRevokeApiKeyRequest = exports.sCreateApiKeyResponse = exports.sCreateApiKeyRequest = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sCreateApiKeyRequest = zod_1.z.object({
|
|
6
|
+
displayName: zod_1.z.string().min(1).max(128),
|
|
4
7
|
});
|
|
5
|
-
|
|
6
|
-
id: z.string().uuid(),
|
|
7
|
-
apiKey: z.string().min(32).max(1024),
|
|
8
|
+
exports.sCreateApiKeyResponse = zod_1.z.object({
|
|
9
|
+
id: zod_1.z.string().uuid(),
|
|
10
|
+
apiKey: zod_1.z.string().min(32).max(1024),
|
|
8
11
|
});
|
|
9
|
-
|
|
10
|
-
id: z.string().uuid(),
|
|
12
|
+
exports.sRevokeApiKeyRequest = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.string().uuid(),
|
|
11
14
|
});
|
package/dist/api/rest/app.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sAppInfo = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sAppInfo = zod_1.z.object({
|
|
6
|
+
version: zod_1.z.string(),
|
|
7
|
+
releaseDate: zod_1.z.string(),
|
|
8
|
+
serverDeviceId: zod_1.z.string(),
|
|
9
|
+
alarmDeviceId: zod_1.z.string(),
|
|
10
|
+
globalZoneId: zod_1.z.string(),
|
|
11
|
+
presenceTrackerId: zod_1.z.string(),
|
|
9
12
|
});
|
package/dist/api/rest/auth.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sLoginResponse = exports.sLoginByRefreshTokenRequest = exports.sLoginByCredentialsRequest = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sLoginByCredentialsRequest = zod_1.z.object({
|
|
6
|
+
username: zod_1.z.string().nonempty('Username must not be empty'),
|
|
7
|
+
password: zod_1.z.string().nonempty('Password must not be empty'),
|
|
5
8
|
});
|
|
6
|
-
|
|
7
|
-
refreshToken: z.string().nonempty('Refresh token must not be empty'),
|
|
9
|
+
exports.sLoginByRefreshTokenRequest = zod_1.z.object({
|
|
10
|
+
refreshToken: zod_1.z.string().nonempty('Refresh token must not be empty'),
|
|
8
11
|
});
|
|
9
|
-
|
|
10
|
-
accessToken: z
|
|
12
|
+
exports.sLoginResponse = zod_1.z.object({
|
|
13
|
+
accessToken: zod_1.z
|
|
11
14
|
.string()
|
|
12
15
|
.describe('Access token to be used for authentication with short expiry time. Apply this token in the Authorization header as a Bearer token.'),
|
|
13
|
-
refreshToken: z
|
|
16
|
+
refreshToken: zod_1.z
|
|
14
17
|
.string()
|
|
15
18
|
.describe('Refresh token to be used to obtain a new access token when the current one expires.'),
|
|
16
19
|
});
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sAutomationBulkMergeRequest = exports.sUpdateAutomationRule = exports.sAddAutomationRuleRequest = void 0;
|
|
4
|
+
const automation_rule_1 = require("../../objects/automation-rule");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.sAddAutomationRuleRequest = automation_rule_1.sAutomationRuleProps;
|
|
7
|
+
exports.sUpdateAutomationRule = automation_rule_1.sAutomationRuleProps.partial().merge(zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string().describe('The ID of the automation rule'),
|
|
6
9
|
}));
|
|
7
|
-
|
|
8
|
-
merge: z
|
|
9
|
-
.array(sAutomationRuleProps)
|
|
10
|
+
exports.sAutomationBulkMergeRequest = zod_1.z.object({
|
|
11
|
+
merge: zod_1.z
|
|
12
|
+
.array(automation_rule_1.sAutomationRuleProps)
|
|
10
13
|
.describe('The automation rules to merge by code'),
|
|
11
|
-
removeCodes: z
|
|
12
|
-
.array(z.string())
|
|
14
|
+
removeCodes: zod_1.z
|
|
15
|
+
.array(zod_1.z.string())
|
|
13
16
|
.describe('The IDs of the automation rules to delete by code'),
|
|
14
17
|
});
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sBookmarkSearchCriteria = exports.sDeleteBookmarkRq = exports.sUpdateBookmarkRq = exports.sUpdateBookmarkBody = exports.sCreateBookmarkRq = void 0;
|
|
4
|
+
const bookmark_1 = require("../../objects/bookmark");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.sCreateBookmarkRq = bookmark_1.sBookmarkProps;
|
|
7
|
+
exports.sUpdateBookmarkBody = bookmark_1.sBookmarkProps.partial();
|
|
8
|
+
exports.sUpdateBookmarkRq = zod_1.z
|
|
6
9
|
.object({
|
|
7
|
-
id: z.string().nonempty(),
|
|
10
|
+
id: zod_1.z.string().nonempty(),
|
|
8
11
|
})
|
|
9
|
-
.and(sUpdateBookmarkBody);
|
|
10
|
-
|
|
11
|
-
id: z.string().nonempty(),
|
|
12
|
+
.and(exports.sUpdateBookmarkBody);
|
|
13
|
+
exports.sDeleteBookmarkRq = zod_1.z.object({
|
|
14
|
+
id: zod_1.z.string().nonempty(),
|
|
12
15
|
});
|
|
13
|
-
|
|
14
|
-
deviceId: z.array(z.string()),
|
|
15
|
-
createdBy: z.array(z.string()),
|
|
16
|
-
timeFrom: z.number().min(0),
|
|
17
|
-
timeTo: z.number().min(0),
|
|
16
|
+
exports.sBookmarkSearchCriteria = zod_1.z.object({
|
|
17
|
+
deviceId: zod_1.z.array(zod_1.z.string()),
|
|
18
|
+
createdBy: zod_1.z.array(zod_1.z.string()),
|
|
19
|
+
timeFrom: zod_1.z.number().min(0),
|
|
20
|
+
timeTo: zod_1.z.number().min(0),
|
|
18
21
|
});
|
package/dist/api/rest/cast.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sCastCamerasRequest = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.sCastCamerasRequest = zod_1.default
|
|
9
|
+
.array(zod_1.default.object({
|
|
10
|
+
cameraId: zod_1.default.string().nonempty(),
|
|
11
|
+
streamId: zod_1.default.string().nonempty(),
|
|
6
12
|
}))
|
|
7
13
|
.min(1);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sUpdateCustomFieldRequest = exports.sAddCustomFieldRequest = void 0;
|
|
4
|
+
const custom_field_1 = require("../../objects/custom-field");
|
|
5
|
+
exports.sAddCustomFieldRequest = custom_field_1.sCustomFieldDto.omit({ id: true });
|
|
6
|
+
exports.sUpdateCustomFieldRequest = exports.sAddCustomFieldRequest.partial();
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|