@awarevue/api-types 2.0.11 → 2.0.12
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.
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const sMqttInboundCommand: z.ZodObject<{
|
|
3
|
+
command: z.ZodString;
|
|
4
|
+
params: z.ZodUnknown;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
command: string;
|
|
7
|
+
params?: unknown;
|
|
8
|
+
}, {
|
|
9
|
+
command: string;
|
|
10
|
+
params?: unknown;
|
|
11
|
+
}>;
|
|
2
12
|
export declare const sMqttInboundStateUpdate: z.ZodObject<{
|
|
3
13
|
timestamp: z.ZodNumber;
|
|
4
14
|
mergeProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -25,5 +35,6 @@ export declare const sMqttInboundEvent: z.ZodObject<{
|
|
|
25
35
|
eventForeignRef: string;
|
|
26
36
|
event?: unknown;
|
|
27
37
|
}>;
|
|
38
|
+
export type MqttInboundCommand = z.infer<typeof sMqttInboundCommand>;
|
|
28
39
|
export type MqttInboundStateUpdate = z.infer<typeof sMqttInboundStateUpdate>;
|
|
29
40
|
export type MqttInboundEvent = z.infer<typeof sMqttInboundEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sMqttInboundEvent = exports.sMqttInboundStateUpdate = void 0;
|
|
3
|
+
exports.sMqttInboundEvent = exports.sMqttInboundStateUpdate = exports.sMqttInboundCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
// MQTT Payloads for agent communication
|
|
6
|
+
exports.sMqttInboundCommand = zod_1.z.object({
|
|
7
|
+
command: zod_1.z.string().nonempty(),
|
|
8
|
+
params: zod_1.z.unknown().describe('Command data'),
|
|
9
|
+
});
|
|
6
10
|
exports.sMqttInboundStateUpdate = zod_1.z.object({
|
|
7
11
|
timestamp: zod_1.z.number(),
|
|
8
12
|
mergeProps: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
package/dist/package.json
CHANGED