mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-13 05:06:25 +00:00
fix z.coerce.number
This commit is contained in:
@@ -122,7 +122,7 @@ const addTargetSchema = z
|
||||
.object({
|
||||
ip: z.string().refine(isTargetValid),
|
||||
method: z.string().nullable(),
|
||||
port: z.coerce.number().int().positive(),
|
||||
port: z.coerce.number<number>().int().positive(),
|
||||
siteId: z.int()
|
||||
.positive({
|
||||
error: "You must select a site for a target."
|
||||
|
||||
@@ -93,7 +93,7 @@ const addRuleSchema = z.object({
|
||||
action: z.enum(["ACCEPT", "DROP", "PASS"]),
|
||||
match: z.string(),
|
||||
value: z.string(),
|
||||
priority: z.coerce.number().int().optional()
|
||||
priority: z.coerce.number<number>().int().optional()
|
||||
});
|
||||
|
||||
type LocalRule = ArrayElement<ListResourceRulesResponse["rules"]> & {
|
||||
|
||||
@@ -136,7 +136,7 @@ const addTargetSchema = z
|
||||
.object({
|
||||
ip: z.string().refine(isTargetValid),
|
||||
method: z.string().nullable(),
|
||||
port: z.coerce.number().int().positive(),
|
||||
port: z.coerce.number<number>().int().positive(),
|
||||
siteId: z.int().positive(),
|
||||
path: z.string().optional().nullable(),
|
||||
pathMatchType: z
|
||||
|
||||
@@ -108,7 +108,7 @@ export default function CreateShareLinkForm({
|
||||
resourceName: z.string(),
|
||||
resourceUrl: z.string(),
|
||||
timeUnit: z.string(),
|
||||
timeValue: z.coerce.number().int().positive().min(1),
|
||||
timeValue: z.coerce.number<number>().int().positive().min(1),
|
||||
title: z.string().optional()
|
||||
});
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ export default function GenerateLicenseKeyForm({
|
||||
jobTitle: z.string().min(1),
|
||||
primaryUse: z.string().min(1),
|
||||
industry: z.string().min(1),
|
||||
prospectiveUsers: z.coerce.number().optional(),
|
||||
prospectiveSites: z.coerce.number().optional(),
|
||||
prospectiveUsers: z.coerce.number<number>().optional(),
|
||||
prospectiveSites: z.coerce.number<number>().optional(),
|
||||
companyName: z.string().min(1),
|
||||
countryOfResidence: z.string().min(1),
|
||||
stateProvinceRegion: z.string().min(1),
|
||||
|
||||
Reference in New Issue
Block a user