@awarevue/api-types 2.0.6 → 2.0.8
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/agent-communication/protocol.d.ts +40 -0
- package/dist/agent-communication/queries.d.ts +30 -0
- package/dist/device/any-device.d.ts +139 -5
- package/dist/device/any-device.js +10 -1
- package/dist/device/index.d.ts +1 -0
- package/dist/device/index.js +1 -0
- package/dist/device/nvr-exporter.d.ts +28 -0
- package/dist/device/nvr-recorder.d.ts +60 -0
- package/dist/device/system.d.ts +48 -0
- package/dist/device/system.js +21 -0
- package/dist/device-command.d.ts +14 -0
- package/dist/device-event.d.ts +21 -1
- package/dist/device-event.js +3 -0
- package/dist/device-import.d.ts +36 -0
- package/dist/notifications.d.ts +29 -0
- package/dist/notifications.js +15 -0
- package/dist/package.json +1 -1
- package/dist/permissions.d.ts +3 -3
- package/dist/permissions.js +1 -0
- package/dist/primitives.d.ts +14 -0
- package/dist/primitives.js +2 -1
- package/dist/user.d.ts +12 -12
- package/package.json +1 -1
|
@@ -258,6 +258,12 @@ export declare const sRecordingsByTimeRangeArgs: z.ZodObject<{
|
|
|
258
258
|
type: "nvr-analytics-server";
|
|
259
259
|
}, {
|
|
260
260
|
type: "nvr-analytics-server";
|
|
261
|
+
}>, z.ZodObject<{
|
|
262
|
+
type: z.ZodLiteral<"system">;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
type: "system";
|
|
265
|
+
}, {
|
|
266
|
+
type: "system";
|
|
261
267
|
}>]>>]>;
|
|
262
268
|
timeFrom: z.ZodNumber;
|
|
263
269
|
timeTo: z.ZodNumber;
|
|
@@ -339,6 +345,8 @@ export declare const sRecordingsByTimeRangeArgs: z.ZodObject<{
|
|
|
339
345
|
type: "nvr-exporter";
|
|
340
346
|
} | {
|
|
341
347
|
type: "nvr-analytics-server";
|
|
348
|
+
} | {
|
|
349
|
+
type: "system";
|
|
342
350
|
}));
|
|
343
351
|
timeFrom: number;
|
|
344
352
|
timeTo: number;
|
|
@@ -420,6 +428,8 @@ export declare const sRecordingsByTimeRangeArgs: z.ZodObject<{
|
|
|
420
428
|
type: "nvr-exporter";
|
|
421
429
|
} | {
|
|
422
430
|
type: "nvr-analytics-server";
|
|
431
|
+
} | {
|
|
432
|
+
type: "system";
|
|
423
433
|
}));
|
|
424
434
|
timeFrom: number;
|
|
425
435
|
timeTo: number;
|
|
@@ -690,6 +700,12 @@ export declare const sPreviewImageArgs: z.ZodObject<{
|
|
|
690
700
|
type: "nvr-analytics-server";
|
|
691
701
|
}, {
|
|
692
702
|
type: "nvr-analytics-server";
|
|
703
|
+
}>, z.ZodObject<{
|
|
704
|
+
type: z.ZodLiteral<"system">;
|
|
705
|
+
}, "strip", z.ZodTypeAny, {
|
|
706
|
+
type: "system";
|
|
707
|
+
}, {
|
|
708
|
+
type: "system";
|
|
693
709
|
}>]>>]>;
|
|
694
710
|
time: z.ZodNumber;
|
|
695
711
|
height: z.ZodNumber;
|
|
@@ -773,6 +789,8 @@ export declare const sPreviewImageArgs: z.ZodObject<{
|
|
|
773
789
|
type: "nvr-exporter";
|
|
774
790
|
} | {
|
|
775
791
|
type: "nvr-analytics-server";
|
|
792
|
+
} | {
|
|
793
|
+
type: "system";
|
|
776
794
|
}));
|
|
777
795
|
}, {
|
|
778
796
|
time: number;
|
|
@@ -854,6 +872,8 @@ export declare const sPreviewImageArgs: z.ZodObject<{
|
|
|
854
872
|
type: "nvr-exporter";
|
|
855
873
|
} | {
|
|
856
874
|
type: "nvr-analytics-server";
|
|
875
|
+
} | {
|
|
876
|
+
type: "system";
|
|
857
877
|
}));
|
|
858
878
|
}>;
|
|
859
879
|
export declare const sPreviewImageResponse: z.ZodNullable<z.ZodObject<{
|
|
@@ -1116,6 +1136,12 @@ export declare const sCameraLatestFrameArgs: z.ZodObject<{
|
|
|
1116
1136
|
type: "nvr-analytics-server";
|
|
1117
1137
|
}, {
|
|
1118
1138
|
type: "nvr-analytics-server";
|
|
1139
|
+
}>, z.ZodObject<{
|
|
1140
|
+
type: z.ZodLiteral<"system">;
|
|
1141
|
+
}, "strip", z.ZodTypeAny, {
|
|
1142
|
+
type: "system";
|
|
1143
|
+
}, {
|
|
1144
|
+
type: "system";
|
|
1119
1145
|
}>]>>]>;
|
|
1120
1146
|
width: z.ZodNumber;
|
|
1121
1147
|
height: z.ZodNumber;
|
|
@@ -1199,6 +1225,8 @@ export declare const sCameraLatestFrameArgs: z.ZodObject<{
|
|
|
1199
1225
|
type: "nvr-exporter";
|
|
1200
1226
|
} | {
|
|
1201
1227
|
type: "nvr-analytics-server";
|
|
1228
|
+
} | {
|
|
1229
|
+
type: "system";
|
|
1202
1230
|
}));
|
|
1203
1231
|
}, {
|
|
1204
1232
|
height: number;
|
|
@@ -1280,6 +1308,8 @@ export declare const sCameraLatestFrameArgs: z.ZodObject<{
|
|
|
1280
1308
|
type: "nvr-exporter";
|
|
1281
1309
|
} | {
|
|
1282
1310
|
type: "nvr-analytics-server";
|
|
1311
|
+
} | {
|
|
1312
|
+
type: "system";
|
|
1283
1313
|
}));
|
|
1284
1314
|
}>;
|
|
1285
1315
|
export declare const sCameraLatestFrameResponse: z.ZodNullable<z.ZodObject<{
|
|
@@ -1542,6 +1572,12 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
1542
1572
|
type: "nvr-analytics-server";
|
|
1543
1573
|
}, {
|
|
1544
1574
|
type: "nvr-analytics-server";
|
|
1575
|
+
}>, z.ZodObject<{
|
|
1576
|
+
type: z.ZodLiteral<"system">;
|
|
1577
|
+
}, "strip", z.ZodTypeAny, {
|
|
1578
|
+
type: "system";
|
|
1579
|
+
}, {
|
|
1580
|
+
type: "system";
|
|
1545
1581
|
}>]>>]>;
|
|
1546
1582
|
timeFrom: z.ZodNumber;
|
|
1547
1583
|
timeTo: z.ZodNumber;
|
|
@@ -1623,6 +1659,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
1623
1659
|
type: "nvr-exporter";
|
|
1624
1660
|
} | {
|
|
1625
1661
|
type: "nvr-analytics-server";
|
|
1662
|
+
} | {
|
|
1663
|
+
type: "system";
|
|
1626
1664
|
}));
|
|
1627
1665
|
timeFrom: number;
|
|
1628
1666
|
timeTo: number;
|
|
@@ -1704,6 +1742,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
1704
1742
|
type: "nvr-exporter";
|
|
1705
1743
|
} | {
|
|
1706
1744
|
type: "nvr-analytics-server";
|
|
1745
|
+
} | {
|
|
1746
|
+
type: "system";
|
|
1707
1747
|
}));
|
|
1708
1748
|
timeFrom: number;
|
|
1709
1749
|
timeTo: number;
|
|
@@ -1955,6 +1995,12 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
1955
1995
|
type: "nvr-analytics-server";
|
|
1956
1996
|
}, {
|
|
1957
1997
|
type: "nvr-analytics-server";
|
|
1998
|
+
}>, z.ZodObject<{
|
|
1999
|
+
type: z.ZodLiteral<"system">;
|
|
2000
|
+
}, "strip", z.ZodTypeAny, {
|
|
2001
|
+
type: "system";
|
|
2002
|
+
}, {
|
|
2003
|
+
type: "system";
|
|
1958
2004
|
}>]>>]>;
|
|
1959
2005
|
time: z.ZodNumber;
|
|
1960
2006
|
height: z.ZodNumber;
|
|
@@ -2038,6 +2084,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
2038
2084
|
type: "nvr-exporter";
|
|
2039
2085
|
} | {
|
|
2040
2086
|
type: "nvr-analytics-server";
|
|
2087
|
+
} | {
|
|
2088
|
+
type: "system";
|
|
2041
2089
|
}));
|
|
2042
2090
|
}, {
|
|
2043
2091
|
time: number;
|
|
@@ -2119,6 +2167,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
2119
2167
|
type: "nvr-exporter";
|
|
2120
2168
|
} | {
|
|
2121
2169
|
type: "nvr-analytics-server";
|
|
2170
|
+
} | {
|
|
2171
|
+
type: "system";
|
|
2122
2172
|
}));
|
|
2123
2173
|
}>;
|
|
2124
2174
|
readonly "cctv:latest-frame": z.ZodObject<{
|
|
@@ -2368,6 +2418,12 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
2368
2418
|
type: "nvr-analytics-server";
|
|
2369
2419
|
}, {
|
|
2370
2420
|
type: "nvr-analytics-server";
|
|
2421
|
+
}>, z.ZodObject<{
|
|
2422
|
+
type: z.ZodLiteral<"system">;
|
|
2423
|
+
}, "strip", z.ZodTypeAny, {
|
|
2424
|
+
type: "system";
|
|
2425
|
+
}, {
|
|
2426
|
+
type: "system";
|
|
2371
2427
|
}>]>>]>;
|
|
2372
2428
|
width: z.ZodNumber;
|
|
2373
2429
|
height: z.ZodNumber;
|
|
@@ -2451,6 +2507,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
2451
2507
|
type: "nvr-exporter";
|
|
2452
2508
|
} | {
|
|
2453
2509
|
type: "nvr-analytics-server";
|
|
2510
|
+
} | {
|
|
2511
|
+
type: "system";
|
|
2454
2512
|
}));
|
|
2455
2513
|
}, {
|
|
2456
2514
|
height: number;
|
|
@@ -2532,6 +2590,8 @@ export declare const nvrRecorderRequestSchemas: {
|
|
|
2532
2590
|
type: "nvr-exporter";
|
|
2533
2591
|
} | {
|
|
2534
2592
|
type: "nvr-analytics-server";
|
|
2593
|
+
} | {
|
|
2594
|
+
type: "system";
|
|
2535
2595
|
}));
|
|
2536
2596
|
}>;
|
|
2537
2597
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SYSTEM: "system";
|
|
3
|
+
export declare const sSystemDeviceSpecs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4
|
+
export type SystemDeviceSpecs = z.infer<typeof sSystemDeviceSpecs>;
|
|
5
|
+
export declare const sSystemDeviceStateDto: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
export type SystemDeviceStateDto = z.infer<typeof sSystemDeviceStateDto>;
|
|
7
|
+
export declare const sNotificationCreated: z.ZodObject<{
|
|
8
|
+
kind: z.ZodLiteral<"notification-created">;
|
|
9
|
+
notificationRef: z.ZodOptional<z.ZodString>;
|
|
10
|
+
severity: z.ZodEnum<["info", "warning", "critical"]>;
|
|
11
|
+
message: z.ZodString;
|
|
12
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
message: string;
|
|
15
|
+
kind: "notification-created";
|
|
16
|
+
severity: "info" | "warning" | "critical";
|
|
17
|
+
metadata?: Record<string, unknown> | undefined;
|
|
18
|
+
notificationRef?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
message: string;
|
|
21
|
+
kind: "notification-created";
|
|
22
|
+
severity: "info" | "warning" | "critical";
|
|
23
|
+
metadata?: Record<string, unknown> | undefined;
|
|
24
|
+
notificationRef?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const systemDeviceEventSchemasByKind: {
|
|
27
|
+
readonly 'notification-created': z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"notification-created">;
|
|
29
|
+
notificationRef: z.ZodOptional<z.ZodString>;
|
|
30
|
+
severity: z.ZodEnum<["info", "warning", "critical"]>;
|
|
31
|
+
message: z.ZodString;
|
|
32
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
message: string;
|
|
35
|
+
kind: "notification-created";
|
|
36
|
+
severity: "info" | "warning" | "critical";
|
|
37
|
+
metadata?: Record<string, unknown> | undefined;
|
|
38
|
+
notificationRef?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
message: string;
|
|
41
|
+
kind: "notification-created";
|
|
42
|
+
severity: "info" | "warning" | "critical";
|
|
43
|
+
metadata?: Record<string, unknown> | undefined;
|
|
44
|
+
notificationRef?: string | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
};
|
|
47
|
+
export type NotificationCreated = z.infer<typeof sNotificationCreated>;
|
|
48
|
+
export type SystemDeviceEvent = NotificationCreated;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.systemDeviceEventSchemasByKind = exports.sNotificationCreated = exports.sSystemDeviceStateDto = exports.sSystemDeviceSpecs = exports.SYSTEM = void 0;
|
|
4
|
+
const primitives_1 = require("../primitives");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.SYSTEM = 'system';
|
|
7
|
+
// SPECS
|
|
8
|
+
exports.sSystemDeviceSpecs = zod_1.z.object({});
|
|
9
|
+
// STATE
|
|
10
|
+
exports.sSystemDeviceStateDto = zod_1.z.record(zod_1.z.unknown());
|
|
11
|
+
// EVENTS
|
|
12
|
+
exports.sNotificationCreated = zod_1.z.object({
|
|
13
|
+
kind: zod_1.z.literal('notification-created'),
|
|
14
|
+
notificationRef: zod_1.z.string().optional(),
|
|
15
|
+
severity: primitives_1.sNotificationSeverity,
|
|
16
|
+
message: zod_1.z.string().nonempty(),
|
|
17
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
18
|
+
});
|
|
19
|
+
exports.systemDeviceEventSchemasByKind = {
|
|
20
|
+
'notification-created': exports.sNotificationCreated,
|
|
21
|
+
};
|
package/dist/device-command.d.ts
CHANGED
|
@@ -270,6 +270,12 @@ export declare const commandSchemas: {
|
|
|
270
270
|
type: "nvr-analytics-server";
|
|
271
271
|
}, {
|
|
272
272
|
type: "nvr-analytics-server";
|
|
273
|
+
}>, import("zod").ZodObject<{
|
|
274
|
+
type: import("zod").ZodLiteral<"system">;
|
|
275
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
276
|
+
type: "system";
|
|
277
|
+
}, {
|
|
278
|
+
type: "system";
|
|
273
279
|
}>]>>]>;
|
|
274
280
|
timeFrom: import("zod").ZodNumber;
|
|
275
281
|
timeTo: import("zod").ZodNumber;
|
|
@@ -354,6 +360,8 @@ export declare const commandSchemas: {
|
|
|
354
360
|
type: "nvr-exporter";
|
|
355
361
|
} | {
|
|
356
362
|
type: "nvr-analytics-server";
|
|
363
|
+
} | {
|
|
364
|
+
type: "system";
|
|
357
365
|
}));
|
|
358
366
|
timeFrom: number;
|
|
359
367
|
timeTo: number;
|
|
@@ -437,6 +445,8 @@ export declare const commandSchemas: {
|
|
|
437
445
|
type: "nvr-exporter";
|
|
438
446
|
} | {
|
|
439
447
|
type: "nvr-analytics-server";
|
|
448
|
+
} | {
|
|
449
|
+
type: "system";
|
|
440
450
|
}));
|
|
441
451
|
timeFrom: number;
|
|
442
452
|
timeTo: number;
|
|
@@ -522,6 +532,8 @@ export declare const commandSchemas: {
|
|
|
522
532
|
type: "nvr-exporter";
|
|
523
533
|
} | {
|
|
524
534
|
type: "nvr-analytics-server";
|
|
535
|
+
} | {
|
|
536
|
+
type: "system";
|
|
525
537
|
}));
|
|
526
538
|
timeFrom: number;
|
|
527
539
|
timeTo: number;
|
|
@@ -608,6 +620,8 @@ export declare const commandSchemas: {
|
|
|
608
620
|
type: "nvr-exporter";
|
|
609
621
|
} | {
|
|
610
622
|
type: "nvr-analytics-server";
|
|
623
|
+
} | {
|
|
624
|
+
type: "system";
|
|
611
625
|
}));
|
|
612
626
|
timeFrom: number;
|
|
613
627
|
timeTo: number;
|
package/dist/device-event.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { ReaderEvent } from './device/reader/index';
|
|
|
11
11
|
import { ServerEvent } from './device/server';
|
|
12
12
|
import { DeviceType } from './device/any-device';
|
|
13
13
|
import { NvrExporterEvent } from './device/nvr-exporter';
|
|
14
|
+
import { SystemDeviceEvent } from './device/system';
|
|
14
15
|
export interface DeviceCommandTriggered {
|
|
15
16
|
kind: 'device-command';
|
|
16
17
|
userId?: string;
|
|
@@ -33,7 +34,7 @@ export interface DeviceDisconnectedEvent {
|
|
|
33
34
|
kind: 'device-disconnected';
|
|
34
35
|
clientId?: number;
|
|
35
36
|
}
|
|
36
|
-
export type AnyDeviceEvent = DeviceCommandTriggered | CameraEvent | DoorEvent | AlarmEvent | MotionDetectedEvent | ReaderEvent | PanicButtonEvent | DeviceConnectedEvent | DeviceDisconnectedEvent | IntercomTerminalEvent | ServerEvent | DeviceGatewayEvent | PresenceTrackerEvent | IoBoardEvent | NvrExporterEvent;
|
|
37
|
+
export type AnyDeviceEvent = DeviceCommandTriggered | CameraEvent | DoorEvent | AlarmEvent | MotionDetectedEvent | ReaderEvent | PanicButtonEvent | DeviceConnectedEvent | DeviceDisconnectedEvent | IntercomTerminalEvent | ServerEvent | DeviceGatewayEvent | PresenceTrackerEvent | IoBoardEvent | NvrExporterEvent | SystemDeviceEvent;
|
|
37
38
|
export declare const sEventHeader: z.ZodObject<{
|
|
38
39
|
id: z.ZodString;
|
|
39
40
|
timestamp: z.ZodNumber;
|
|
@@ -61,6 +62,25 @@ export declare const eventSchemaByKind: {
|
|
|
61
62
|
}, {
|
|
62
63
|
kind: "motion-detected";
|
|
63
64
|
}>;
|
|
65
|
+
'notification-created': z.ZodObject<{
|
|
66
|
+
kind: z.ZodLiteral<"notification-created">;
|
|
67
|
+
notificationRef: z.ZodOptional<z.ZodString>;
|
|
68
|
+
severity: z.ZodEnum<["info", "warning", "critical"]>;
|
|
69
|
+
message: z.ZodString;
|
|
70
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
message: string;
|
|
73
|
+
kind: "notification-created";
|
|
74
|
+
severity: "info" | "warning" | "critical";
|
|
75
|
+
metadata?: Record<string, unknown> | undefined;
|
|
76
|
+
notificationRef?: string | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
message: string;
|
|
79
|
+
kind: "notification-created";
|
|
80
|
+
severity: "info" | "warning" | "critical";
|
|
81
|
+
metadata?: Record<string, unknown> | undefined;
|
|
82
|
+
notificationRef?: string | undefined;
|
|
83
|
+
}>;
|
|
64
84
|
'nvr-export-started': z.ZodObject<{
|
|
65
85
|
kind: z.ZodLiteral<"nvr-export-started">;
|
|
66
86
|
exportId: z.ZodString;
|
package/dist/device-event.js
CHANGED
|
@@ -11,6 +11,7 @@ const panic_button_1 = require("./device/panic-button");
|
|
|
11
11
|
const presence_tracker_1 = require("./device/presence-tracker");
|
|
12
12
|
const index_1 = require("./device/reader/index");
|
|
13
13
|
const nvr_exporter_1 = require("./device/nvr-exporter");
|
|
14
|
+
const system_1 = require("./device/system");
|
|
14
15
|
exports.sMotionDetected = zod_1.z.object({
|
|
15
16
|
kind: zod_1.z.literal('motion-detected'),
|
|
16
17
|
});
|
|
@@ -65,6 +66,7 @@ exports.eventKindLabels = {
|
|
|
65
66
|
'door-closed': 'Door Closed',
|
|
66
67
|
'nvr-export-started': 'NVR Export Started',
|
|
67
68
|
'nvr-export-deleted': 'NVR Export Deleted',
|
|
69
|
+
'notification-created': 'Notification Created',
|
|
68
70
|
};
|
|
69
71
|
exports.eventSchemaByKind = {
|
|
70
72
|
...alarm_1.alarmEventSchemasByKind,
|
|
@@ -76,6 +78,7 @@ exports.eventSchemaByKind = {
|
|
|
76
78
|
...presence_tracker_1.presenceTrackerEventSchemaByKind,
|
|
77
79
|
...index_1.readerEventSchemaByKind,
|
|
78
80
|
...nvr_exporter_1.nvrExporterEventSchemasByKind,
|
|
81
|
+
...system_1.systemDeviceEventSchemasByKind,
|
|
79
82
|
'motion-detected': exports.sMotionDetected,
|
|
80
83
|
};
|
|
81
84
|
exports.eventsByDeviceType = {
|
package/dist/device-import.d.ts
CHANGED
|
@@ -253,6 +253,12 @@ export declare const sImportedDevice: z.ZodIntersection<z.ZodIntersection<z.ZodO
|
|
|
253
253
|
type: "nvr-analytics-server";
|
|
254
254
|
}, {
|
|
255
255
|
type: "nvr-analytics-server";
|
|
256
|
+
}>, z.ZodObject<{
|
|
257
|
+
type: z.ZodLiteral<"system">;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
type: "system";
|
|
260
|
+
}, {
|
|
261
|
+
type: "system";
|
|
256
262
|
}>]>>;
|
|
257
263
|
export declare const sDuplicateDevice: z.ZodObject<{
|
|
258
264
|
name: z.ZodString;
|
|
@@ -517,6 +523,12 @@ export declare const sDeviceDiscoveryDto: z.ZodObject<{
|
|
|
517
523
|
type: "nvr-analytics-server";
|
|
518
524
|
}, {
|
|
519
525
|
type: "nvr-analytics-server";
|
|
526
|
+
}>, z.ZodObject<{
|
|
527
|
+
type: z.ZodLiteral<"system">;
|
|
528
|
+
}, "strip", z.ZodTypeAny, {
|
|
529
|
+
type: "system";
|
|
530
|
+
}, {
|
|
531
|
+
type: "system";
|
|
520
532
|
}>]>>, "many">;
|
|
521
533
|
relations: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
522
534
|
leftId: z.ZodString;
|
|
@@ -617,6 +629,8 @@ export declare const sDeviceDiscoveryDto: z.ZodObject<{
|
|
|
617
629
|
type: "nvr-exporter";
|
|
618
630
|
} | {
|
|
619
631
|
type: "nvr-analytics-server";
|
|
632
|
+
} | {
|
|
633
|
+
type: "system";
|
|
620
634
|
}))[];
|
|
621
635
|
relations: ({
|
|
622
636
|
kind: "parent" | "attachedTo" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
@@ -707,6 +721,8 @@ export declare const sDeviceDiscoveryDto: z.ZodObject<{
|
|
|
707
721
|
type: "nvr-exporter";
|
|
708
722
|
} | {
|
|
709
723
|
type: "nvr-analytics-server";
|
|
724
|
+
} | {
|
|
725
|
+
type: "system";
|
|
710
726
|
}))[];
|
|
711
727
|
relations: ({
|
|
712
728
|
kind: "parent" | "attachedTo" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
@@ -971,6 +987,12 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
971
987
|
type: "nvr-analytics-server";
|
|
972
988
|
}, {
|
|
973
989
|
type: "nvr-analytics-server";
|
|
990
|
+
}>, z.ZodObject<{
|
|
991
|
+
type: z.ZodLiteral<"system">;
|
|
992
|
+
}, "strip", z.ZodTypeAny, {
|
|
993
|
+
type: "system";
|
|
994
|
+
}, {
|
|
995
|
+
type: "system";
|
|
974
996
|
}>]>>, "many">;
|
|
975
997
|
updated: z.ZodArray<z.ZodObject<{
|
|
976
998
|
id: z.ZodString;
|
|
@@ -1212,6 +1234,12 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1212
1234
|
type: "nvr-analytics-server";
|
|
1213
1235
|
}, {
|
|
1214
1236
|
type: "nvr-analytics-server";
|
|
1237
|
+
}>, z.ZodObject<{
|
|
1238
|
+
type: z.ZodLiteral<"system">;
|
|
1239
|
+
}, "strip", z.ZodTypeAny, {
|
|
1240
|
+
type: "system";
|
|
1241
|
+
}, {
|
|
1242
|
+
type: "system";
|
|
1215
1243
|
}>]>, z.ZodObject<{
|
|
1216
1244
|
id: z.ZodString;
|
|
1217
1245
|
presets: z.ZodArray<z.ZodObject<{
|
|
@@ -1414,6 +1442,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1414
1442
|
type: "nvr-exporter";
|
|
1415
1443
|
} | {
|
|
1416
1444
|
type: "nvr-analytics-server";
|
|
1445
|
+
} | {
|
|
1446
|
+
type: "system";
|
|
1417
1447
|
}) & {
|
|
1418
1448
|
groups: string[];
|
|
1419
1449
|
id: string;
|
|
@@ -1528,6 +1558,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1528
1558
|
type: "nvr-exporter";
|
|
1529
1559
|
} | {
|
|
1530
1560
|
type: "nvr-analytics-server";
|
|
1561
|
+
} | {
|
|
1562
|
+
type: "system";
|
|
1531
1563
|
}))[];
|
|
1532
1564
|
updated: z.objectOutputType<{
|
|
1533
1565
|
id: z.ZodString;
|
|
@@ -1609,6 +1641,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1609
1641
|
type: "nvr-exporter";
|
|
1610
1642
|
} | {
|
|
1611
1643
|
type: "nvr-analytics-server";
|
|
1644
|
+
} | {
|
|
1645
|
+
type: "system";
|
|
1612
1646
|
}) & {
|
|
1613
1647
|
groups: string[];
|
|
1614
1648
|
id: string;
|
|
@@ -1723,6 +1757,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1723
1757
|
type: "nvr-exporter";
|
|
1724
1758
|
} | {
|
|
1725
1759
|
type: "nvr-analytics-server";
|
|
1760
|
+
} | {
|
|
1761
|
+
type: "system";
|
|
1726
1762
|
}))[];
|
|
1727
1763
|
updated: z.objectInputType<{
|
|
1728
1764
|
id: z.ZodString;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sNotificationDto: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5
|
+
message: z.ZodString;
|
|
6
|
+
severity: z.ZodEnum<["info", "warning", "critical"]>;
|
|
7
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
8
|
+
createdOn: z.ZodNumber;
|
|
9
|
+
acknowledgedBy: z.ZodNullable<z.ZodString>;
|
|
10
|
+
acknowledgedOn: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
message: string;
|
|
13
|
+
id: string;
|
|
14
|
+
metadata: Record<string, unknown>;
|
|
15
|
+
createdOn: number;
|
|
16
|
+
severity: "info" | "warning" | "critical";
|
|
17
|
+
acknowledgedBy: string | null;
|
|
18
|
+
acknowledgedOn: number | null;
|
|
19
|
+
source?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
message: string;
|
|
22
|
+
id: string;
|
|
23
|
+
metadata: Record<string, unknown>;
|
|
24
|
+
createdOn: number;
|
|
25
|
+
severity: "info" | "warning" | "critical";
|
|
26
|
+
acknowledgedBy: string | null;
|
|
27
|
+
acknowledgedOn: number | null;
|
|
28
|
+
source?: string | undefined;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sNotificationDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("./primitives");
|
|
6
|
+
exports.sNotificationDto = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string().nonempty(),
|
|
8
|
+
source: primitives_1.sDeviceId.optional(),
|
|
9
|
+
message: zod_1.z.string().nonempty(),
|
|
10
|
+
severity: primitives_1.sNotificationSeverity,
|
|
11
|
+
metadata: zod_1.z.record(zod_1.z.unknown()),
|
|
12
|
+
createdOn: zod_1.z.number().int().nonnegative(),
|
|
13
|
+
acknowledgedBy: zod_1.z.string().nonempty().nullable(),
|
|
14
|
+
acknowledgedOn: zod_1.z.number().int().nonnegative().nullable(),
|
|
15
|
+
});
|
package/dist/package.json
CHANGED
package/dist/permissions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const sPermissionId: 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<"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<"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">]>;
|
|
2
|
+
export declare const sPermissionId: 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<"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">]>;
|
|
3
3
|
export type PermissionArea = 'layout' | 'camera' | 'preset' | 'door' | 'public-view' | 'private-view' | 'person' | 'door-group' | 'access-rule' | 'schedule' | 'presence' | 'factory' | 'event' | 'alarm' | 'user' | 'role' | 'device' | 'module' | 'automation' | 'device-group' | 'macro' | 'template' | 'custom-field' | 'media' | 'about' | 'intercom' | 'device' | 'display' | 'security-level' | 'citadel-mode' | 'token-conversion' | 'bookmark' | 'access-path' | 'person-type' | 'agreement' | 'api-key';
|
|
4
|
-
export declare const permissions: Record<"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" | "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" | "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", string>;
|
|
5
|
-
export declare const permissionsArray: ("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" | "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" | "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")[];
|
|
4
|
+
export declare const permissions: Record<"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" | "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", string>;
|
|
5
|
+
export declare const permissionsArray: ("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" | "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")[];
|
|
6
6
|
export type PermissionId = z.infer<typeof sPermissionId>;
|
package/dist/permissions.js
CHANGED
|
@@ -25,6 +25,7 @@ const deviceTypePermissions = {
|
|
|
25
25
|
'nvr-analytics-server': zod_1.z
|
|
26
26
|
.literal('device:nvr-analytics-server')
|
|
27
27
|
.describe('View NVR analytics servers'),
|
|
28
|
+
system: zod_1.z.literal('device:system').describe('View system devices'),
|
|
28
29
|
};
|
|
29
30
|
const sDeviceTypePermissions = Object.values(deviceTypePermissions);
|
|
30
31
|
exports.sPermissionId = zod_1.z.union([
|
package/dist/primitives.d.ts
CHANGED
|
@@ -263,6 +263,12 @@ export declare const sAgentDeviceInfo: z.ZodIntersection<z.ZodObject<{
|
|
|
263
263
|
type: "nvr-analytics-server";
|
|
264
264
|
}, {
|
|
265
265
|
type: "nvr-analytics-server";
|
|
266
|
+
}>, z.ZodObject<{
|
|
267
|
+
type: z.ZodLiteral<"system">;
|
|
268
|
+
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
type: "system";
|
|
270
|
+
}, {
|
|
271
|
+
type: "system";
|
|
266
272
|
}>]>>;
|
|
267
273
|
export declare const sDeviceParam: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
268
274
|
name: z.ZodString;
|
|
@@ -510,4 +516,12 @@ export declare const sDeviceParam: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.
|
|
|
510
516
|
type: "nvr-analytics-server";
|
|
511
517
|
}, {
|
|
512
518
|
type: "nvr-analytics-server";
|
|
519
|
+
}>, z.ZodObject<{
|
|
520
|
+
type: z.ZodLiteral<"system">;
|
|
521
|
+
}, "strip", z.ZodTypeAny, {
|
|
522
|
+
type: "system";
|
|
523
|
+
}, {
|
|
524
|
+
type: "system";
|
|
513
525
|
}>]>>]>;
|
|
526
|
+
export declare const sNotificationSeverity: z.ZodEnum<["info", "warning", "critical"]>;
|
|
527
|
+
export type NotificationSeverity = z.infer<typeof sNotificationSeverity>;
|
package/dist/primitives.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sDeviceParam = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sMacroId = exports.sZoneId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
3
|
+
exports.sNotificationSeverity = exports.sDeviceParam = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sMacroId = exports.sZoneId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const device_1 = require("./device");
|
|
6
6
|
exports.sDeviceId = zod_1.z.string().uuid().nonempty();
|
|
@@ -23,3 +23,4 @@ exports.sAgentDeviceInfo = zod_1.z.intersection(device_1.sForeignDeviceInfo, dev
|
|
|
23
23
|
}));
|
|
24
24
|
// reusable device argument. This schema can be checked at runtime to see if it's a device ID or full device info and substituted accordingly.
|
|
25
25
|
exports.sDeviceParam = exports.sDeviceId.or(exports.sAgentDeviceInfo);
|
|
26
|
+
exports.sNotificationSeverity = zod_1.z.enum(['info', 'warning', 'critical']);
|