@awarevue/api-types 2.0.119 → 2.0.121
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.
|
@@ -519,16 +519,26 @@ export declare const sPushFile: z.ZodObject<{
|
|
|
519
519
|
url: z.ZodString;
|
|
520
520
|
}, z.core.$strip>;
|
|
521
521
|
export declare const sPushTrackableUpdate: z.ZodObject<{
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
522
|
+
updates: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
523
|
+
timestamp: z.ZodNumber;
|
|
524
|
+
objectId: z.ZodString;
|
|
525
|
+
objectName: z.ZodString;
|
|
526
|
+
objectKind: z.ZodNullable<z.ZodString>;
|
|
527
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
528
|
+
longitude: z.ZodNumber;
|
|
529
|
+
latitude: z.ZodNumber;
|
|
530
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
531
|
+
speed: z.ZodOptional<z.ZodObject<{
|
|
532
|
+
value: z.ZodNumber;
|
|
533
|
+
unit: z.ZodEnum<{
|
|
534
|
+
"m/s": "m/s";
|
|
535
|
+
"km/h": "km/h";
|
|
536
|
+
mph: "mph";
|
|
537
|
+
knots: "knots";
|
|
538
|
+
}>;
|
|
539
|
+
}, z.core.$strip>>;
|
|
540
|
+
heading: z.ZodOptional<z.ZodNumber>;
|
|
541
|
+
}, z.core.$strip>>;
|
|
532
542
|
kind: z.ZodLiteral<"trackable-update">;
|
|
533
543
|
provider: z.ZodString;
|
|
534
544
|
foreignRef: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { WebSocketMessage } from './web-socket';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const sTrackableUpdate: z.ZodObject<{
|
|
4
4
|
timestamp: z.ZodNumber;
|
|
5
5
|
objectId: z.ZodString;
|
|
6
6
|
objectName: z.ZodString;
|
|
@@ -9,9 +9,40 @@ export declare const sTrackableUpdatePayload: z.ZodObject<{
|
|
|
9
9
|
longitude: z.ZodNumber;
|
|
10
10
|
latitude: z.ZodNumber;
|
|
11
11
|
altitude: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
speed: z.ZodOptional<z.
|
|
12
|
+
speed: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
value: z.ZodNumber;
|
|
14
|
+
unit: z.ZodEnum<{
|
|
15
|
+
"m/s": "m/s";
|
|
16
|
+
"km/h": "km/h";
|
|
17
|
+
mph: "mph";
|
|
18
|
+
knots: "knots";
|
|
19
|
+
}>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
13
21
|
heading: z.ZodOptional<z.ZodNumber>;
|
|
14
22
|
}, z.core.$strip>;
|
|
23
|
+
export type TrackableUpdate = z.infer<typeof sTrackableUpdate>;
|
|
24
|
+
export declare const sTrackableUpdatePayload: z.ZodObject<{
|
|
25
|
+
updates: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
+
timestamp: z.ZodNumber;
|
|
27
|
+
objectId: z.ZodString;
|
|
28
|
+
objectName: z.ZodString;
|
|
29
|
+
objectKind: z.ZodNullable<z.ZodString>;
|
|
30
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
31
|
+
longitude: z.ZodNumber;
|
|
32
|
+
latitude: z.ZodNumber;
|
|
33
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
speed: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
value: z.ZodNumber;
|
|
36
|
+
unit: z.ZodEnum<{
|
|
37
|
+
"m/s": "m/s";
|
|
38
|
+
"km/h": "km/h";
|
|
39
|
+
mph: "mph";
|
|
40
|
+
knots: "knots";
|
|
41
|
+
}>;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
heading: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
15
46
|
export type TrackableUpdatePayload = z.infer<typeof sTrackableUpdatePayload>;
|
|
16
47
|
interface TrackableMessageMap {
|
|
17
48
|
update: TrackableUpdatePayload;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTrackableMessage = exports.sTrackableUpdatePayload = void 0;
|
|
3
|
+
exports.isTrackableMessage = exports.sTrackableUpdatePayload = exports.sTrackableUpdate = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const primitives_1 = require("../../primitives");
|
|
6
|
-
exports.
|
|
6
|
+
exports.sTrackableUpdate = zod_1.z.object({
|
|
7
7
|
timestamp: zod_1.z.number(),
|
|
8
8
|
objectId: zod_1.z.string().nonempty(),
|
|
9
9
|
objectName: zod_1.z.string().nonempty(),
|
|
@@ -12,9 +12,12 @@ exports.sTrackableUpdatePayload = zod_1.z.object({
|
|
|
12
12
|
longitude: zod_1.z.number().min(-180).max(180),
|
|
13
13
|
latitude: zod_1.z.number().min(-90).max(90),
|
|
14
14
|
altitude: zod_1.z.number().optional(),
|
|
15
|
-
speed:
|
|
15
|
+
speed: primitives_1.sSpeed.optional(),
|
|
16
16
|
heading: zod_1.z.number().optional(),
|
|
17
17
|
});
|
|
18
|
+
exports.sTrackableUpdatePayload = zod_1.z.object({
|
|
19
|
+
updates: zod_1.z.record(zod_1.z.string(), exports.sTrackableUpdate),
|
|
20
|
+
});
|
|
18
21
|
const validators = {
|
|
19
22
|
update: exports.sTrackableUpdatePayload,
|
|
20
23
|
};
|
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.121",
|
|
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/dist/primitives.d.ts
CHANGED
|
@@ -290,3 +290,13 @@ export declare const sCallDirection: z.ZodEnum<{
|
|
|
290
290
|
incoming: "incoming";
|
|
291
291
|
outgoing: "outgoing";
|
|
292
292
|
}>;
|
|
293
|
+
export declare const sSpeed: z.ZodObject<{
|
|
294
|
+
value: z.ZodNumber;
|
|
295
|
+
unit: z.ZodEnum<{
|
|
296
|
+
"m/s": "m/s";
|
|
297
|
+
"km/h": "km/h";
|
|
298
|
+
mph: "mph";
|
|
299
|
+
knots: "knots";
|
|
300
|
+
}>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
export type Speed = z.infer<typeof sSpeed>;
|
package/dist/primitives.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* domain-specific types like DeviceId, PresetId, Duration, URL, etc.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sStreamId = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sIoOutputSlotId = exports.sIoInputSlotId = exports.sWorldObjectId = exports.sUserId = exports.sMacroId = exports.sZoneId = exports.sPersonTypeId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
10
|
+
exports.sSpeed = exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sStreamId = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sIoOutputSlotId = exports.sIoInputSlotId = exports.sWorldObjectId = exports.sUserId = exports.sMacroId = exports.sZoneId = exports.sPersonTypeId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
11
11
|
const zod_1 = require("zod");
|
|
12
12
|
const device_1 = require("./objects/device");
|
|
13
13
|
exports.sDeviceId = zod_1.z.string().nonempty();
|
|
@@ -53,3 +53,7 @@ exports.sCallState = zod_1.z.enum([
|
|
|
53
53
|
'terminated',
|
|
54
54
|
]);
|
|
55
55
|
exports.sCallDirection = zod_1.z.enum(['incoming', 'outgoing']);
|
|
56
|
+
exports.sSpeed = zod_1.z.object({
|
|
57
|
+
value: zod_1.z.number().min(0),
|
|
58
|
+
unit: zod_1.z.enum(['m/s', 'km/h', 'mph', 'knots']),
|
|
59
|
+
});
|
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.121",
|
|
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",
|