export type EventspacesPages = {id: string, created_at: unknown, updated_at?: unknown | undefined, created_by?: string | undefined, updated_by?: string | undefined, eventspace_id: string, organization_id: string, content?: unknown | undefined, title?: unknown | undefined}; export type PatchApiEventspacesPagesArgs = {id?: string | undefined, created_at?: unknown | undefined, updated_at?: unknown | undefined, created_by?: string | undefined, updated_by?: string | undefined, eventspace_id?: string | undefined, organization_id?: string | undefined, content?: unknown | undefined, title?: unknown | undefined, Prefer?: ('return=representation' | 'return=minimal' | 'return=none') | undefined, body: EventspacesPages}; export type PatchApiEventspacesPagesOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * PATCH /eventspaces_pages */ export const patchApiEventspacesPages = async (args: PatchApiEventspacesPagesArgs, options?: PatchApiEventspacesPagesOptions) => { 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.updated_at != null) query.append("updated_at", String(args.updated_at)) if (args.created_by != null) query.append("created_by", String(args.created_by)) if (args.updated_by != null) query.append("updated_by", String(args.updated_by)) if (args.eventspace_id != null) query.append("eventspace_id", String(args.eventspace_id)) if (args.organization_id != null) query.append("organization_id", String(args.organization_id)) if (args.content != null) query.append("content", String(args.content)) if (args.title != null) query.append("title", String(args.title)) if (args.Prefer != null) headers.set("Prefer", String(args.Prefer)) const url = `${baseUrl.replace(/\/+$/, '')}/eventspaces_pages${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 };