export type DeleteApiMfV1ResultIdResultIdArgs = {resultId: number}; export type DeleteApiMfV1ResultIdResultIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * delete result by id * * DELETE /mf/v1/result/id/{resultId} */ export const deleteApiMfV1ResultIdResultId = async (args: DeleteApiMfV1ResultIdResultIdArgs, options?: DeleteApiMfV1ResultIdResultIdOptions) => { const {baseUrl = "http://gateway.mlss.mf", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/mf/v1/result/id/${encodeURIComponent(String(args.resultId))}${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 };