/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.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 = z .object({ id: z.nullable(z.string()).optional(), name: z.nullable(z.string()).optional(), }); /** @internal */ export type Team$Outbound = { id?: string | null | undefined; name?: string | null | undefined; }; /** @internal */ export const Team$outboundSchema: z.ZodType = z.object({ id: z.nullable(z.string()).optional(), name: z.nullable(z.string()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Team$ { /** @deprecated use `Team$inboundSchema` instead. */ export const inboundSchema = Team$inboundSchema; /** @deprecated use `Team$outboundSchema` instead. */ export const outboundSchema = Team$outboundSchema; /** @deprecated use `Team$Outbound` instead. */ export type Outbound = Team$Outbound; } 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`, ); }