export type PatchApiAgentphoneV1AgentsAgentIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update agent fields. Only sent fields change. * * PATCH /agentphone/v1/agents/{agentId} */ export const patchApiAgentphoneV1AgentsAgentId = async (options?: PatchApiAgentphoneV1AgentsAgentIdOptions) => { const {baseUrl = "https://mpp.orthogonal.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/agentphone/v1/agents/${encodeURIComponent(String(args.agentId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };