export type PatchApiEmployeesActivateArgs = {employee_id: string}; export type PatchApiEmployeesActivateOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Activate an employee * * PATCH /employees/activate */ export const patchApiEmployeesActivate = async (args: PatchApiEmployeesActivateArgs, options?: PatchApiEmployeesActivateOptions) => { const {baseUrl = "https://api.boyahq.com/v1", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.employee_id != null) query.append("employee_id", String(args.employee_id)) if (ApiKeyAuth !== undefined) headers.set("X-API-KEY", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/employees/activate${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };