@remnawave/backend-contract
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -18,8 +18,2 @@ "use strict"; | ||
.uuid('Inbound UUID must be a valid UUID'), | ||
viewPosition: zod_1.z | ||
.number({ | ||
invalid_type_error: 'View position must be an integer', | ||
}) | ||
.int() | ||
.optional(), | ||
remark: zod_1.z | ||
@@ -43,4 +37,4 @@ .string({ | ||
host: zod_1.z.string().optional(), | ||
alpn: zod_1.z.nativeEnum(alpn_1.ALPN).optional(), | ||
fingerprint: zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).optional(), | ||
alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()), | ||
fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()), | ||
allowInsecure: zod_1.z.boolean().optional().default(false), | ||
@@ -47,0 +41,0 @@ isDisabled: zod_1.z.boolean().optional().default(false), |
import { z } from 'zod'; | ||
import { REST_API } from '../../api'; | ||
import { ALPN } from '../../constants/hosts/alpn'; | ||
import { FINGERPRINTS } from '../../constants/hosts/fingerprints'; | ||
import { ALPN_VALUES } from '../../constants/hosts/alpn'; | ||
import { FINGERPRINTS_VALUES } from '../../constants/hosts/fingerprints'; | ||
import { HostsSchema } from '../../models'; | ||
@@ -16,8 +16,2 @@ | ||
.uuid('Inbound UUID must be a valid UUID'), | ||
viewPosition: z | ||
.number({ | ||
invalid_type_error: 'View position must be an integer', | ||
}) | ||
.int() | ||
.optional(), | ||
remark: z | ||
@@ -41,4 +35,6 @@ .string({ | ||
host: z.string().optional(), | ||
alpn: z.nativeEnum(ALPN).optional(), | ||
fingerprint: z.nativeEnum(FINGERPRINTS).optional(), | ||
alpn: z.optional(z.enum([ALPN_VALUES[0], ...ALPN_VALUES]).nullable()), | ||
fingerprint: z.optional( | ||
z.enum([FINGERPRINTS_VALUES[0], ...FINGERPRINTS_VALUES]).nullable(), | ||
), | ||
allowInsecure: z.boolean().optional().default(false), | ||
@@ -45,0 +41,0 @@ isDisabled: z.boolean().optional().default(false), |
{ | ||
"name": "@remnawave/backend-contract", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "A contract library for Remnawave", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
139936
3456