@remnawave/backend-contract 0.0.20 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
@@ -15,12 +15,6 @@ var CreateHostCommand;
|
|
15
15
|
invalid_type_error: 'Inbound UUID must be a string',
|
16
16
|
})
|
17
17
|
.uuid('Inbound UUID must be a valid UUID'),
|
18
|
-
viewPosition: zod_1.z
|
19
|
-
.number({
|
20
|
-
invalid_type_error: 'View position must be an integer',
|
21
|
-
})
|
22
|
-
.int()
|
23
|
-
.optional(),
|
24
18
|
remark: zod_1.z
|
25
19
|
.string({
|
26
20
|
invalid_type_error: 'Remark must be a string',
|
@@ -39,8 +33,8 @@ var CreateHostCommand;
|
|
39
33
|
path: zod_1.z.string().optional(),
|
40
34
|
sni: zod_1.z.string().optional(),
|
41
35
|
host: zod_1.z.string().optional(),
|
42
|
-
alpn: zod_1.z.
|
43
|
-
fingerprint: zod_1.z.
|
36
|
+
alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()),
|
37
|
+
fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()),
|
44
38
|
allowInsecure: zod_1.z.boolean().optional().default(false),
|
45
39
|
isDisabled: zod_1.z.boolean().optional().default(false),
|
46
40
|
});
|
@@ -40,8 +40,8 @@ var UpdateHostCommand;
|
|
40
40
|
path: zod_1.z.optional(zod_1.z.string()),
|
41
41
|
sni: zod_1.z.optional(zod_1.z.string()),
|
42
42
|
host: zod_1.z.optional(zod_1.z.string()),
|
43
|
-
alpn: zod_1.z.optional(zod_1.z.
|
44
|
-
fingerprint: zod_1.z.optional(zod_1.z.
|
43
|
+
alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()),
|
44
|
+
fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()),
|
45
45
|
allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
|
46
46
|
isDisabled: zod_1.z.optional(zod_1.z.boolean()),
|
47
47
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { REST_API } from '../../api';
|
3
|
-
import {
|
4
|
-
import {
|
3
|
+
import { ALPN_VALUES } from '../../constants/hosts/alpn';
|
4
|
+
import { FINGERPRINTS_VALUES } from '../../constants/hosts/fingerprints';
|
5
5
|
import { HostsSchema } from '../../models';
|
6
6
|
|
7
7
|
export namespace CreateHostCommand {
|
@@ -13,12 +13,6 @@ export namespace CreateHostCommand {
|
|
13
13
|
invalid_type_error: 'Inbound UUID must be a string',
|
14
14
|
})
|
15
15
|
.uuid('Inbound UUID must be a valid UUID'),
|
16
|
-
viewPosition: z
|
17
|
-
.number({
|
18
|
-
invalid_type_error: 'View position must be an integer',
|
19
|
-
})
|
20
|
-
.int()
|
21
|
-
.optional(),
|
22
16
|
remark: z
|
23
17
|
.string({
|
24
18
|
invalid_type_error: 'Remark must be a string',
|
@@ -37,8 +31,10 @@ export namespace CreateHostCommand {
|
|
37
31
|
path: z.string().optional(),
|
38
32
|
sni: z.string().optional(),
|
39
33
|
host: z.string().optional(),
|
40
|
-
alpn: z.
|
41
|
-
fingerprint: z.
|
34
|
+
alpn: z.optional(z.enum([ALPN_VALUES[0], ...ALPN_VALUES]).nullable()),
|
35
|
+
fingerprint: z.optional(
|
36
|
+
z.enum([FINGERPRINTS_VALUES[0], ...FINGERPRINTS_VALUES]).nullable(),
|
37
|
+
),
|
42
38
|
allowInsecure: z.boolean().optional().default(false),
|
43
39
|
isDisabled: z.boolean().optional().default(false),
|
44
40
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { REST_API } from '../../api';
|
3
|
-
import { ALPN } from '../../constants/hosts/alpn';
|
4
|
-
import { FINGERPRINTS } from '../../constants/hosts/fingerprints';
|
3
|
+
import { ALPN, ALPN_VALUES } from '../../constants/hosts/alpn';
|
4
|
+
import { FINGERPRINTS, FINGERPRINTS_VALUES } from '../../constants/hosts/fingerprints';
|
5
5
|
import { HostsSchema } from '../../models';
|
6
6
|
|
7
7
|
export namespace UpdateHostCommand {
|
@@ -38,8 +38,10 @@ export namespace UpdateHostCommand {
|
|
38
38
|
path: z.optional(z.string()),
|
39
39
|
sni: z.optional(z.string()),
|
40
40
|
host: z.optional(z.string()),
|
41
|
-
alpn: z.optional(z.
|
42
|
-
fingerprint: z.optional(
|
41
|
+
alpn: z.optional(z.enum([ALPN_VALUES[0], ...ALPN_VALUES]).nullable()),
|
42
|
+
fingerprint: z.optional(
|
43
|
+
z.enum([FINGERPRINTS_VALUES[0], ...FINGERPRINTS_VALUES]).nullable(),
|
44
|
+
),
|
43
45
|
allowInsecure: z.optional(z.boolean()),
|
44
46
|
isDisabled: z.optional(z.boolean()),
|
45
47
|
});
|