@awarevue/api-types 1.0.100 → 1.0.102
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/device/alarm.d.ts +1 -0
- package/dist/device-event.d.ts +15 -3
- package/dist/device-event.js +5 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/device/alarm.d.ts
CHANGED
package/dist/device-event.d.ts
CHANGED
|
@@ -16,9 +16,14 @@ export interface DeviceCommandTriggered {
|
|
|
16
16
|
command: string;
|
|
17
17
|
args: object;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
kind:
|
|
21
|
-
}
|
|
19
|
+
export declare const sMotionDetected: z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"motion-detected">;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
kind: "motion-detected";
|
|
23
|
+
}, {
|
|
24
|
+
kind: "motion-detected";
|
|
25
|
+
}>;
|
|
26
|
+
export type MotionDetectedEvent = z.infer<typeof sMotionDetected>;
|
|
22
27
|
export interface DeviceConnectedEvent {
|
|
23
28
|
kind: 'device-connected';
|
|
24
29
|
clientId?: number;
|
|
@@ -48,6 +53,13 @@ type EventHeader = z.infer<typeof sEventHeader>;
|
|
|
48
53
|
export type DeviceEvent<TEvent extends AnyDeviceEvent = AnyDeviceEvent> = EventHeader & TEvent;
|
|
49
54
|
export declare const eventKindLabels: Record<DeviceEvent['kind'], string>;
|
|
50
55
|
export declare const eventSchemaByKind: {
|
|
56
|
+
'motion-detected': z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"motion-detected">;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
kind: "motion-detected";
|
|
60
|
+
}, {
|
|
61
|
+
kind: "motion-detected";
|
|
62
|
+
}>;
|
|
51
63
|
'reader-auth': z.ZodObject<{
|
|
52
64
|
kind: z.ZodLiteral<"reader-auth">;
|
|
53
65
|
token: z.ZodNullable<z.ZodString>;
|
package/dist/device-event.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDeviceEvent = exports.eventsByDeviceType = exports.eventSchemaByKind = exports.eventKindLabels = exports.sEventHeader = void 0;
|
|
3
|
+
exports.isDeviceEvent = exports.eventsByDeviceType = exports.eventSchemaByKind = exports.eventKindLabels = exports.sEventHeader = exports.sMotionDetected = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const alarm_1 = require("./device/alarm");
|
|
6
6
|
const camera_1 = require("./device/camera");
|
|
@@ -10,6 +10,9 @@ const io_board_1 = require("./device/io-board");
|
|
|
10
10
|
const panic_button_1 = require("./device/panic-button");
|
|
11
11
|
const presence_tracker_1 = require("./device/presence-tracker");
|
|
12
12
|
const index_1 = require("./device/reader/index");
|
|
13
|
+
exports.sMotionDetected = zod_1.z.object({
|
|
14
|
+
kind: zod_1.z.literal('motion-detected'),
|
|
15
|
+
});
|
|
13
16
|
exports.sEventHeader = zod_1.z.object({
|
|
14
17
|
id: zod_1.z.string().nonempty(),
|
|
15
18
|
timestamp: zod_1.z.number().int().positive(),
|
|
@@ -69,6 +72,7 @@ exports.eventSchemaByKind = {
|
|
|
69
72
|
...panic_button_1.panicButtonEventSchemaByKind,
|
|
70
73
|
...presence_tracker_1.presenceTrackerEventSchemaByKind,
|
|
71
74
|
...index_1.readerEventSchemaByKind,
|
|
75
|
+
'motion-detected': exports.sMotionDetected,
|
|
72
76
|
};
|
|
73
77
|
exports.eventsByDeviceType = {
|
|
74
78
|
camera: [
|
package/dist/package.json
CHANGED