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