@remnawave/backend-contract
Advanced tools
Comparing version 0.0.51 to 0.0.52
@@ -13,3 +13,3 @@ "use strict"; | ||
id: zod_1.z.string(), | ||
value: zod_1.z.string(), | ||
value: zod_1.z.unknown(), | ||
}); | ||
@@ -25,8 +25,6 @@ const SortingSchema = zod_1.z.object({ | ||
filters: zod_1.z | ||
.union([zod_1.z.string(), zod_1.z.array(FilterSchema)]) | ||
.transform((val) => (typeof val === 'string' ? JSON.parse(val) : val)) | ||
.preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(FilterSchema)) | ||
.optional(), | ||
filterModes: zod_1.z | ||
.union([zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.string())]) | ||
.transform((val) => (typeof val === 'string' ? JSON.parse(val) : val)) | ||
.preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string())) | ||
.optional(), | ||
@@ -33,0 +31,0 @@ globalFilterMode: zod_1.z.string().optional(), |
@@ -11,3 +11,3 @@ import { z } from 'zod'; | ||
id: z.string(), | ||
value: z.string(), | ||
value: z.unknown(), | ||
}); | ||
@@ -25,10 +25,15 @@ | ||
filters: z | ||
.union([z.string(), z.array(FilterSchema)]) | ||
.transform((val) => (typeof val === 'string' ? JSON.parse(val) : val)) | ||
.preprocess( | ||
(str) => (typeof str === 'string' ? JSON.parse(str) : str), | ||
z.array(FilterSchema), | ||
) | ||
.optional(), | ||
filterModes: z | ||
.union([z.string(), z.record(z.string(), z.string())]) | ||
.transform((val) => (typeof val === 'string' ? JSON.parse(val) : val)) | ||
.preprocess( | ||
(str) => (typeof str === 'string' ? JSON.parse(str) : str), | ||
z.record(z.string(), z.string()), | ||
) | ||
.optional(), | ||
globalFilterMode: z.string().optional(), | ||
@@ -35,0 +40,0 @@ |
{ | ||
"name": "@remnawave/backend-contract", | ||
"version": "0.0.51", | ||
"version": "0.0.52", | ||
"description": "A contract library for Remnawave", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3858
157103