/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type V3DomainLinkRequestResponse = { httpMeta: components.HTTPMetadata; /** * V3DomainLinkResponse */ v3DomainLinkResponse?: components.V3DomainLinkResponse | undefined; }; /** @internal */ export const V3DomainLinkRequestResponse$inboundSchema: z.ZodType< V3DomainLinkRequestResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, V3DomainLinkResponse: components.V3DomainLinkResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "V3DomainLinkResponse": "v3DomainLinkResponse", }); }); /** @internal */ export type V3DomainLinkRequestResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; V3DomainLinkResponse?: components.V3DomainLinkResponse$Outbound | undefined; }; /** @internal */ export const V3DomainLinkRequestResponse$outboundSchema: z.ZodType< V3DomainLinkRequestResponse$Outbound, z.ZodTypeDef, V3DomainLinkRequestResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, v3DomainLinkResponse: components.V3DomainLinkResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", v3DomainLinkResponse: "V3DomainLinkResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3DomainLinkRequestResponse$ { /** @deprecated use `V3DomainLinkRequestResponse$inboundSchema` instead. */ export const inboundSchema = V3DomainLinkRequestResponse$inboundSchema; /** @deprecated use `V3DomainLinkRequestResponse$outboundSchema` instead. */ export const outboundSchema = V3DomainLinkRequestResponse$outboundSchema; /** @deprecated use `V3DomainLinkRequestResponse$Outbound` instead. */ export type Outbound = V3DomainLinkRequestResponse$Outbound; } export function v3DomainLinkRequestResponseToJSON( v3DomainLinkRequestResponse: V3DomainLinkRequestResponse, ): string { return JSON.stringify( V3DomainLinkRequestResponse$outboundSchema.parse( v3DomainLinkRequestResponse, ), ); } export function v3DomainLinkRequestResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3DomainLinkRequestResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3DomainLinkRequestResponse' from JSON`, ); }