/* * 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 AuthDto = { accessToken: string; }; /** @internal */ export const AuthDto$inboundSchema: z.ZodType = z.object({ accessToken: z.string(), }); /** @internal */ export type AuthDto$Outbound = { accessToken: string; }; /** @internal */ export const AuthDto$outboundSchema: z.ZodType< AuthDto$Outbound, z.ZodTypeDef, AuthDto > = z.object({ accessToken: z.string(), }); export function authDtoToJSON(authDto: AuthDto): string { return JSON.stringify(AuthDto$outboundSchema.parse(authDto)); } export function authDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthDto' from JSON`, ); }