export type PayrollSubmissionBlockerRequestType = {blocker_type: string, selected_option: string}; export type UpdateApiV1CompaniesCompanyIdPayrollsPayrollIdSubmitArgs = {'X-Gusto-API-Version'?: '2026-06-15' | undefined, company_id: string, payroll_id: string, body: {submission_blockers?: Array | undefined}}; export type UpdateApiV1CompaniesCompanyIdPayrollsPayrollIdSubmitOptions = {baseUrl?: string | undefined, CompanyAccessAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Submit payroll * * PUT /v1/companies/{company_id}/payrolls/{payroll_id}/submit */ export const updateApiV1CompaniesCompanyIdPayrollsPayrollIdSubmit = async (args: UpdateApiV1CompaniesCompanyIdPayrollsPayrollIdSubmitArgs, options?: UpdateApiV1CompaniesCompanyIdPayrollsPayrollIdSubmitOptions) => { const {baseUrl = "https://api.gusto-demo.com", fetch: fetchFn = fetch, CompanyAccessAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args['X-Gusto-API-Version'] != null) headers.set("X-Gusto-API-Version", String(args['X-Gusto-API-Version'])) if (CompanyAccessAuth !== undefined) headers.set('authorization', `Bearer ${CompanyAccessAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/companies/${encodeURIComponent(String(args.company_id))}/payrolls/${encodeURIComponent(String(args.payroll_id))}/submit${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };