import apiClient from "../../lib/apiClient";

export interface Tenant {
  id: string;
  name: string;
  phone?: string;
  slug: string;
}

export interface UserProfile {
  id: string;
  email: string;
  name: string;
  phone?: string;
  role: string;
  companyCode?: string;
  tenantId?: string;
  tenant?: Tenant;
}

export async function fetchMe() {
  const { data } = await apiClient.get<UserProfile>("/user/me");
  return data;
}
