@awarevue/api-types 2.0.30 → 2.0.32
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/commands/alarm.d.ts +40 -40
- package/dist/api/commands/alarm.js +4 -4
- package/dist/api/commands/all.d.ts +20 -20
- package/dist/api/commands/io-board.js +2 -1
- package/dist/api/events/io-board.js +2 -1
- package/dist/package.json +1 -1
- package/dist/primitives.d.ts +11 -0
- package/dist/primitives.js +10 -1
- package/package.json +1 -1
|
@@ -2,20 +2,20 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const sArmCommand: z.ZodObject<{
|
|
3
3
|
command: z.ZodLiteral<"alarm.arm">;
|
|
4
4
|
params: z.ZodObject<{
|
|
5
|
-
|
|
5
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
|
|
7
|
+
deviceIds: string[];
|
|
8
8
|
}, {
|
|
9
|
-
|
|
9
|
+
deviceIds: string[];
|
|
10
10
|
}>;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
12
|
params: {
|
|
13
|
-
|
|
13
|
+
deviceIds: string[];
|
|
14
14
|
};
|
|
15
15
|
command: "alarm.arm";
|
|
16
16
|
}, {
|
|
17
17
|
params: {
|
|
18
|
-
|
|
18
|
+
deviceIds: string[];
|
|
19
19
|
};
|
|
20
20
|
command: "alarm.arm";
|
|
21
21
|
}>;
|
|
@@ -23,24 +23,24 @@ export type ArmCommand = z.infer<typeof sArmCommand>;
|
|
|
23
23
|
export declare const sDisarmCommand: z.ZodObject<{
|
|
24
24
|
command: z.ZodLiteral<"alarm.disarm">;
|
|
25
25
|
params: z.ZodObject<{
|
|
26
|
-
|
|
26
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
27
27
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
|
|
29
|
+
deviceIds: string[];
|
|
30
30
|
duration?: number | undefined;
|
|
31
31
|
}, {
|
|
32
|
-
|
|
32
|
+
deviceIds: string[];
|
|
33
33
|
duration?: number | undefined;
|
|
34
34
|
}>;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
params: {
|
|
37
|
-
|
|
37
|
+
deviceIds: string[];
|
|
38
38
|
duration?: number | undefined;
|
|
39
39
|
};
|
|
40
40
|
command: "alarm.disarm";
|
|
41
41
|
}, {
|
|
42
42
|
params: {
|
|
43
|
-
|
|
43
|
+
deviceIds: string[];
|
|
44
44
|
duration?: number | undefined;
|
|
45
45
|
};
|
|
46
46
|
command: "alarm.disarm";
|
|
@@ -49,20 +49,20 @@ export type DisarmCommand = z.infer<typeof sDisarmCommand>;
|
|
|
49
49
|
export declare const sBypassCommand: z.ZodObject<{
|
|
50
50
|
command: z.ZodLiteral<"alarm.bypass">;
|
|
51
51
|
params: z.ZodObject<{
|
|
52
|
-
|
|
52
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
|
|
54
|
+
deviceIds: string[];
|
|
55
55
|
}, {
|
|
56
|
-
|
|
56
|
+
deviceIds: string[];
|
|
57
57
|
}>;
|
|
58
58
|
}, "strip", z.ZodTypeAny, {
|
|
59
59
|
params: {
|
|
60
|
-
|
|
60
|
+
deviceIds: string[];
|
|
61
61
|
};
|
|
62
62
|
command: "alarm.bypass";
|
|
63
63
|
}, {
|
|
64
64
|
params: {
|
|
65
|
-
|
|
65
|
+
deviceIds: string[];
|
|
66
66
|
};
|
|
67
67
|
command: "alarm.bypass";
|
|
68
68
|
}>;
|
|
@@ -70,20 +70,20 @@ export type BypassCommand = z.infer<typeof sBypassCommand>;
|
|
|
70
70
|
export declare const sUnbypassCommand: z.ZodObject<{
|
|
71
71
|
command: z.ZodLiteral<"alarm.unbypass">;
|
|
72
72
|
params: z.ZodObject<{
|
|
73
|
-
|
|
73
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
|
|
75
|
+
deviceIds: string[];
|
|
76
76
|
}, {
|
|
77
|
-
|
|
77
|
+
deviceIds: string[];
|
|
78
78
|
}>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
80
|
params: {
|
|
81
|
-
|
|
81
|
+
deviceIds: string[];
|
|
82
82
|
};
|
|
83
83
|
command: "alarm.unbypass";
|
|
84
84
|
}, {
|
|
85
85
|
params: {
|
|
86
|
-
|
|
86
|
+
deviceIds: string[];
|
|
87
87
|
};
|
|
88
88
|
command: "alarm.unbypass";
|
|
89
89
|
}>;
|
|
@@ -162,44 +162,44 @@ export declare const alarmCommandSchemas: {
|
|
|
162
162
|
readonly 'alarm.arm': z.ZodObject<{
|
|
163
163
|
command: z.ZodLiteral<"alarm.arm">;
|
|
164
164
|
params: z.ZodObject<{
|
|
165
|
-
|
|
165
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
166
166
|
}, "strip", z.ZodTypeAny, {
|
|
167
|
-
|
|
167
|
+
deviceIds: string[];
|
|
168
168
|
}, {
|
|
169
|
-
|
|
169
|
+
deviceIds: string[];
|
|
170
170
|
}>;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
172
|
params: {
|
|
173
|
-
|
|
173
|
+
deviceIds: string[];
|
|
174
174
|
};
|
|
175
175
|
command: "alarm.arm";
|
|
176
176
|
}, {
|
|
177
177
|
params: {
|
|
178
|
-
|
|
178
|
+
deviceIds: string[];
|
|
179
179
|
};
|
|
180
180
|
command: "alarm.arm";
|
|
181
181
|
}>;
|
|
182
182
|
readonly 'alarm.disarm': z.ZodObject<{
|
|
183
183
|
command: z.ZodLiteral<"alarm.disarm">;
|
|
184
184
|
params: z.ZodObject<{
|
|
185
|
-
|
|
185
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
186
186
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
|
|
188
|
+
deviceIds: string[];
|
|
189
189
|
duration?: number | undefined;
|
|
190
190
|
}, {
|
|
191
|
-
|
|
191
|
+
deviceIds: string[];
|
|
192
192
|
duration?: number | undefined;
|
|
193
193
|
}>;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
195
|
params: {
|
|
196
|
-
|
|
196
|
+
deviceIds: string[];
|
|
197
197
|
duration?: number | undefined;
|
|
198
198
|
};
|
|
199
199
|
command: "alarm.disarm";
|
|
200
200
|
}, {
|
|
201
201
|
params: {
|
|
202
|
-
|
|
202
|
+
deviceIds: string[];
|
|
203
203
|
duration?: number | undefined;
|
|
204
204
|
};
|
|
205
205
|
command: "alarm.disarm";
|
|
@@ -272,40 +272,40 @@ export declare const alarmCommandSchemas: {
|
|
|
272
272
|
readonly 'alarm.bypass': z.ZodObject<{
|
|
273
273
|
command: z.ZodLiteral<"alarm.bypass">;
|
|
274
274
|
params: z.ZodObject<{
|
|
275
|
-
|
|
275
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
276
276
|
}, "strip", z.ZodTypeAny, {
|
|
277
|
-
|
|
277
|
+
deviceIds: string[];
|
|
278
278
|
}, {
|
|
279
|
-
|
|
279
|
+
deviceIds: string[];
|
|
280
280
|
}>;
|
|
281
281
|
}, "strip", z.ZodTypeAny, {
|
|
282
282
|
params: {
|
|
283
|
-
|
|
283
|
+
deviceIds: string[];
|
|
284
284
|
};
|
|
285
285
|
command: "alarm.bypass";
|
|
286
286
|
}, {
|
|
287
287
|
params: {
|
|
288
|
-
|
|
288
|
+
deviceIds: string[];
|
|
289
289
|
};
|
|
290
290
|
command: "alarm.bypass";
|
|
291
291
|
}>;
|
|
292
292
|
readonly 'alarm.unbypass': z.ZodObject<{
|
|
293
293
|
command: z.ZodLiteral<"alarm.unbypass">;
|
|
294
294
|
params: z.ZodObject<{
|
|
295
|
-
|
|
295
|
+
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
296
296
|
}, "strip", z.ZodTypeAny, {
|
|
297
|
-
|
|
297
|
+
deviceIds: string[];
|
|
298
298
|
}, {
|
|
299
|
-
|
|
299
|
+
deviceIds: string[];
|
|
300
300
|
}>;
|
|
301
301
|
}, "strip", z.ZodTypeAny, {
|
|
302
302
|
params: {
|
|
303
|
-
|
|
303
|
+
deviceIds: string[];
|
|
304
304
|
};
|
|
305
305
|
command: "alarm.unbypass";
|
|
306
306
|
}, {
|
|
307
307
|
params: {
|
|
308
|
-
|
|
308
|
+
deviceIds: string[];
|
|
309
309
|
};
|
|
310
310
|
command: "alarm.unbypass";
|
|
311
311
|
}>;
|
|
@@ -7,26 +7,26 @@ const zod_1 = require("zod");
|
|
|
7
7
|
exports.sArmCommand = zod_1.z.object({
|
|
8
8
|
command: zod_1.z.literal('alarm.arm'),
|
|
9
9
|
params: zod_1.z.object({
|
|
10
|
-
|
|
10
|
+
deviceIds: zod_1.z.array(primitives_1.sDeviceId),
|
|
11
11
|
}),
|
|
12
12
|
});
|
|
13
13
|
exports.sDisarmCommand = zod_1.z.object({
|
|
14
14
|
command: zod_1.z.literal('alarm.disarm'),
|
|
15
15
|
params: zod_1.z.object({
|
|
16
|
-
|
|
16
|
+
deviceIds: zod_1.z.array(primitives_1.sDeviceId),
|
|
17
17
|
duration: primitives_1.sDuration.optional().describe('Duration in milliseconds'),
|
|
18
18
|
}),
|
|
19
19
|
});
|
|
20
20
|
exports.sBypassCommand = zod_1.z.object({
|
|
21
21
|
command: zod_1.z.literal('alarm.bypass'),
|
|
22
22
|
params: zod_1.z.object({
|
|
23
|
-
|
|
23
|
+
deviceIds: zod_1.z.array(primitives_1.sDeviceId),
|
|
24
24
|
}),
|
|
25
25
|
});
|
|
26
26
|
exports.sUnbypassCommand = zod_1.z.object({
|
|
27
27
|
command: zod_1.z.literal('alarm.unbypass'),
|
|
28
28
|
params: zod_1.z.object({
|
|
29
|
-
|
|
29
|
+
deviceIds: zod_1.z.array(primitives_1.sDeviceId),
|
|
30
30
|
}),
|
|
31
31
|
});
|
|
32
32
|
exports.sArmAllCommand = zod_1.z.object({
|
|
@@ -2063,44 +2063,44 @@ export declare const commandSchemas: {
|
|
|
2063
2063
|
readonly 'alarm.arm': import("zod").ZodObject<{
|
|
2064
2064
|
command: import("zod").ZodLiteral<"alarm.arm">;
|
|
2065
2065
|
params: import("zod").ZodObject<{
|
|
2066
|
-
|
|
2066
|
+
deviceIds: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
2067
2067
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2068
|
-
|
|
2068
|
+
deviceIds: string[];
|
|
2069
2069
|
}, {
|
|
2070
|
-
|
|
2070
|
+
deviceIds: string[];
|
|
2071
2071
|
}>;
|
|
2072
2072
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2073
2073
|
params: {
|
|
2074
|
-
|
|
2074
|
+
deviceIds: string[];
|
|
2075
2075
|
};
|
|
2076
2076
|
command: "alarm.arm";
|
|
2077
2077
|
}, {
|
|
2078
2078
|
params: {
|
|
2079
|
-
|
|
2079
|
+
deviceIds: string[];
|
|
2080
2080
|
};
|
|
2081
2081
|
command: "alarm.arm";
|
|
2082
2082
|
}>;
|
|
2083
2083
|
readonly 'alarm.disarm': import("zod").ZodObject<{
|
|
2084
2084
|
command: import("zod").ZodLiteral<"alarm.disarm">;
|
|
2085
2085
|
params: import("zod").ZodObject<{
|
|
2086
|
-
|
|
2086
|
+
deviceIds: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
2087
2087
|
duration: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2088
2088
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2089
|
-
|
|
2089
|
+
deviceIds: string[];
|
|
2090
2090
|
duration?: number | undefined;
|
|
2091
2091
|
}, {
|
|
2092
|
-
|
|
2092
|
+
deviceIds: string[];
|
|
2093
2093
|
duration?: number | undefined;
|
|
2094
2094
|
}>;
|
|
2095
2095
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2096
2096
|
params: {
|
|
2097
|
-
|
|
2097
|
+
deviceIds: string[];
|
|
2098
2098
|
duration?: number | undefined;
|
|
2099
2099
|
};
|
|
2100
2100
|
command: "alarm.disarm";
|
|
2101
2101
|
}, {
|
|
2102
2102
|
params: {
|
|
2103
|
-
|
|
2103
|
+
deviceIds: string[];
|
|
2104
2104
|
duration?: number | undefined;
|
|
2105
2105
|
};
|
|
2106
2106
|
command: "alarm.disarm";
|
|
@@ -2173,40 +2173,40 @@ export declare const commandSchemas: {
|
|
|
2173
2173
|
readonly 'alarm.bypass': import("zod").ZodObject<{
|
|
2174
2174
|
command: import("zod").ZodLiteral<"alarm.bypass">;
|
|
2175
2175
|
params: import("zod").ZodObject<{
|
|
2176
|
-
|
|
2176
|
+
deviceIds: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
2177
2177
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2178
|
-
|
|
2178
|
+
deviceIds: string[];
|
|
2179
2179
|
}, {
|
|
2180
|
-
|
|
2180
|
+
deviceIds: string[];
|
|
2181
2181
|
}>;
|
|
2182
2182
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2183
2183
|
params: {
|
|
2184
|
-
|
|
2184
|
+
deviceIds: string[];
|
|
2185
2185
|
};
|
|
2186
2186
|
command: "alarm.bypass";
|
|
2187
2187
|
}, {
|
|
2188
2188
|
params: {
|
|
2189
|
-
|
|
2189
|
+
deviceIds: string[];
|
|
2190
2190
|
};
|
|
2191
2191
|
command: "alarm.bypass";
|
|
2192
2192
|
}>;
|
|
2193
2193
|
readonly 'alarm.unbypass': import("zod").ZodObject<{
|
|
2194
2194
|
command: import("zod").ZodLiteral<"alarm.unbypass">;
|
|
2195
2195
|
params: import("zod").ZodObject<{
|
|
2196
|
-
|
|
2196
|
+
deviceIds: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
2197
2197
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2198
|
-
|
|
2198
|
+
deviceIds: string[];
|
|
2199
2199
|
}, {
|
|
2200
|
-
|
|
2200
|
+
deviceIds: string[];
|
|
2201
2201
|
}>;
|
|
2202
2202
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2203
2203
|
params: {
|
|
2204
|
-
|
|
2204
|
+
deviceIds: string[];
|
|
2205
2205
|
};
|
|
2206
2206
|
command: "alarm.unbypass";
|
|
2207
2207
|
}, {
|
|
2208
2208
|
params: {
|
|
2209
|
-
|
|
2209
|
+
deviceIds: string[];
|
|
2210
2210
|
};
|
|
2211
2211
|
command: "alarm.unbypass";
|
|
2212
2212
|
}>;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ioBoardCommands = exports.sIoBoardSetOutputCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../../primitives");
|
|
5
6
|
// COMMANDS
|
|
6
7
|
exports.sIoBoardSetOutputCommand = zod_1.z.object({
|
|
7
8
|
command: zod_1.z.literal('io-board.set-output'),
|
|
8
9
|
params: zod_1.z.object({
|
|
9
|
-
output:
|
|
10
|
+
output: primitives_1.sIoOutputSlotId,
|
|
10
11
|
value: zod_1.z.boolean(),
|
|
11
12
|
}),
|
|
12
13
|
});
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ioBoardEventSchemaByKind = exports.sIoBoardInputChangedEvent = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../../primitives");
|
|
5
6
|
// EVENTS
|
|
6
7
|
exports.sIoBoardInputChangedEvent = zod_1.z.object({
|
|
7
8
|
kind: zod_1.z.literal('io-board-input-changed'),
|
|
8
|
-
inputName:
|
|
9
|
+
inputName: primitives_1.sIoInputSlotId,
|
|
9
10
|
value: zod_1.z.boolean(),
|
|
10
11
|
});
|
|
11
12
|
exports.ioBoardEventSchemaByKind = {
|
package/dist/package.json
CHANGED
package/dist/primitives.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P R I M I T I V E S
|
|
3
|
+
* These are the basic building blocks used throughout the API type definitions.
|
|
4
|
+
* Funactionally, product components compare schema attribute types to these primitives - by reference equality - to provide custom handling
|
|
5
|
+
* for common data types. We're not talking about int, string and that, we're talking about
|
|
6
|
+
* domain-specific types like DeviceId, PresetId, Duration, URL, etc.
|
|
7
|
+
*/
|
|
1
8
|
import { z } from 'zod';
|
|
2
9
|
export declare const sDeviceId: z.ZodString;
|
|
3
10
|
export declare const sPresetId: z.ZodString;
|
|
@@ -6,6 +13,10 @@ export declare const sPersonId: z.ZodString;
|
|
|
6
13
|
export declare const sZoneId: z.ZodString;
|
|
7
14
|
export declare const sMacroId: z.ZodString;
|
|
8
15
|
export declare const sWorldObjectId: z.ZodString;
|
|
16
|
+
export declare const sIoInputSlotId: z.ZodString;
|
|
17
|
+
export type IoInputSlotId = z.infer<typeof sIoInputSlotId>;
|
|
18
|
+
export declare const sIoOutputSlotId: z.ZodString;
|
|
19
|
+
export type IoOutputSlotId = z.infer<typeof sIoOutputSlotId>;
|
|
9
20
|
export declare const sDuration: z.ZodNumber;
|
|
10
21
|
export declare const sUrl: z.ZodString;
|
|
11
22
|
export declare const sFileResponse: z.ZodNullable<z.ZodObject<{
|
package/dist/primitives.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* P R I M I T I V E S
|
|
4
|
+
* These are the basic building blocks used throughout the API type definitions.
|
|
5
|
+
* Funactionally, product components compare schema attribute types to these primitives - by reference equality - to provide custom handling
|
|
6
|
+
* for common data types. We're not talking about int, string and that, we're talking about
|
|
7
|
+
* domain-specific types like DeviceId, PresetId, Duration, URL, etc.
|
|
8
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sWorldObjectId = exports.sMacroId = exports.sZoneId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
10
|
+
exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sIoOutputSlotId = exports.sIoInputSlotId = exports.sWorldObjectId = exports.sMacroId = exports.sZoneId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
4
11
|
const zod_1 = require("zod");
|
|
5
12
|
const device_1 = require("./objects/device");
|
|
6
13
|
exports.sDeviceId = zod_1.z.string().uuid().nonempty();
|
|
@@ -10,6 +17,8 @@ exports.sPersonId = zod_1.z.string().uuid().nonempty();
|
|
|
10
17
|
exports.sZoneId = zod_1.z.string().uuid().nonempty();
|
|
11
18
|
exports.sMacroId = zod_1.z.string().uuid().nonempty();
|
|
12
19
|
exports.sWorldObjectId = zod_1.z.string().nonempty();
|
|
20
|
+
exports.sIoInputSlotId = zod_1.z.string().nonempty();
|
|
21
|
+
exports.sIoOutputSlotId = zod_1.z.string().nonempty();
|
|
13
22
|
// general
|
|
14
23
|
exports.sDuration = zod_1.z.number().min(0).describe('Duration in milliseconds');
|
|
15
24
|
exports.sUrl = zod_1.z.string().url().describe('A valid URL');
|