export type DeleteApiAgentsConnectionsMcpNameArgs = {name: string}; export type DeleteApiAgentsConnectionsMcpNameOptions = {baseUrl?: string | undefined, FronteggHTTPAuthentication?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Agent Mcp Connection * * DELETE /agents/connections/mcp/{name} */ export const deleteApiAgentsConnectionsMcpName = async (args: DeleteApiAgentsConnectionsMcpNameArgs, options?: DeleteApiAgentsConnectionsMcpNameOptions) => { const {baseUrl = "https://api.streamkap.com", fetch: fetchFn = fetch, FronteggHTTPAuthentication} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (FronteggHTTPAuthentication !== undefined) headers.set('authorization', `Bearer ${FronteggHTTPAuthentication}`) const url = `${baseUrl.replace(/\/+$/, '')}/agents/connections/mcp/${encodeURIComponent(String(args.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 };