export type GetApiApiIntelligenceX402ToolsByBuyerActivityJsonOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Compare x402 tools by observed buyer activity and agent job * * GET /api/intelligence/x402-tools-by-buyer-activity.json */ export const getApiApiIntelligenceX402ToolsByBuyerActivityJson = async (options?: GetApiApiIntelligenceX402ToolsByBuyerActivityJsonOptions) => { const {baseUrl = "https://ontarioprotocol.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/intelligence/x402-tools-by-buyer-activity.json${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };