/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteDomainRequest = { /** * The domain name. */ slug: string; }; /** * The domain was deleted. */ export type DeleteDomainResponseBody = { /** * The domain name. */ slug: string; }; /** @internal */ export type DeleteDomainRequest$Outbound = { slug: string; }; /** @internal */ export const DeleteDomainRequest$outboundSchema: z.ZodType< DeleteDomainRequest$Outbound, z.ZodTypeDef, DeleteDomainRequest > = z.object({ slug: z.string(), }); export function deleteDomainRequestToJSON( deleteDomainRequest: DeleteDomainRequest, ): string { return JSON.stringify( DeleteDomainRequest$outboundSchema.parse(deleteDomainRequest), ); } /** @internal */ export const DeleteDomainResponseBody$inboundSchema: z.ZodType< DeleteDomainResponseBody, z.ZodTypeDef, unknown > = z.object({ slug: z.string(), }); export function deleteDomainResponseBodyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteDomainResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteDomainResponseBody' from JSON`, ); }