export type UpdateApiApiMetadataTermsIdActiveFlagArgs = {id: string, activeFlag: boolean};
export type UpdateApiApiMetadataTermsIdActiveFlagOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined};
/**
* Allowed user roles:
set a terms record to active (true) or inactive (false)
*
* PUT /api/metadata/terms/{id}/{activeFlag}
*/
export const updateApiApiMetadataTermsIdActiveFlag = async (args: UpdateApiApiMetadataTermsIdActiveFlagArgs, options?: UpdateApiApiMetadataTermsIdActiveFlagOptions) => {
const {baseUrl = "https://api.burstiq.com", fetch: fetchFn = fetch} = options ?? {}
const query = new URLSearchParams()
const headers = new Headers()
headers.set('accept', "*/*")
const url = `${baseUrl.replace(/\/+$/, '')}/api/metadata/terms/${encodeURIComponent(String(args.id))}/${encodeURIComponent(String(args.activeFlag))}${query.size > 0 ? `?${query}` : ''}`
const res = await fetchFn(url, {method: "PUT", headers})
if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}})
return res.blob()
};