@awarevue/api-types 2.0.42 → 2.0.43
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/api/events/all.js +2 -0
- package/dist/api/events/server.d.ts +23 -1
- package/dist/api/events/server.js +10 -1
- package/dist/api/rest/security-level.d.ts +6 -0
- package/dist/objects/security-level.d.ts +3 -0
- package/dist/objects/security-level.js +1 -0
- package/dist/package.json +1 -1
- package/dist/primitives.d.ts +1 -0
- package/dist/primitives.js +2 -1
- package/package.json +1 -1
package/dist/api/events/all.js
CHANGED
|
@@ -81,6 +81,8 @@ exports.eventKindLabels = {
|
|
|
81
81
|
'nvr-export-deleted': 'NVR Export Deleted',
|
|
82
82
|
'notification-created': 'Notification Created',
|
|
83
83
|
'notification-acknowledged': 'Notification Acknowledged',
|
|
84
|
+
'user-logged-in': 'User Logged In',
|
|
85
|
+
'user-logged-out': 'User Logged Out',
|
|
84
86
|
};
|
|
85
87
|
exports.eventSchemaByKind = {
|
|
86
88
|
...alarm_1.alarmEventSchemasByKind,
|
|
@@ -62,4 +62,26 @@ export type ObjectDeleted = {
|
|
|
62
62
|
userId?: string;
|
|
63
63
|
};
|
|
64
64
|
}[keyof ObjectKinds];
|
|
65
|
-
export
|
|
65
|
+
export declare const sUserLoggedIn: z.ZodObject<{
|
|
66
|
+
kind: z.ZodLiteral<"user-logged-in">;
|
|
67
|
+
userId: z.ZodString;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
kind: "user-logged-in";
|
|
70
|
+
userId: string;
|
|
71
|
+
}, {
|
|
72
|
+
kind: "user-logged-in";
|
|
73
|
+
userId: string;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const sUserLoggedOut: z.ZodObject<{
|
|
76
|
+
kind: z.ZodLiteral<"user-logged-out">;
|
|
77
|
+
userId: z.ZodString;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
kind: "user-logged-out";
|
|
80
|
+
userId: string;
|
|
81
|
+
}, {
|
|
82
|
+
kind: "user-logged-out";
|
|
83
|
+
userId: string;
|
|
84
|
+
}>;
|
|
85
|
+
export type UserLoggedIn = z.infer<typeof sUserLoggedIn>;
|
|
86
|
+
export type UserLoggedOut = z.infer<typeof sUserLoggedOut>;
|
|
87
|
+
export type ServerEvent = ObjectCreated | ObjectUpdated | ObjectDeleted | AgentStarted | AgentStopped | UserLoggedIn | UserLoggedOut;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sAgentStopped = exports.sAgentStarted = void 0;
|
|
3
|
+
exports.sUserLoggedOut = exports.sUserLoggedIn = exports.sAgentStopped = exports.sAgentStarted = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const primitives_1 = require("../../primitives");
|
|
5
6
|
// EVENTS
|
|
6
7
|
exports.sAgentStarted = zod_1.z.object({
|
|
7
8
|
kind: zod_1.z.literal('agent-started'),
|
|
@@ -13,3 +14,11 @@ exports.sAgentStopped = zod_1.z.object({
|
|
|
13
14
|
agent: zod_1.z.string(),
|
|
14
15
|
providers: zod_1.z.array(zod_1.z.string()),
|
|
15
16
|
});
|
|
17
|
+
exports.sUserLoggedIn = zod_1.z.object({
|
|
18
|
+
kind: zod_1.z.literal('user-logged-in'),
|
|
19
|
+
userId: primitives_1.sUserId,
|
|
20
|
+
});
|
|
21
|
+
exports.sUserLoggedOut = zod_1.z.object({
|
|
22
|
+
kind: zod_1.z.literal('user-logged-out'),
|
|
23
|
+
userId: primitives_1.sUserId,
|
|
24
|
+
});
|
|
@@ -7,6 +7,7 @@ export declare const sAddSecurityLevelRequest: z.ZodObject<Omit<{
|
|
|
7
7
|
color: z.ZodString;
|
|
8
8
|
checkFrequency: z.ZodNumber;
|
|
9
9
|
checkOnExit: z.ZodBoolean;
|
|
10
|
+
alwaysShowCheck: z.ZodBoolean;
|
|
10
11
|
default: z.ZodBoolean;
|
|
11
12
|
}, "id">, "strip", z.ZodTypeAny, {
|
|
12
13
|
name: string;
|
|
@@ -16,6 +17,7 @@ export declare const sAddSecurityLevelRequest: z.ZodObject<Omit<{
|
|
|
16
17
|
order: number;
|
|
17
18
|
checkFrequency: number;
|
|
18
19
|
checkOnExit: boolean;
|
|
20
|
+
alwaysShowCheck: boolean;
|
|
19
21
|
}, {
|
|
20
22
|
name: string;
|
|
21
23
|
default: boolean;
|
|
@@ -24,6 +26,7 @@ export declare const sAddSecurityLevelRequest: z.ZodObject<Omit<{
|
|
|
24
26
|
order: number;
|
|
25
27
|
checkFrequency: number;
|
|
26
28
|
checkOnExit: boolean;
|
|
29
|
+
alwaysShowCheck: boolean;
|
|
27
30
|
}>;
|
|
28
31
|
export declare const sUpdateSecurityLevelRequest: z.ZodObject<{
|
|
29
32
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -33,6 +36,7 @@ export declare const sUpdateSecurityLevelRequest: z.ZodObject<{
|
|
|
33
36
|
order: z.ZodOptional<z.ZodNumber>;
|
|
34
37
|
checkFrequency: z.ZodOptional<z.ZodNumber>;
|
|
35
38
|
checkOnExit: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
alwaysShowCheck: z.ZodOptional<z.ZodBoolean>;
|
|
36
40
|
}, "strip", z.ZodTypeAny, {
|
|
37
41
|
name?: string | undefined;
|
|
38
42
|
default?: boolean | undefined;
|
|
@@ -41,6 +45,7 @@ export declare const sUpdateSecurityLevelRequest: z.ZodObject<{
|
|
|
41
45
|
order?: number | undefined;
|
|
42
46
|
checkFrequency?: number | undefined;
|
|
43
47
|
checkOnExit?: boolean | undefined;
|
|
48
|
+
alwaysShowCheck?: boolean | undefined;
|
|
44
49
|
}, {
|
|
45
50
|
name?: string | undefined;
|
|
46
51
|
default?: boolean | undefined;
|
|
@@ -49,6 +54,7 @@ export declare const sUpdateSecurityLevelRequest: z.ZodObject<{
|
|
|
49
54
|
order?: number | undefined;
|
|
50
55
|
checkFrequency?: number | undefined;
|
|
51
56
|
checkOnExit?: boolean | undefined;
|
|
57
|
+
alwaysShowCheck?: boolean | undefined;
|
|
52
58
|
}>;
|
|
53
59
|
export type AddSecurityLevelRequest = z.infer<typeof sAddSecurityLevelRequest>;
|
|
54
60
|
export type UpdateSecurityLevelRequest = z.infer<typeof sUpdateSecurityLevelRequest>;
|
|
@@ -7,6 +7,7 @@ export declare const sSecurityLevelDto: z.ZodObject<{
|
|
|
7
7
|
color: z.ZodString;
|
|
8
8
|
checkFrequency: z.ZodNumber;
|
|
9
9
|
checkOnExit: z.ZodBoolean;
|
|
10
|
+
alwaysShowCheck: z.ZodBoolean;
|
|
10
11
|
default: z.ZodBoolean;
|
|
11
12
|
}, "strip", z.ZodTypeAny, {
|
|
12
13
|
name: string;
|
|
@@ -17,6 +18,7 @@ export declare const sSecurityLevelDto: z.ZodObject<{
|
|
|
17
18
|
order: number;
|
|
18
19
|
checkFrequency: number;
|
|
19
20
|
checkOnExit: boolean;
|
|
21
|
+
alwaysShowCheck: boolean;
|
|
20
22
|
}, {
|
|
21
23
|
name: string;
|
|
22
24
|
default: boolean;
|
|
@@ -26,5 +28,6 @@ export declare const sSecurityLevelDto: z.ZodObject<{
|
|
|
26
28
|
order: number;
|
|
27
29
|
checkFrequency: number;
|
|
28
30
|
checkOnExit: boolean;
|
|
31
|
+
alwaysShowCheck: boolean;
|
|
29
32
|
}>;
|
|
30
33
|
export type SecurityLevelDto = z.infer<typeof sSecurityLevelDto>;
|
package/dist/package.json
CHANGED
package/dist/primitives.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const sPersonId: z.ZodString;
|
|
|
13
13
|
export declare const sPersonTypeId: z.ZodString;
|
|
14
14
|
export declare const sZoneId: z.ZodString;
|
|
15
15
|
export declare const sMacroId: z.ZodString;
|
|
16
|
+
export declare const sUserId: z.ZodString;
|
|
16
17
|
export declare const sWorldObjectId: z.ZodString;
|
|
17
18
|
export declare const sIoInputSlotId: z.ZodString;
|
|
18
19
|
export type IoInputSlotId = z.infer<typeof sIoInputSlotId>;
|
package/dist/primitives.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* domain-specific types like DeviceId, PresetId, Duration, URL, etc.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sIoOutputSlotId = exports.sIoInputSlotId = exports.sWorldObjectId = exports.sMacroId = exports.sZoneId = exports.sPersonTypeId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
10
|
+
exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sIoOutputSlotId = exports.sIoInputSlotId = exports.sWorldObjectId = exports.sUserId = exports.sMacroId = exports.sZoneId = exports.sPersonTypeId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
11
11
|
const zod_1 = require("zod");
|
|
12
12
|
const device_1 = require("./objects/device");
|
|
13
13
|
exports.sDeviceId = zod_1.z.string().uuid().nonempty();
|
|
@@ -17,6 +17,7 @@ exports.sPersonId = zod_1.z.string().uuid().nonempty();
|
|
|
17
17
|
exports.sPersonTypeId = zod_1.z.string().nonempty();
|
|
18
18
|
exports.sZoneId = zod_1.z.string().uuid().nonempty();
|
|
19
19
|
exports.sMacroId = zod_1.z.string().uuid().nonempty();
|
|
20
|
+
exports.sUserId = zod_1.z.string().uuid().nonempty();
|
|
20
21
|
exports.sWorldObjectId = zod_1.z.string().nonempty();
|
|
21
22
|
exports.sIoInputSlotId = zod_1.z.string().nonempty();
|
|
22
23
|
exports.sIoOutputSlotId = zod_1.z.string().nonempty();
|