/* * 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"; export type V3DomainLinkRequest = { pcid: string; scopes?: Array | undefined; }; /** @internal */ export const V3DomainLinkRequest$inboundSchema: z.ZodType< V3DomainLinkRequest, z.ZodTypeDef, unknown > = z.object({ pcid: z.string(), scopes: z.array(z.string()).optional(), }); /** @internal */ export type V3DomainLinkRequest$Outbound = { pcid: string; scopes?: Array | undefined; }; /** @internal */ export const V3DomainLinkRequest$outboundSchema: z.ZodType< V3DomainLinkRequest$Outbound, z.ZodTypeDef, V3DomainLinkRequest > = z.object({ pcid: z.string(), scopes: z.array(z.string()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3DomainLinkRequest$ { /** @deprecated use `V3DomainLinkRequest$inboundSchema` instead. */ export const inboundSchema = V3DomainLinkRequest$inboundSchema; /** @deprecated use `V3DomainLinkRequest$outboundSchema` instead. */ export const outboundSchema = V3DomainLinkRequest$outboundSchema; /** @deprecated use `V3DomainLinkRequest$Outbound` instead. */ export type Outbound = V3DomainLinkRequest$Outbound; } export function v3DomainLinkRequestToJSON( v3DomainLinkRequest: V3DomainLinkRequest, ): string { return JSON.stringify( V3DomainLinkRequest$outboundSchema.parse(v3DomainLinkRequest), ); } export function v3DomainLinkRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3DomainLinkRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3DomainLinkRequest' from JSON`, ); }