export type Followers = {id: string, created_at: unknown, user_id: string, organization_id: string}; export type PatchApiFollowersArgs = {id?: string | undefined, created_at?: unknown | undefined, user_id?: string | undefined, organization_id?: string | undefined, Prefer?: ('return=representation' | 'return=minimal' | 'return=none') | undefined, body: Followers}; export type PatchApiFollowersOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * PATCH /followers */ export const patchApiFollowers = async (args: PatchApiFollowersArgs, options?: PatchApiFollowersOptions) => { const {baseUrl = "https://vnaabuozknwgxuvnfwjo.supabase.co:443", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args.id != null) query.append("id", String(args.id)) if (args.created_at != null) query.append("created_at", String(args.created_at)) if (args.user_id != null) query.append("user_id", String(args.user_id)) if (args.organization_id != null) query.append("organization_id", String(args.organization_id)) if (args.Prefer != null) headers.set("Prefer", String(args.Prefer)) const url = `${baseUrl.replace(/\/+$/, '')}/followers${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 };