@awarevue/api-types 2.0.24 → 2.0.25
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/_legacy/index.js +18 -2
- package/dist/_legacy/milestone.js +2 -1
- package/dist/_legacy/orchid.js +2 -1
- package/dist/alarm-automation.js +37 -26
- package/dist/api/agent-protocol/index.js +17 -1
- package/dist/api/agent-protocol/protocol.js +219 -212
- package/dist/api/commands/alarm.js +46 -43
- package/dist/api/commands/all.js +25 -22
- package/dist/api/commands/camera-lift.js +13 -10
- package/dist/api/commands/camera.js +65 -61
- package/dist/api/commands/display.js +27 -24
- package/dist/api/commands/door.js +21 -18
- package/dist/api/commands/index.js +28 -12
- package/dist/api/commands/intercom-terminal.js +2 -1
- package/dist/api/commands/io-board.js +11 -8
- package/dist/api/commands/nvr-exporter.js +20 -17
- package/dist/api/commands/pbx.js +13 -10
- package/dist/api/commands/presence-tracker.js +25 -22
- package/dist/api/commands/server.js +21 -18
- package/dist/api/error.js +93 -89
- package/dist/api/events/alarm.js +53 -50
- package/dist/api/events/all.js +57 -53
- package/dist/api/events/camera.js +68 -65
- package/dist/api/events/display.js +6 -3
- package/dist/api/events/door.js +60 -57
- package/dist/api/events/index.js +28 -12
- package/dist/api/events/intercom-terminal.js +16 -13
- package/dist/api/events/io-board.js +10 -7
- package/dist/api/events/nvr-exporter.js +14 -11
- package/dist/api/events/panic-button.js +8 -5
- package/dist/api/events/presence-tracker.js +29 -26
- package/dist/api/events/reader.js +11 -8
- package/dist/api/events/server.js +12 -9
- package/dist/api/index.js +25 -9
- package/dist/api/mqtt/index.js +17 -1
- package/dist/api/mqtt/payloads.js +15 -12
- package/dist/api/queries/all.js +23 -20
- package/dist/api/queries/camera.js +19 -16
- package/dist/api/queries/index.js +21 -5
- package/dist/api/queries/nvr-analytics-server.js +57 -54
- package/dist/api/queries/nvr-exporter.js +26 -23
- package/dist/api/queries/nvr-recorder.js +32 -29
- package/dist/api/rest/access-rule.js +14 -8
- package/dist/api/rest/agreement.js +6 -3
- package/dist/api/rest/alarm.js +2 -1
- package/dist/api/rest/api-keys.js +11 -8
- package/dist/api/rest/app.js +11 -8
- package/dist/api/rest/auth.js +12 -9
- package/dist/api/rest/automation.js +13 -10
- package/dist/api/rest/aware-config.js +2 -1
- package/dist/api/rest/bookmarks.js +17 -14
- package/dist/api/rest/cast.js +11 -5
- package/dist/api/rest/custom-field.js +6 -3
- package/dist/api/rest/device-event.js +2 -1
- package/dist/api/rest/device-group.js +19 -13
- package/dist/api/rest/file.js +2 -1
- package/dist/api/rest/index.js +50 -34
- package/dist/api/rest/io-device.js +21 -14
- package/dist/api/rest/layout.js +23 -17
- package/dist/api/rest/macros.js +6 -3
- package/dist/api/rest/media.js +55 -52
- package/dist/api/rest/module-config.js +2 -1
- package/dist/api/rest/notifications.js +11 -8
- package/dist/api/rest/person-agreement.js +11 -5
- package/dist/api/rest/person-presence.js +26 -23
- package/dist/api/rest/person-type.js +6 -3
- package/dist/api/rest/person.js +11 -5
- package/dist/api/rest/query.js +13 -8
- package/dist/api/rest/schedule.js +11 -8
- package/dist/api/rest/security-level.js +6 -3
- package/dist/api/rest/template.js +13 -10
- package/dist/api/rest/token-conversion.js +6 -3
- package/dist/api/rest/user.js +31 -28
- package/dist/api/rest/view.js +20 -14
- package/dist/api/rest/webrtc-playback.js +12 -6
- package/dist/api/rest/zone.js +14 -8
- package/dist/api/state/index.js +2 -1
- package/dist/api/ws/device-communication.js +46 -38
- package/dist/api/ws/index.js +21 -5
- package/dist/api/ws/notifications.js +17 -10
- package/dist/api/ws/progress.js +37 -30
- package/dist/api/ws/web-rtc-signaling.js +72 -65
- package/dist/api/ws/web-socket.js +5 -2
- package/dist/index.js +22 -6
- package/dist/objects/access-rule.js +32 -29
- package/dist/objects/agent-metadata.js +33 -30
- package/dist/objects/agreement.js +10 -7
- package/dist/objects/all.js +7 -4
- package/dist/objects/api-key.js +10 -7
- package/dist/objects/automation-rule.js +28 -25
- package/dist/objects/bookmark.js +14 -11
- package/dist/objects/credential.js +15 -9
- package/dist/objects/custom-field.js +11 -8
- package/dist/objects/device/alarm.js +6 -3
- package/dist/objects/device/any-device.js +206 -203
- package/dist/objects/device/camera-lift.js +6 -3
- package/dist/objects/device/camera.js +30 -27
- package/dist/objects/device/device-gateway.js +4 -1
- package/dist/objects/device/device-import.js +26 -23
- package/dist/objects/device/device-relation.js +16 -13
- package/dist/objects/device/display.js +6 -3
- package/dist/objects/device/door.js +10 -7
- package/dist/objects/device/index.js +38 -22
- package/dist/objects/device/intercom-operator.js +4 -1
- package/dist/objects/device/intercom-terminal.js +20 -17
- package/dist/objects/device/io-board.js +8 -5
- package/dist/objects/device/motion-sensor.js +6 -3
- package/dist/objects/device/nvr-analytics-server.js +8 -5
- package/dist/objects/device/nvr-exporter.js +9 -6
- package/dist/objects/device/nvr-recorder.js +8 -5
- package/dist/objects/device/panic-button.js +6 -3
- package/dist/objects/device/pbx.js +7 -4
- package/dist/objects/device/presence-tracker.js +4 -1
- package/dist/objects/device/reader.js +4 -1
- package/dist/objects/device/server.js +4 -1
- package/dist/objects/device/system.js +7 -4
- package/dist/objects/device-group.js +11 -8
- package/dist/objects/index.js +44 -28
- package/dist/objects/layout.js +23 -20
- package/dist/objects/macro.js +20 -17
- package/dist/objects/module-config.js +2 -1
- package/dist/objects/notification.js +15 -12
- package/dist/objects/person-agreement.js +10 -7
- package/dist/objects/person-presence.js +32 -29
- package/dist/objects/person-type.js +17 -11
- package/dist/objects/person.js +42 -39
- package/dist/objects/role.js +11 -8
- package/dist/objects/schedule.js +45 -39
- package/dist/objects/security-level.js +13 -10
- package/dist/objects/template.js +10 -7
- package/dist/objects/token-conversion.js +10 -7
- package/dist/objects/user.js +14 -11
- package/dist/objects/view.js +53 -50
- package/dist/objects/world-object.js +8 -5
- package/dist/objects/zone.js +16 -13
- package/dist/package.json +1 -1
- package/dist/permissions.js +149 -146
- package/dist/primitives.js +30 -27
- package/package.json +1 -1
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sAccessRuleProps = exports.sAccessRuleDto = exports.sAccessRuleGroupPermissionDto = exports.sAccessRulePermissionDto = exports.sAccessRulePersonDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sAccessRulePersonDto = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string().describe('Person ID'),
|
|
7
|
+
firstName: zod_1.z.string().describe('First name'),
|
|
8
|
+
lastName: zod_1.z.string().describe('Last name'),
|
|
9
|
+
avatarId: zod_1.z.string().nullable().describe('Avatar ID'),
|
|
7
10
|
});
|
|
8
|
-
|
|
9
|
-
deviceId: z.string().describe('Device ID').nonempty(),
|
|
10
|
-
scheduleId: z.string().describe('Schedule ID').nonempty(),
|
|
11
|
+
exports.sAccessRulePermissionDto = zod_1.z.object({
|
|
12
|
+
deviceId: zod_1.z.string().describe('Device ID').nonempty(),
|
|
13
|
+
scheduleId: zod_1.z.string().describe('Schedule ID').nonempty(),
|
|
11
14
|
});
|
|
12
|
-
|
|
13
|
-
groupId: z.string().describe('Group ID').nonempty(),
|
|
14
|
-
scheduleId: z.string().describe('Schedule ID').nonempty(),
|
|
15
|
+
exports.sAccessRuleGroupPermissionDto = zod_1.z.object({
|
|
16
|
+
groupId: zod_1.z.string().describe('Group ID').nonempty(),
|
|
17
|
+
scheduleId: zod_1.z.string().describe('Schedule ID').nonempty(),
|
|
15
18
|
});
|
|
16
|
-
|
|
17
|
-
id: z.string().describe('Access rule ID'),
|
|
18
|
-
displayName: z.string().describe('Display name'),
|
|
19
|
-
appliedTo: z.array(sAccessRulePersonDto).describe('Applied to'),
|
|
20
|
-
permissions: z.array(sAccessRulePermissionDto).describe('Permissions'),
|
|
21
|
-
groupPermissions: z
|
|
22
|
-
.array(sAccessRuleGroupPermissionDto)
|
|
19
|
+
exports.sAccessRuleDto = zod_1.z.object({
|
|
20
|
+
id: zod_1.z.string().describe('Access rule ID'),
|
|
21
|
+
displayName: zod_1.z.string().describe('Display name'),
|
|
22
|
+
appliedTo: zod_1.z.array(exports.sAccessRulePersonDto).describe('Applied to'),
|
|
23
|
+
permissions: zod_1.z.array(exports.sAccessRulePermissionDto).describe('Permissions'),
|
|
24
|
+
groupPermissions: zod_1.z
|
|
25
|
+
.array(exports.sAccessRuleGroupPermissionDto)
|
|
23
26
|
.describe('Group permissions'),
|
|
24
|
-
createdOn: z.string().describe('Created on'),
|
|
25
|
-
lastModifiedOn: z.string().describe('Last modified on'),
|
|
26
|
-
refs: z.record(z.union([z.string(), z.array(z.string())])),
|
|
27
|
-
version: z.number().describe('Version'),
|
|
27
|
+
createdOn: zod_1.z.string().describe('Created on'),
|
|
28
|
+
lastModifiedOn: zod_1.z.string().describe('Last modified on'),
|
|
29
|
+
refs: zod_1.z.record(zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])),
|
|
30
|
+
version: zod_1.z.number().describe('Version'),
|
|
28
31
|
});
|
|
29
|
-
|
|
30
|
-
displayName: z.string().nonempty().describe('Display name'),
|
|
31
|
-
appliedTo: z.array(z.string().nonempty()).describe('Applied to'),
|
|
32
|
-
permissions: z.array(sAccessRulePermissionDto).describe('Permissions'),
|
|
33
|
-
groupPermissions: z
|
|
34
|
-
.array(sAccessRuleGroupPermissionDto)
|
|
32
|
+
exports.sAccessRuleProps = zod_1.z.object({
|
|
33
|
+
displayName: zod_1.z.string().nonempty().describe('Display name'),
|
|
34
|
+
appliedTo: zod_1.z.array(zod_1.z.string().nonempty()).describe('Applied to'),
|
|
35
|
+
permissions: zod_1.z.array(exports.sAccessRulePermissionDto).describe('Permissions'),
|
|
36
|
+
groupPermissions: zod_1.z
|
|
37
|
+
.array(exports.sAccessRuleGroupPermissionDto)
|
|
35
38
|
.describe('Group permissions'),
|
|
36
39
|
});
|
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sAccessControlCapabilityReport = exports.sTokenSpecs = exports.sAccessObjectKind = exports.sProviderSpecs = exports.sUiHint = exports.sUiWidgetHint = exports.sUiOrderHint = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const credential_1 = require("./credential");
|
|
6
|
+
exports.sUiOrderHint = zod_1.z.object({
|
|
7
|
+
kind: zod_1.z.literal('order'),
|
|
8
|
+
path: zod_1.z.string(),
|
|
9
|
+
fields: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
7
10
|
});
|
|
8
|
-
|
|
9
|
-
kind: z.literal('widget'),
|
|
10
|
-
path: z.string(),
|
|
11
|
-
spanColumns: z.number().optional(),
|
|
12
|
-
password: z.boolean().optional(),
|
|
13
|
-
placeHolder: z.string().optional(),
|
|
11
|
+
exports.sUiWidgetHint = zod_1.z.object({
|
|
12
|
+
kind: zod_1.z.literal('widget'),
|
|
13
|
+
path: zod_1.z.string(),
|
|
14
|
+
spanColumns: zod_1.z.number().optional(),
|
|
15
|
+
password: zod_1.z.boolean().optional(),
|
|
16
|
+
placeHolder: zod_1.z.string().optional(),
|
|
14
17
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
title: z
|
|
18
|
+
exports.sUiHint = zod_1.z.union([exports.sUiOrderHint, exports.sUiWidgetHint]);
|
|
19
|
+
exports.sProviderSpecs = zod_1.z.object({
|
|
20
|
+
title: zod_1.z
|
|
18
21
|
.string()
|
|
19
22
|
.nonempty()
|
|
20
23
|
.describe('a human-readable name for the provider'),
|
|
21
|
-
configSchema: z
|
|
24
|
+
configSchema: zod_1.z
|
|
22
25
|
.unknown()
|
|
23
26
|
.describe('a valid JSON schema that describes provider config data structure'), // We can use AJV to validate the definition of a JSON schema
|
|
24
|
-
configDefault: z
|
|
25
|
-
.record(z.unknown())
|
|
27
|
+
configDefault: zod_1.z
|
|
28
|
+
.record(zod_1.z.unknown())
|
|
26
29
|
.describe('Default initialized values for configuration'),
|
|
27
|
-
configFormUiHints: z
|
|
28
|
-
.array(sUiHint)
|
|
30
|
+
configFormUiHints: zod_1.z
|
|
31
|
+
.array(exports.sUiHint)
|
|
29
32
|
.optional()
|
|
30
33
|
.describe('UI hints for configuration form visuals'),
|
|
31
34
|
});
|
|
32
|
-
|
|
35
|
+
exports.sAccessObjectKind = zod_1.z.enum([
|
|
33
36
|
'accessRule',
|
|
34
37
|
'schedule',
|
|
35
38
|
'person',
|
|
36
39
|
'device',
|
|
37
40
|
'zone',
|
|
38
41
|
]);
|
|
39
|
-
|
|
40
|
-
type: sCredentialType, // etc, those map to a AWARE-standardized set of token types
|
|
41
|
-
regex: z.string().optional(),
|
|
42
|
-
formatDescription: z.string().optional(),
|
|
43
|
-
maxPerPerson: z.number().optional(),
|
|
42
|
+
exports.sTokenSpecs = zod_1.z.object({
|
|
43
|
+
type: credential_1.sCredentialType, // etc, those map to a AWARE-standardized set of token types
|
|
44
|
+
regex: zod_1.z.string().optional(),
|
|
45
|
+
formatDescription: zod_1.z.string().optional(),
|
|
46
|
+
maxPerPerson: zod_1.z.number().optional(),
|
|
44
47
|
});
|
|
45
|
-
|
|
46
|
-
tokens: z.array(sTokenSpecs),
|
|
47
|
-
accessObjects: z.array(sAccessObjectKind),
|
|
48
|
-
oneSchedulePerDoor: z.boolean(),
|
|
48
|
+
exports.sAccessControlCapabilityReport = zod_1.z.object({
|
|
49
|
+
tokens: zod_1.z.array(exports.sTokenSpecs),
|
|
50
|
+
accessObjects: zod_1.z.array(exports.sAccessObjectKind),
|
|
51
|
+
oneSchedulePerDoor: zod_1.z.boolean(),
|
|
49
52
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sAgreementDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sAgreementDto = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string().uuid(),
|
|
7
|
+
displayName: zod_1.z.string().min(1).max(64),
|
|
8
|
+
content: zod_1.z.string().min(1),
|
|
9
|
+
createdOn: zod_1.z.string().date(),
|
|
10
|
+
lastModifiedOn: zod_1.z.string().date(),
|
|
8
11
|
});
|
package/dist/objects/all.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectKinds = exports.objectLabels = exports.sObjectKind = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sObjectKind = zod_1.z.enum([
|
|
3
6
|
'accessRule',
|
|
4
7
|
'schedule',
|
|
5
8
|
'person',
|
|
@@ -19,7 +22,7 @@ export const sObjectKind = z.enum([
|
|
|
19
22
|
'agreement',
|
|
20
23
|
'apiKey',
|
|
21
24
|
]);
|
|
22
|
-
|
|
25
|
+
exports.objectLabels = {
|
|
23
26
|
accessRule: 'Access Rule',
|
|
24
27
|
schedule: 'Schedule',
|
|
25
28
|
person: 'Person',
|
|
@@ -39,4 +42,4 @@ export const objectLabels = {
|
|
|
39
42
|
agreement: 'Agreement',
|
|
40
43
|
apiKey: 'API Key',
|
|
41
44
|
};
|
|
42
|
-
|
|
45
|
+
exports.objectKinds = exports.sObjectKind.options;
|
package/dist/objects/api-key.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sApiKeyDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sApiKeyDto = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string().uuid(),
|
|
7
|
+
displayName: zod_1.z.string().min(1).max(128),
|
|
8
|
+
prefix: zod_1.z.string().min(8).max(16),
|
|
9
|
+
createdOn: zod_1.z.string().datetime(),
|
|
10
|
+
lastModifiedOn: zod_1.z.string().datetime(),
|
|
8
11
|
});
|
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sAutomationRuleDto = exports.sAutomationRuleProps = exports.sAutomationRuleBody = exports.sAutomationRuleCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sAutomationRuleCommand = zod_1.z.object({
|
|
6
|
+
command: zod_1.z.string().nonempty().describe('The command to be executed'),
|
|
7
|
+
target: zod_1.z.string().nonempty().describe('The target of the command'),
|
|
8
|
+
params: zod_1.z
|
|
9
|
+
.record(zod_1.z.unknown())
|
|
7
10
|
.describe('The parameters of the command depending on what it is'),
|
|
8
11
|
});
|
|
9
|
-
|
|
10
|
-
onEvent: z
|
|
12
|
+
exports.sAutomationRuleBody = zod_1.z.object({
|
|
13
|
+
onEvent: zod_1.z
|
|
11
14
|
.string()
|
|
12
15
|
.nonempty()
|
|
13
16
|
.describe('The event that triggers the automation rule'),
|
|
14
|
-
runIf: z
|
|
17
|
+
runIf: zod_1.z
|
|
15
18
|
.string()
|
|
16
19
|
.optional()
|
|
17
20
|
.describe('The condition under which the automation rule should run'),
|
|
18
|
-
commands: z
|
|
19
|
-
.array(sAutomationRuleCommand)
|
|
21
|
+
commands: zod_1.z
|
|
22
|
+
.array(exports.sAutomationRuleCommand)
|
|
20
23
|
.describe('The commands to be executed by the automation rule'),
|
|
21
24
|
});
|
|
22
|
-
|
|
23
|
-
displayName: z
|
|
25
|
+
exports.sAutomationRuleProps = zod_1.z.object({
|
|
26
|
+
displayName: zod_1.z
|
|
24
27
|
.string()
|
|
25
28
|
.nonempty()
|
|
26
29
|
.describe('The name of the automation rule'),
|
|
27
|
-
description: z
|
|
30
|
+
description: zod_1.z
|
|
28
31
|
.string()
|
|
29
32
|
.optional()
|
|
30
33
|
.describe('A description of the automation rule'),
|
|
31
|
-
code: z.string().nullable().describe('The code of the automation rule'),
|
|
32
|
-
body: sAutomationRuleBody.describe('The body of the automation rule'),
|
|
33
|
-
enabled: z.boolean().describe('Whether the automation rule is enabled'),
|
|
34
|
-
exclusivityGroup: z
|
|
34
|
+
code: zod_1.z.string().nullable().describe('The code of the automation rule'),
|
|
35
|
+
body: exports.sAutomationRuleBody.describe('The body of the automation rule'),
|
|
36
|
+
enabled: zod_1.z.boolean().describe('Whether the automation rule is enabled'),
|
|
37
|
+
exclusivityGroup: zod_1.z
|
|
35
38
|
.string()
|
|
36
39
|
.nullable()
|
|
37
40
|
.describe('The exclusivity group of the automation rule. Only one matching rule at max will run within one group based on the highest score'),
|
|
38
|
-
score: z.number().int().min(0).nullable(),
|
|
39
|
-
module: z
|
|
41
|
+
score: zod_1.z.number().int().min(0).nullable(),
|
|
42
|
+
module: zod_1.z
|
|
40
43
|
.string()
|
|
41
44
|
.nullable()
|
|
42
45
|
.describe('The module the automation rule belongs to'),
|
|
43
|
-
metadata: z.record(z.unknown()),
|
|
46
|
+
metadata: zod_1.z.record(zod_1.z.unknown()),
|
|
44
47
|
});
|
|
45
|
-
|
|
46
|
-
id: z.string().describe('The ID of the automation rule'),
|
|
47
|
-
createdOn: z.string().describe('The date the automation rule was created'),
|
|
48
|
-
lastModifiedOn: z
|
|
48
|
+
exports.sAutomationRuleDto = exports.sAutomationRuleProps.merge(zod_1.z.object({
|
|
49
|
+
id: zod_1.z.string().describe('The ID of the automation rule'),
|
|
50
|
+
createdOn: zod_1.z.string().describe('The date the automation rule was created'),
|
|
51
|
+
lastModifiedOn: zod_1.z
|
|
49
52
|
.string()
|
|
50
53
|
.describe('The date the automation rule was last modified'),
|
|
51
54
|
}));
|
package/dist/objects/bookmark.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sBookmarkDto = exports.sBookmarkProps = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sBookmarkProps = zod_1.z.object({
|
|
6
|
+
timestamp: zod_1.z.number().min(0),
|
|
7
|
+
label: zod_1.z.string().nonempty(),
|
|
8
|
+
deviceId: zod_1.z.string().nonempty(),
|
|
9
|
+
metadata: zod_1.z.record(zod_1.z.unknown()),
|
|
7
10
|
});
|
|
8
|
-
|
|
9
|
-
id: z.string().nonempty(),
|
|
10
|
-
createdBy: z.string().nonempty(),
|
|
11
|
-
createdOn: z.string().datetime(),
|
|
12
|
-
lastModifiedOn: z.string().datetime(),
|
|
11
|
+
exports.sBookmarkDto = exports.sBookmarkProps.and(zod_1.z.object({
|
|
12
|
+
id: zod_1.z.string().nonempty(),
|
|
13
|
+
createdBy: zod_1.z.string().nonempty(),
|
|
14
|
+
createdOn: zod_1.z.string().datetime(),
|
|
15
|
+
lastModifiedOn: zod_1.z.string().datetime(),
|
|
13
16
|
}));
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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.sAssignedCredential = exports.sCredentialValue = exports.sCredentialType = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.sCredentialType = zod_1.default.enum(['card', 'pin', 'fingerprint']);
|
|
9
|
+
exports.sCredentialValue = zod_1.default.union([
|
|
10
|
+
zod_1.default.string().nonempty(),
|
|
11
|
+
zod_1.default.record(zod_1.default.unknown()),
|
|
6
12
|
]);
|
|
7
|
-
|
|
8
|
-
type: sCredentialType,
|
|
9
|
-
value: sCredentialValue,
|
|
10
|
-
note:
|
|
13
|
+
exports.sAssignedCredential = zod_1.default.object({
|
|
14
|
+
type: exports.sCredentialType,
|
|
15
|
+
value: exports.sCredentialValue,
|
|
16
|
+
note: zod_1.default.string().nullable(),
|
|
11
17
|
});
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sCustomFieldDto = exports.CustomFieldExtendsTypeEnum = exports.CustomFieldTypeEnum = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.CustomFieldTypeEnum = zod_1.z.enum([
|
|
3
6
|
'string',
|
|
4
7
|
'number',
|
|
5
8
|
'boolean',
|
|
6
9
|
'date',
|
|
7
10
|
]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
id: z.string().uuid(),
|
|
11
|
-
name: z.string().min(1).max(64),
|
|
12
|
-
type: CustomFieldTypeEnum,
|
|
13
|
-
extendsType: CustomFieldExtendsTypeEnum,
|
|
11
|
+
exports.CustomFieldExtendsTypeEnum = zod_1.z.enum(['person']);
|
|
12
|
+
exports.sCustomFieldDto = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.string().uuid(),
|
|
14
|
+
name: zod_1.z.string().min(1).max(64),
|
|
15
|
+
type: exports.CustomFieldTypeEnum,
|
|
16
|
+
extendsType: exports.CustomFieldExtendsTypeEnum,
|
|
14
17
|
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sAlarmSpecs = exports.ALARM = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
2
5
|
/*
|
|
3
6
|
- only one alarm is active at the same time. If a new alarm-causing event takes place, the already existing alarm will be amended with the new event rather than creating a new alarm
|
|
4
7
|
(Imagine the case of pirates boarding a ship: the alarm will not be triggered for each pirate, but only once for the whole group of pirates so the UI will show one alarm window and all devices that triggered that alarm listed as they come in, each with its adjacent camera footage if applicable)
|
|
@@ -7,6 +10,6 @@ import { z } from 'zod';
|
|
|
7
10
|
- in all situations, 'door-force', 'tamper' and other unusual events will trigger alarms regardless of their arm / disarm states
|
|
8
11
|
- arming / disarming more than one device will be achieved by an action against a device group (e.g. 'All Devices', 'Top Deck Doors', 'All Doors', 'All Motion Detectors' etc.)
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
exports.ALARM = 'alarm';
|
|
11
14
|
// SPECS
|
|
12
|
-
|
|
15
|
+
exports.sAlarmSpecs = zod_1.z.object({});
|