export type DeleteApiApiV1McpServerArgs = {Authorization: string, 'Mcp-Session-Id'?: string | undefined}; export type DeleteApiApiV1McpServerOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Terminate MCP session * * DELETE /api/v1/mcp-server */ export const deleteApiApiV1McpServer = async (args: DeleteApiApiV1McpServerArgs, options?: DeleteApiApiV1McpServerOptions) => { const {baseUrl = "https://agent.getaxonflow.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) if (args['Mcp-Session-Id'] != null) headers.set("Mcp-Session-Id", String(args['Mcp-Session-Id'])) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/mcp-server${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 };