@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
67 lines • 2.94 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
/**
* The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available.
*/
export const ServiceType = {
External: "external",
Na: "na",
ZeitWorld: "zeit.world",
};
/** @internal */
export const ClaimDomainOwnershipRequest$outboundSchema = z.object({
domain: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function claimDomainOwnershipRequestToJSON(claimDomainOwnershipRequest) {
return JSON.stringify(ClaimDomainOwnershipRequest$outboundSchema.parse(claimDomainOwnershipRequest));
}
/** @internal */
export const ClaimDomainOwnershipCreator$inboundSchema = z.object({
username: types.string(),
email: types.string(),
customerId: z.nullable(types.string()).optional(),
isDomainReseller: types.optional(types.boolean()),
id: types.string(),
});
export function claimDomainOwnershipCreatorFromJSON(jsonString) {
return safeParse(jsonString, (x) => ClaimDomainOwnershipCreator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClaimDomainOwnershipCreator' from JSON`);
}
/** @internal */
export const ServiceType$inboundSchema = z
.nativeEnum(ServiceType);
/** @internal */
export const ClaimDomainOwnershipDomain$inboundSchema = z.object({
expiresAt: types.nullable(types.number()),
verified: types.boolean(),
nameservers: z.array(types.string()),
intendedNameservers: z.array(types.string()),
customNameservers: types.optional(z.array(types.string())),
creator: z.lazy(() => ClaimDomainOwnershipCreator$inboundSchema),
name: types.string(),
teamId: types.nullable(types.string()),
boughtAt: types.nullable(types.number()),
createdAt: types.number(),
id: types.string(),
renew: types.optional(types.boolean()),
serviceType: ServiceType$inboundSchema,
transferredAt: z.nullable(types.number()).optional(),
transferStartedAt: types.optional(types.number()),
userId: types.string(),
});
export function claimDomainOwnershipDomainFromJSON(jsonString) {
return safeParse(jsonString, (x) => ClaimDomainOwnershipDomain$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClaimDomainOwnershipDomain' from JSON`);
}
/** @internal */
export const ClaimDomainOwnershipResponseBody$inboundSchema = z.object({
domain: z.lazy(() => ClaimDomainOwnershipDomain$inboundSchema),
});
export function claimDomainOwnershipResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ClaimDomainOwnershipResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClaimDomainOwnershipResponseBody' from JSON`);
}
//# sourceMappingURL=claimdomainownershipop.js.map