@remnawave/backend-contract
Advanced tools
Comparing version 0.0.28 to 0.0.30
@@ -13,23 +13,15 @@ "use strict"; | ||
}).extend({ | ||
name: zod_1.z.string().min(5, 'Name is required').optional(), | ||
address: zod_1.z.string().min(2, 'Address is required').optional(), | ||
port: zod_1.z.number().int().min(1, 'Port is required').optional(), | ||
isTrafficTrackingActive: zod_1.z.boolean().optional(), | ||
trafficLimitBytes: zod_1.z | ||
name: zod_1.z.optional(zod_1.z.string().min(5, 'Min. 5 characters')), | ||
address: zod_1.z.optional(zod_1.z.string().min(2, 'Min. 2 characters')), | ||
port: zod_1.z.optional(zod_1.z.number()), | ||
isTrafficTrackingActive: zod_1.z.optional(zod_1.z.boolean()), | ||
trafficLimitBytes: zod_1.z.optional(zod_1.z.number().min(0, 'Traffic limit must be greater than 0')), | ||
notifyPercent: zod_1.z.optional(zod_1.z | ||
.number() | ||
.int() | ||
.min(0, 'Traffic limit must be greater than 0') | ||
.optional(), | ||
notifyPercent: zod_1.z | ||
.number() | ||
.int() | ||
.min(0, 'Notify percent must be greater than 0') | ||
.max(100, 'Notify percent must be less than 100') | ||
.optional(), | ||
trafficResetDay: zod_1.z | ||
.max(100, 'Notify percent must be less than 100')), | ||
trafficResetDay: zod_1.z.optional(zod_1.z | ||
.number() | ||
.int() | ||
.min(1, 'Traffic reset day must be greater than 0') | ||
.max(31, 'Traffic reset day must be less than 31') | ||
.optional(), | ||
.max(31, 'Traffic reset day must be less than 31')), | ||
}); | ||
@@ -36,0 +28,0 @@ UpdateNodeCommand.ResponseSchema = zod_1.z.object({ |
@@ -11,23 +11,19 @@ import { z } from 'zod'; | ||
}).extend({ | ||
name: z.string().min(5, 'Name is required').optional(), | ||
address: z.string().min(2, 'Address is required').optional(), | ||
port: z.number().int().min(1, 'Port is required').optional(), | ||
isTrafficTrackingActive: z.boolean().optional(), | ||
trafficLimitBytes: z | ||
.number() | ||
.int() | ||
.min(0, 'Traffic limit must be greater than 0') | ||
.optional(), | ||
notifyPercent: z | ||
.number() | ||
.int() | ||
.min(0, 'Notify percent must be greater than 0') | ||
.max(100, 'Notify percent must be less than 100') | ||
.optional(), | ||
trafficResetDay: z | ||
.number() | ||
.int() | ||
.min(1, 'Traffic reset day must be greater than 0') | ||
.max(31, 'Traffic reset day must be less than 31') | ||
.optional(), | ||
name: z.optional(z.string().min(5, 'Min. 5 characters')), | ||
address: z.optional(z.string().min(2, 'Min. 2 characters')), | ||
port: z.optional(z.number()), | ||
isTrafficTrackingActive: z.optional(z.boolean()), | ||
trafficLimitBytes: z.optional(z.number().min(0, 'Traffic limit must be greater than 0')), | ||
notifyPercent: z.optional( | ||
z | ||
.number() | ||
.min(0, 'Notify percent must be greater than 0') | ||
.max(100, 'Notify percent must be less than 100'), | ||
), | ||
trafficResetDay: z.optional( | ||
z | ||
.number() | ||
.min(1, 'Traffic reset day must be greater than 0') | ||
.max(31, 'Traffic reset day must be less than 31'), | ||
), | ||
}); | ||
@@ -34,0 +30,0 @@ |
{ | ||
"name": "@remnawave/backend-contract", | ||
"version": "0.0.28", | ||
"version": "0.0.30", | ||
"description": "A contract library for Remnawave", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
140584
3477