export type DeleteApiApiV1AdminSeedsSeedNameArgs = {seed_name: string}; export type DeleteApiApiV1AdminSeedsSeedNameOptions = {baseUrl: string, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the seed CRD object from the Kubermatic. * * DELETE /api/v1/admin/seeds/{seed_name} */ export const deleteApiApiV1AdminSeedsSeedName = async (args: DeleteApiApiV1AdminSeedsSeedNameArgs, options: DeleteApiApiV1AdminSeedsSeedNameOptions) => { const {baseUrl, fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKey !== undefined) headers.set("Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/admin/seeds/${encodeURIComponent(String(args.seed_name))}${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 };