/* * 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"; /** * A partial update. Every field is optional; an omitted field is left * * @remarks * unchanged. */ export type PatchRepoRequest = { description?: string | undefined; name?: string | undefined; }; /** @internal */ export const PatchRepoRequest$inboundSchema: z.ZodType< PatchRepoRequest, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), name: z.string().optional(), }); /** @internal */ export type PatchRepoRequest$Outbound = { description?: string | undefined; name?: string | undefined; }; /** @internal */ export const PatchRepoRequest$outboundSchema: z.ZodType< PatchRepoRequest$Outbound, z.ZodTypeDef, PatchRepoRequest > = z.object({ description: z.string().optional(), name: z.string().optional(), }); export function patchRepoRequestToJSON( patchRepoRequest: PatchRepoRequest, ): string { return JSON.stringify( PatchRepoRequest$outboundSchema.parse(patchRepoRequest), ); } export function patchRepoRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PatchRepoRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchRepoRequest' from JSON`, ); }