/* * 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"; import { ConnectedRepository, ConnectedRepository$inboundSchema, ConnectedRepository$Outbound, ConnectedRepository$outboundSchema, } from "./connectedrepository.js"; export type RepositoryList = { repositories: Array; }; /** @internal */ export const RepositoryList$inboundSchema: z.ZodType< RepositoryList, z.ZodTypeDef, unknown > = z.object({ repositories: z.array(ConnectedRepository$inboundSchema), }); /** @internal */ export type RepositoryList$Outbound = { repositories: Array; }; /** @internal */ export const RepositoryList$outboundSchema: z.ZodType< RepositoryList$Outbound, z.ZodTypeDef, RepositoryList > = z.object({ repositories: z.array(ConnectedRepository$outboundSchema), }); export function repositoryListToJSON(repositoryList: RepositoryList): string { return JSON.stringify(RepositoryList$outboundSchema.parse(repositoryList)); } export function repositoryListFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RepositoryList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RepositoryList' from JSON`, ); }