export type GetApiRpcGetIdentityArgs = {keymode: unknown}; export type GetApiRpcGetIdentityOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /rpc/get_identity */ export const getApiRpcGetIdentity = async (args: GetApiRpcGetIdentityArgs, options?: GetApiRpcGetIdentityOptions) => { const {baseUrl = "https://vnaabuozknwgxuvnfwjo.supabase.co:443", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.keymode != null) query.append("keymode", String(args.keymode)) const url = `${baseUrl.replace(/\/+$/, '')}/rpc/get_identity${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };