@awarevue/api-types 2.0.22 → 2.0.23
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.d.ts +2 -0
- package/dist/_legacy/index.js +2 -0
- package/dist/_legacy/milestone.js +1 -0
- package/dist/_legacy/orchid.js +1 -0
- package/dist/alarm-automation.d.ts +3 -3
- package/dist/alarm-automation.js +26 -37
- package/dist/api/agent-protocol/index.d.ts +1 -0
- package/dist/api/agent-protocol/index.js +1 -0
- package/dist/{agent-communication → api/agent-protocol}/protocol.d.ts +407 -598
- package/dist/api/agent-protocol/protocol.js +382 -0
- package/dist/api/commands/alarm.js +59 -0
- package/dist/{commands → api/commands}/all.d.ts +83 -83
- package/dist/{commands → api/commands}/all.js +22 -25
- package/dist/api/commands/camera-lift.js +14 -0
- package/dist/api/commands/camera.js +93 -0
- package/dist/api/commands/display.js +34 -0
- package/dist/api/commands/door.js +24 -0
- package/dist/api/commands/index.js +12 -0
- package/dist/api/commands/intercom-terminal.js +2 -0
- package/dist/api/commands/io-board.js +12 -0
- package/dist/api/commands/nvr-exporter.js +23 -0
- package/dist/api/commands/pbx.js +14 -0
- package/dist/api/commands/presence-tracker.js +30 -0
- package/dist/api/commands/server.js +24 -0
- package/dist/api/error.js +181 -0
- package/dist/api/events/alarm.js +52 -0
- package/dist/{events → api/events}/all.d.ts +8 -8
- package/dist/api/events/all.js +124 -0
- package/dist/api/events/camera.js +84 -0
- package/dist/api/events/display.js +6 -0
- package/dist/api/events/door.js +59 -0
- package/dist/api/events/index.js +12 -0
- package/dist/api/events/intercom-terminal.js +16 -0
- package/dist/api/events/io-board.js +10 -0
- package/dist/api/events/nvr-exporter.js +18 -0
- package/dist/api/events/panic-button.js +8 -0
- package/dist/api/events/presence-tracker.js +30 -0
- package/dist/api/events/reader.js +10 -0
- package/dist/{events → api/events}/server.d.ts +5 -5
- package/dist/api/events/server.js +12 -0
- package/dist/api/index.d.ts +9 -4
- package/dist/api/index.js +9 -20
- package/dist/api/mqtt/index.d.ts +1 -0
- package/dist/api/mqtt/index.js +1 -0
- package/dist/api/mqtt/payloads.js +18 -0
- package/dist/api/queries/all.js +25 -0
- package/dist/api/queries/camera.js +24 -0
- package/dist/api/queries/index.js +5 -0
- package/dist/api/queries/nvr-analytics-server.js +73 -0
- package/dist/api/queries/nvr-exporter.js +33 -0
- package/dist/api/queries/nvr-recorder.js +39 -0
- package/dist/api/rest/access-rule.d.ts +117 -0
- package/dist/api/rest/access-rule.js +10 -0
- package/dist/{access-control → api/rest}/agreement.d.ts +0 -20
- package/dist/api/rest/agreement.js +7 -0
- package/dist/api/rest/alarm.js +1 -0
- package/dist/{api-keys.d.ts → api/rest/api-keys.d.ts} +0 -20
- package/dist/api/rest/api-keys.js +11 -0
- package/dist/api/rest/app.js +9 -0
- package/dist/api/rest/auth.js +16 -0
- package/dist/{automation.d.ts → api/rest/automation.d.ts} +0 -217
- package/dist/api/rest/automation.js +14 -0
- package/dist/api/rest/aware-config.js +1 -0
- package/dist/{bookmarks.d.ts → api/rest/bookmarks.d.ts} +0 -49
- package/dist/api/rest/bookmarks.js +18 -0
- package/dist/api/rest/cast.js +7 -0
- package/dist/{custom-field.d.ts → api/rest/custom-field.d.ts} +1 -19
- package/dist/api/rest/custom-field.js +3 -0
- package/dist/{device-event.d.ts → api/rest/device-event.d.ts} +1 -1
- package/dist/api/rest/device-event.js +1 -0
- package/dist/{device-group.d.ts → api/rest/device-group.d.ts} +0 -23
- package/dist/api/rest/device-group.js +17 -0
- package/dist/api/rest/file.js +1 -0
- package/dist/api/rest/index.d.ts +34 -0
- package/dist/api/rest/index.js +34 -0
- package/dist/{device-factory.d.ts → api/rest/io-device.d.ts} +1 -1
- package/dist/api/rest/io-device.js +19 -0
- package/dist/{layout.d.ts → api/rest/layout.d.ts} +6 -107
- package/dist/api/rest/layout.js +19 -0
- package/dist/{macros.d.ts → api/rest/macros.d.ts} +0 -82
- package/dist/api/rest/macros.js +8 -0
- package/dist/api/rest/media.js +65 -0
- package/dist/api/rest/module-config.d.ts +19 -0
- package/dist/api/rest/module-config.js +1 -0
- package/dist/api/rest/notifications.d.ts +21 -0
- package/dist/api/rest/notifications.js +9 -0
- package/dist/api/rest/person-agreement.d.ts +15 -0
- package/dist/api/rest/person-agreement.js +6 -0
- package/dist/api/rest/person-presence.d.ts +72 -0
- package/dist/api/rest/person-presence.js +29 -0
- package/dist/{access-control → api/rest}/person-type.d.ts +1 -33
- package/dist/api/rest/person-type.js +8 -0
- package/dist/api/rest/person.d.ts +128 -0
- package/dist/api/rest/person.js +8 -0
- package/dist/api/{query.js → rest/query.js} +8 -13
- package/dist/api/rest/schedule.d.ts +249 -0
- package/dist/api/rest/schedule.js +9 -0
- package/dist/{security-level.d.ts → api/rest/security-level.d.ts} +0 -29
- package/dist/api/rest/security-level.js +5 -0
- package/dist/{template.d.ts → api/rest/template.d.ts} +1 -18
- package/dist/api/rest/template.js +12 -0
- package/dist/{token-conversion.d.ts → api/rest/token-conversion.d.ts} +0 -22
- package/dist/api/rest/token-conversion.js +5 -0
- package/dist/{user.d.ts → api/rest/user.d.ts} +10 -60
- package/dist/api/rest/user.js +32 -0
- package/dist/api/rest/view.d.ts +397 -0
- package/dist/api/rest/view.js +16 -0
- package/dist/api/rest/webrtc-playback.js +8 -0
- package/dist/{access-control → api/rest}/zone.d.ts +0 -29
- package/dist/api/rest/zone.js +10 -0
- package/dist/api/state/index.d.ts +10 -0
- package/dist/api/state/index.js +1 -0
- package/dist/api/ws/device-communication.js +55 -0
- package/dist/api/ws/index.js +5 -0
- package/dist/api/ws/notifications.js +20 -0
- package/dist/api/ws/progress.js +44 -0
- package/dist/api/ws/web-rtc-signaling.js +92 -0
- package/dist/api/ws/web-socket.js +2 -0
- package/dist/index.d.ts +1 -36
- package/dist/index.js +6 -57
- package/dist/{access-control → objects}/access-rule.d.ts +9 -78
- package/dist/objects/access-rule.js +36 -0
- package/dist/objects/agent-metadata.d.ts +192 -0
- package/dist/objects/agent-metadata.js +49 -0
- package/dist/objects/agreement.d.ts +21 -0
- package/dist/objects/agreement.js +8 -0
- package/dist/{objects.d.ts → objects/all.d.ts} +18 -11
- package/dist/{objects.js → objects/all.js} +4 -7
- package/dist/objects/api-key.d.ts +21 -0
- package/dist/objects/api-key.js +8 -0
- package/dist/objects/automation-rule.d.ts +218 -0
- package/dist/objects/automation-rule.js +51 -0
- package/dist/objects/bookmark.d.ts +50 -0
- package/dist/objects/bookmark.js +13 -0
- package/dist/objects/credential.js +11 -0
- package/dist/objects/custom-field.d.ts +20 -0
- package/dist/objects/custom-field.js +14 -0
- package/dist/{device → objects/device}/alarm.js +3 -6
- package/dist/{device → objects/device}/any-device.d.ts +510 -510
- package/dist/objects/device/any-device.js +239 -0
- package/dist/objects/device/camera-lift.js +4 -0
- package/dist/objects/device/camera.js +32 -0
- package/dist/objects/device/device-gateway.js +2 -0
- package/dist/{device-import.d.ts → objects/device/device-import.d.ts} +44 -44
- package/dist/objects/device/device-import.js +30 -0
- package/dist/{device-relation.js → objects/device/device-relation.js} +13 -16
- package/dist/objects/device/display.js +4 -0
- package/dist/objects/device/door.js +9 -0
- package/dist/{device → objects/device}/index.d.ts +2 -0
- package/dist/objects/device/index.js +22 -0
- package/dist/objects/device/intercom-operator.js +1 -0
- package/dist/objects/device/intercom-terminal.js +23 -0
- package/dist/objects/device/io-board.js +7 -0
- package/dist/objects/device/motion-sensor.js +4 -0
- package/dist/objects/device/nvr-analytics-server.js +6 -0
- package/dist/objects/device/nvr-exporter.js +7 -0
- package/dist/objects/device/nvr-recorder.js +6 -0
- package/dist/objects/device/panic-button.js +4 -0
- package/dist/objects/device/pbx.js +6 -0
- package/dist/objects/device/presence-tracker.js +1 -0
- package/dist/objects/device/reader.js +1 -0
- package/dist/{device → objects/device}/server.d.ts +1 -1
- package/dist/objects/device/server.js +1 -0
- package/dist/objects/device/system.js +6 -0
- package/dist/objects/device-group.d.ts +24 -0
- package/dist/objects/device-group.js +9 -0
- package/dist/objects/index.d.ts +27 -0
- package/dist/objects/index.js +27 -0
- package/dist/objects/layout.d.ts +102 -0
- package/dist/objects/layout.js +22 -0
- package/dist/objects/macro.d.ts +83 -0
- package/dist/objects/macro.js +22 -0
- package/dist/{module-config.d.ts → objects/module-config.d.ts} +1 -18
- package/dist/objects/module-config.js +1 -0
- package/dist/{notifications.d.ts → objects/notification.d.ts} +0 -20
- package/dist/objects/notification.js +13 -0
- package/dist/{access-control → objects}/person-agreement.d.ts +1 -15
- package/dist/objects/person-agreement.js +8 -0
- package/dist/{access-control → objects}/person-presence.d.ts +2 -73
- package/dist/objects/person-presence.js +35 -0
- package/dist/objects/person-type.d.ts +33 -0
- package/dist/objects/person-type.js +16 -0
- package/dist/{access-control → objects}/person.d.ts +74 -140
- package/dist/objects/person.js +42 -0
- package/dist/objects/role.d.ts +21 -0
- package/dist/objects/role.js +15 -0
- package/dist/{access-control → objects}/schedule.d.ts +4 -129
- package/dist/objects/schedule.js +53 -0
- package/dist/objects/security-level.d.ts +30 -0
- package/dist/objects/security-level.js +11 -0
- package/dist/objects/template.d.ts +20 -0
- package/dist/objects/template.js +8 -0
- package/dist/objects/token-conversion.d.ts +23 -0
- package/dist/objects/token-conversion.js +8 -0
- package/dist/objects/user.d.ts +31 -0
- package/dist/objects/user.js +12 -0
- package/dist/{view.d.ts → objects/view.d.ts} +3 -399
- package/dist/objects/view.js +64 -0
- package/dist/{world-objects.js → objects/world-object.js} +5 -8
- package/dist/objects/zone.d.ts +41 -0
- package/dist/objects/zone.js +15 -0
- package/dist/package.json +1 -1
- package/dist/permissions.js +146 -149
- package/dist/primitives.d.ts +30 -30
- package/dist/primitives.js +27 -30
- package/package.json +1 -1
- package/dist/access-control/access-rule.js +0 -49
- package/dist/access-control/agreement.js +0 -20
- package/dist/access-control/credential.js +0 -17
- package/dist/access-control/index.d.ts +0 -9
- package/dist/access-control/index.js +0 -25
- package/dist/access-control/person-agreement.js +0 -19
- package/dist/access-control/person-presence.js +0 -66
- package/dist/access-control/person-type.js +0 -29
- package/dist/access-control/person.js +0 -53
- package/dist/access-control/schedule.js +0 -65
- package/dist/access-control/zone.js +0 -28
- package/dist/agent-communication/index.d.ts +0 -2
- package/dist/agent-communication/index.js +0 -18
- package/dist/agent-communication/mqtt-payloads.js +0 -21
- package/dist/agent-communication/protocol.js +0 -436
- package/dist/api/alarm.js +0 -2
- package/dist/api/auth.js +0 -19
- package/dist/api/media.js +0 -68
- package/dist/api-keys.js +0 -21
- package/dist/app.js +0 -12
- package/dist/automation.js +0 -66
- package/dist/aware-config.js +0 -2
- package/dist/bookmarks.js +0 -32
- package/dist/cast.js +0 -13
- package/dist/commands/alarm.js +0 -62
- package/dist/commands/camera-lift.js +0 -17
- package/dist/commands/camera.js +0 -97
- package/dist/commands/display.js +0 -37
- package/dist/commands/door.js +0 -27
- package/dist/commands/index.js +0 -28
- package/dist/commands/intercom-terminal.js +0 -3
- package/dist/commands/io-board.js +0 -15
- package/dist/commands/nvr-exporter.js +0 -26
- package/dist/commands/pbx.js +0 -17
- package/dist/commands/presence-tracker.js +0 -33
- package/dist/commands/server.js +0 -27
- package/dist/custom-field.js +0 -19
- package/dist/device/any-device.js +0 -242
- package/dist/device/camera-lift.js +0 -7
- package/dist/device/camera.js +0 -35
- package/dist/device/device-gateway.js +0 -5
- package/dist/device/display.js +0 -7
- package/dist/device/door.js +0 -12
- package/dist/device/index.js +0 -36
- package/dist/device/intercom-operator.js +0 -4
- package/dist/device/intercom-terminal.js +0 -26
- package/dist/device/io-board.js +0 -10
- package/dist/device/motion-sensor.js +0 -7
- package/dist/device/nvr-analytics-server.js +0 -9
- package/dist/device/nvr-exporter.js +0 -10
- package/dist/device/nvr-recorder.js +0 -9
- package/dist/device/panic-button.js +0 -7
- package/dist/device/pbx.js +0 -9
- package/dist/device/presence-tracker.js +0 -4
- package/dist/device/reader.js +0 -4
- package/dist/device/server.js +0 -4
- package/dist/device/system.js +0 -9
- package/dist/device-event.js +0 -2
- package/dist/device-factory.js +0 -26
- package/dist/device-group.js +0 -31
- package/dist/device-import.js +0 -33
- package/dist/device-state.d.ts +0 -10
- package/dist/device-state.js +0 -2
- package/dist/error.js +0 -185
- package/dist/events/alarm.js +0 -55
- package/dist/events/all.js +0 -128
- package/dist/events/camera.js +0 -87
- package/dist/events/display.js +0 -9
- package/dist/events/door.js +0 -62
- package/dist/events/index.js +0 -28
- package/dist/events/intercom-terminal.js +0 -19
- package/dist/events/io-board.js +0 -13
- package/dist/events/nvr-exporter.js +0 -21
- package/dist/events/panic-button.js +0 -11
- package/dist/events/presence-tracker.js +0 -33
- package/dist/events/reader.js +0 -13
- package/dist/events/server.js +0 -15
- package/dist/file.js +0 -2
- package/dist/layout.js +0 -45
- package/dist/macros.js +0 -32
- package/dist/messages/device-communication.js +0 -63
- package/dist/messages/index.js +0 -21
- package/dist/messages/notifications.js +0 -27
- package/dist/messages/progress.js +0 -51
- package/dist/messages/web-rtc-signaling.js +0 -99
- package/dist/messages/web-socket.js +0 -5
- package/dist/milestone.js +0 -2
- package/dist/module-config.js +0 -2
- package/dist/notifications.js +0 -23
- package/dist/orchid.js +0 -2
- package/dist/queries/all.js +0 -28
- package/dist/queries/camera.js +0 -27
- package/dist/queries/index.js +0 -21
- package/dist/queries/nvr-analytics-server.js +0 -76
- package/dist/queries/nvr-exporter.js +0 -36
- package/dist/queries/nvr-recorder.js +0 -42
- package/dist/security-level.js +0 -18
- package/dist/template.js +0 -21
- package/dist/token-conversion.js +0 -15
- package/dist/user.js +0 -57
- package/dist/view.js +0 -84
- package/dist/webrtc-playback.js +0 -14
- package/dist/{milestone.d.ts → _legacy/milestone.d.ts} +0 -0
- package/dist/{orchid.d.ts → _legacy/orchid.d.ts} +0 -0
- package/dist/{commands → api/commands}/alarm.d.ts +0 -0
- package/dist/{commands → api/commands}/camera-lift.d.ts +0 -0
- package/dist/{commands → api/commands}/camera.d.ts +0 -0
- package/dist/{commands → api/commands}/display.d.ts +0 -0
- package/dist/{commands → api/commands}/door.d.ts +0 -0
- package/dist/{commands → api/commands}/index.d.ts +0 -0
- package/dist/{commands → api/commands}/intercom-terminal.d.ts +0 -0
- package/dist/{commands → api/commands}/io-board.d.ts +0 -0
- package/dist/{commands → api/commands}/nvr-exporter.d.ts +86 -86
- package/dist/{commands → api/commands}/pbx.d.ts +0 -0
- package/dist/{commands → api/commands}/presence-tracker.d.ts +0 -0
- package/dist/{commands → api/commands}/server.d.ts +78 -78
- package/dist/{error.d.ts → api/error.d.ts} +0 -0
- package/dist/{events → api/events}/alarm.d.ts +0 -0
- package/dist/{events → api/events}/camera.d.ts +0 -0
- package/dist/{events → api/events}/display.d.ts +0 -0
- package/dist/{events → api/events}/door.d.ts +0 -0
- package/dist/{events → api/events}/index.d.ts +0 -0
- package/dist/{events → api/events}/intercom-terminal.d.ts +0 -0
- package/dist/{events → api/events}/io-board.d.ts +0 -0
- package/dist/{events → api/events}/nvr-exporter.d.ts +4 -4
- package/dist/{events → api/events}/panic-button.d.ts +0 -0
- package/dist/{events → api/events}/presence-tracker.d.ts +8 -8
- package/dist/{events → api/events}/reader.d.ts +0 -0
- package/dist/{agent-communication/mqtt-payloads.d.ts → api/mqtt/payloads.d.ts} +0 -0
- package/dist/{queries → api/queries}/all.d.ts +83 -83
- package/dist/{queries → api/queries}/camera.d.ts +0 -0
- package/dist/{queries → api/queries}/index.d.ts +0 -0
- package/dist/{queries → api/queries}/nvr-analytics-server.d.ts +4 -4
- package/dist/{queries → api/queries}/nvr-exporter.d.ts +0 -0
- package/dist/{queries → api/queries}/nvr-recorder.d.ts +162 -162
- package/dist/api/{alarm.d.ts → rest/alarm.d.ts} +0 -0
- package/dist/{app.d.ts → api/rest/app.d.ts} +0 -0
- package/dist/api/{auth.d.ts → rest/auth.d.ts} +0 -0
- package/dist/{aware-config.d.ts → api/rest/aware-config.d.ts} +0 -0
- package/dist/{cast.d.ts → api/rest/cast.d.ts} +0 -0
- package/dist/{file.d.ts → api/rest/file.d.ts} +0 -0
- package/dist/api/{media.d.ts → rest/media.d.ts} +2 -2
- /package/dist/api/{query.d.ts → rest/query.d.ts} +0 -0
- /package/dist/{webrtc-playback.d.ts → api/rest/webrtc-playback.d.ts} +0 -0
- /package/dist/{messages → api/ws}/device-communication.d.ts +0 -0
- /package/dist/{messages → api/ws}/index.d.ts +0 -0
- /package/dist/{messages → api/ws}/notifications.d.ts +0 -0
- /package/dist/{messages → api/ws}/progress.d.ts +0 -0
- /package/dist/{messages → api/ws}/web-rtc-signaling.d.ts +0 -0
- /package/dist/{messages → api/ws}/web-socket.d.ts +0 -0
- /package/dist/{access-control → objects}/credential.d.ts +0 -0
- /package/dist/{device → objects/device}/alarm.d.ts +0 -0
- /package/dist/{device → objects/device}/camera-lift.d.ts +0 -0
- /package/dist/{device → objects/device}/camera.d.ts +0 -0
- /package/dist/{device → objects/device}/device-gateway.d.ts +0 -0
- /package/dist/{device-relation.d.ts → objects/device/device-relation.d.ts} +0 -0
- /package/dist/{device → objects/device}/display.d.ts +0 -0
- /package/dist/{device → objects/device}/door.d.ts +0 -0
- /package/dist/{device → objects/device}/intercom-operator.d.ts +0 -0
- /package/dist/{device → objects/device}/intercom-terminal.d.ts +0 -0
- /package/dist/{device → objects/device}/io-board.d.ts +0 -0
- /package/dist/{device → objects/device}/motion-sensor.d.ts +0 -0
- /package/dist/{device → objects/device}/nvr-analytics-server.d.ts +0 -0
- /package/dist/{device → objects/device}/nvr-exporter.d.ts +0 -0
- /package/dist/{device → objects/device}/nvr-recorder.d.ts +0 -0
- /package/dist/{device → objects/device}/panic-button.d.ts +0 -0
- /package/dist/{device → objects/device}/pbx.d.ts +0 -0
- /package/dist/{device → objects/device}/presence-tracker.d.ts +0 -0
- /package/dist/{device → objects/device}/reader.d.ts +0 -0
- /package/dist/{device → objects/device}/system.d.ts +0 -0
- /package/dist/{world-objects.d.ts → objects/world-object.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from 'zod';
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export declare const sPersonAccessRule: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
displayName: z.ZodString;
|
|
@@ -9,6 +9,66 @@ export declare const sPersonAccessRule: z.ZodObject<{
|
|
|
9
9
|
id: string;
|
|
10
10
|
displayName: string;
|
|
11
11
|
}>;
|
|
12
|
+
export declare const sPersonProps: z.ZodObject<{
|
|
13
|
+
firstName: z.ZodString;
|
|
14
|
+
lastName: z.ZodString;
|
|
15
|
+
position: z.ZodNullable<z.ZodString>;
|
|
16
|
+
accessSuspended: z.ZodBoolean;
|
|
17
|
+
staffMember: z.ZodBoolean;
|
|
18
|
+
validFrom: z.ZodNullable<z.ZodString>;
|
|
19
|
+
validTo: z.ZodNullable<z.ZodString>;
|
|
20
|
+
avatarId: z.ZodNullable<z.ZodString>;
|
|
21
|
+
credentials: z.ZodArray<z.ZodObject<{
|
|
22
|
+
type: z.ZodEnum<["card", "pin", "fingerprint"]>;
|
|
23
|
+
value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
24
|
+
note: z.ZodNullable<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: "card" | "pin" | "fingerprint";
|
|
27
|
+
value: string | Record<string, unknown>;
|
|
28
|
+
note: string | null;
|
|
29
|
+
}, {
|
|
30
|
+
type: "card" | "pin" | "fingerprint";
|
|
31
|
+
value: string | Record<string, unknown>;
|
|
32
|
+
note: string | null;
|
|
33
|
+
}>, "many">;
|
|
34
|
+
accessRules: z.ZodArray<z.ZodString, "many">;
|
|
35
|
+
customFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
36
|
+
type: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
type: string;
|
|
39
|
+
position: string | null;
|
|
40
|
+
firstName: string;
|
|
41
|
+
lastName: string;
|
|
42
|
+
avatarId: string | null;
|
|
43
|
+
accessSuspended: boolean;
|
|
44
|
+
staffMember: boolean;
|
|
45
|
+
validFrom: string | null;
|
|
46
|
+
validTo: string | null;
|
|
47
|
+
credentials: {
|
|
48
|
+
type: "card" | "pin" | "fingerprint";
|
|
49
|
+
value: string | Record<string, unknown>;
|
|
50
|
+
note: string | null;
|
|
51
|
+
}[];
|
|
52
|
+
accessRules: string[];
|
|
53
|
+
customFields: Record<string, string> | null;
|
|
54
|
+
}, {
|
|
55
|
+
type: string;
|
|
56
|
+
position: string | null;
|
|
57
|
+
firstName: string;
|
|
58
|
+
lastName: string;
|
|
59
|
+
avatarId: string | null;
|
|
60
|
+
accessSuspended: boolean;
|
|
61
|
+
staffMember: boolean;
|
|
62
|
+
validFrom: string | null;
|
|
63
|
+
validTo: string | null;
|
|
64
|
+
credentials: {
|
|
65
|
+
type: "card" | "pin" | "fingerprint";
|
|
66
|
+
value: string | Record<string, unknown>;
|
|
67
|
+
note: string | null;
|
|
68
|
+
}[];
|
|
69
|
+
accessRules: string[];
|
|
70
|
+
customFields: Record<string, string> | null;
|
|
71
|
+
}>;
|
|
12
72
|
export declare const sPersonDto: z.ZodObject<{
|
|
13
73
|
id: z.ZodString;
|
|
14
74
|
firstName: z.ZodString;
|
|
@@ -73,17 +133,16 @@ export declare const sPersonDto: z.ZodObject<{
|
|
|
73
133
|
id: string;
|
|
74
134
|
position: string | null;
|
|
75
135
|
version: number;
|
|
76
|
-
refs: Record<string, string | string[]>;
|
|
77
|
-
createdOn: string;
|
|
78
|
-
lastModifiedOn: string;
|
|
79
136
|
firstName: string;
|
|
80
137
|
lastName: string;
|
|
81
138
|
avatarId: string | null;
|
|
82
|
-
|
|
83
|
-
|
|
139
|
+
createdOn: string;
|
|
140
|
+
lastModifiedOn: string;
|
|
141
|
+
refs: Record<string, string | string[]>;
|
|
84
142
|
accessSuspended: boolean;
|
|
85
|
-
archived: boolean;
|
|
86
143
|
staffMember: boolean;
|
|
144
|
+
validFrom: string | null;
|
|
145
|
+
validTo: string | null;
|
|
87
146
|
credentials: {
|
|
88
147
|
type: "card" | "pin" | "fingerprint";
|
|
89
148
|
value: string | Record<string, unknown>;
|
|
@@ -94,6 +153,7 @@ export declare const sPersonDto: z.ZodObject<{
|
|
|
94
153
|
displayName: string;
|
|
95
154
|
}[];
|
|
96
155
|
customFields: Record<string, string> | null;
|
|
156
|
+
archived: boolean;
|
|
97
157
|
agreements: {
|
|
98
158
|
createdOn: string;
|
|
99
159
|
lastModifiedOn: string;
|
|
@@ -106,17 +166,16 @@ export declare const sPersonDto: z.ZodObject<{
|
|
|
106
166
|
id: string;
|
|
107
167
|
position: string | null;
|
|
108
168
|
version: number;
|
|
109
|
-
refs: Record<string, string | string[]>;
|
|
110
|
-
createdOn: string;
|
|
111
|
-
lastModifiedOn: string;
|
|
112
169
|
firstName: string;
|
|
113
170
|
lastName: string;
|
|
114
171
|
avatarId: string | null;
|
|
115
|
-
|
|
116
|
-
|
|
172
|
+
createdOn: string;
|
|
173
|
+
lastModifiedOn: string;
|
|
174
|
+
refs: Record<string, string | string[]>;
|
|
117
175
|
accessSuspended: boolean;
|
|
118
|
-
archived: boolean;
|
|
119
176
|
staffMember: boolean;
|
|
177
|
+
validFrom: string | null;
|
|
178
|
+
validTo: string | null;
|
|
120
179
|
credentials: {
|
|
121
180
|
type: "card" | "pin" | "fingerprint";
|
|
122
181
|
value: string | Record<string, unknown>;
|
|
@@ -127,6 +186,7 @@ export declare const sPersonDto: z.ZodObject<{
|
|
|
127
186
|
displayName: string;
|
|
128
187
|
}[];
|
|
129
188
|
customFields: Record<string, string> | null;
|
|
189
|
+
archived: boolean;
|
|
130
190
|
agreements: {
|
|
131
191
|
createdOn: string;
|
|
132
192
|
lastModifiedOn: string;
|
|
@@ -135,132 +195,6 @@ export declare const sPersonDto: z.ZodObject<{
|
|
|
135
195
|
agreementImage: string;
|
|
136
196
|
}[];
|
|
137
197
|
}>;
|
|
138
|
-
export declare const sCreatePersonRequest: z.ZodObject<{
|
|
139
|
-
firstName: z.ZodString;
|
|
140
|
-
lastName: z.ZodString;
|
|
141
|
-
position: z.ZodNullable<z.ZodString>;
|
|
142
|
-
accessSuspended: z.ZodBoolean;
|
|
143
|
-
staffMember: z.ZodBoolean;
|
|
144
|
-
validFrom: z.ZodNullable<z.ZodString>;
|
|
145
|
-
validTo: z.ZodNullable<z.ZodString>;
|
|
146
|
-
avatarId: z.ZodNullable<z.ZodString>;
|
|
147
|
-
credentials: z.ZodArray<z.ZodObject<{
|
|
148
|
-
type: z.ZodEnum<["card", "pin", "fingerprint"]>;
|
|
149
|
-
value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
150
|
-
note: z.ZodNullable<z.ZodString>;
|
|
151
|
-
}, "strip", z.ZodTypeAny, {
|
|
152
|
-
type: "card" | "pin" | "fingerprint";
|
|
153
|
-
value: string | Record<string, unknown>;
|
|
154
|
-
note: string | null;
|
|
155
|
-
}, {
|
|
156
|
-
type: "card" | "pin" | "fingerprint";
|
|
157
|
-
value: string | Record<string, unknown>;
|
|
158
|
-
note: string | null;
|
|
159
|
-
}>, "many">;
|
|
160
|
-
accessRules: z.ZodArray<z.ZodString, "many">;
|
|
161
|
-
customFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
162
|
-
type: z.ZodString;
|
|
163
|
-
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
type: string;
|
|
165
|
-
position: string | null;
|
|
166
|
-
firstName: string;
|
|
167
|
-
lastName: string;
|
|
168
|
-
avatarId: string | null;
|
|
169
|
-
validFrom: string | null;
|
|
170
|
-
validTo: string | null;
|
|
171
|
-
accessSuspended: boolean;
|
|
172
|
-
staffMember: boolean;
|
|
173
|
-
credentials: {
|
|
174
|
-
type: "card" | "pin" | "fingerprint";
|
|
175
|
-
value: string | Record<string, unknown>;
|
|
176
|
-
note: string | null;
|
|
177
|
-
}[];
|
|
178
|
-
accessRules: string[];
|
|
179
|
-
customFields: Record<string, string> | null;
|
|
180
|
-
}, {
|
|
181
|
-
type: string;
|
|
182
|
-
position: string | null;
|
|
183
|
-
firstName: string;
|
|
184
|
-
lastName: string;
|
|
185
|
-
avatarId: string | null;
|
|
186
|
-
validFrom: string | null;
|
|
187
|
-
validTo: string | null;
|
|
188
|
-
accessSuspended: boolean;
|
|
189
|
-
staffMember: boolean;
|
|
190
|
-
credentials: {
|
|
191
|
-
type: "card" | "pin" | "fingerprint";
|
|
192
|
-
value: string | Record<string, unknown>;
|
|
193
|
-
note: string | null;
|
|
194
|
-
}[];
|
|
195
|
-
accessRules: string[];
|
|
196
|
-
customFields: Record<string, string> | null;
|
|
197
|
-
}>;
|
|
198
|
-
export declare const sUpdatePersonRequest: z.ZodObject<{
|
|
199
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
200
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
201
|
-
position: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
202
|
-
accessSuspended: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
-
staffMember: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
-
validFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
205
|
-
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
|
-
avatarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
|
-
credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
208
|
-
type: z.ZodEnum<["card", "pin", "fingerprint"]>;
|
|
209
|
-
value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
210
|
-
note: z.ZodNullable<z.ZodString>;
|
|
211
|
-
}, "strip", z.ZodTypeAny, {
|
|
212
|
-
type: "card" | "pin" | "fingerprint";
|
|
213
|
-
value: string | Record<string, unknown>;
|
|
214
|
-
note: string | null;
|
|
215
|
-
}, {
|
|
216
|
-
type: "card" | "pin" | "fingerprint";
|
|
217
|
-
value: string | Record<string, unknown>;
|
|
218
|
-
note: string | null;
|
|
219
|
-
}>, "many">>;
|
|
220
|
-
accessRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
221
|
-
customFields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
222
|
-
type: z.ZodOptional<z.ZodString>;
|
|
223
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
-
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
type?: string | undefined;
|
|
226
|
-
position?: string | null | undefined;
|
|
227
|
-
firstName?: string | undefined;
|
|
228
|
-
lastName?: string | undefined;
|
|
229
|
-
avatarId?: string | null | undefined;
|
|
230
|
-
validFrom?: string | null | undefined;
|
|
231
|
-
validTo?: string | null | undefined;
|
|
232
|
-
accessSuspended?: boolean | undefined;
|
|
233
|
-
archived?: boolean | undefined;
|
|
234
|
-
staffMember?: boolean | undefined;
|
|
235
|
-
credentials?: {
|
|
236
|
-
type: "card" | "pin" | "fingerprint";
|
|
237
|
-
value: string | Record<string, unknown>;
|
|
238
|
-
note: string | null;
|
|
239
|
-
}[] | undefined;
|
|
240
|
-
accessRules?: string[] | undefined;
|
|
241
|
-
customFields?: Record<string, string> | null | undefined;
|
|
242
|
-
}, {
|
|
243
|
-
type?: string | undefined;
|
|
244
|
-
position?: string | null | undefined;
|
|
245
|
-
firstName?: string | undefined;
|
|
246
|
-
lastName?: string | undefined;
|
|
247
|
-
avatarId?: string | null | undefined;
|
|
248
|
-
validFrom?: string | null | undefined;
|
|
249
|
-
validTo?: string | null | undefined;
|
|
250
|
-
accessSuspended?: boolean | undefined;
|
|
251
|
-
archived?: boolean | undefined;
|
|
252
|
-
staffMember?: boolean | undefined;
|
|
253
|
-
credentials?: {
|
|
254
|
-
type: "card" | "pin" | "fingerprint";
|
|
255
|
-
value: string | Record<string, unknown>;
|
|
256
|
-
note: string | null;
|
|
257
|
-
}[] | undefined;
|
|
258
|
-
accessRules?: string[] | undefined;
|
|
259
|
-
customFields?: Record<string, string> | null | undefined;
|
|
260
|
-
}>;
|
|
261
198
|
export type PersonAccessRuleDto = z.infer<typeof sPersonAccessRule>;
|
|
199
|
+
export type PersonProps = z.infer<typeof sPersonProps>;
|
|
262
200
|
export type PersonDto = z.infer<typeof sPersonDto>;
|
|
263
|
-
export type CreatePersonRequest = z.infer<typeof sCreatePersonRequest>;
|
|
264
|
-
export type UpdatePersonRequest = {
|
|
265
|
-
id: string;
|
|
266
|
-
} & z.infer<typeof sUpdatePersonRequest>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { sPersonAgeementDto } from './person-agreement';
|
|
3
|
+
import { sAssignedCredential } from './credential';
|
|
4
|
+
export const sPersonAccessRule = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
displayName: z.string(),
|
|
7
|
+
});
|
|
8
|
+
export const sPersonProps = z.object({
|
|
9
|
+
firstName: z.string().min(1).max(64),
|
|
10
|
+
lastName: z.string().min(1).max(64),
|
|
11
|
+
position: z.string().nullable(),
|
|
12
|
+
accessSuspended: z.boolean(),
|
|
13
|
+
staffMember: z.boolean(),
|
|
14
|
+
validFrom: z.string().date().nullable(),
|
|
15
|
+
validTo: z.string().date().nullable(),
|
|
16
|
+
avatarId: z.string().nullable(),
|
|
17
|
+
credentials: z.array(sAssignedCredential),
|
|
18
|
+
accessRules: z.array(z.string().nonempty()),
|
|
19
|
+
customFields: z.record(z.string()).nullable(),
|
|
20
|
+
type: z.string().min(1).max(16),
|
|
21
|
+
});
|
|
22
|
+
export const sPersonDto = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
firstName: z.string().min(1).max(64),
|
|
25
|
+
lastName: z.string().min(1).max(64),
|
|
26
|
+
position: z.string().max(128).nullable(),
|
|
27
|
+
validFrom: z.string().date().nullable(),
|
|
28
|
+
validTo: z.string().date().nullable(),
|
|
29
|
+
accessSuspended: z.boolean(),
|
|
30
|
+
archived: z.boolean(),
|
|
31
|
+
staffMember: z.boolean(),
|
|
32
|
+
createdOn: z.string(),
|
|
33
|
+
lastModifiedOn: z.string(),
|
|
34
|
+
avatarId: z.string().nullable(),
|
|
35
|
+
credentials: z.array(sAssignedCredential),
|
|
36
|
+
accessRules: z.array(sPersonAccessRule),
|
|
37
|
+
customFields: z.record(z.string()).nullable(),
|
|
38
|
+
refs: z.record(z.union([z.string(), z.array(z.string())])),
|
|
39
|
+
version: z.number(),
|
|
40
|
+
type: z.string().min(1).max(64),
|
|
41
|
+
agreements: z.array(sPersonAgeementDto),
|
|
42
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sRoleDto: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
displayName: z.ZodString;
|
|
5
|
+
systemName: z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
+
description: z.ZodString;
|
|
7
|
+
permissions: z.ZodArray<z.ZodUnion<[z.ZodLiteral<"layout:read">, z.ZodLiteral<"layout:update">, z.ZodLiteral<"layout:delete">, z.ZodLiteral<"layout:create">, z.ZodLiteral<"camera:live">, z.ZodLiteral<"camera:playback">, z.ZodLiteral<"camera:playback-export">, z.ZodLiteral<"camera:ptz">, z.ZodLiteral<"camera:privacy-mode">, z.ZodLiteral<"camera:assign">, z.ZodLiteral<"camera:detection">, z.ZodLiteral<"preset:read">, z.ZodLiteral<"preset:update">, z.ZodLiteral<"preset:delete">, z.ZodLiteral<"preset:create">, z.ZodLiteral<"door:release">, z.ZodLiteral<"door:lock">, z.ZodLiteral<"camera-lift:activate">, z.ZodLiteral<"io-board:activate">, z.ZodLiteral<"public-view:read">, z.ZodLiteral<"public-view:update">, z.ZodLiteral<"public-view:delete">, z.ZodLiteral<"public-view:create">, z.ZodLiteral<"private-view:read">, z.ZodLiteral<"private-view:update">, z.ZodLiteral<"private-view:delete">, z.ZodLiteral<"private-view:create">, z.ZodLiteral<"person:read">, z.ZodLiteral<"person:update">, z.ZodLiteral<"person:delete">, z.ZodLiteral<"person:create">, z.ZodLiteral<"person:assign">, z.ZodLiteral<"person:print">, z.ZodLiteral<"door-group:read">, z.ZodLiteral<"door-group:update">, z.ZodLiteral<"door-group:delete">, z.ZodLiteral<"door-group:create">, z.ZodLiteral<"access-rule:read">, z.ZodLiteral<"access-rule:update">, z.ZodLiteral<"access-rule:delete">, z.ZodLiteral<"access-rule:create">, z.ZodLiteral<"schedule:read">, z.ZodLiteral<"schedule:update">, z.ZodLiteral<"schedule:delete">, z.ZodLiteral<"schedule:create">, z.ZodLiteral<"presence:read">, z.ZodLiteral<"presence:update">, z.ZodLiteral<"presence:update-reader">, z.ZodLiteral<"factory:read">, z.ZodLiteral<"factory:update">, z.ZodLiteral<"factory:delete">, z.ZodLiteral<"factory:create">, z.ZodLiteral<"event:read">, z.ZodLiteral<"event:purge">, z.ZodLiteral<"alarm:read">, z.ZodLiteral<"alarm:acknowlede">, z.ZodLiteral<"alarm:arm">, z.ZodLiteral<"alarm:trigger">, z.ZodLiteral<"alarm:bypass">, z.ZodLiteral<"user:read">, z.ZodLiteral<"user:change-password">, z.ZodLiteral<"user:change-username">, z.ZodLiteral<"user:change-name">, z.ZodLiteral<"user:change-email">, z.ZodLiteral<"user:activate">, z.ZodLiteral<"user:delete">, z.ZodLiteral<"user:change-roles">, z.ZodLiteral<"user:create">, z.ZodLiteral<"role:read">, z.ZodLiteral<"role:create">, z.ZodLiteral<"role:delete">, z.ZodLiteral<"role:update">, z.ZodLiteral<"module:read">, z.ZodLiteral<"module:update">, z.ZodLiteral<"module:enable">, z.ZodLiteral<"device:discover">, z.ZodLiteral<"device:import">, z.ZodLiteral<"device:override-specs">, z.ZodLiteral<"device:notes">, z.ZodLiteral<"device:alarms">, z.ZodLiteral<"device:adjacent-cameras">, z.ZodLiteral<"automation:read">, z.ZodLiteral<"automation:update">, z.ZodLiteral<"automation:delete">, z.ZodLiteral<"automation:create">, z.ZodLiteral<"device-group:read">, z.ZodLiteral<"device-group:update">, z.ZodLiteral<"device-group:delete">, z.ZodLiteral<"device-group:create">, z.ZodLiteral<"macro:read">, z.ZodLiteral<"macro:update">, z.ZodLiteral<"macro:delete">, z.ZodLiteral<"macro:create">, z.ZodLiteral<"macro:run">, z.ZodLiteral<"notification:create">, z.ZodLiteral<"template:read">, z.ZodLiteral<"template:update">, z.ZodLiteral<"template:delete">, z.ZodLiteral<"template:create">, z.ZodLiteral<"custom-field:read">, z.ZodLiteral<"custom-field:update">, z.ZodLiteral<"custom-field:delete">, z.ZodLiteral<"custom-field:create">, z.ZodLiteral<"media:read">, z.ZodLiteral<"about:read">, z.ZodLiteral<"intercom:read">, z.ZodLiteral<"display:read">, ...(z.ZodLiteral<"device:camera"> | z.ZodLiteral<"device:door"> | z.ZodLiteral<"device:motion-sensor"> | z.ZodLiteral<"device:panic-button"> | z.ZodLiteral<"device:intercom-terminal"> | z.ZodLiteral<"device:display"> | z.ZodLiteral<"device:nvr-recorder"> | z.ZodLiteral<"device:nvr-exporter"> | z.ZodLiteral<"device:nvr-analytics-server"> | z.ZodLiteral<"device:system">)[], z.ZodLiteral<"security-level:read">, z.ZodLiteral<"security-level:update">, z.ZodLiteral<"security-level:delete">, z.ZodLiteral<"security-level:create">, z.ZodLiteral<"citadel-mode:toggle">, z.ZodLiteral<"token-conversion:read">, z.ZodLiteral<"token-conversion:update">, z.ZodLiteral<"token-conversion:delete">, z.ZodLiteral<"token-conversion:create">, z.ZodLiteral<"bookmark:read">, z.ZodLiteral<"bookmark:create">, z.ZodLiteral<"bookmark:update">, z.ZodLiteral<"bookmark:delete">, z.ZodLiteral<"access-path:read">, z.ZodLiteral<"access-path:create">, z.ZodLiteral<"access-path:update">, z.ZodLiteral<"access-path:delete">, z.ZodLiteral<"person-type:create">, z.ZodLiteral<"person-type:update">, z.ZodLiteral<"person-type:delete">, z.ZodLiteral<"agreement:create">, z.ZodLiteral<"agreement:update">, z.ZodLiteral<"agreement:delete">, z.ZodLiteral<"api-key:create">, z.ZodLiteral<"api-key:revoke">]>, "many">;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
description: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
permissions: ("device:camera" | "device:door" | "device:motion-sensor" | "device:panic-button" | "device:intercom-terminal" | "device:display" | "device:nvr-recorder" | "device:nvr-exporter" | "device:nvr-analytics-server" | "device:system" | "layout:read" | "layout:update" | "layout:delete" | "layout:create" | "camera:live" | "camera:playback" | "camera:playback-export" | "camera:ptz" | "camera:privacy-mode" | "camera:assign" | "camera:detection" | "preset:read" | "preset:update" | "preset:delete" | "preset:create" | "door:release" | "door:lock" | "camera-lift:activate" | "io-board:activate" | "public-view:read" | "public-view:update" | "public-view:delete" | "public-view:create" | "private-view:read" | "private-view:update" | "private-view:delete" | "private-view:create" | "person:read" | "person:update" | "person:delete" | "person:create" | "person:assign" | "person:print" | "door-group:read" | "door-group:update" | "door-group:delete" | "door-group:create" | "access-rule:read" | "access-rule:update" | "access-rule:delete" | "access-rule:create" | "schedule:read" | "schedule:update" | "schedule:delete" | "schedule:create" | "presence:read" | "presence:update" | "presence:update-reader" | "factory:read" | "factory:update" | "factory:delete" | "factory:create" | "event:read" | "event:purge" | "alarm:read" | "alarm:acknowlede" | "alarm:arm" | "alarm:trigger" | "alarm:bypass" | "user:read" | "user:change-password" | "user:change-username" | "user:change-name" | "user:change-email" | "user:activate" | "user:delete" | "user:change-roles" | "user:create" | "role:read" | "role:create" | "role:delete" | "role:update" | "module:read" | "module:update" | "module:enable" | "device:discover" | "device:import" | "device:override-specs" | "device:notes" | "device:alarms" | "device:adjacent-cameras" | "automation:read" | "automation:update" | "automation:delete" | "automation:create" | "device-group:read" | "device-group:update" | "device-group:delete" | "device-group:create" | "macro:read" | "macro:update" | "macro:delete" | "macro:create" | "macro:run" | "notification:create" | "template:read" | "template:update" | "template:delete" | "template:create" | "custom-field:read" | "custom-field:update" | "custom-field:delete" | "custom-field:create" | "media:read" | "about:read" | "intercom:read" | "display:read" | "security-level:read" | "security-level:update" | "security-level:delete" | "security-level:create" | "citadel-mode:toggle" | "token-conversion:read" | "token-conversion:update" | "token-conversion:delete" | "token-conversion:create" | "bookmark:read" | "bookmark:create" | "bookmark:update" | "bookmark:delete" | "access-path:read" | "access-path:create" | "access-path:update" | "access-path:delete" | "person-type:create" | "person-type:update" | "person-type:delete" | "agreement:create" | "agreement:update" | "agreement:delete" | "api-key:create" | "api-key:revoke")[];
|
|
13
|
+
systemName: string;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
description: string;
|
|
17
|
+
displayName: string;
|
|
18
|
+
permissions: ("device:camera" | "device:door" | "device:motion-sensor" | "device:panic-button" | "device:intercom-terminal" | "device:display" | "device:nvr-recorder" | "device:nvr-exporter" | "device:nvr-analytics-server" | "device:system" | "layout:read" | "layout:update" | "layout:delete" | "layout:create" | "camera:live" | "camera:playback" | "camera:playback-export" | "camera:ptz" | "camera:privacy-mode" | "camera:assign" | "camera:detection" | "preset:read" | "preset:update" | "preset:delete" | "preset:create" | "door:release" | "door:lock" | "camera-lift:activate" | "io-board:activate" | "public-view:read" | "public-view:update" | "public-view:delete" | "public-view:create" | "private-view:read" | "private-view:update" | "private-view:delete" | "private-view:create" | "person:read" | "person:update" | "person:delete" | "person:create" | "person:assign" | "person:print" | "door-group:read" | "door-group:update" | "door-group:delete" | "door-group:create" | "access-rule:read" | "access-rule:update" | "access-rule:delete" | "access-rule:create" | "schedule:read" | "schedule:update" | "schedule:delete" | "schedule:create" | "presence:read" | "presence:update" | "presence:update-reader" | "factory:read" | "factory:update" | "factory:delete" | "factory:create" | "event:read" | "event:purge" | "alarm:read" | "alarm:acknowlede" | "alarm:arm" | "alarm:trigger" | "alarm:bypass" | "user:read" | "user:change-password" | "user:change-username" | "user:change-name" | "user:change-email" | "user:activate" | "user:delete" | "user:change-roles" | "user:create" | "role:read" | "role:create" | "role:delete" | "role:update" | "module:read" | "module:update" | "module:enable" | "device:discover" | "device:import" | "device:override-specs" | "device:notes" | "device:alarms" | "device:adjacent-cameras" | "automation:read" | "automation:update" | "automation:delete" | "automation:create" | "device-group:read" | "device-group:update" | "device-group:delete" | "device-group:create" | "macro:read" | "macro:update" | "macro:delete" | "macro:create" | "macro:run" | "notification:create" | "template:read" | "template:update" | "template:delete" | "template:create" | "custom-field:read" | "custom-field:update" | "custom-field:delete" | "custom-field:create" | "media:read" | "about:read" | "intercom:read" | "display:read" | "security-level:read" | "security-level:update" | "security-level:delete" | "security-level:create" | "citadel-mode:toggle" | "token-conversion:read" | "token-conversion:update" | "token-conversion:delete" | "token-conversion:create" | "bookmark:read" | "bookmark:create" | "bookmark:update" | "bookmark:delete" | "access-path:read" | "access-path:create" | "access-path:update" | "access-path:delete" | "person-type:create" | "person-type:update" | "person-type:delete" | "agreement:create" | "agreement:update" | "agreement:delete" | "api-key:create" | "api-key:revoke")[];
|
|
19
|
+
systemName: string;
|
|
20
|
+
}>;
|
|
21
|
+
export type RoleDto = z.infer<typeof sRoleDto>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { sPermissionId } from '../permissions';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const sRoleDto = z.object({
|
|
4
|
+
id: z.string().uuid(),
|
|
5
|
+
displayName: z.string().nonempty().max(100),
|
|
6
|
+
systemName: z
|
|
7
|
+
.string()
|
|
8
|
+
.nonempty()
|
|
9
|
+
.max(64)
|
|
10
|
+
.refine((value) => !/\s/.test(value), {
|
|
11
|
+
message: 'System name must not contain spaces',
|
|
12
|
+
}),
|
|
13
|
+
description: z.string().nonempty(),
|
|
14
|
+
permissions: z.array(sPermissionId),
|
|
15
|
+
});
|
|
@@ -162,9 +162,9 @@ export declare const sScheduleDto: z.ZodObject<{
|
|
|
162
162
|
}[];
|
|
163
163
|
} | null;
|
|
164
164
|
displayName: string;
|
|
165
|
-
refs: Record<string, string | string[]>;
|
|
166
165
|
createdOn: string;
|
|
167
166
|
lastModifiedOn: string;
|
|
167
|
+
refs: Record<string, string | string[]>;
|
|
168
168
|
editable: boolean;
|
|
169
169
|
deletable: boolean;
|
|
170
170
|
flag: "always" | "never" | null;
|
|
@@ -192,9 +192,9 @@ export declare const sScheduleDto: z.ZodObject<{
|
|
|
192
192
|
}[];
|
|
193
193
|
} | null;
|
|
194
194
|
displayName: string;
|
|
195
|
-
refs: Record<string, string | string[]>;
|
|
196
195
|
createdOn: string;
|
|
197
196
|
lastModifiedOn: string;
|
|
197
|
+
refs: Record<string, string | string[]>;
|
|
198
198
|
editable: boolean;
|
|
199
199
|
deletable: boolean;
|
|
200
200
|
flag: "always" | "never" | null;
|
|
@@ -250,7 +250,7 @@ export declare const sScheduleDetailsRequest: z.ZodObject<{
|
|
|
250
250
|
}[];
|
|
251
251
|
}>;
|
|
252
252
|
export type ScheduleDetailsRequest = z.infer<typeof sScheduleDetailsRequest>;
|
|
253
|
-
export declare const
|
|
253
|
+
export declare const sScheduleProps: z.ZodObject<{
|
|
254
254
|
displayName: z.ZodString;
|
|
255
255
|
flag: z.ZodNullable<z.ZodEnum<["always", "never"]>>;
|
|
256
256
|
include: z.ZodNullable<z.ZodObject<{
|
|
@@ -372,129 +372,4 @@ export declare const sCreateScheduleRequest: z.ZodObject<{
|
|
|
372
372
|
displayName: string;
|
|
373
373
|
flag: "always" | "never" | null;
|
|
374
374
|
}>;
|
|
375
|
-
export type
|
|
376
|
-
export declare const sUpdateScheduleRequest: z.ZodObject<{
|
|
377
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
378
|
-
flag: z.ZodOptional<z.ZodNullable<z.ZodEnum<["always", "never"]>>>;
|
|
379
|
-
include: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
380
|
-
startDate: z.ZodNullable<z.ZodString>;
|
|
381
|
-
endDate: z.ZodNullable<z.ZodString>;
|
|
382
|
-
timeIntervals: z.ZodArray<z.ZodObject<{
|
|
383
|
-
weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
|
|
384
|
-
from: z.ZodNumber;
|
|
385
|
-
to: z.ZodNumber;
|
|
386
|
-
}, "strip", z.ZodTypeAny, {
|
|
387
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
388
|
-
from: number;
|
|
389
|
-
to: number;
|
|
390
|
-
}, {
|
|
391
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
392
|
-
from: number;
|
|
393
|
-
to: number;
|
|
394
|
-
}>, "many">;
|
|
395
|
-
repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
|
|
396
|
-
}, "strip", z.ZodTypeAny, {
|
|
397
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
398
|
-
startDate: string | null;
|
|
399
|
-
endDate: string | null;
|
|
400
|
-
timeIntervals: {
|
|
401
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
402
|
-
from: number;
|
|
403
|
-
to: number;
|
|
404
|
-
}[];
|
|
405
|
-
}, {
|
|
406
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
407
|
-
startDate: string | null;
|
|
408
|
-
endDate: string | null;
|
|
409
|
-
timeIntervals: {
|
|
410
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
411
|
-
from: number;
|
|
412
|
-
to: number;
|
|
413
|
-
}[];
|
|
414
|
-
}>>>;
|
|
415
|
-
exclude: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
416
|
-
startDate: z.ZodNullable<z.ZodString>;
|
|
417
|
-
endDate: z.ZodNullable<z.ZodString>;
|
|
418
|
-
timeIntervals: z.ZodArray<z.ZodObject<{
|
|
419
|
-
weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
|
|
420
|
-
from: z.ZodNumber;
|
|
421
|
-
to: z.ZodNumber;
|
|
422
|
-
}, "strip", z.ZodTypeAny, {
|
|
423
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
424
|
-
from: number;
|
|
425
|
-
to: number;
|
|
426
|
-
}, {
|
|
427
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
428
|
-
from: number;
|
|
429
|
-
to: number;
|
|
430
|
-
}>, "many">;
|
|
431
|
-
repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
|
|
432
|
-
}, "strip", z.ZodTypeAny, {
|
|
433
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
434
|
-
startDate: string | null;
|
|
435
|
-
endDate: string | null;
|
|
436
|
-
timeIntervals: {
|
|
437
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
438
|
-
from: number;
|
|
439
|
-
to: number;
|
|
440
|
-
}[];
|
|
441
|
-
}, {
|
|
442
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
443
|
-
startDate: string | null;
|
|
444
|
-
endDate: string | null;
|
|
445
|
-
timeIntervals: {
|
|
446
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
447
|
-
from: number;
|
|
448
|
-
to: number;
|
|
449
|
-
}[];
|
|
450
|
-
}>>>;
|
|
451
|
-
}, "strip", z.ZodTypeAny, {
|
|
452
|
-
include?: {
|
|
453
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
454
|
-
startDate: string | null;
|
|
455
|
-
endDate: string | null;
|
|
456
|
-
timeIntervals: {
|
|
457
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
458
|
-
from: number;
|
|
459
|
-
to: number;
|
|
460
|
-
}[];
|
|
461
|
-
} | null | undefined;
|
|
462
|
-
exclude?: {
|
|
463
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
464
|
-
startDate: string | null;
|
|
465
|
-
endDate: string | null;
|
|
466
|
-
timeIntervals: {
|
|
467
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
468
|
-
from: number;
|
|
469
|
-
to: number;
|
|
470
|
-
}[];
|
|
471
|
-
} | null | undefined;
|
|
472
|
-
displayName?: string | undefined;
|
|
473
|
-
flag?: "always" | "never" | null | undefined;
|
|
474
|
-
}, {
|
|
475
|
-
include?: {
|
|
476
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
477
|
-
startDate: string | null;
|
|
478
|
-
endDate: string | null;
|
|
479
|
-
timeIntervals: {
|
|
480
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
481
|
-
from: number;
|
|
482
|
-
to: number;
|
|
483
|
-
}[];
|
|
484
|
-
} | null | undefined;
|
|
485
|
-
exclude?: {
|
|
486
|
-
repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
|
|
487
|
-
startDate: string | null;
|
|
488
|
-
endDate: string | null;
|
|
489
|
-
timeIntervals: {
|
|
490
|
-
weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
491
|
-
from: number;
|
|
492
|
-
to: number;
|
|
493
|
-
}[];
|
|
494
|
-
} | null | undefined;
|
|
495
|
-
displayName?: string | undefined;
|
|
496
|
-
flag?: "always" | "never" | null | undefined;
|
|
497
|
-
}>;
|
|
498
|
-
export type UpdateScheduleRequest = {
|
|
499
|
-
id: string;
|
|
500
|
-
} & z.infer<typeof sUpdateScheduleRequest>;
|
|
375
|
+
export type ScheduleProps = z.infer<typeof sScheduleProps>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export const sWeekDay = z.enum([
|
|
3
|
+
'mon',
|
|
4
|
+
'tue',
|
|
5
|
+
'wed',
|
|
6
|
+
'thu',
|
|
7
|
+
'fri',
|
|
8
|
+
'sat',
|
|
9
|
+
'sun',
|
|
10
|
+
]);
|
|
11
|
+
export const sRepeatType = z.enum(['daily', 'weekly', 'monthly', 'yearly']);
|
|
12
|
+
export const sFlagType = z.enum(['always', 'never']);
|
|
13
|
+
export const sTimeIntervalDto = z.object({
|
|
14
|
+
weekDay: sWeekDay,
|
|
15
|
+
from: z.number(),
|
|
16
|
+
to: z.number(),
|
|
17
|
+
});
|
|
18
|
+
export const sScheduleDetailsDto = z.object({
|
|
19
|
+
startDate: z.string().nullable(),
|
|
20
|
+
endDate: z.string().nullable(),
|
|
21
|
+
timeIntervals: z.array(sTimeIntervalDto),
|
|
22
|
+
repeat: sRepeatType.nullable(),
|
|
23
|
+
});
|
|
24
|
+
export const sScheduleDto = z.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
displayName: z.string(),
|
|
27
|
+
include: sScheduleDetailsDto.nullable(),
|
|
28
|
+
exclude: sScheduleDetailsDto.nullable(),
|
|
29
|
+
editable: z.boolean(),
|
|
30
|
+
deletable: z.boolean(),
|
|
31
|
+
createdOn: z.string(),
|
|
32
|
+
lastModifiedOn: z.string(),
|
|
33
|
+
refs: z.record(z.union([z.string(), z.array(z.string())])),
|
|
34
|
+
version: z.number(),
|
|
35
|
+
flag: sFlagType.nullable(),
|
|
36
|
+
});
|
|
37
|
+
export const sTimeInterval = z.object({
|
|
38
|
+
weekDay: sWeekDay,
|
|
39
|
+
from: z.number().max(240000).min(0),
|
|
40
|
+
to: z.number().max(240000).min(0),
|
|
41
|
+
});
|
|
42
|
+
export const sScheduleDetailsRequest = z.object({
|
|
43
|
+
startDate: z.string().nullable(),
|
|
44
|
+
endDate: z.string().nullable(),
|
|
45
|
+
timeIntervals: z.array(sTimeInterval),
|
|
46
|
+
repeat: sRepeatType.nullable(),
|
|
47
|
+
});
|
|
48
|
+
export const sScheduleProps = z.object({
|
|
49
|
+
displayName: z.string().nonempty(),
|
|
50
|
+
flag: sFlagType.nullable(),
|
|
51
|
+
include: sScheduleDetailsRequest.nullable(),
|
|
52
|
+
exclude: sScheduleDetailsRequest.nullable(),
|
|
53
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sSecurityLevelDto: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
order: z.ZodNumber;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
active: z.ZodBoolean;
|
|
7
|
+
color: z.ZodString;
|
|
8
|
+
checkFrequency: z.ZodNumber;
|
|
9
|
+
checkOnExit: z.ZodBoolean;
|
|
10
|
+
default: z.ZodBoolean;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
name: string;
|
|
13
|
+
default: boolean;
|
|
14
|
+
id: string;
|
|
15
|
+
active: boolean;
|
|
16
|
+
color: string;
|
|
17
|
+
order: number;
|
|
18
|
+
checkFrequency: number;
|
|
19
|
+
checkOnExit: boolean;
|
|
20
|
+
}, {
|
|
21
|
+
name: string;
|
|
22
|
+
default: boolean;
|
|
23
|
+
id: string;
|
|
24
|
+
active: boolean;
|
|
25
|
+
color: string;
|
|
26
|
+
order: number;
|
|
27
|
+
checkFrequency: number;
|
|
28
|
+
checkOnExit: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export type SecurityLevelDto = z.infer<typeof sSecurityLevelDto>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const sSecurityLevelDto = z.object({
|
|
3
|
+
id: z.string().uuid(),
|
|
4
|
+
order: z.number().int().min(0),
|
|
5
|
+
name: z.string().max(64),
|
|
6
|
+
active: z.boolean(),
|
|
7
|
+
color: z.string().length(6),
|
|
8
|
+
checkFrequency: z.number().int().min(0).max(100),
|
|
9
|
+
checkOnExit: z.boolean(),
|
|
10
|
+
default: z.boolean(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sTemplateTypeEnum: z.ZodEnum<["id", "report"]>;
|
|
3
|
+
export type TemplateTypeEnum = z.infer<typeof sTemplateTypeEnum>;
|
|
4
|
+
export declare const sTemplateDto: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
type: z.ZodEnum<["id", "report"]>;
|
|
8
|
+
templateHtmlId: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
name: string;
|
|
11
|
+
type: "id" | "report";
|
|
12
|
+
id: string;
|
|
13
|
+
templateHtmlId: string;
|
|
14
|
+
}, {
|
|
15
|
+
name: string;
|
|
16
|
+
type: "id" | "report";
|
|
17
|
+
id: string;
|
|
18
|
+
templateHtmlId: string;
|
|
19
|
+
}>;
|
|
20
|
+
export type TemplateDto = z.infer<typeof sTemplateDto>;
|