export type GetApiRpcGetUserIdArgs = {apikey: unknown}; export type GetApiRpcGetUserIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /rpc/get_user_id */ export const getApiRpcGetUserId = async (args: GetApiRpcGetUserIdArgs, options?: GetApiRpcGetUserIdOptions) => { const {baseUrl = "https://vnaabuozknwgxuvnfwjo.supabase.co:443", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.apikey != null) query.append("apikey", String(args.apikey)) const url = `${baseUrl.replace(/\/+$/, '')}/rpc/get_user_id${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 };