export type DeleteApiDigitalBankingV1CustomBenchmarksCustomBenchmarkIdArgs = {custom_benchmark_id: string}; export type DeleteApiDigitalBankingV1CustomBenchmarksCustomBenchmarkIdOptions = {baseUrl: string, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Custom Benchmark * * DELETE /digital-banking/v1/custom-benchmarks/{custom_benchmark_id} */ export const deleteApiDigitalBankingV1CustomBenchmarksCustomBenchmarkId = async (args: DeleteApiDigitalBankingV1CustomBenchmarksCustomBenchmarkIdArgs, options: DeleteApiDigitalBankingV1CustomBenchmarksCustomBenchmarkIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/digital-banking/v1/custom-benchmarks/${encodeURIComponent(String(args.custom_benchmark_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 };