Files
SnowLuma/.pnpm-store/v11/files/3f/2eb9837d36a6e3f93f46117dd23842a717defad47de3e34713d70aca2ca501ac5e37107289ffc7256e7a22cd96d51f6f60f38eb53c1d63d5b243c9073ad267
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

74 lines
2.0 KiB
Plaintext

import { ZodStringDef } from "zod/v3";
import { ErrorMessages } from "../errorMessages.js";
import { Refs } from "../Refs.js";
/**
* Generated from the regular expressions found here as of 2024-05-22:
* https://github.com/colinhacks/zod/blob/master/src/types.ts.
*
* Expressions with /i flag have been changed accordingly.
*/
export declare const zodPatterns: {
/**
* `c` was changed to `[cC]` to replicate /i flag
*/
readonly cuid: RegExp;
readonly cuid2: RegExp;
readonly ulid: RegExp;
/**
* `a-z` was added to replicate /i flag
*/
readonly email: RegExp;
/**
* Constructed a valid Unicode RegExp
*
* Lazily instantiate since this type of regex isn't supported
* in all envs (e.g. React Native).
*
* See:
* https://github.com/colinhacks/zod/issues/2433
* Fix in Zod:
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
*/
readonly emoji: () => RegExp;
/**
* Unused
*/
readonly uuid: RegExp;
/**
* Unused
*/
readonly ipv4: RegExp;
readonly ipv4Cidr: RegExp;
/**
* Unused
*/
readonly ipv6: RegExp;
readonly ipv6Cidr: RegExp;
readonly base64: RegExp;
readonly base64url: RegExp;
readonly nanoid: RegExp;
readonly jwt: RegExp;
};
export type JsonSchema7StringType = {
type: "string";
minLength?: number;
maxLength?: number;
format?: "email" | "idn-email" | "uri" | "uuid" | "date-time" | "ipv4" | "ipv6" | "date" | "time" | "duration";
pattern?: string;
allOf?: {
pattern: string;
errorMessage?: ErrorMessages<{
pattern: string;
}>;
}[];
anyOf?: {
format: string;
errorMessage?: ErrorMessages<{
format: string;
}>;
}[];
errorMessage?: ErrorMessages<JsonSchema7StringType>;
contentEncoding?: string;
};
export declare function parseStringDef(def: ZodStringDef, refs: Refs): JsonSchema7StringType;