Comparing version 3.24.0-canary.20241107T043915 to 3.24.0-canary.20241210T025031
import { enumUtil } from "./helpers/enumUtil"; | ||
import { errorUtil } from "./helpers/errorUtil"; | ||
import { AsyncParseReturnType, ParseContext, ParseInput, ParseParams, ParseReturnType, ParseStatus, SyncParseReturnType } from "./helpers/parseUtil"; | ||
import { AsyncParseReturnType, INVALID, ParseContext, ParseInput, ParseParams, ParseReturnType, ParseStatus, SyncParseReturnType } from "./helpers/parseUtil"; | ||
import { partialUtil } from "./helpers/partialUtil"; | ||
@@ -183,4 +183,11 @@ import { Primitive } from "./helpers/typeAliases"; | ||
} | { | ||
kind: "cidr"; | ||
version?: IpVersion; | ||
message?: string; | ||
} | { | ||
kind: "base64"; | ||
message?: string; | ||
} | { | ||
kind: "base64url"; | ||
message?: string; | ||
}; | ||
@@ -210,2 +217,3 @@ export interface ZodStringDef extends ZodTypeDef { | ||
base64(message?: errorUtil.ErrMessage): ZodString; | ||
base64url(message?: errorUtil.ErrMessage): ZodString; | ||
ip(options?: string | { | ||
@@ -215,2 +223,6 @@ version?: IpVersion; | ||
}): ZodString; | ||
cidr(options?: string | { | ||
version?: IpVersion; | ||
message?: string; | ||
}): ZodString; | ||
datetime(options?: string | { | ||
@@ -259,3 +271,5 @@ message?: string | undefined; | ||
get isIP(): boolean; | ||
get isCIDR(): boolean; | ||
get isBase64(): boolean; | ||
get isBase64url(): boolean; | ||
get minLength(): number | null; | ||
@@ -354,2 +368,3 @@ get maxLength(): number | null; | ||
_parse(input: ParseInput): ParseReturnType<bigint>; | ||
_getInvalidInput(input: ParseInput): INVALID; | ||
static create: (params?: ({ | ||
@@ -619,3 +634,3 @@ errorMap?: ZodErrorMap | undefined; | ||
} & ZodRawShape, UnknownKeysParam, ZodTypeAny>; | ||
export interface ZodDiscriminatedUnionDef<Discriminator extends string, Options extends ZodDiscriminatedUnionOption<string>[] = ZodDiscriminatedUnionOption<string>[]> extends ZodTypeDef { | ||
export interface ZodDiscriminatedUnionDef<Discriminator extends string, Options extends readonly ZodDiscriminatedUnionOption<string>[] = ZodDiscriminatedUnionOption<string>[]> extends ZodTypeDef { | ||
discriminator: Discriminator; | ||
@@ -626,3 +641,3 @@ options: Options; | ||
} | ||
export declare class ZodDiscriminatedUnion<Discriminator extends string, Options extends ZodDiscriminatedUnionOption<Discriminator>[]> extends ZodType<output<Options[number]>, ZodDiscriminatedUnionDef<Discriminator, Options>, input<Options[number]>> { | ||
export declare class ZodDiscriminatedUnion<Discriminator extends string, Options extends readonly ZodDiscriminatedUnionOption<Discriminator>[]> extends ZodType<output<Options[number]>, ZodDiscriminatedUnionDef<Discriminator, Options>, input<Options[number]>> { | ||
_parse(input: ParseInput): ParseReturnType<this["_output"]>; | ||
@@ -640,3 +655,3 @@ get discriminator(): Discriminator; | ||
*/ | ||
static create<Discriminator extends string, Types extends [ | ||
static create<Discriminator extends string, Types extends readonly [ | ||
ZodDiscriminatedUnionOption<Discriminator>, | ||
@@ -643,0 +658,0 @@ ...ZodDiscriminatedUnionOption<Discriminator>[] |
@@ -73,3 +73,3 @@ import type { TypeOf, ZodType } from "."; | ||
} | ||
export declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "base64" | { | ||
export declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "base64url" | { | ||
includes: string; | ||
@@ -76,0 +76,0 @@ position?: number; |
{ | ||
"name": "zod", | ||
"version": "3.24.0-canary.20241107T043915", | ||
"version": "3.24.0-canary.20241210T025031", | ||
"author": "Colin McDonnell <colin@colinhacks.com>", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
685636
15387
3028
1