@awarevue/api-types 2.0.5 → 2.0.7
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 +52 -210
- package/dist/agent-communication/queries.d.ts +42 -210
- 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 +44 -188
- package/dist/device/nvr-recorder.d.ts +84 -420
- package/dist/device/other.d.ts +48 -0
- package/dist/device/other.js +21 -0
- package/dist/device-command.d.ts +22 -94
- 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 +3 -0
- package/dist/primitives.d.ts +14 -92
- package/dist/primitives.js +3 -2
- package/dist/user.d.ts +12 -12
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DEVICE_OTHER: "device-other";
|
|
3
|
+
export declare const sDeviceOtherSpecs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4
|
+
export type DeviceOtherSpecs = z.infer<typeof sDeviceOtherSpecs>;
|
|
5
|
+
export declare const sDeviceOtherStateDto: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
export type DeviceOtherStateDto = z.infer<typeof sDeviceOtherStateDto>;
|
|
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 deviceOtherEventSchemasByKind: {
|
|
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 DeviceOtherEvent = NotificationCreated;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deviceOtherEventSchemasByKind = exports.sNotificationCreated = exports.sDeviceOtherStateDto = exports.sDeviceOtherSpecs = exports.DEVICE_OTHER = void 0;
|
|
4
|
+
const primitives_1 = require("../primitives");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.DEVICE_OTHER = 'device-other';
|
|
7
|
+
// SPECS
|
|
8
|
+
exports.sDeviceOtherSpecs = zod_1.z.object({});
|
|
9
|
+
// STATE
|
|
10
|
+
exports.sDeviceOtherStateDto = 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.deviceOtherEventSchemasByKind = {
|
|
20
|
+
'notification-created': exports.sNotificationCreated,
|
|
21
|
+
};
|
package/dist/device-command.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const commandSchemas: {
|
|
|
24
24
|
command: import("zod").ZodLiteral<"nvr-exporter.start-export">;
|
|
25
25
|
params: import("zod").ZodObject<{
|
|
26
26
|
requestId: import("zod").ZodString;
|
|
27
|
-
device: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodIntersection<import("zod").
|
|
27
|
+
device: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
28
28
|
name: import("zod").ZodString;
|
|
29
29
|
foreignRef: import("zod").ZodString;
|
|
30
30
|
provider: import("zod").ZodString;
|
|
@@ -270,60 +270,20 @@ export declare const commandSchemas: {
|
|
|
270
270
|
type: "nvr-analytics-server";
|
|
271
271
|
}, {
|
|
272
272
|
type: "nvr-analytics-server";
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
id: import("zod").ZodString;
|
|
276
|
-
name: import("zod").ZodString;
|
|
277
|
-
params: import("zod").ZodUnknown;
|
|
278
|
-
isDefault: import("zod").ZodBoolean;
|
|
279
|
-
assignedRef: import("zod").ZodNullable<import("zod").ZodString>;
|
|
280
|
-
createdOn: import("zod").ZodString;
|
|
281
|
-
lastModifiedOn: import("zod").ZodString;
|
|
282
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
283
|
-
name: string;
|
|
284
|
-
id: string;
|
|
285
|
-
isDefault: boolean;
|
|
286
|
-
assignedRef: string | null;
|
|
287
|
-
createdOn: string;
|
|
288
|
-
lastModifiedOn: string;
|
|
289
|
-
params?: unknown;
|
|
290
|
-
}, {
|
|
291
|
-
name: string;
|
|
292
|
-
id: string;
|
|
293
|
-
isDefault: boolean;
|
|
294
|
-
assignedRef: string | null;
|
|
295
|
-
createdOn: string;
|
|
296
|
-
lastModifiedOn: string;
|
|
297
|
-
params?: unknown;
|
|
298
|
-
}>, "many">;
|
|
273
|
+
}>, import("zod").ZodObject<{
|
|
274
|
+
type: import("zod").ZodLiteral<"device-other">;
|
|
299
275
|
}, "strip", import("zod").ZodTypeAny, {
|
|
300
|
-
|
|
301
|
-
name: string;
|
|
302
|
-
id: string;
|
|
303
|
-
isDefault: boolean;
|
|
304
|
-
assignedRef: string | null;
|
|
305
|
-
createdOn: string;
|
|
306
|
-
lastModifiedOn: string;
|
|
307
|
-
params?: unknown;
|
|
308
|
-
}[];
|
|
276
|
+
type: "device-other";
|
|
309
277
|
}, {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
id: string;
|
|
313
|
-
isDefault: boolean;
|
|
314
|
-
assignedRef: string | null;
|
|
315
|
-
createdOn: string;
|
|
316
|
-
lastModifiedOn: string;
|
|
317
|
-
params?: unknown;
|
|
318
|
-
}[];
|
|
319
|
-
}>>]>;
|
|
278
|
+
type: "device-other";
|
|
279
|
+
}>]>>]>;
|
|
320
280
|
timeFrom: import("zod").ZodNumber;
|
|
321
281
|
timeTo: import("zod").ZodNumber;
|
|
322
282
|
name: import("zod").ZodString;
|
|
323
283
|
}, "strip", import("zod").ZodTypeAny, {
|
|
324
284
|
name: string;
|
|
325
285
|
requestId: string;
|
|
326
|
-
device: string | (
|
|
286
|
+
device: string | ({
|
|
327
287
|
name: string;
|
|
328
288
|
foreignRef: string;
|
|
329
289
|
provider: string;
|
|
@@ -400,23 +360,15 @@ export declare const commandSchemas: {
|
|
|
400
360
|
type: "nvr-exporter";
|
|
401
361
|
} | {
|
|
402
362
|
type: "nvr-analytics-server";
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
id: string;
|
|
407
|
-
isDefault: boolean;
|
|
408
|
-
assignedRef: string | null;
|
|
409
|
-
createdOn: string;
|
|
410
|
-
lastModifiedOn: string;
|
|
411
|
-
params?: unknown;
|
|
412
|
-
}[];
|
|
413
|
-
});
|
|
363
|
+
} | {
|
|
364
|
+
type: "device-other";
|
|
365
|
+
}));
|
|
414
366
|
timeFrom: number;
|
|
415
367
|
timeTo: number;
|
|
416
368
|
}, {
|
|
417
369
|
name: string;
|
|
418
370
|
requestId: string;
|
|
419
|
-
device: string | (
|
|
371
|
+
device: string | ({
|
|
420
372
|
name: string;
|
|
421
373
|
foreignRef: string;
|
|
422
374
|
provider: string;
|
|
@@ -493,17 +445,9 @@ export declare const commandSchemas: {
|
|
|
493
445
|
type: "nvr-exporter";
|
|
494
446
|
} | {
|
|
495
447
|
type: "nvr-analytics-server";
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
id: string;
|
|
500
|
-
isDefault: boolean;
|
|
501
|
-
assignedRef: string | null;
|
|
502
|
-
createdOn: string;
|
|
503
|
-
lastModifiedOn: string;
|
|
504
|
-
params?: unknown;
|
|
505
|
-
}[];
|
|
506
|
-
});
|
|
448
|
+
} | {
|
|
449
|
+
type: "device-other";
|
|
450
|
+
}));
|
|
507
451
|
timeFrom: number;
|
|
508
452
|
timeTo: number;
|
|
509
453
|
}>;
|
|
@@ -511,7 +455,7 @@ export declare const commandSchemas: {
|
|
|
511
455
|
params: {
|
|
512
456
|
name: string;
|
|
513
457
|
requestId: string;
|
|
514
|
-
device: string | (
|
|
458
|
+
device: string | ({
|
|
515
459
|
name: string;
|
|
516
460
|
foreignRef: string;
|
|
517
461
|
provider: string;
|
|
@@ -588,17 +532,9 @@ export declare const commandSchemas: {
|
|
|
588
532
|
type: "nvr-exporter";
|
|
589
533
|
} | {
|
|
590
534
|
type: "nvr-analytics-server";
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
id: string;
|
|
595
|
-
isDefault: boolean;
|
|
596
|
-
assignedRef: string | null;
|
|
597
|
-
createdOn: string;
|
|
598
|
-
lastModifiedOn: string;
|
|
599
|
-
params?: unknown;
|
|
600
|
-
}[];
|
|
601
|
-
});
|
|
535
|
+
} | {
|
|
536
|
+
type: "device-other";
|
|
537
|
+
}));
|
|
602
538
|
timeFrom: number;
|
|
603
539
|
timeTo: number;
|
|
604
540
|
};
|
|
@@ -607,7 +543,7 @@ export declare const commandSchemas: {
|
|
|
607
543
|
params: {
|
|
608
544
|
name: string;
|
|
609
545
|
requestId: string;
|
|
610
|
-
device: string | (
|
|
546
|
+
device: string | ({
|
|
611
547
|
name: string;
|
|
612
548
|
foreignRef: string;
|
|
613
549
|
provider: string;
|
|
@@ -684,17 +620,9 @@ export declare const commandSchemas: {
|
|
|
684
620
|
type: "nvr-exporter";
|
|
685
621
|
} | {
|
|
686
622
|
type: "nvr-analytics-server";
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
id: string;
|
|
691
|
-
isDefault: boolean;
|
|
692
|
-
assignedRef: string | null;
|
|
693
|
-
createdOn: string;
|
|
694
|
-
lastModifiedOn: string;
|
|
695
|
-
params?: unknown;
|
|
696
|
-
}[];
|
|
697
|
-
});
|
|
623
|
+
} | {
|
|
624
|
+
type: "device-other";
|
|
625
|
+
}));
|
|
698
626
|
timeFrom: number;
|
|
699
627
|
timeTo: number;
|
|
700
628
|
};
|
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 { DeviceOtherEvent } from './device/other';
|
|
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 | DeviceOtherEvent;
|
|
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 other_1 = require("./device/other");
|
|
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
|
+
...other_1.deviceOtherEventSchemasByKind,
|
|
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<"device-other">;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
type: "device-other";
|
|
260
|
+
}, {
|
|
261
|
+
type: "device-other";
|
|
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<"device-other">;
|
|
528
|
+
}, "strip", z.ZodTypeAny, {
|
|
529
|
+
type: "device-other";
|
|
530
|
+
}, {
|
|
531
|
+
type: "device-other";
|
|
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: "device-other";
|
|
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: "device-other";
|
|
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<"device-other">;
|
|
992
|
+
}, "strip", z.ZodTypeAny, {
|
|
993
|
+
type: "device-other";
|
|
994
|
+
}, {
|
|
995
|
+
type: "device-other";
|
|
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<"device-other">;
|
|
1239
|
+
}, "strip", z.ZodTypeAny, {
|
|
1240
|
+
type: "device-other";
|
|
1241
|
+
}, {
|
|
1242
|
+
type: "device-other";
|
|
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: "device-other";
|
|
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: "device-other";
|
|
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: "device-other";
|
|
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: "device-other";
|
|
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:device-other">)[], 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:device-other" | "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:device-other" | "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,9 @@ 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
|
+
'device-other': zod_1.z
|
|
29
|
+
.literal('device:device-other')
|
|
30
|
+
.describe('View other devices'),
|
|
28
31
|
};
|
|
29
32
|
const sDeviceTypePermissions = Object.values(deviceTypePermissions);
|
|
30
33
|
exports.sPermissionId = zod_1.z.union([
|