@awarevue/api-types 1.0.1
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/access-control/access-rule.d.ts +243 -0
- package/dist/access-control/access-rule.js +49 -0
- package/dist/access-control/credential.d.ts +14 -0
- package/dist/access-control/credential.js +12 -0
- package/dist/access-control/index.d.ts +7 -0
- package/dist/access-control/index.js +23 -0
- package/dist/access-control/person-presence.d.ts +249 -0
- package/dist/access-control/person-presence.js +61 -0
- package/dist/access-control/person.d.ts +209 -0
- package/dist/access-control/person.js +49 -0
- package/dist/access-control/schedule.d.ts +500 -0
- package/dist/access-control/schedule.js +65 -0
- package/dist/access-control/sync.d.ts +3 -0
- package/dist/access-control/sync.js +2 -0
- package/dist/access-control/zone.d.ts +65 -0
- package/dist/access-control/zone.js +28 -0
- package/dist/agent-communication/index.d.ts +1 -0
- package/dist/agent-communication/index.js +17 -0
- package/dist/agent-communication/protocol.d.ts +1692 -0
- package/dist/agent-communication/protocol.js +341 -0
- package/dist/api/alarm.d.ts +23 -0
- package/dist/api/alarm.js +2 -0
- package/dist/api/auth.d.ts +31 -0
- package/dist/api/auth.js +19 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +20 -0
- package/dist/api/media.d.ts +187 -0
- package/dist/api/media.js +59 -0
- package/dist/api/query.d.ts +33 -0
- package/dist/api/query.js +41 -0
- package/dist/app.d.ts +12 -0
- package/dist/app.js +8 -0
- package/dist/automation.d.ts +334 -0
- package/dist/automation.js +49 -0
- package/dist/aware-config.d.ts +3 -0
- package/dist/aware-config.js +2 -0
- package/dist/custom-field.d.ts +52 -0
- package/dist/custom-field.js +19 -0
- package/dist/device/alarm.d.ts +265 -0
- package/dist/device/alarm.js +66 -0
- package/dist/device/any-device.d.ts +2376 -0
- package/dist/device/any-device.js +185 -0
- package/dist/device/camera-lift.d.ts +17 -0
- package/dist/device/camera-lift.js +7 -0
- package/dist/device/camera.d.ts +829 -0
- package/dist/device/camera.js +120 -0
- package/dist/device/device-gateway.d.ts +3 -0
- package/dist/device/device-gateway.js +4 -0
- package/dist/device/door.d.ts +217 -0
- package/dist/device/door.js +57 -0
- package/dist/device/index.d.ts +15 -0
- package/dist/device/index.js +31 -0
- package/dist/device/intercom-operator.d.ts +13 -0
- package/dist/device/intercom-operator.js +5 -0
- package/dist/device/intercom-terminal.d.ts +244 -0
- package/dist/device/intercom-terminal.js +48 -0
- package/dist/device/io-board.d.ts +55 -0
- package/dist/device/io-board.js +19 -0
- package/dist/device/motion-sensor.d.ts +8 -0
- package/dist/device/motion-sensor.js +8 -0
- package/dist/device/panic-button.d.ts +26 -0
- package/dist/device/panic-button.js +14 -0
- package/dist/device/pbx.d.ts +20 -0
- package/dist/device/pbx.js +11 -0
- package/dist/device/presence-tracker.d.ts +127 -0
- package/dist/device/presence-tracker.js +27 -0
- package/dist/device/reader/commands.d.ts +1 -0
- package/dist/device/reader/commands.js +2 -0
- package/dist/device/reader/events.d.ts +37 -0
- package/dist/device/reader/events.js +13 -0
- package/dist/device/reader/index.d.ts +3 -0
- package/dist/device/reader/index.js +19 -0
- package/dist/device/reader/specs.d.ts +2 -0
- package/dist/device/reader/specs.js +4 -0
- package/dist/device/server.d.ts +73 -0
- package/dist/device/server.js +33 -0
- package/dist/device-command.d.ts +23 -0
- package/dist/device-command.js +110 -0
- package/dist/device-event.d.ts +682 -0
- package/dist/device-event.js +87 -0
- package/dist/device-factory.d.ts +112 -0
- package/dist/device-factory.js +25 -0
- package/dist/device-group.d.ts +74 -0
- package/dist/device-group.js +31 -0
- package/dist/device-import.d.ts +1412 -0
- package/dist/device-import.js +33 -0
- package/dist/device-relation.d.ts +30 -0
- package/dist/device-relation.js +68 -0
- package/dist/device-state.d.ts +10 -0
- package/dist/device-state.js +2 -0
- package/dist/error.d.ts +13 -0
- package/dist/error.js +10 -0
- package/dist/file.d.ts +3 -0
- package/dist/file.js +2 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +44 -0
- package/dist/layout.d.ts +188 -0
- package/dist/layout.js +40 -0
- package/dist/macros.d.ts +160 -0
- package/dist/macros.js +26 -0
- package/dist/messages/device-communication.d.ts +121 -0
- package/dist/messages/device-communication.js +63 -0
- package/dist/messages/index.d.ts +5 -0
- package/dist/messages/index.js +21 -0
- package/dist/messages/progress.d.ts +118 -0
- package/dist/messages/progress.js +51 -0
- package/dist/messages/provider-api/index.d.ts +1 -0
- package/dist/messages/provider-api/index.js +17 -0
- package/dist/messages/provider-api/sync-protocol.d.ts +83 -0
- package/dist/messages/provider-api/sync-protocol.js +2 -0
- package/dist/messages/web-rtc-signaling.d.ts +265 -0
- package/dist/messages/web-rtc-signaling.js +82 -0
- package/dist/messages/web-socket.d.ts +7 -0
- package/dist/messages/web-socket.js +5 -0
- package/dist/milestone.d.ts +5 -0
- package/dist/milestone.js +2 -0
- package/dist/module-config.d.ts +27 -0
- package/dist/module-config.js +2 -0
- package/dist/orchid.d.ts +19 -0
- package/dist/orchid.js +2 -0
- package/dist/package.json +40 -0
- package/dist/permissions.d.ts +6 -0
- package/dist/permissions.js +168 -0
- package/dist/template.d.ts +50 -0
- package/dist/template.js +21 -0
- package/dist/user.d.ts +184 -0
- package/dist/user.js +56 -0
- package/dist/view.d.ts +775 -0
- package/dist/view.js +74 -0
- package/dist/webrtc-playback.d.ts +20 -0
- package/dist/webrtc-playback.js +14 -0
- package/package.json +40 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sDeviceGetChangesDto = exports.sDeviceDiscoveryDto = exports.sDuplicateDevice = exports.sImportedDevice = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const device_1 = require("./device");
|
|
6
|
+
const device_relation_1 = require("./device-relation");
|
|
7
|
+
exports.sImportedDevice = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
10
|
+
})
|
|
11
|
+
.and(device_1.sForeignDeviceInfo)
|
|
12
|
+
.and(device_1.sAnyDeviceSpecs);
|
|
13
|
+
exports.sDuplicateDevice = zod_1.z.object({
|
|
14
|
+
name: zod_1.z.string(),
|
|
15
|
+
refs: zod_1.z.array(zod_1.z.string()),
|
|
16
|
+
});
|
|
17
|
+
exports.sDeviceDiscoveryDto = zod_1.z.object({
|
|
18
|
+
devices: zod_1.z.array(exports.sImportedDevice),
|
|
19
|
+
relations: zod_1.z.array(device_relation_1.sDeviceRelationDto.and(zod_1.z.object({ provider: zod_1.z.string() }))),
|
|
20
|
+
});
|
|
21
|
+
exports.sDeviceGetChangesDto = zod_1.z.object({
|
|
22
|
+
added: zod_1.z.array(exports.sImportedDevice),
|
|
23
|
+
updated: zod_1.z.array(zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
id: zod_1.z.string(),
|
|
26
|
+
provider: zod_1.z.string(),
|
|
27
|
+
foreignRef: zod_1.z.string(),
|
|
28
|
+
})
|
|
29
|
+
.catchall(zod_1.z.unknown())),
|
|
30
|
+
removed: zod_1.z.array(device_1.sDeviceDto),
|
|
31
|
+
relations: zod_1.z.array(device_relation_1.sDeviceRelationDto),
|
|
32
|
+
duplicates: zod_1.z.array(exports.sDuplicateDevice),
|
|
33
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sDeviceRelationKind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy"]>;
|
|
3
|
+
export declare const sDeviceRelationDto: z.ZodObject<{
|
|
4
|
+
leftId: z.ZodString;
|
|
5
|
+
rightId: z.ZodString;
|
|
6
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy"]>;
|
|
7
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
8
|
+
leftId: z.ZodString;
|
|
9
|
+
rightId: z.ZodString;
|
|
10
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy"]>;
|
|
11
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
12
|
+
leftId: z.ZodString;
|
|
13
|
+
rightId: z.ZodString;
|
|
14
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy"]>;
|
|
15
|
+
}, z.ZodUnknown, "strip">>;
|
|
16
|
+
export declare const sDeviceRelationSide: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy"]>;
|
|
19
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy"]>;
|
|
22
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy"]>;
|
|
25
|
+
}, z.ZodUnknown, "strip">>;
|
|
26
|
+
export type DeviceRelationKind = z.infer<typeof sDeviceRelationKind>;
|
|
27
|
+
export declare const relationKinds: Record<DeviceRelationKind, DeviceRelationKind>;
|
|
28
|
+
export declare const inverseRelationKinds: Record<DeviceRelationKind, DeviceRelationKind>;
|
|
29
|
+
export type DeviceRelationDto = z.infer<typeof sDeviceRelationDto>;
|
|
30
|
+
export type DeviceRelationSide = z.infer<typeof sDeviceRelationSide>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inverseRelationKinds = exports.relationKinds = exports.sDeviceRelationSide = exports.sDeviceRelationDto = exports.sDeviceRelationKind = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sDeviceRelationKind = zod_1.z.enum([
|
|
6
|
+
'attachedTo',
|
|
7
|
+
'parent',
|
|
8
|
+
'child',
|
|
9
|
+
'holds',
|
|
10
|
+
'isHeldBy',
|
|
11
|
+
'observes',
|
|
12
|
+
'isObservedBy',
|
|
13
|
+
'sendsInputTo',
|
|
14
|
+
'receivesInputFrom',
|
|
15
|
+
'sendsOutputTo',
|
|
16
|
+
'receivesOutputFrom',
|
|
17
|
+
'unlocks',
|
|
18
|
+
'isUnlockedBy',
|
|
19
|
+
'controls',
|
|
20
|
+
'isControlledBy',
|
|
21
|
+
]);
|
|
22
|
+
exports.sDeviceRelationDto = zod_1.z
|
|
23
|
+
.object({
|
|
24
|
+
leftId: zod_1.z.string(),
|
|
25
|
+
rightId: zod_1.z.string(),
|
|
26
|
+
kind: exports.sDeviceRelationKind,
|
|
27
|
+
})
|
|
28
|
+
.catchall(zod_1.z.unknown());
|
|
29
|
+
exports.sDeviceRelationSide = zod_1.z
|
|
30
|
+
.object({
|
|
31
|
+
id: zod_1.z.string(),
|
|
32
|
+
kind: exports.sDeviceRelationKind,
|
|
33
|
+
})
|
|
34
|
+
.catchall(zod_1.z.unknown());
|
|
35
|
+
exports.relationKinds = {
|
|
36
|
+
attachedTo: 'attachedTo',
|
|
37
|
+
parent: 'parent',
|
|
38
|
+
child: 'child',
|
|
39
|
+
holds: 'holds',
|
|
40
|
+
isHeldBy: 'isHeldBy',
|
|
41
|
+
observes: 'observes',
|
|
42
|
+
isObservedBy: 'isObservedBy',
|
|
43
|
+
sendsInputTo: 'sendsInputTo',
|
|
44
|
+
receivesInputFrom: 'receivesInputFrom',
|
|
45
|
+
sendsOutputTo: 'sendsOutputTo',
|
|
46
|
+
receivesOutputFrom: 'receivesOutputFrom',
|
|
47
|
+
unlocks: 'unlocks',
|
|
48
|
+
isUnlockedBy: 'isUnlockedBy',
|
|
49
|
+
controls: 'controls',
|
|
50
|
+
isControlledBy: 'isControlledBy',
|
|
51
|
+
};
|
|
52
|
+
exports.inverseRelationKinds = {
|
|
53
|
+
attachedTo: 'attachedTo',
|
|
54
|
+
parent: 'child',
|
|
55
|
+
child: 'parent',
|
|
56
|
+
holds: 'isHeldBy',
|
|
57
|
+
isHeldBy: 'holds',
|
|
58
|
+
observes: 'isObservedBy',
|
|
59
|
+
isObservedBy: 'observes',
|
|
60
|
+
sendsInputTo: 'receivesInputFrom',
|
|
61
|
+
receivesInputFrom: 'sendsInputTo',
|
|
62
|
+
sendsOutputTo: 'receivesOutputFrom',
|
|
63
|
+
receivesOutputFrom: 'sendsOutputTo',
|
|
64
|
+
unlocks: 'isUnlockedBy',
|
|
65
|
+
isUnlockedBy: 'unlocks',
|
|
66
|
+
controls: 'isControlledBy',
|
|
67
|
+
isControlledBy: 'controls',
|
|
68
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AlarmStateDto } from './device/alarm';
|
|
2
|
+
import { CameraStateDto } from './device/camera';
|
|
3
|
+
import { CameraLiftStateDto } from './device/camera-lift';
|
|
4
|
+
import { DoorStateDto } from './device/door';
|
|
5
|
+
import { IntercomOperatorStateDto } from './device/intercom-operator';
|
|
6
|
+
import { IntercomTerminalStateDto } from './device/intercom-terminal';
|
|
7
|
+
import { IoBoardStateDto } from './device/io-board';
|
|
8
|
+
import { MotionSensorStateDto } from './device/motion-sensor';
|
|
9
|
+
import { PanicButtonStateDto } from './device/panic-button';
|
|
10
|
+
export type DeviceStateDto = CameraStateDto | DoorStateDto | AlarmStateDto | IoBoardStateDto | CameraLiftStateDto | MotionSensorStateDto | PanicButtonStateDto | IntercomTerminalStateDto | IntercomOperatorStateDto;
|
package/dist/error.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sErrorResponse: z.ZodObject<{
|
|
3
|
+
code: z.ZodString;
|
|
4
|
+
message: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
code: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}, {
|
|
9
|
+
code: string;
|
|
10
|
+
message: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type ErrorResponse = z.infer<typeof sErrorResponse>;
|
|
13
|
+
export declare const isErrorResponse: (obj: unknown) => obj is ErrorResponse;
|
package/dist/error.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isErrorResponse = exports.sErrorResponse = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sErrorResponse = zod_1.z.object({
|
|
6
|
+
code: zod_1.z.string(),
|
|
7
|
+
message: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
const isErrorResponse = (obj) => exports.sErrorResponse.safeParse(obj).success;
|
|
10
|
+
exports.isErrorResponse = isErrorResponse;
|
package/dist/file.d.ts
ADDED
package/dist/file.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './messages';
|
|
3
|
+
export * from './error';
|
|
4
|
+
export * from './user';
|
|
5
|
+
export * from './permissions';
|
|
6
|
+
export * from './view';
|
|
7
|
+
export * from './layout';
|
|
8
|
+
export * from './device';
|
|
9
|
+
export * from './device-relation';
|
|
10
|
+
export * from './file';
|
|
11
|
+
export * from './device-state';
|
|
12
|
+
export * from './device-import';
|
|
13
|
+
export * from './milestone';
|
|
14
|
+
export * from './orchid';
|
|
15
|
+
export * from './aware-config';
|
|
16
|
+
export * from './access-control';
|
|
17
|
+
export * from './device-event';
|
|
18
|
+
export * from './device-command';
|
|
19
|
+
export * from './device-factory';
|
|
20
|
+
export * from './module-config';
|
|
21
|
+
export * from './device-group';
|
|
22
|
+
export * from './app';
|
|
23
|
+
export * from './automation';
|
|
24
|
+
export * from './macros';
|
|
25
|
+
export * from './template';
|
|
26
|
+
export * from './webrtc-playback';
|
|
27
|
+
export * from './custom-field';
|
|
28
|
+
export * from './agent-communication';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./api"), exports);
|
|
18
|
+
__exportStar(require("./messages"), exports);
|
|
19
|
+
__exportStar(require("./error"), exports);
|
|
20
|
+
__exportStar(require("./user"), exports);
|
|
21
|
+
__exportStar(require("./permissions"), exports);
|
|
22
|
+
__exportStar(require("./view"), exports);
|
|
23
|
+
__exportStar(require("./layout"), exports);
|
|
24
|
+
__exportStar(require("./device"), exports);
|
|
25
|
+
__exportStar(require("./device-relation"), exports);
|
|
26
|
+
__exportStar(require("./file"), exports);
|
|
27
|
+
__exportStar(require("./device-state"), exports);
|
|
28
|
+
__exportStar(require("./device-import"), exports);
|
|
29
|
+
__exportStar(require("./milestone"), exports);
|
|
30
|
+
__exportStar(require("./orchid"), exports);
|
|
31
|
+
__exportStar(require("./aware-config"), exports);
|
|
32
|
+
__exportStar(require("./access-control"), exports);
|
|
33
|
+
__exportStar(require("./device-event"), exports);
|
|
34
|
+
__exportStar(require("./device-command"), exports);
|
|
35
|
+
__exportStar(require("./device-factory"), exports);
|
|
36
|
+
__exportStar(require("./module-config"), exports);
|
|
37
|
+
__exportStar(require("./device-group"), exports);
|
|
38
|
+
__exportStar(require("./app"), exports);
|
|
39
|
+
__exportStar(require("./automation"), exports);
|
|
40
|
+
__exportStar(require("./macros"), exports);
|
|
41
|
+
__exportStar(require("./template"), exports);
|
|
42
|
+
__exportStar(require("./webrtc-playback"), exports);
|
|
43
|
+
__exportStar(require("./custom-field"), exports);
|
|
44
|
+
__exportStar(require("./agent-communication"), exports);
|
package/dist/layout.d.ts
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export declare const sLayoutDeviceDto: z.ZodObject<{
|
|
3
|
+
deviceId: z.ZodString;
|
|
4
|
+
x: z.ZodNumber;
|
|
5
|
+
y: z.ZodNumber;
|
|
6
|
+
scale: z.ZodNumber;
|
|
7
|
+
rotation: z.ZodNumber;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
scale: number;
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
deviceId: string;
|
|
13
|
+
rotation: number;
|
|
14
|
+
}, {
|
|
15
|
+
scale: number;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
deviceId: string;
|
|
19
|
+
rotation: number;
|
|
20
|
+
}>;
|
|
21
|
+
export type LayoutDeviceDto = z.infer<typeof sLayoutDeviceDto>;
|
|
22
|
+
export declare const sAddLayoutRequest: z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
thumbnailId: z.ZodString;
|
|
25
|
+
imageId: z.ZodString;
|
|
26
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
28
|
+
deviceId: z.ZodString;
|
|
29
|
+
x: z.ZodNumber;
|
|
30
|
+
y: z.ZodNumber;
|
|
31
|
+
scale: z.ZodNumber;
|
|
32
|
+
rotation: z.ZodNumber;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
scale: number;
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
deviceId: string;
|
|
38
|
+
rotation: number;
|
|
39
|
+
}, {
|
|
40
|
+
scale: number;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
deviceId: string;
|
|
44
|
+
rotation: number;
|
|
45
|
+
}>, "many">;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
name: string;
|
|
48
|
+
devices: {
|
|
49
|
+
scale: number;
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
deviceId: string;
|
|
53
|
+
rotation: number;
|
|
54
|
+
}[];
|
|
55
|
+
thumbnailId: string;
|
|
56
|
+
imageId: string;
|
|
57
|
+
order?: number | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
name: string;
|
|
60
|
+
devices: {
|
|
61
|
+
scale: number;
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
deviceId: string;
|
|
65
|
+
rotation: number;
|
|
66
|
+
}[];
|
|
67
|
+
thumbnailId: string;
|
|
68
|
+
imageId: string;
|
|
69
|
+
order?: number | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
export type AddLayoutRequest = z.infer<typeof sAddLayoutRequest>;
|
|
72
|
+
export declare const sUpdateLayoutRequest: z.ZodObject<{
|
|
73
|
+
name: z.ZodOptional<z.ZodString>;
|
|
74
|
+
thumbnailId: z.ZodOptional<z.ZodString>;
|
|
75
|
+
imageId: z.ZodOptional<z.ZodString>;
|
|
76
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
79
|
+
deviceId: z.ZodString;
|
|
80
|
+
x: z.ZodNumber;
|
|
81
|
+
y: z.ZodNumber;
|
|
82
|
+
scale: z.ZodNumber;
|
|
83
|
+
rotation: z.ZodNumber;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
scale: number;
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
deviceId: string;
|
|
89
|
+
rotation: number;
|
|
90
|
+
}, {
|
|
91
|
+
scale: number;
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
deviceId: string;
|
|
95
|
+
rotation: number;
|
|
96
|
+
}>, "many">>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
name?: string | undefined;
|
|
99
|
+
order?: number | undefined;
|
|
100
|
+
isDefault?: boolean | undefined;
|
|
101
|
+
devices?: {
|
|
102
|
+
scale: number;
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
deviceId: string;
|
|
106
|
+
rotation: number;
|
|
107
|
+
}[] | undefined;
|
|
108
|
+
thumbnailId?: string | undefined;
|
|
109
|
+
imageId?: string | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
name?: string | undefined;
|
|
112
|
+
order?: number | undefined;
|
|
113
|
+
isDefault?: boolean | undefined;
|
|
114
|
+
devices?: {
|
|
115
|
+
scale: number;
|
|
116
|
+
x: number;
|
|
117
|
+
y: number;
|
|
118
|
+
deviceId: string;
|
|
119
|
+
rotation: number;
|
|
120
|
+
}[] | undefined;
|
|
121
|
+
thumbnailId?: string | undefined;
|
|
122
|
+
imageId?: string | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
export type UpdateLayoutRequest = {
|
|
125
|
+
id: string;
|
|
126
|
+
} & z.infer<typeof sUpdateLayoutRequest>;
|
|
127
|
+
export declare const sLayoutDto: z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
name: z.ZodString;
|
|
130
|
+
thumbnailUrl: z.ZodString;
|
|
131
|
+
imageUrl: z.ZodString;
|
|
132
|
+
order: z.ZodNumber;
|
|
133
|
+
isDefault: z.ZodBoolean;
|
|
134
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
135
|
+
deviceId: z.ZodString;
|
|
136
|
+
x: z.ZodNumber;
|
|
137
|
+
y: z.ZodNumber;
|
|
138
|
+
scale: z.ZodNumber;
|
|
139
|
+
rotation: z.ZodNumber;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
scale: number;
|
|
142
|
+
x: number;
|
|
143
|
+
y: number;
|
|
144
|
+
deviceId: string;
|
|
145
|
+
rotation: number;
|
|
146
|
+
}, {
|
|
147
|
+
scale: number;
|
|
148
|
+
x: number;
|
|
149
|
+
y: number;
|
|
150
|
+
deviceId: string;
|
|
151
|
+
rotation: number;
|
|
152
|
+
}>, "many">;
|
|
153
|
+
createdOn: z.ZodString;
|
|
154
|
+
lastModifiedOn: z.ZodString;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
name: string;
|
|
157
|
+
id: string;
|
|
158
|
+
order: number;
|
|
159
|
+
createdOn: string;
|
|
160
|
+
lastModifiedOn: string;
|
|
161
|
+
isDefault: boolean;
|
|
162
|
+
devices: {
|
|
163
|
+
scale: number;
|
|
164
|
+
x: number;
|
|
165
|
+
y: number;
|
|
166
|
+
deviceId: string;
|
|
167
|
+
rotation: number;
|
|
168
|
+
}[];
|
|
169
|
+
thumbnailUrl: string;
|
|
170
|
+
imageUrl: string;
|
|
171
|
+
}, {
|
|
172
|
+
name: string;
|
|
173
|
+
id: string;
|
|
174
|
+
order: number;
|
|
175
|
+
createdOn: string;
|
|
176
|
+
lastModifiedOn: string;
|
|
177
|
+
isDefault: boolean;
|
|
178
|
+
devices: {
|
|
179
|
+
scale: number;
|
|
180
|
+
x: number;
|
|
181
|
+
y: number;
|
|
182
|
+
deviceId: string;
|
|
183
|
+
rotation: number;
|
|
184
|
+
}[];
|
|
185
|
+
thumbnailUrl: string;
|
|
186
|
+
imageUrl: string;
|
|
187
|
+
}>;
|
|
188
|
+
export type LayoutDto = z.infer<typeof sLayoutDto>;
|
package/dist/layout.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sLayoutDto = exports.sUpdateLayoutRequest = exports.sAddLayoutRequest = exports.sLayoutDeviceDto = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.sLayoutDeviceDto = zod_1.default.object({
|
|
9
|
+
deviceId: zod_1.default.string(),
|
|
10
|
+
x: zod_1.default.number(),
|
|
11
|
+
y: zod_1.default.number(),
|
|
12
|
+
scale: zod_1.default.number(),
|
|
13
|
+
rotation: zod_1.default.number(),
|
|
14
|
+
});
|
|
15
|
+
exports.sAddLayoutRequest = zod_1.default.object({
|
|
16
|
+
name: zod_1.default.string().nonempty(),
|
|
17
|
+
thumbnailId: zod_1.default.string().nonempty(),
|
|
18
|
+
imageId: zod_1.default.string().nonempty(),
|
|
19
|
+
order: zod_1.default.number().optional(),
|
|
20
|
+
devices: zod_1.default.array(exports.sLayoutDeviceDto),
|
|
21
|
+
});
|
|
22
|
+
exports.sUpdateLayoutRequest = zod_1.default.object({
|
|
23
|
+
name: zod_1.default.string().optional(),
|
|
24
|
+
thumbnailId: zod_1.default.string().optional(),
|
|
25
|
+
imageId: zod_1.default.string().optional(),
|
|
26
|
+
order: zod_1.default.number().optional(),
|
|
27
|
+
isDefault: zod_1.default.boolean().optional(),
|
|
28
|
+
devices: zod_1.default.array(exports.sLayoutDeviceDto).optional(),
|
|
29
|
+
});
|
|
30
|
+
exports.sLayoutDto = zod_1.default.object({
|
|
31
|
+
id: zod_1.default.string(),
|
|
32
|
+
name: zod_1.default.string(),
|
|
33
|
+
thumbnailUrl: zod_1.default.string(),
|
|
34
|
+
imageUrl: zod_1.default.string(),
|
|
35
|
+
order: zod_1.default.number(),
|
|
36
|
+
isDefault: zod_1.default.boolean(),
|
|
37
|
+
devices: zod_1.default.array(exports.sLayoutDeviceDto),
|
|
38
|
+
createdOn: zod_1.default.string(),
|
|
39
|
+
lastModifiedOn: zod_1.default.string(),
|
|
40
|
+
});
|
package/dist/macros.d.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sMacroItemDto: z.ZodObject<{
|
|
3
|
+
id: z.ZodNullable<z.ZodString>;
|
|
4
|
+
stepId: z.ZodString;
|
|
5
|
+
deviceId: z.ZodString;
|
|
6
|
+
command: z.ZodString;
|
|
7
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string | null;
|
|
10
|
+
params: Record<string, unknown>;
|
|
11
|
+
command: string;
|
|
12
|
+
deviceId: string;
|
|
13
|
+
stepId: string;
|
|
14
|
+
}, {
|
|
15
|
+
id: string | null;
|
|
16
|
+
params: Record<string, unknown>;
|
|
17
|
+
command: string;
|
|
18
|
+
deviceId: string;
|
|
19
|
+
stepId: string;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const sMacroDto: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
displayName: z.ZodString;
|
|
24
|
+
createdOn: z.ZodString;
|
|
25
|
+
lastModifiedOn: z.ZodString;
|
|
26
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
27
|
+
items: z.ZodArray<z.ZodObject<{
|
|
28
|
+
id: z.ZodNullable<z.ZodString>;
|
|
29
|
+
stepId: z.ZodString;
|
|
30
|
+
deviceId: z.ZodString;
|
|
31
|
+
command: z.ZodString;
|
|
32
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
id: string | null;
|
|
35
|
+
params: Record<string, unknown>;
|
|
36
|
+
command: string;
|
|
37
|
+
deviceId: string;
|
|
38
|
+
stepId: string;
|
|
39
|
+
}, {
|
|
40
|
+
id: string | null;
|
|
41
|
+
params: Record<string, unknown>;
|
|
42
|
+
command: string;
|
|
43
|
+
deviceId: string;
|
|
44
|
+
stepId: string;
|
|
45
|
+
}>, "many">;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
id: string;
|
|
48
|
+
items: {
|
|
49
|
+
id: string | null;
|
|
50
|
+
params: Record<string, unknown>;
|
|
51
|
+
command: string;
|
|
52
|
+
deviceId: string;
|
|
53
|
+
stepId: string;
|
|
54
|
+
}[];
|
|
55
|
+
displayName: string;
|
|
56
|
+
createdOn: string;
|
|
57
|
+
lastModifiedOn: string;
|
|
58
|
+
createdBy: string | null;
|
|
59
|
+
}, {
|
|
60
|
+
id: string;
|
|
61
|
+
items: {
|
|
62
|
+
id: string | null;
|
|
63
|
+
params: Record<string, unknown>;
|
|
64
|
+
command: string;
|
|
65
|
+
deviceId: string;
|
|
66
|
+
stepId: string;
|
|
67
|
+
}[];
|
|
68
|
+
displayName: string;
|
|
69
|
+
createdOn: string;
|
|
70
|
+
lastModifiedOn: string;
|
|
71
|
+
createdBy: string | null;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const sAddMacroRequest: z.ZodObject<Omit<{
|
|
74
|
+
id: z.ZodString;
|
|
75
|
+
displayName: z.ZodString;
|
|
76
|
+
createdOn: z.ZodString;
|
|
77
|
+
lastModifiedOn: z.ZodString;
|
|
78
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
79
|
+
items: z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodNullable<z.ZodString>;
|
|
81
|
+
stepId: z.ZodString;
|
|
82
|
+
deviceId: z.ZodString;
|
|
83
|
+
command: z.ZodString;
|
|
84
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
id: string | null;
|
|
87
|
+
params: Record<string, unknown>;
|
|
88
|
+
command: string;
|
|
89
|
+
deviceId: string;
|
|
90
|
+
stepId: string;
|
|
91
|
+
}, {
|
|
92
|
+
id: string | null;
|
|
93
|
+
params: Record<string, unknown>;
|
|
94
|
+
command: string;
|
|
95
|
+
deviceId: string;
|
|
96
|
+
stepId: string;
|
|
97
|
+
}>, "many">;
|
|
98
|
+
}, "id" | "createdOn" | "lastModifiedOn" | "createdBy">, "strip", z.ZodTypeAny, {
|
|
99
|
+
items: {
|
|
100
|
+
id: string | null;
|
|
101
|
+
params: Record<string, unknown>;
|
|
102
|
+
command: string;
|
|
103
|
+
deviceId: string;
|
|
104
|
+
stepId: string;
|
|
105
|
+
}[];
|
|
106
|
+
displayName: string;
|
|
107
|
+
}, {
|
|
108
|
+
items: {
|
|
109
|
+
id: string | null;
|
|
110
|
+
params: Record<string, unknown>;
|
|
111
|
+
command: string;
|
|
112
|
+
deviceId: string;
|
|
113
|
+
stepId: string;
|
|
114
|
+
}[];
|
|
115
|
+
displayName: string;
|
|
116
|
+
}>;
|
|
117
|
+
export declare const sUpdateMacroRequest: z.ZodObject<{
|
|
118
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
119
|
+
id: z.ZodNullable<z.ZodString>;
|
|
120
|
+
stepId: z.ZodString;
|
|
121
|
+
deviceId: z.ZodString;
|
|
122
|
+
command: z.ZodString;
|
|
123
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
id: string | null;
|
|
126
|
+
params: Record<string, unknown>;
|
|
127
|
+
command: string;
|
|
128
|
+
deviceId: string;
|
|
129
|
+
stepId: string;
|
|
130
|
+
}, {
|
|
131
|
+
id: string | null;
|
|
132
|
+
params: Record<string, unknown>;
|
|
133
|
+
command: string;
|
|
134
|
+
deviceId: string;
|
|
135
|
+
stepId: string;
|
|
136
|
+
}>, "many">>;
|
|
137
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
items?: {
|
|
140
|
+
id: string | null;
|
|
141
|
+
params: Record<string, unknown>;
|
|
142
|
+
command: string;
|
|
143
|
+
deviceId: string;
|
|
144
|
+
stepId: string;
|
|
145
|
+
}[] | undefined;
|
|
146
|
+
displayName?: string | undefined;
|
|
147
|
+
}, {
|
|
148
|
+
items?: {
|
|
149
|
+
id: string | null;
|
|
150
|
+
params: Record<string, unknown>;
|
|
151
|
+
command: string;
|
|
152
|
+
deviceId: string;
|
|
153
|
+
stepId: string;
|
|
154
|
+
}[] | undefined;
|
|
155
|
+
displayName?: string | undefined;
|
|
156
|
+
}>;
|
|
157
|
+
export type MacroItemDto = z.infer<typeof sMacroItemDto>;
|
|
158
|
+
export type MacroDto = z.infer<typeof sMacroDto>;
|
|
159
|
+
export type AddMacroRequest = z.infer<typeof sAddMacroRequest>;
|
|
160
|
+
export type UpdateMacroRequest = z.infer<typeof sUpdateMacroRequest>;
|
package/dist/macros.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sUpdateMacroRequest = exports.sAddMacroRequest = exports.sMacroDto = exports.sMacroItemDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sMacroItemDto = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string().uuid().nullable(),
|
|
7
|
+
stepId: zod_1.z.string().nonempty(),
|
|
8
|
+
deviceId: zod_1.z.string().uuid().nonempty(),
|
|
9
|
+
command: zod_1.z.string().nonempty(),
|
|
10
|
+
params: zod_1.z.record(zod_1.z.unknown()),
|
|
11
|
+
});
|
|
12
|
+
exports.sMacroDto = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.string().uuid(),
|
|
14
|
+
displayName: zod_1.z.string().nonempty(),
|
|
15
|
+
createdOn: zod_1.z.string(),
|
|
16
|
+
lastModifiedOn: zod_1.z.string(),
|
|
17
|
+
createdBy: zod_1.z.string().nullable(),
|
|
18
|
+
items: zod_1.z.array(exports.sMacroItemDto),
|
|
19
|
+
});
|
|
20
|
+
exports.sAddMacroRequest = exports.sMacroDto.omit({
|
|
21
|
+
id: true,
|
|
22
|
+
createdOn: true,
|
|
23
|
+
lastModifiedOn: true,
|
|
24
|
+
createdBy: true,
|
|
25
|
+
});
|
|
26
|
+
exports.sUpdateMacroRequest = exports.sAddMacroRequest.partial();
|