/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { employeeFormsGenerateW2 } from "../funcs/employeeFormsGenerateW2.js"; import { employeeFormsGet } from "../funcs/employeeFormsGet.js"; import { employeeFormsGetPdf } from "../funcs/employeeFormsGetPdf.js"; import { employeeFormsList } from "../funcs/employeeFormsList.js"; import { employeeFormsSign } from "../funcs/employeeFormsSign.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { GetV1EmployeeFormRequest, GetV1EmployeeFormResponse, } from "../models/operations/getv1employeeform.js"; import { GetV1EmployeeFormPdfRequest, GetV1EmployeeFormPdfResponse, } from "../models/operations/getv1employeeformpdf.js"; import { GetV1EmployeeFormsRequest, GetV1EmployeeFormsResponse, } from "../models/operations/getv1employeeforms.js"; import { PostV1SandboxGenerateW2Request, PostV1SandboxGenerateW2Response, } from "../models/operations/postv1sandboxgeneratew2.js"; import { PutV1EmployeeFormSignRequest, PutV1EmployeeFormSignResponse, } from "../models/operations/putv1employeeformsign.js"; import { unwrapAsync } from "../types/fp.js"; export class EmployeeForms extends ClientSDK { /** * Generate a W2 form [DEMO] * * @remarks * > 🚧 Demo action * > * > This action is only available in the Demo environment * * Generates a W2 document for testing purposes. * * scope: `employees:write` */ async generateW2( request: PostV1SandboxGenerateW2Request, options?: RequestOptions, ): Promise { return unwrapAsync(employeeFormsGenerateW2( this, request, options, )); } /** * Get all employee forms * * @remarks * Get a list of all employee's forms * * scope: `employee_forms:read` */ async list( request: GetV1EmployeeFormsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeFormsList( this, request, options, )); } /** * Get an employee form * * @remarks * Get an employee form * * scope: `employee_forms:read` */ async get( request: GetV1EmployeeFormRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeFormsGet( this, request, options, )); } /** * Get the employee form pdf * * @remarks * Get the link to the employee form PDF * * scope: `employee_forms:read` */ async getPdf( request: GetV1EmployeeFormPdfRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeFormsGetPdf( this, request, options, )); } /** * Sign an employee form * * @remarks * Sign an employee form. * * The optional preparer attributes are only valid for I-9 form. When a preparer is used, the * first name, last name, street address, city, state, and zip for that preparer are all required. * * scope: `employee_forms:sign` */ async sign( request: PutV1EmployeeFormSignRequest, options?: RequestOptions, ): Promise { return unwrapAsync(employeeFormsSign( this, request, options, )); } }