export type DeleteApiObjectverzoekenUuidOptions = {baseUrl: string, JWTClaims?: string | undefined, fetch?: typeof fetch | undefined}; /** * Verwijder een OBJECT-VERZOEK relatie. * * DELETE /objectverzoeken/{uuid} */ export const deleteApiObjectverzoekenUuid = async (options: DeleteApiObjectverzoekenUuidOptions) => { const {baseUrl, fetch: fetchFn = fetch, JWTClaims} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (JWTClaims !== undefined) headers.set('authorization', `Bearer ${JWTClaims}`) const url = `${baseUrl.replace(/\/+$/, '')}/objectverzoeken/${encodeURIComponent(String(args.uuid))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };