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>

87 lines (78 loc) 2.25 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; export type GetDomainVerificationRecordRequest = { /** * The domain name to get the verification record for */ domain: string; /** * The Team identifier to perform the request on behalf of. */ teamId?: string | undefined; /** * The Team slug to perform the request on behalf of. */ slug?: string | undefined; }; /** * Returns the TXT record needed to verify domain ownership. */ export type GetDomainVerificationRecordResponseBody = { txtRecord: string; verificationDomain: string; }; /** @internal */ export type GetDomainVerificationRecordRequest$Outbound = { domain: string; teamId?: string | undefined; slug?: string | undefined; }; /** @internal */ export const GetDomainVerificationRecordRequest$outboundSchema: z.ZodType< GetDomainVerificationRecordRequest$Outbound, z.ZodTypeDef, GetDomainVerificationRecordRequest > = z.object({ domain: z.string(), teamId: z.string().optional(), slug: z.string().optional(), }); export function getDomainVerificationRecordRequestToJSON( getDomainVerificationRecordRequest: GetDomainVerificationRecordRequest, ): string { return JSON.stringify( GetDomainVerificationRecordRequest$outboundSchema.parse( getDomainVerificationRecordRequest, ), ); } /** @internal */ export const GetDomainVerificationRecordResponseBody$inboundSchema: z.ZodType< GetDomainVerificationRecordResponseBody, z.ZodTypeDef, unknown > = z.object({ txtRecord: types.string(), verificationDomain: types.string(), }); export function getDomainVerificationRecordResponseBodyFromJSON( jsonString: string, ): SafeParseResult< GetDomainVerificationRecordResponseBody, SDKValidationError > { return safeParse( jsonString, (x) => GetDomainVerificationRecordResponseBody$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetDomainVerificationRecordResponseBody' from JSON`, ); }