export type UpdateApiApiV1CompensationPlanningCyclesIdBudgetsBreakdownArgs = {id: number, body: Array<{id?: string | undefined, employeeId?: string | undefined, budgetAllocations?: ({salaryIncrease?: number | undefined, bonuses?: number | undefined, equity?: number | undefined}) | undefined}>}; export type UpdateApiApiV1CompensationPlanningCyclesIdBudgetsBreakdownOptions = {baseUrl?: string | undefined, oauth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Save budget breakdown * * PUT /api/v1/compensation/planning_cycles/{id}/budgets/breakdown */ export const updateApiApiV1CompensationPlanningCyclesIdBudgetsBreakdown = async (args: UpdateApiApiV1CompensationPlanningCyclesIdBudgetsBreakdownArgs, options?: UpdateApiApiV1CompensationPlanningCyclesIdBudgetsBreakdownOptions) => { const {baseUrl = "https://companySubDomain.bamboohr.com", fetch: fetchFn = fetch, oauth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (oauth !== undefined) headers.set('authorization', `Bearer ${oauth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/compensation/planning_cycles/${encodeURIComponent(String(args.id))}/budgets/breakdown${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 };