export type DeleteApiApiMcpPerUserHeadersCredentialIdArgs = {id: string}; export type DeleteApiApiMcpPerUserHeadersCredentialIdOptions = {baseUrl?: string | undefined, ManagementBearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Revoke a per-user-headers credential * * DELETE /api/mcp/per-user-headers/credential/{id} */ export const deleteApiApiMcpPerUserHeadersCredentialId = async (args: DeleteApiApiMcpPerUserHeadersCredentialIdArgs, options?: DeleteApiApiMcpPerUserHeadersCredentialIdOptions) => { const {baseUrl = "http://localhost:8080", fetch: fetchFn = fetch, ManagementBearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ManagementBearerAuth !== undefined) headers.set('authorization', `Bearer ${ManagementBearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/mcp/per-user-headers/credential/${encodeURIComponent(String(args.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 };