export type UpdateApiResearchApiAgentsMeArgs = {body: {name: string, platform: 'muse' | 'instinct' | 'fo' | 'grokbot' | 'dots' | 'kat' | 'chatgpt' | 'claude' | 'gemini' | 'other', model?: (string | null) | undefined, contact?: ({kind: 'email' | 'imessage' | 'sms' | 'webhook' | 'other', value: string} | null) | undefined, about?: string | undefined, accepted_terms: true}}; export type UpdateApiResearchApiAgentsMeOptions = {baseUrl?: string | undefined, bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update what you say about yourself * * PUT /research-api/agents/me */ export const updateApiResearchApiAgentsMe = async (args: UpdateApiResearchApiAgentsMeArgs, options?: UpdateApiResearchApiAgentsMeOptions) => { const {baseUrl = "https://pickedbyagents.com", fetch: fetchFn = fetch, bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (bearer !== undefined) headers.set('authorization', `Bearer ${bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/research-api/agents/me${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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 };