export type DeleteApiV1TenantIdBackendsBackendIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a backend. * * DELETE /v1/{tenantId}/backends/{backendId} */ export const deleteApiV1TenantIdBackendsBackendId = async (options?: DeleteApiV1TenantIdBackendsBackendIdOptions) => { const {baseUrl = "https://virtserver.swaggerhub.com/open83/crystal/1.0.0", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/${encodeURIComponent(String(args.tenantId))}/backends/${encodeURIComponent(String(args.backendId))}${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 };