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>

52 lines 2.62 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 { HttpApiDecodeError$inboundSchema, } from "./httpapidecodeerror.js"; import { TldNotSupported$inboundSchema, } from "./tldnotsupported.js"; /** @internal */ export const GetTldPriceRequest$outboundSchema = z.object({ tld: z.string(), years: z.string().optional(), teamId: z.string().optional(), }); export function getTldPriceRequestToJSON(getTldPriceRequest) { return JSON.stringify(GetTldPriceRequest$outboundSchema.parse(getTldPriceRequest)); } /** @internal */ export const GetTldPriceDomainsRegistrarResponseBody$inboundSchema = smartUnion([ TldNotSupported$inboundSchema, HttpApiDecodeError$inboundSchema, ]); export function getTldPriceDomainsRegistrarResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTldPriceDomainsRegistrarResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTldPriceDomainsRegistrarResponseBody' from JSON`); } /** @internal */ export const PurchasePrice$inboundSchema = smartUnion([types.number(), types.string()]); export function purchasePriceFromJSON(jsonString) { return safeParse(jsonString, (x) => PurchasePrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PurchasePrice' from JSON`); } /** @internal */ export const RenewalPrice$inboundSchema = smartUnion([types.number(), types.string()]); export function renewalPriceFromJSON(jsonString) { return safeParse(jsonString, (x) => RenewalPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RenewalPrice' from JSON`); } /** @internal */ export const TransferPrice$inboundSchema = smartUnion([types.number(), types.string()]); export function transferPriceFromJSON(jsonString) { return safeParse(jsonString, (x) => TransferPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransferPrice' from JSON`); } /** @internal */ export const GetTldPriceResponseBody$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 getTldPriceResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTldPriceResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTldPriceResponseBody' from JSON`); } //# sourceMappingURL=gettldpriceop.js.map