@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.77 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 GetDomainServiceType = {
External: "external",
Na: "na",
ZeitWorld: "zeit.world",
};
/** @internal */
export const GetDomainRequest$outboundSchema = z.object({
domain: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getDomainRequestToJSON(getDomainRequest) {
return JSON.stringify(GetDomainRequest$outboundSchema.parse(getDomainRequest));
}
/** @internal */
export const GetDomainCreator$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 getDomainCreatorFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetDomainCreator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainCreator' from JSON`);
}
/** @internal */
export const GetDomainServiceType$inboundSchema = z.nativeEnum(GetDomainServiceType);
/** @internal */
export const GetDomainDomain$inboundSchema = z.object({
suffix: types.boolean(),
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(() => GetDomainCreator$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: GetDomainServiceType$inboundSchema,
transferredAt: z.nullable(types.number()).optional(),
transferStartedAt: types.optional(types.number()),
userId: types.string(),
});
export function getDomainDomainFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetDomainDomain$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainDomain' from JSON`);
}
/** @internal */
export const GetDomainResponseBody$inboundSchema = z.object({
domain: z.lazy(() => GetDomainDomain$inboundSchema),
});
export function getDomainResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetDomainResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainResponseBody' from JSON`);
}
//# sourceMappingURL=getdomainop.js.map