@awarevue/api-types 1.0.85 → 1.0.86
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.
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./protocol"), exports);
|
|
18
18
|
__exportStar(require("./queries"), exports);
|
|
19
|
+
__exportStar(require("./mqtt-payloads"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sMqttInboundStateUpdate: z.ZodObject<{
|
|
3
|
+
timestamp: z.ZodNumber;
|
|
4
|
+
mergeProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
5
|
+
removeProps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
timestamp: number;
|
|
8
|
+
mergeProps: Record<string, unknown>;
|
|
9
|
+
removeProps?: string[] | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
timestamp: number;
|
|
12
|
+
mergeProps: Record<string, unknown>;
|
|
13
|
+
removeProps?: string[] | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const sMqttInboundEvent: z.ZodObject<{
|
|
16
|
+
eventTimestamp: z.ZodNumber;
|
|
17
|
+
eventForeignRef: z.ZodString;
|
|
18
|
+
event: z.ZodUnknown;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
eventTimestamp: number;
|
|
21
|
+
eventForeignRef: string;
|
|
22
|
+
event?: unknown;
|
|
23
|
+
}, {
|
|
24
|
+
eventTimestamp: number;
|
|
25
|
+
eventForeignRef: string;
|
|
26
|
+
event?: unknown;
|
|
27
|
+
}>;
|
|
28
|
+
export type MqttInboundStateUpdate = z.infer<typeof sMqttInboundStateUpdate>;
|
|
29
|
+
export type MqttInboundEvent = z.infer<typeof sMqttInboundEvent>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sMqttInboundEvent = exports.sMqttInboundStateUpdate = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
// MQTT Payloads for agent communication
|
|
6
|
+
exports.sMqttInboundStateUpdate = zod_1.z.object({
|
|
7
|
+
timestamp: zod_1.z.number(),
|
|
8
|
+
mergeProps: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
9
|
+
removeProps: zod_1.z.array(zod_1.z.string().nonempty()).optional(),
|
|
10
|
+
});
|
|
11
|
+
exports.sMqttInboundEvent = zod_1.z.object({
|
|
12
|
+
eventTimestamp: zod_1.z
|
|
13
|
+
.number()
|
|
14
|
+
.describe('Event timestamp in milliseconds since epoch, as reported by origin'),
|
|
15
|
+
eventForeignRef: zod_1.z.string().nonempty(),
|
|
16
|
+
event: zod_1.z.unknown().describe('Event data'),
|
|
17
|
+
});
|
package/dist/package.json
CHANGED