export type UpdateApiEmployeesEmployeeIdTablesInternalNameRowsIdArgs = {body: {internal_name?: string | undefined}}; export type UpdateApiEmployeesEmployeeIdTablesInternalNameRowsIdOptions = {baseUrl?: string | undefined, XAPIKEY?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update an employee table row * * PUT /employees/{employee_id}/tables/{internal_name}/rows/{id} */ export const updateApiEmployeesEmployeeIdTablesInternalNameRowsId = async (args: UpdateApiEmployeesEmployeeIdTablesInternalNameRowsIdArgs, options?: UpdateApiEmployeesEmployeeIdTablesInternalNameRowsIdOptions) => { const {baseUrl = "https://app.peopleforce.io/api/public/v3", fetch: fetchFn = fetch, XAPIKEY} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (XAPIKEY !== undefined) headers.set("X-API-KEY", XAPIKEY) const url = `${baseUrl.replace(/\/+$/, '')}/employees/${encodeURIComponent(String(args.employee_id))}/tables/${encodeURIComponent(String(args.internal_name))}/rows/${encodeURIComponent(String(args.id))}${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 };