export type DeleteApiPublicDataQualityV1DataQualityRuleDataQualityRuleNameArgs = {'data-quality-rule-name': string}; export type DeleteApiPublicDataQualityV1DataQualityRuleDataQualityRuleNameOptions = {baseUrl: string, httpAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a DataQualityRule * * DELETE /public/data-quality/v1/data-quality-rule/{data-quality-rule-name} */ export const deleteApiPublicDataQualityV1DataQualityRuleDataQualityRuleName = async (args: DeleteApiPublicDataQualityV1DataQualityRuleDataQualityRuleNameArgs, options: DeleteApiPublicDataQualityV1DataQualityRuleDataQualityRuleNameOptions) => { const {baseUrl, fetch: fetchFn = fetch, httpAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (httpAuth !== undefined) headers.set('authorization', `Bearer ${httpAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/public/data-quality/v1/data-quality-rule/${encodeURIComponent(String(args['data-quality-rule-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 };