@awarevue/api-types 2.0.153 → 2.0.155
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/error.d.ts +11 -0
- package/dist/api/error.js +8 -1
- package/dist/api/events/all.d.ts +23 -0
- package/dist/api/events/all.js +2 -0
- package/dist/api/events/camera.d.ts +64 -1
- package/dist/api/events/camera.js +51 -5
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/api/error.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export declare const sConflictMeta: z.ZodObject<{
|
|
|
20
20
|
blockingId: z.ZodOptional<z.ZodString>;
|
|
21
21
|
value: z.ZodOptional<z.ZodString>;
|
|
22
22
|
}, z.core.$strip>;
|
|
23
|
+
/** Someone else changed the resource since the requester read it, so the requester's change was not made. */
|
|
24
|
+
export declare const sChangedMeta: z.ZodObject<{
|
|
25
|
+
subject: z.ZodString;
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
23
28
|
export declare const sVoidMeta: z.ZodObject<{}, z.core.$strict>;
|
|
24
29
|
export declare const sAccessRuleConflictMeta: z.ZodObject<{
|
|
25
30
|
deviceSchedules: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
@@ -61,6 +66,7 @@ export type DuplicateMeta = z.infer<typeof sDuplicateMeta>;
|
|
|
61
66
|
export type NotFoundMeta = z.infer<typeof sNotFoundMeta>;
|
|
62
67
|
export type InvalidMeta = z.infer<typeof sInvalidMeta>;
|
|
63
68
|
export type ConflictMeta = z.infer<typeof sConflictMeta>;
|
|
69
|
+
export type ChangedMeta = z.infer<typeof sChangedMeta>;
|
|
64
70
|
export type AccessRuleConflictMeta = z.infer<typeof sAccessRuleConflictMeta>;
|
|
65
71
|
export declare enum AppErrorCode {
|
|
66
72
|
RESOURCE_ALREADY_EXISTS = "RESOURCE_ALREADY_EXISTS",
|
|
@@ -69,6 +75,7 @@ export declare enum AppErrorCode {
|
|
|
69
75
|
RESOURCE_INVALID = "RESOURCE_INVALID",
|
|
70
76
|
RESOURCE_IN_USE = "RESOURCE_IN_USE",
|
|
71
77
|
RESOURCE_NOT_SUPPORTED = "RESOURCE_NOT_SUPPORTED",
|
|
78
|
+
RESOURCE_CHANGED = "RESOURCE_CHANGED",
|
|
72
79
|
BAD_REFERENCE = "BAD_REFERENCE",
|
|
73
80
|
UNKNOWN = "UNKNOWN",
|
|
74
81
|
SERVER_INTERNAL_ERROR = "SERVER_INTERNAL_ERROR",
|
|
@@ -143,6 +150,10 @@ export declare const errorMetadataSchemas: {
|
|
|
143
150
|
value: z.ZodOptional<z.ZodString>;
|
|
144
151
|
}, z.core.$strip>;
|
|
145
152
|
readonly RESOURCE_NOT_SUPPORTED: z.ZodObject<{}, z.core.$strict>;
|
|
153
|
+
readonly RESOURCE_CHANGED: z.ZodObject<{
|
|
154
|
+
subject: z.ZodString;
|
|
155
|
+
id: z.ZodString;
|
|
156
|
+
}, z.core.$strip>;
|
|
146
157
|
readonly RESOURCE_FORBIDDEN: z.ZodObject<{}, z.core.$strict>;
|
|
147
158
|
readonly BAD_REFERENCE: z.ZodObject<{}, z.core.$strict>;
|
|
148
159
|
readonly ACCESS_RULE_NOT_FOUND: z.ZodObject<{
|
package/dist/api/error.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.errorMetadataSchemas = exports.AppErrorCode = exports.sPersonTypeSyncPermissionRequiredMeta = exports.sPersonTypeNotAccessControlUserMeta = exports.sTokenLimitExceededMeta = exports.sTokenInvalidFormatMeta = exports.sZoneAccessRuleConflictMeta = exports.sAccessRuleConflictMeta = exports.sVoidMeta = exports.sConflictMeta = exports.sInvalidMeta = exports.sNotFoundMeta = exports.sDuplicateMeta = void 0;
|
|
3
|
+
exports.errorMetadataSchemas = exports.AppErrorCode = exports.sPersonTypeSyncPermissionRequiredMeta = exports.sPersonTypeNotAccessControlUserMeta = exports.sTokenLimitExceededMeta = exports.sTokenInvalidFormatMeta = exports.sZoneAccessRuleConflictMeta = exports.sAccessRuleConflictMeta = exports.sVoidMeta = exports.sChangedMeta = exports.sConflictMeta = exports.sInvalidMeta = exports.sNotFoundMeta = exports.sDuplicateMeta = void 0;
|
|
4
4
|
exports.isErrorResponse = isErrorResponse;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const credential_type_1 = require("../primitives/credential-type");
|
|
@@ -26,6 +26,11 @@ exports.sConflictMeta = zod_1.z.object({
|
|
|
26
26
|
blockingId: zod_1.z.string().optional(),
|
|
27
27
|
value: zod_1.z.string().optional(),
|
|
28
28
|
});
|
|
29
|
+
/** Someone else changed the resource since the requester read it, so the requester's change was not made. */
|
|
30
|
+
exports.sChangedMeta = zod_1.z.object({
|
|
31
|
+
subject: zod_1.z.string(),
|
|
32
|
+
id: zod_1.z.string(),
|
|
33
|
+
});
|
|
29
34
|
exports.sVoidMeta = zod_1.z.object({}).strict();
|
|
30
35
|
exports.sAccessRuleConflictMeta = zod_1.z.object({
|
|
31
36
|
deviceSchedules: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())),
|
|
@@ -62,6 +67,7 @@ var AppErrorCode;
|
|
|
62
67
|
AppErrorCode["RESOURCE_INVALID"] = "RESOURCE_INVALID";
|
|
63
68
|
AppErrorCode["RESOURCE_IN_USE"] = "RESOURCE_IN_USE";
|
|
64
69
|
AppErrorCode["RESOURCE_NOT_SUPPORTED"] = "RESOURCE_NOT_SUPPORTED";
|
|
70
|
+
AppErrorCode["RESOURCE_CHANGED"] = "RESOURCE_CHANGED";
|
|
65
71
|
AppErrorCode["BAD_REFERENCE"] = "BAD_REFERENCE";
|
|
66
72
|
AppErrorCode["UNKNOWN"] = "UNKNOWN";
|
|
67
73
|
AppErrorCode["SERVER_INTERNAL_ERROR"] = "SERVER_INTERNAL_ERROR";
|
|
@@ -129,6 +135,7 @@ exports.errorMetadataSchemas = {
|
|
|
129
135
|
[AppErrorCode.RESOURCE_INVALID]: exports.sInvalidMeta,
|
|
130
136
|
[AppErrorCode.RESOURCE_IN_USE]: exports.sConflictMeta,
|
|
131
137
|
[AppErrorCode.RESOURCE_NOT_SUPPORTED]: exports.sVoidMeta,
|
|
138
|
+
[AppErrorCode.RESOURCE_CHANGED]: exports.sChangedMeta,
|
|
132
139
|
[AppErrorCode.RESOURCE_FORBIDDEN]: exports.sVoidMeta,
|
|
133
140
|
[AppErrorCode.BAD_REFERENCE]: exports.sVoidMeta,
|
|
134
141
|
// access
|
package/dist/api/events/all.d.ts
CHANGED
|
@@ -223,6 +223,14 @@ export declare const eventSchemaByKind: {
|
|
|
223
223
|
}, z.core.$strip>;
|
|
224
224
|
assignedRef: z.ZodNullable<z.ZodString>;
|
|
225
225
|
}, z.core.$strip>;
|
|
226
|
+
'privacy-mode-set': z.ZodObject<{
|
|
227
|
+
kind: z.ZodLiteral<"privacy-mode-set">;
|
|
228
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
'privacy-mode-unset': z.ZodObject<{
|
|
231
|
+
kind: z.ZodLiteral<"privacy-mode-unset">;
|
|
232
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>;
|
|
226
234
|
'object-detection-started': z.ZodIntersection<z.ZodObject<{
|
|
227
235
|
kind: z.ZodLiteral<"object-detection-started">;
|
|
228
236
|
providerAssignedRef: z.ZodString;
|
|
@@ -231,6 +239,9 @@ export declare const eventSchemaByKind: {
|
|
|
231
239
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
232
240
|
probability: z.ZodNumber;
|
|
233
241
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
242
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
243
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
244
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
234
245
|
frameTime: z.ZodNumber;
|
|
235
246
|
startTime: z.ZodNumber;
|
|
236
247
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -240,6 +251,8 @@ export declare const eventSchemaByKind: {
|
|
|
240
251
|
y1: z.ZodNumber;
|
|
241
252
|
x2: z.ZodNumber;
|
|
242
253
|
y2: z.ZodNumber;
|
|
254
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
243
256
|
}, z.core.$strip>>>;
|
|
244
257
|
'object-detection-updated': z.ZodIntersection<z.ZodObject<{
|
|
245
258
|
kind: z.ZodLiteral<"object-detection-updated">;
|
|
@@ -249,6 +262,9 @@ export declare const eventSchemaByKind: {
|
|
|
249
262
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
250
263
|
probability: z.ZodNumber;
|
|
251
264
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
265
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
266
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
252
268
|
frameTime: z.ZodNumber;
|
|
253
269
|
startTime: z.ZodNumber;
|
|
254
270
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -258,6 +274,8 @@ export declare const eventSchemaByKind: {
|
|
|
258
274
|
y1: z.ZodNumber;
|
|
259
275
|
x2: z.ZodNumber;
|
|
260
276
|
y2: z.ZodNumber;
|
|
277
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
261
279
|
}, z.core.$strip>>>;
|
|
262
280
|
'object-detection-ended': z.ZodIntersection<z.ZodObject<{
|
|
263
281
|
kind: z.ZodLiteral<"object-detection-ended">;
|
|
@@ -267,6 +285,9 @@ export declare const eventSchemaByKind: {
|
|
|
267
285
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
268
286
|
probability: z.ZodNumber;
|
|
269
287
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
288
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
289
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
290
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
270
291
|
frameTime: z.ZodNumber;
|
|
271
292
|
startTime: z.ZodNumber;
|
|
272
293
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -276,6 +297,8 @@ export declare const eventSchemaByKind: {
|
|
|
276
297
|
y1: z.ZodNumber;
|
|
277
298
|
x2: z.ZodNumber;
|
|
278
299
|
y2: z.ZodNumber;
|
|
300
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
301
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
279
302
|
}, z.core.$strip>>>;
|
|
280
303
|
'scene-created': z.ZodIntersection<z.ZodObject<{
|
|
281
304
|
kind: z.ZodLiteral<"scene-created">;
|
package/dist/api/events/all.js
CHANGED
|
@@ -70,6 +70,8 @@ exports.eventKindLabels = {
|
|
|
70
70
|
'object-updated': 'Object Updated',
|
|
71
71
|
'object-deleted': 'Object Deleted',
|
|
72
72
|
'ptz-preset-saved': 'PTZ Preset Saved on Device',
|
|
73
|
+
'privacy-mode-set': 'Privacy Mode Set',
|
|
74
|
+
'privacy-mode-unset': 'Privacy Mode Unset',
|
|
73
75
|
'person-in': 'Person Checked In',
|
|
74
76
|
'person-out': 'Person Checked Out',
|
|
75
77
|
'object-detection-started': 'Object Detection Started',
|
|
@@ -9,12 +9,25 @@ export declare const sCameraPtzPresetSaved: z.ZodObject<{
|
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
assignedRef: z.ZodNullable<z.ZodString>;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
|
+
/** The camera's privacy mode was turned on: nothing is recorded or watched. */
|
|
13
|
+
export declare const sPrivacyModeSet: z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"privacy-mode-set">;
|
|
15
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
/** The camera's privacy mode was turned off: it records and can be watched again. */
|
|
18
|
+
export declare const sPrivacyModeUnset: z.ZodObject<{
|
|
19
|
+
kind: z.ZodLiteral<"privacy-mode-unset">;
|
|
20
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
/** A box in the picture the object was detected in, in pixels of that picture. */
|
|
12
23
|
export declare const sBoxLocator: z.ZodObject<{
|
|
13
24
|
locatorKind: z.ZodLiteral<"box">;
|
|
14
25
|
x1: z.ZodNumber;
|
|
15
26
|
y1: z.ZodNumber;
|
|
16
27
|
x2: z.ZodNumber;
|
|
17
28
|
y2: z.ZodNumber;
|
|
29
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
18
31
|
}, z.core.$strip>;
|
|
19
32
|
export declare const sObjectLocator: z.ZodObject<{
|
|
20
33
|
locatorKind: z.ZodLiteral<"box">;
|
|
@@ -22,11 +35,16 @@ export declare const sObjectLocator: z.ZodObject<{
|
|
|
22
35
|
y1: z.ZodNumber;
|
|
23
36
|
x2: z.ZodNumber;
|
|
24
37
|
y2: z.ZodNumber;
|
|
38
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
25
40
|
}, z.core.$strip>;
|
|
26
41
|
export declare const sObjectDetectionData: z.ZodIntersection<z.ZodObject<{
|
|
27
42
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
28
43
|
probability: z.ZodNumber;
|
|
29
44
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
45
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
46
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
30
48
|
frameTime: z.ZodNumber;
|
|
31
49
|
startTime: z.ZodNumber;
|
|
32
50
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -36,7 +54,12 @@ export declare const sObjectDetectionData: z.ZodIntersection<z.ZodObject<{
|
|
|
36
54
|
y1: z.ZodNumber;
|
|
37
55
|
x2: z.ZodNumber;
|
|
38
56
|
y2: z.ZodNumber;
|
|
57
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
39
59
|
}, z.core.$strip>>;
|
|
60
|
+
/**
|
|
61
|
+
* A detected object's events: started once, then any number of updated, then ended once.
|
|
62
|
+
*/
|
|
40
63
|
export declare const sObjectDetectionStarted: z.ZodIntersection<z.ZodObject<{
|
|
41
64
|
kind: z.ZodLiteral<"object-detection-started">;
|
|
42
65
|
providerAssignedRef: z.ZodString;
|
|
@@ -45,6 +68,9 @@ export declare const sObjectDetectionStarted: z.ZodIntersection<z.ZodObject<{
|
|
|
45
68
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
46
69
|
probability: z.ZodNumber;
|
|
47
70
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
71
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
72
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
48
74
|
frameTime: z.ZodNumber;
|
|
49
75
|
startTime: z.ZodNumber;
|
|
50
76
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -54,6 +80,8 @@ export declare const sObjectDetectionStarted: z.ZodIntersection<z.ZodObject<{
|
|
|
54
80
|
y1: z.ZodNumber;
|
|
55
81
|
x2: z.ZodNumber;
|
|
56
82
|
y2: z.ZodNumber;
|
|
83
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
57
85
|
}, z.core.$strip>>>;
|
|
58
86
|
export declare const sObjectDetectionUpdated: z.ZodIntersection<z.ZodObject<{
|
|
59
87
|
kind: z.ZodLiteral<"object-detection-updated">;
|
|
@@ -63,6 +91,9 @@ export declare const sObjectDetectionUpdated: z.ZodIntersection<z.ZodObject<{
|
|
|
63
91
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
64
92
|
probability: z.ZodNumber;
|
|
65
93
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
94
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
95
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
66
97
|
frameTime: z.ZodNumber;
|
|
67
98
|
startTime: z.ZodNumber;
|
|
68
99
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -72,6 +103,8 @@ export declare const sObjectDetectionUpdated: z.ZodIntersection<z.ZodObject<{
|
|
|
72
103
|
y1: z.ZodNumber;
|
|
73
104
|
x2: z.ZodNumber;
|
|
74
105
|
y2: z.ZodNumber;
|
|
106
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
75
108
|
}, z.core.$strip>>>;
|
|
76
109
|
export declare const sObjectDetectionEnded: z.ZodIntersection<z.ZodObject<{
|
|
77
110
|
kind: z.ZodLiteral<"object-detection-ended">;
|
|
@@ -81,6 +114,9 @@ export declare const sObjectDetectionEnded: z.ZodIntersection<z.ZodObject<{
|
|
|
81
114
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
82
115
|
probability: z.ZodNumber;
|
|
83
116
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
117
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
118
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
119
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
84
120
|
frameTime: z.ZodNumber;
|
|
85
121
|
startTime: z.ZodNumber;
|
|
86
122
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -90,6 +126,8 @@ export declare const sObjectDetectionEnded: z.ZodIntersection<z.ZodObject<{
|
|
|
90
126
|
y1: z.ZodNumber;
|
|
91
127
|
x2: z.ZodNumber;
|
|
92
128
|
y2: z.ZodNumber;
|
|
129
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
93
131
|
}, z.core.$strip>>>;
|
|
94
132
|
export declare const sSceneData: z.ZodObject<{
|
|
95
133
|
detections: z.ZodArray<z.ZodString>;
|
|
@@ -138,6 +176,14 @@ export declare const cameraEventSchemasByKind: {
|
|
|
138
176
|
}, z.core.$strip>;
|
|
139
177
|
assignedRef: z.ZodNullable<z.ZodString>;
|
|
140
178
|
}, z.core.$strip>;
|
|
179
|
+
readonly 'privacy-mode-set': z.ZodObject<{
|
|
180
|
+
kind: z.ZodLiteral<"privacy-mode-set">;
|
|
181
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
readonly 'privacy-mode-unset': z.ZodObject<{
|
|
184
|
+
kind: z.ZodLiteral<"privacy-mode-unset">;
|
|
185
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
186
|
+
}, z.core.$strip>;
|
|
141
187
|
readonly 'object-detection-started': z.ZodIntersection<z.ZodObject<{
|
|
142
188
|
kind: z.ZodLiteral<"object-detection-started">;
|
|
143
189
|
providerAssignedRef: z.ZodString;
|
|
@@ -146,6 +192,9 @@ export declare const cameraEventSchemasByKind: {
|
|
|
146
192
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
147
193
|
probability: z.ZodNumber;
|
|
148
194
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
195
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
196
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
197
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
149
198
|
frameTime: z.ZodNumber;
|
|
150
199
|
startTime: z.ZodNumber;
|
|
151
200
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -155,6 +204,8 @@ export declare const cameraEventSchemasByKind: {
|
|
|
155
204
|
y1: z.ZodNumber;
|
|
156
205
|
x2: z.ZodNumber;
|
|
157
206
|
y2: z.ZodNumber;
|
|
207
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
158
209
|
}, z.core.$strip>>>;
|
|
159
210
|
readonly 'object-detection-updated': z.ZodIntersection<z.ZodObject<{
|
|
160
211
|
kind: z.ZodLiteral<"object-detection-updated">;
|
|
@@ -164,6 +215,9 @@ export declare const cameraEventSchemasByKind: {
|
|
|
164
215
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
165
216
|
probability: z.ZodNumber;
|
|
166
217
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
218
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
219
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
220
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
167
221
|
frameTime: z.ZodNumber;
|
|
168
222
|
startTime: z.ZodNumber;
|
|
169
223
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -173,6 +227,8 @@ export declare const cameraEventSchemasByKind: {
|
|
|
173
227
|
y1: z.ZodNumber;
|
|
174
228
|
x2: z.ZodNumber;
|
|
175
229
|
y2: z.ZodNumber;
|
|
230
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
176
232
|
}, z.core.$strip>>>;
|
|
177
233
|
readonly 'object-detection-ended': z.ZodIntersection<z.ZodObject<{
|
|
178
234
|
kind: z.ZodLiteral<"object-detection-ended">;
|
|
@@ -182,6 +238,9 @@ export declare const cameraEventSchemasByKind: {
|
|
|
182
238
|
objectKind: z.ZodNullable<z.ZodString>;
|
|
183
239
|
probability: z.ZodNumber;
|
|
184
240
|
identifiedObjectId: z.ZodNullable<z.ZodString>;
|
|
241
|
+
identificationScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
242
|
+
providerZones: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
243
|
+
stationary: z.ZodOptional<z.ZodBoolean>;
|
|
185
244
|
frameTime: z.ZodNumber;
|
|
186
245
|
startTime: z.ZodNumber;
|
|
187
246
|
endTime: z.ZodNullable<z.ZodNumber>;
|
|
@@ -191,6 +250,8 @@ export declare const cameraEventSchemasByKind: {
|
|
|
191
250
|
y1: z.ZodNumber;
|
|
192
251
|
x2: z.ZodNumber;
|
|
193
252
|
y2: z.ZodNumber;
|
|
253
|
+
frameWidth: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
frameHeight: z.ZodOptional<z.ZodNumber>;
|
|
194
255
|
}, z.core.$strip>>>;
|
|
195
256
|
readonly 'scene-created': z.ZodIntersection<z.ZodObject<{
|
|
196
257
|
kind: z.ZodLiteral<"scene-created">;
|
|
@@ -224,6 +285,8 @@ export declare const cameraEventSchemasByKind: {
|
|
|
224
285
|
}, z.core.$strip>>;
|
|
225
286
|
};
|
|
226
287
|
export type CameraPtzPresetSaved = z.infer<typeof sCameraPtzPresetSaved>;
|
|
288
|
+
export type PrivacyModeSet = z.infer<typeof sPrivacyModeSet>;
|
|
289
|
+
export type PrivacyModeUnset = z.infer<typeof sPrivacyModeUnset>;
|
|
227
290
|
export type BoxLocator = z.infer<typeof sBoxLocator>;
|
|
228
291
|
export type ObjectLocator = z.infer<typeof sObjectLocator>;
|
|
229
292
|
export type ObjectDetectionData = z.infer<typeof sObjectDetectionData>;
|
|
@@ -234,4 +297,4 @@ export type SceneData = z.infer<typeof sSceneData>;
|
|
|
234
297
|
export type SceneCreated = z.infer<typeof sSceneCreated>;
|
|
235
298
|
export type SceneUpdated = z.infer<typeof sSceneUpdated>;
|
|
236
299
|
export type SceneEnded = z.infer<typeof sSceneEnded>;
|
|
237
|
-
export type CameraEvent = CameraPtzPresetSaved | ObjectDetectionStarted | ObjectDetectionUpdated | ObjectDetectionEnded | SceneCreated | SceneUpdated | SceneEnded;
|
|
300
|
+
export type CameraEvent = CameraPtzPresetSaved | PrivacyModeSet | PrivacyModeUnset | ObjectDetectionStarted | ObjectDetectionUpdated | ObjectDetectionEnded | SceneCreated | SceneUpdated | SceneEnded;
|
|
@@ -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 = void 0;
|
|
3
|
+
exports.cameraEventSchemasByKind = exports.sSceneEnded = exports.sSceneUpdated = exports.sSceneCreated = exports.sSceneData = exports.sObjectDetectionEnded = exports.sObjectDetectionUpdated = exports.sObjectDetectionStarted = exports.sObjectDetectionData = exports.sObjectLocator = exports.sBoxLocator = exports.sPrivacyModeUnset = exports.sPrivacyModeSet = exports.sCameraPtzPresetSaved = void 0;
|
|
4
4
|
const primitives_1 = require("../../primitives");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
// EVENTS
|
|
@@ -10,42 +10,86 @@ exports.sCameraPtzPresetSaved = zod_1.z.object({
|
|
|
10
10
|
presetInfo: primitives_1.sCameraPresetInfo,
|
|
11
11
|
assignedRef: zod_1.z.string().nullable(),
|
|
12
12
|
});
|
|
13
|
+
/** The camera's privacy mode was turned on: nothing is recorded or watched. */
|
|
14
|
+
exports.sPrivacyModeSet = zod_1.z.object({
|
|
15
|
+
kind: zod_1.z.literal('privacy-mode-set'),
|
|
16
|
+
userId: zod_1.z.string().optional(),
|
|
17
|
+
});
|
|
18
|
+
/** The camera's privacy mode was turned off: it records and can be watched again. */
|
|
19
|
+
exports.sPrivacyModeUnset = zod_1.z.object({
|
|
20
|
+
kind: zod_1.z.literal('privacy-mode-unset'),
|
|
21
|
+
userId: zod_1.z.string().optional(),
|
|
22
|
+
});
|
|
23
|
+
/** A box in the picture the object was detected in, in pixels of that picture. */
|
|
13
24
|
exports.sBoxLocator = zod_1.z.object({
|
|
14
25
|
locatorKind: zod_1.z.literal('box'),
|
|
15
26
|
x1: zod_1.z.number(),
|
|
16
27
|
y1: zod_1.z.number(),
|
|
17
28
|
x2: zod_1.z.number(),
|
|
18
29
|
y2: zod_1.z.number(),
|
|
30
|
+
frameWidth: zod_1.z
|
|
31
|
+
.number()
|
|
32
|
+
.positive()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Width in pixels of the picture the box is measured in, which is not necessarily the stream resolution'),
|
|
35
|
+
frameHeight: zod_1.z
|
|
36
|
+
.number()
|
|
37
|
+
.positive()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('Height in pixels of the picture the box is measured in'),
|
|
19
40
|
});
|
|
20
41
|
exports.sObjectLocator = exports.sBoxLocator;
|
|
21
42
|
exports.sObjectDetectionData = zod_1.z
|
|
22
43
|
.object({
|
|
23
44
|
objectKind: primitives_1.sWorldObjectId.nullable(),
|
|
24
45
|
probability: zod_1.z.number(),
|
|
25
|
-
identifiedObjectId: zod_1.z
|
|
46
|
+
identifiedObjectId: zod_1.z
|
|
47
|
+
.string()
|
|
48
|
+
.nullable()
|
|
49
|
+
.describe('Who or what the object was identified as. For faces, the Aware person id.'),
|
|
50
|
+
identificationScore: zod_1.z
|
|
51
|
+
.number()
|
|
52
|
+
.nullable()
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('Confidence of identifiedObjectId, 0 to 1, when known'),
|
|
55
|
+
providerZones: zod_1.z
|
|
56
|
+
.array(zod_1.z.string())
|
|
57
|
+
.optional()
|
|
58
|
+
.describe("Names of the detection provider's zones the object is in now. These are the vendor's zones, not Aware Zones."),
|
|
59
|
+
stationary: zod_1.z
|
|
60
|
+
.boolean()
|
|
61
|
+
.optional()
|
|
62
|
+
.describe('Whether the object has stopped moving'),
|
|
26
63
|
frameTime: zod_1.z.number(),
|
|
27
64
|
startTime: zod_1.z.number(),
|
|
28
65
|
endTime: zod_1.z.number().nullable(),
|
|
29
66
|
})
|
|
30
67
|
.and(exports.sObjectLocator);
|
|
68
|
+
const sProviderAssignedRef = zod_1.z
|
|
69
|
+
.string()
|
|
70
|
+
.nonempty()
|
|
71
|
+
.describe('Correlates the events of one detected object, from started to ended; unique only with the provider and camera');
|
|
72
|
+
/**
|
|
73
|
+
* A detected object's events: started once, then any number of updated, then ended once.
|
|
74
|
+
*/
|
|
31
75
|
exports.sObjectDetectionStarted = zod_1.z
|
|
32
76
|
.object({
|
|
33
77
|
kind: zod_1.z.literal('object-detection-started'),
|
|
34
|
-
providerAssignedRef:
|
|
78
|
+
providerAssignedRef: sProviderAssignedRef,
|
|
35
79
|
detectionProvider: zod_1.z.string().nonempty(),
|
|
36
80
|
})
|
|
37
81
|
.and(exports.sObjectDetectionData);
|
|
38
82
|
exports.sObjectDetectionUpdated = zod_1.z
|
|
39
83
|
.object({
|
|
40
84
|
kind: zod_1.z.literal('object-detection-updated'),
|
|
41
|
-
providerAssignedRef:
|
|
85
|
+
providerAssignedRef: sProviderAssignedRef,
|
|
42
86
|
detectionProvider: zod_1.z.string().nonempty(),
|
|
43
87
|
})
|
|
44
88
|
.and(exports.sObjectDetectionData);
|
|
45
89
|
exports.sObjectDetectionEnded = zod_1.z
|
|
46
90
|
.object({
|
|
47
91
|
kind: zod_1.z.literal('object-detection-ended'),
|
|
48
|
-
providerAssignedRef:
|
|
92
|
+
providerAssignedRef: sProviderAssignedRef,
|
|
49
93
|
detectionProvider: zod_1.z.string().nonempty(),
|
|
50
94
|
})
|
|
51
95
|
.and(exports.sObjectDetectionData);
|
|
@@ -78,6 +122,8 @@ exports.sSceneEnded = zod_1.z
|
|
|
78
122
|
.and(exports.sSceneData);
|
|
79
123
|
exports.cameraEventSchemasByKind = {
|
|
80
124
|
'ptz-preset-saved': exports.sCameraPtzPresetSaved,
|
|
125
|
+
'privacy-mode-set': exports.sPrivacyModeSet,
|
|
126
|
+
'privacy-mode-unset': exports.sPrivacyModeUnset,
|
|
81
127
|
'object-detection-started': exports.sObjectDetectionStarted,
|
|
82
128
|
'object-detection-updated': exports.sObjectDetectionUpdated,
|
|
83
129
|
'object-detection-ended': exports.sObjectDetectionEnded,
|
package/dist/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.155",
|
|
8
8
|
"description": "Common types between backend, agent(s) and frontend(s)",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.155",
|
|
8
8
|
"description": "Common types between backend, agent(s) and frontend(s)",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|