/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { employeeBenefitsCreate } from "../funcs/employeeBenefitsCreate.js"; import { employeeBenefitsCreateYtdBenefitAmountsFromDifferentCompany } from "../funcs/employeeBenefitsCreateYtdBenefitAmountsFromDifferentCompany.js"; import { employeeBenefitsDelete } from "../funcs/employeeBenefitsDelete.js"; import { employeeBenefitsGet } from "../funcs/employeeBenefitsGet.js"; import { employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses } from "../funcs/employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses.js"; import { employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear, } from "../funcs/employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear.js"; import { employeeBenefitsGetYtdBenefitAmountsFromDifferentCompany } from "../funcs/employeeBenefitsGetYtdBenefitAmountsFromDifferentCompany.js"; import { employeeBenefitsPatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear, } from "../funcs/employeeBenefitsPatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear.js"; import { employeeBenefitsPostV1EmployeesEmployeeUuidSection603HighEarnerStatuses } from "../funcs/employeeBenefitsPostV1EmployeesEmployeeUuidSection603HighEarnerStatuses.js"; import { employeeBenefitsRetrieve } from "../funcs/employeeBenefitsRetrieve.js"; import { employeeBenefitsUpdate } from "../funcs/employeeBenefitsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { DeleteV1EmployeeBenefitsEmployeeBenefitIdRequest, DeleteV1EmployeeBenefitsEmployeeBenefitIdResponse, } from "../models/operations/deletev1employeebenefitsemployeebenefitid.js"; import { GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, GetEmployeeYtdBenefitAmountsFromDifferentCompanyResponse, } from "../models/operations/getemployeeytdbenefitamountsfromdifferentcompany.js"; import { GetV1EmployeeBenefitsEmployeeBenefitIdRequest, GetV1EmployeeBenefitsEmployeeBenefitIdResponse, } from "../models/operations/getv1employeebenefitsemployeebenefitid.js"; import { GetV1EmployeesEmployeeIdEmployeeBenefitsRequest, GetV1EmployeesEmployeeIdEmployeeBenefitsResponse, } from "../models/operations/getv1employeesemployeeidemployeebenefits.js"; import { GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesRequest, GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesResponse, } from "../models/operations/getv1employeesemployeeuuidsection603highearnerstatuses.js"; import { GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest, GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse, } from "../models/operations/getv1employeesemployeeuuidsection603highearnerstatuseseffectiveyear.js"; import { PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest, PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse, } from "../models/operations/patchv1employeesemployeeuuidsection603highearnerstatuseseffectiveyear.js"; import { PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, PostEmployeeYtdBenefitAmountsFromDifferentCompanyResponse, } from "../models/operations/postemployeeytdbenefitamountsfromdifferentcompany.js"; import { PostV1EmployeesEmployeeIdEmployeeBenefitsRequest, PostV1EmployeesEmployeeIdEmployeeBenefitsResponse, } from "../models/operations/postv1employeesemployeeidemployeebenefits.js"; import { PostV1EmployeesEmployeeUuidSection603HighEarnerStatusesRequest, PostV1EmployeesEmployeeUuidSection603HighEarnerStatusesResponse, } from "../models/operations/postv1employeesemployeeuuidsection603highearnerstatuses.js"; import { PutV1EmployeeBenefitsEmployeeBenefitIdRequest, PutV1EmployeeBenefitsEmployeeBenefitIdResponse, } from "../models/operations/putv1employeebenefitsemployeebenefitid.js"; import { unwrapAsync } from "../types/fp.js"; export class EmployeeBenefits extends ClientSDK { /** * Get all benefits for an employee * * @remarks * Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. * * Returns an array of all employee benefits for this employee * * Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. * * scope: `employee_benefits:read` */ async get( request: GetV1EmployeesEmployeeIdEmployeeBenefitsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeBenefitsGet( this, request, options, )); } /** * Create an employee benefit * * @remarks * Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. * * When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create employee benefits for benefit types that are permitted for the application. * * scope: `employee_benefits:write` */ async create( request: PostV1EmployeesEmployeeIdEmployeeBenefitsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeBenefitsCreate( this, request, options, )); } /** * Get an employee benefit * * @remarks * Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. * * Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. * * scope: `employee_benefits:read` */ async retrieve( request: GetV1EmployeeBenefitsEmployeeBenefitIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeBenefitsRetrieve( this, request, options, )); } /** * Update an employee benefit * * @remarks * Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. * * When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only update employee benefits for benefit types that are permitted for the application. * * scope: `employee_benefits:write` */ async update( request: PutV1EmployeeBenefitsEmployeeBenefitIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeBenefitsUpdate( this, request, options, )); } /** * Delete an employee benefit * * @remarks * Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. * * When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only delete employee benefits for benefit types that are permitted for the application. * * scope: `employee_benefits:write` */ async delete( request: DeleteV1EmployeeBenefitsEmployeeBenefitIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeBenefitsDelete( this, request, options, )); } /** * Get year-to-date benefit amounts from a different company * * @remarks * Retrieves year-to-date benefit amounts that were contributed at a different company for the specified employee. * Returns benefit amounts for the requested tax year (defaults to current year if not specified). * * This endpoint only supports retrieving outside contributions for 401(k) benefits. * * scope: `employee_benefits:read` */ async getYtdBenefitAmountsFromDifferentCompany( request: GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeBenefitsGetYtdBenefitAmountsFromDifferentCompany( this, request, options, )); } /** * Create year-to-date benefit amounts from a different company * * @remarks * Year-to-date benefit amounts from a different company represents the amount of money added to an employee's plan during a current year, made outside of the current contribution when they were employed at a different company. * * This endpoint only supports passing outside contributions for 401(k) benefits. * * scope: `employee_benefits:write` */ async createYtdBenefitAmountsFromDifferentCompany( request: PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, options?: RequestOptions, ): Promise { return unwrapAsync( employeeBenefitsCreateYtdBenefitAmountsFromDifferentCompany( this, request, options, ), ); } /** * Get all Section 603 high earner statuses for an employee * * @remarks * Get all Section 603 high earner statuses for an employee across all years. * * Section 603 of the SECURE 2.0 Act applies to employees aged 50 or older whose prior-year FICA wages exceed the IRS threshold. * These employees are classified as high earners, and their catch-up contributions to pre-tax retirement benefits must be designated as post-tax contributions. * * scope: `employee_benefits:read` */ async getV1EmployeesEmployeeUuidSection603HighEarnerStatuses( request: GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesRequest, options?: RequestOptions, ): Promise { return unwrapAsync( employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatuses( this, request, options, ), ); } /** * Create a Section 603 high earner status * * @remarks * Create a Section 603 high earner status for an employee for a specific year. * * Section 603 of the SECURE 2.0 Act applies to employees aged 50 or older whose prior-year FICA wages exceed the IRS threshold. * These employees are classified as high earners, and their catch-up contributions to pre-tax retirement benefits must be designated as post-tax contributions. * * scope: `employee_benefits:write` */ async postV1EmployeesEmployeeUuidSection603HighEarnerStatuses( request: PostV1EmployeesEmployeeUuidSection603HighEarnerStatusesRequest, options?: RequestOptions, ): Promise { return unwrapAsync( employeeBenefitsPostV1EmployeesEmployeeUuidSection603HighEarnerStatuses( this, request, options, ), ); } /** * Get a Section 603 high earner status for a specific year * * @remarks * Get a Section 603 high earner status for an employee for a specific year. * * Section 603 of the SECURE 2.0 Act applies to employees aged 50 or older whose prior-year FICA wages exceed the IRS threshold. * These employees are classified as high earners, and their catch-up contributions to pre-tax retirement benefits must be designated as post-tax contributions. * * scope: `employee_benefits:read` */ async getV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear( request: GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest, options?: RequestOptions, ): Promise< GetV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse > { return unwrapAsync( employeeBenefitsGetV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear( this, request, options, ), ); } /** * Update a Section 603 high earner status * * @remarks * Update a Section 603 high earner status for an employee for a specific year. * * Section 603 of the SECURE 2.0 Act applies to employees aged 50 or older whose prior-year FICA wages exceed the IRS threshold. * These employees are classified as high earners, and their catch-up contributions to pre-tax retirement benefits must be designated as post-tax contributions. * * scope: `employee_benefits:write` */ async patchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear( request: PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest, options?: RequestOptions, ): Promise< PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse > { return unwrapAsync( employeeBenefitsPatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYear( this, request, options, ), ); } }