mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-09 08:08:34 -06:00
Add separate RootRegistryEnum zod schema & type
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {z} from "zod";
|
||||
|
||||
export const ObjectTypeEnum = z.enum(['ip', 'autnum', 'entity', 'url', 'tld', 'registrar', 'json', 'domain'])
|
||||
export const RootRegistryEnum = z.enum(['autnum', 'domain', 'ip4', 'ip6', 'entity'])
|
||||
export const StatusEnum = z.enum(["validated", "renew prohibited", "update prohibited", "transfer prohibited", "delete prohibited", "proxy", "private", "removed", "obscured", "associated", "active", "inactive", "locked", "pending create", "pending renew", "pending transfer", "pending update", "pending delete", "add period", "auto renew period", "client delete prohibited", "client hold", "client renew prohibited", "client transfer prohibited", "client update prohibited", "pending restore", "redemption period", "renew period", "server delete prohibited", "server renew prohibited", "server transfer prohibited", "server update prohibited", "server hold", "transfer period"])
|
||||
|
||||
export const LinkSchema = z.object({
|
||||
|
||||
@@ -9,11 +9,13 @@ import type {
|
||||
NameserverSchema,
|
||||
ObjectTypeEnum,
|
||||
RegisterSchema,
|
||||
StatusEnum
|
||||
StatusEnum,
|
||||
RootRegistryEnum
|
||||
} from "@/schema";
|
||||
|
||||
export type ObjectType = z.infer<typeof ObjectTypeEnum>
|
||||
export type RegistryType = Exclude<ObjectType, 'ip'> | 'ip4' | 'ip6';
|
||||
export type RootRegistryType = z.infer<typeof RootRegistryEnum>;
|
||||
export type TargetType = Exclude<ObjectType, 'ip'> | 'ip4' | 'ip6';
|
||||
|
||||
export type RdapStatusType = z.infer<typeof StatusEnum>;
|
||||
export type Link = z.infer<typeof LinkSchema>;
|
||||
|
||||
Reference in New Issue
Block a user