/* * 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"; /** * The representation of an earning type in Gusto. */ export type EarningType = { /** * The name of the earning type. */ name?: string | undefined; /** * The ID of the earning type. */ uuid: string; /** * Whether the earning type is active. */ active?: boolean | undefined; }; /** @internal */ export const EarningType$inboundSchema: z.ZodType< EarningType, z.ZodTypeDef, unknown > = z.object({ name: z.string().optional(), uuid: z.string(), active: z.boolean().optional(), }); export function earningTypeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EarningType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EarningType' from JSON`, ); }