export type UpdateApiApiV1CompensationTotalRewardsCustomDisclaimerArgs = {body: {customDisclaimer: string}}; export type UpdateApiApiV1CompensationTotalRewardsCustomDisclaimerOptions = {baseUrl?: string | undefined, oauth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Set Total Rewards Custom Disclaimer * * PUT /api/v1/compensation/total_rewards/custom_disclaimer */ export const updateApiApiV1CompensationTotalRewardsCustomDisclaimer = async (args: UpdateApiApiV1CompensationTotalRewardsCustomDisclaimerArgs, options?: UpdateApiApiV1CompensationTotalRewardsCustomDisclaimerOptions) => { 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/total_rewards/custom_disclaimer${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 };