@awarevue/api-types 1.0.46 → 1.0.47
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/package.json +1 -1
- package/dist/security-level.d.ts +58 -0
- package/dist/security-level.js +16 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sSecurityLevelDto: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
active: z.ZodBoolean;
|
|
6
|
+
color: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
name: string;
|
|
9
|
+
id: number;
|
|
10
|
+
active: boolean;
|
|
11
|
+
color: string;
|
|
12
|
+
}, {
|
|
13
|
+
name: string;
|
|
14
|
+
id: number;
|
|
15
|
+
active: boolean;
|
|
16
|
+
color: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const sAddSecurityLevelRequest: z.ZodObject<Omit<{
|
|
19
|
+
id: z.ZodNumber;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
active: z.ZodBoolean;
|
|
22
|
+
color: z.ZodString;
|
|
23
|
+
}, "id">, "strip", z.ZodTypeAny, {
|
|
24
|
+
name: string;
|
|
25
|
+
active: boolean;
|
|
26
|
+
color: string;
|
|
27
|
+
}, {
|
|
28
|
+
name: string;
|
|
29
|
+
active: boolean;
|
|
30
|
+
color: string;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const sUpdateSecurityLevelRequest: z.ZodObject<{
|
|
33
|
+
name: z.ZodOptional<z.ZodString>;
|
|
34
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
color: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
active?: boolean | undefined;
|
|
39
|
+
color?: string | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
active?: boolean | undefined;
|
|
43
|
+
color?: string | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const sSetActiveSecurityLevelRequest: z.ZodObject<{
|
|
46
|
+
id: z.ZodNumber;
|
|
47
|
+
active: z.ZodBoolean;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
id: number;
|
|
50
|
+
active: boolean;
|
|
51
|
+
}, {
|
|
52
|
+
id: number;
|
|
53
|
+
active: boolean;
|
|
54
|
+
}>;
|
|
55
|
+
export type SecurityLevelDto = z.infer<typeof sSecurityLevelDto>;
|
|
56
|
+
export type AddSecurityLevelRequest = z.infer<typeof sAddSecurityLevelRequest>;
|
|
57
|
+
export type UpdateSecurityLevelRequest = z.infer<typeof sUpdateSecurityLevelRequest>;
|
|
58
|
+
export type SetActiveSecurityLevelRequest = z.infer<typeof sSetActiveSecurityLevelRequest>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sSetActiveSecurityLevelRequest = exports.sUpdateSecurityLevelRequest = exports.sAddSecurityLevelRequest = exports.sSecurityLevelDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sSecurityLevelDto = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.number(),
|
|
7
|
+
name: zod_1.z.string().max(64),
|
|
8
|
+
active: zod_1.z.boolean(),
|
|
9
|
+
color: zod_1.z.string().length(6),
|
|
10
|
+
});
|
|
11
|
+
exports.sAddSecurityLevelRequest = exports.sSecurityLevelDto.omit({ id: true });
|
|
12
|
+
exports.sUpdateSecurityLevelRequest = exports.sAddSecurityLevelRequest.partial();
|
|
13
|
+
exports.sSetActiveSecurityLevelRequest = zod_1.z.object({
|
|
14
|
+
id: zod_1.z.number(),
|
|
15
|
+
active: zod_1.z.boolean(),
|
|
16
|
+
});
|