export type DeleteApiEigenschappenUuidArgs = {uuid: string}; export type DeleteApiEigenschappenUuidOptions = {baseUrl?: string | undefined, JWTClaims?: string | undefined, fetch?: typeof fetch | undefined}; /** * Verwijder een EIGENSCHAP. * * DELETE /eigenschappen/{uuid} */ export const deleteApiEigenschappenUuid = async (args: DeleteApiEigenschappenUuidArgs, options?: DeleteApiEigenschappenUuidOptions) => { const {baseUrl = "https://virtserver.swaggerhub.com/michielverhoef/Catalogussen_API/1.3.0", 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(/\/+$/, '')}/eigenschappen/${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 };