/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The team the person is currently in. */ export type Team = { /** * The unique identifier of the team. */ id?: string | null | undefined; /** * The name of the team. */ name?: string | null | undefined; }; /** @internal */ export const Team$inboundSchema: z.ZodType = /* @__PURE__ */ lazySchema$(() => z.object({ id: z.nullable(types.string()).optional(), name: z.nullable(types.string()).optional(), }) ); /** @internal */ export type Team$Outbound = { id?: string | null | undefined; name?: string | null | undefined; }; /** @internal */ export const Team$outboundSchema: z.ZodType = /* @__PURE__ */ lazySchema$(() => z.object({ id: z.nullable(z.string()).optional(), name: z.nullable(z.string()).optional(), }) ); export function teamToJSON(team: Team): string { return JSON.stringify(Team$outboundSchema.parse(team)); } export function teamFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Team$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Team' from JSON`, ); }