UNPKG

@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>

75 lines 3.18 kB
/* * 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"; /** * When true, the response will only include the nameservers assigned directly to the specified domain. When false and there are no nameservers assigned directly to the specified domain, the response will include the nameservers of the domain's parent zone. */ export const Strict = { True: "true", False: "false", }; /** * How we see the domain's configuration. - `CNAME`: Domain has a CNAME pointing to Vercel. - `A`: Domain's A record is resolving to Vercel. - `http`: Domain is resolving to Vercel but may be behind a Proxy. - `dns-01`: Domain is not resolving to Vercel but dns-01 challenge is enabled. - `null`: Domain is not resolving to Vercel. */ export const ConfiguredBy = { A: "A", Cname: "CNAME", Dns01: "dns-01", Http: "http", }; /** * Which challenge types the domain can use for issuing certs. */ export const AcceptedChallenges = { Dns01: "dns-01", Http01: "http-01", }; /** @internal */ export const Strict$outboundSchema = z .nativeEnum(Strict); /** @internal */ export const GetDomainConfigRequest$outboundSchema = z.object({ domain: z.string(), projectIdOrName: z.string().optional(), strict: Strict$outboundSchema.optional(), teamId: z.string().optional(), slug: z.string().optional(), }); export function getDomainConfigRequestToJSON(getDomainConfigRequest) { return JSON.stringify(GetDomainConfigRequest$outboundSchema.parse(getDomainConfigRequest)); } /** @internal */ export const ConfiguredBy$inboundSchema = z.nativeEnum(ConfiguredBy); /** @internal */ export const AcceptedChallenges$inboundSchema = z.nativeEnum(AcceptedChallenges); /** @internal */ export const RecommendedIPv4$inboundSchema = z.object({ rank: types.number(), value: z.array(types.string()), }); export function recommendedIPv4FromJSON(jsonString) { return safeParse(jsonString, (x) => RecommendedIPv4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecommendedIPv4' from JSON`); } /** @internal */ export const RecommendedCNAME$inboundSchema = z.object({ rank: types.number(), value: types.string(), }); export function recommendedCNAMEFromJSON(jsonString) { return safeParse(jsonString, (x) => RecommendedCNAME$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecommendedCNAME' from JSON`); } /** @internal */ export const GetDomainConfigResponseBody$inboundSchema = z.object({ configuredBy: types.nullable(ConfiguredBy$inboundSchema), acceptedChallenges: z.array(AcceptedChallenges$inboundSchema), recommendedIPv4: z.array(z.lazy(() => RecommendedIPv4$inboundSchema)), recommendedCNAME: z.array(z.lazy(() => RecommendedCNAME$inboundSchema)), misconfigured: types.boolean(), }); export function getDomainConfigResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetDomainConfigResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainConfigResponseBody' from JSON`); } //# sourceMappingURL=getdomainconfigop.js.map