export type DeleteApiVulnerabilityProfileNameEntryIdArgs = {'X-Auth-Token': string, name: string, id: number}; export type DeleteApiVulnerabilityProfileNameEntryIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete vulnerability profile entry * * DELETE /vulnerability/profile/{name}/entry/{id} */ export const deleteApiVulnerabilityProfileNameEntryId = async (args: DeleteApiVulnerabilityProfileNameEntryIdArgs, options: DeleteApiVulnerabilityProfileNameEntryIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-Auth-Token'] != null) headers.set("X-Auth-Token", String(args['X-Auth-Token'])) const url = `${baseUrl.replace(/\/+$/, '')}/vulnerability/profile/${encodeURIComponent(String(args.name))}/entry/${encodeURIComponent(String(args.id))}${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 };