@remnawave/backend-contract
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -26,3 +26,3 @@ import { z } from 'zod'; | ||
activeUserInbounds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
expireAt: z.ZodEffects<z.ZodString, Date, string>; | ||
expireAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, Date, string | Date>; | ||
createdAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>; | ||
@@ -50,3 +50,3 @@ lastTrafficResetAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>; | ||
username: string; | ||
expireAt: string; | ||
expireAt: string | Date; | ||
status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined; | ||
@@ -53,0 +53,0 @@ createdAt?: string | undefined; |
@@ -82,8 +82,7 @@ "use strict"; | ||
expireAt: zod_1.z | ||
.string({ | ||
required_error: 'Expiration date is required', | ||
invalid_type_error: 'Invalid date format', | ||
}) | ||
.datetime({ message: 'Invalid date format', offset: true }) | ||
.transform((str) => new Date(str)) | ||
.union([ | ||
zod_1.z.string().datetime({ message: 'Invalid date format', offset: true }), | ||
zod_1.z.date(), | ||
]) | ||
.transform((val) => (val instanceof Date ? val : new Date(val))) | ||
.describe('Date format: 2025-01-17T15:38:45.065Z'), | ||
@@ -90,0 +89,0 @@ createdAt: zod_1.z |
@@ -82,8 +82,7 @@ "use strict"; | ||
expireAt: zod_1.z | ||
.string({ | ||
required_error: 'Expiration date is required', | ||
invalid_type_error: 'Invalid date format', | ||
}) | ||
.datetime({ message: 'Invalid date format', offset: true }) | ||
.transform((str) => new Date(str)) | ||
.union([ | ||
zod_1.z.string().datetime({ message: 'Invalid date format', offset: true }), | ||
zod_1.z.date(), | ||
]) | ||
.transform((val) => (val instanceof Date ? val : new Date(val))) | ||
.describe('Date format: 2025-01-17T15:38:45.065Z'), | ||
@@ -90,0 +89,0 @@ createdAt: zod_1.z |
{ | ||
"name": "@remnawave/backend-contract", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"public": true, | ||
@@ -5,0 +5,0 @@ "license": "AGPL-3.0-only", |
Sorry, the diff of this file is not supported yet
480337
11506