/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { LinkedFrom, LinkedFrom$inboundSchema, LinkedFrom$Outbound, LinkedFrom$outboundSchema, } from "./linkedfrom.js"; import { LinkedTo, LinkedTo$inboundSchema, LinkedTo$Outbound, LinkedTo$outboundSchema, } from "./linkedto.js"; import { RequestsFrom, RequestsFrom$inboundSchema, RequestsFrom$Outbound, RequestsFrom$outboundSchema, } from "./requestsfrom.js"; import { RequestsTo, RequestsTo$inboundSchema, RequestsTo$Outbound, RequestsTo$outboundSchema, } from "./requeststo.js"; export type V3DomainLinkedResponse = { linkedFrom?: Array | undefined; linkedTo?: Array | undefined; requestsFrom?: Array | undefined; requestsTo?: Array | undefined; }; /** @internal */ export const V3DomainLinkedResponse$inboundSchema: z.ZodType< V3DomainLinkedResponse, z.ZodTypeDef, unknown > = z.object({ linkedFrom: z.array(LinkedFrom$inboundSchema).optional(), linkedTo: z.array(LinkedTo$inboundSchema).optional(), requestsFrom: z.array(RequestsFrom$inboundSchema).optional(), requestsTo: z.array(RequestsTo$inboundSchema).optional(), }); /** @internal */ export type V3DomainLinkedResponse$Outbound = { linkedFrom?: Array | undefined; linkedTo?: Array | undefined; requestsFrom?: Array | undefined; requestsTo?: Array | undefined; }; /** @internal */ export const V3DomainLinkedResponse$outboundSchema: z.ZodType< V3DomainLinkedResponse$Outbound, z.ZodTypeDef, V3DomainLinkedResponse > = z.object({ linkedFrom: z.array(LinkedFrom$outboundSchema).optional(), linkedTo: z.array(LinkedTo$outboundSchema).optional(), requestsFrom: z.array(RequestsFrom$outboundSchema).optional(), requestsTo: z.array(RequestsTo$outboundSchema).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3DomainLinkedResponse$ { /** @deprecated use `V3DomainLinkedResponse$inboundSchema` instead. */ export const inboundSchema = V3DomainLinkedResponse$inboundSchema; /** @deprecated use `V3DomainLinkedResponse$outboundSchema` instead. */ export const outboundSchema = V3DomainLinkedResponse$outboundSchema; /** @deprecated use `V3DomainLinkedResponse$Outbound` instead. */ export type Outbound = V3DomainLinkedResponse$Outbound; } export function v3DomainLinkedResponseToJSON( v3DomainLinkedResponse: V3DomainLinkedResponse, ): string { return JSON.stringify( V3DomainLinkedResponse$outboundSchema.parse(v3DomainLinkedResponse), ); } export function v3DomainLinkedResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3DomainLinkedResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3DomainLinkedResponse' from JSON`, ); }