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