/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ca561e811aa6 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type GitRepository = { name: string; private: boolean; defaultBranch: string; pushedAt?: Date | undefined; }; /** @internal */ export const GitRepository$inboundSchema: z.ZodType = z .object({ name: z.string(), private: z.boolean(), defaultBranch: z.string(), pushedAt: z.iso.datetime({ offset: true }).transform(v => new Date(v)) .optional(), }); export function gitRepositoryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GitRepository$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitRepository' from JSON`, ); }