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>

56 lines 3.03 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"; import { smartUnion } from "../types/smartUnion.js"; import { BadRequest$inboundSchema } from "./badrequest.js"; import { DomainTooShort$inboundSchema, } from "./domaintooshort.js"; import { HttpApiDecodeError$inboundSchema, } from "./httpapidecodeerror.js"; import { TldNotSupported$inboundSchema, } from "./tldnotsupported.js"; /** @internal */ export const GetDomainPriceRequest$outboundSchema = z.object({ domain: z.string(), years: z.string().optional(), teamId: z.string().optional(), }); export function getDomainPriceRequestToJSON(getDomainPriceRequest) { return JSON.stringify(GetDomainPriceRequest$outboundSchema.parse(getDomainPriceRequest)); } /** @internal */ export const GetDomainPriceDomainsRegistrarResponseBody$inboundSchema = smartUnion([ BadRequest$inboundSchema, DomainTooShort$inboundSchema, TldNotSupported$inboundSchema, HttpApiDecodeError$inboundSchema, ]); export function getDomainPriceDomainsRegistrarResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetDomainPriceDomainsRegistrarResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainPriceDomainsRegistrarResponseBody' from JSON`); } /** @internal */ export const GetDomainPricePurchasePrice$inboundSchema = smartUnion([types.number(), types.string()]); export function getDomainPricePurchasePriceFromJSON(jsonString) { return safeParse(jsonString, (x) => GetDomainPricePurchasePrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainPricePurchasePrice' from JSON`); } /** @internal */ export const GetDomainPriceRenewalPrice$inboundSchema = smartUnion([types.number(), types.string()]); export function getDomainPriceRenewalPriceFromJSON(jsonString) { return safeParse(jsonString, (x) => GetDomainPriceRenewalPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainPriceRenewalPrice' from JSON`); } /** @internal */ export const GetDomainPriceTransferPrice$inboundSchema = smartUnion([types.number(), types.string()]); export function getDomainPriceTransferPriceFromJSON(jsonString) { return safeParse(jsonString, (x) => GetDomainPriceTransferPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainPriceTransferPrice' from JSON`); } /** @internal */ export const GetDomainPriceResponseBody$inboundSchema = z.object({ years: types.number(), purchasePrice: smartUnion([types.number(), types.string()]), renewalPrice: smartUnion([types.number(), types.string()]), transferPrice: smartUnion([types.number(), types.string()]), }); export function getDomainPriceResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetDomainPriceResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainPriceResponseBody' from JSON`); } //# sourceMappingURL=getdomainpriceop.js.map