/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The representation of an employee's Section 603 high earner status for a specific year. Section 603 of the SECURE 2.0 Act requires employees aged 50 or older whose prior-year FICA wages exceed the IRS threshold to have their catch-up contributions to pre-tax retirement benefits designated as post-tax contributions. */ export type EmployeeSection603HighEarnerStatus = { /** * The unique identifier of the Section 603 high earner status record */ id: string; /** * The year for which this high earner status applies */ effectiveYear: number; /** * Whether the employee is classified as a high earner for Section 603 purposes. Can be null if the status has not yet been determined. */ isHighEarner: boolean | null; }; /** @internal */ export const EmployeeSection603HighEarnerStatus$inboundSchema: z.ZodType< EmployeeSection603HighEarnerStatus, z.ZodTypeDef, unknown > = z.object({ id: z.string(), effective_year: z.number().int(), is_high_earner: z.nullable(z.boolean()), }).transform((v) => { return remap$(v, { "effective_year": "effectiveYear", "is_high_earner": "isHighEarner", }); }); export function employeeSection603HighEarnerStatusFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EmployeeSection603HighEarnerStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmployeeSection603HighEarnerStatus' from JSON`, ); }