export type DeleteApiRepositoriesIdCommitsCommitShaEnrichmentsEnrichmentIdArgs = {id: number, commit_sha: string, enrichment_id: number}; export type DeleteApiRepositoriesIdCommitsCommitShaEnrichmentsEnrichmentIdOptions = {baseUrl: string, APIKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete commit enrichment * * DELETE /repositories/{id}/commits/{commit_sha}/enrichments/{enrichment_id} */ export const deleteApiRepositoriesIdCommitsCommitShaEnrichmentsEnrichmentId = async (args: DeleteApiRepositoriesIdCommitsCommitShaEnrichmentsEnrichmentIdArgs, options: DeleteApiRepositoriesIdCommitsCommitShaEnrichmentsEnrichmentIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, APIKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyAuth !== undefined) headers.set("X-API-KEY", APIKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/repositories/${encodeURIComponent(String(args.id))}/commits/${encodeURIComponent(String(args.commit_sha))}/enrichments/${encodeURIComponent(String(args.enrichment_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 };