export type CreateApiApiToolsAgentBuyerCardArgs = {body: {endpoint: string, evidence_url?: string | undefined, fallback?: string | undefined, inputs?: (string | Array) | undefined, job: string, method?: ('GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE') | undefined, name: string, network: string, not_for?: string | undefined, output: string, preflight_url?: string | undefined, price_usdc: string}}; export type CreateApiApiToolsAgentBuyerCardOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Generate a free machine-readable Agent Buyer Card * * POST /api/tools/agent-buyer-card */ export const createApiApiToolsAgentBuyerCard = async (args: CreateApiApiToolsAgentBuyerCardArgs, options?: CreateApiApiToolsAgentBuyerCardOptions) => { const {baseUrl = "https://ontarioprotocol.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/api/tools/agent-buyer-card${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };