import http from "@/api/http-client" import { type Policy } from "@/api/base-api" import { UserRoles, type User } from "@/api/users-api" export { UserRoles } export type UserAsShow = Pick< User, "id" | "email" | "firstName" | "lastName" | "displayName" | "roles" | "createdAt" | "updatedAt" > export const currentUserApi = { async get(): Promise<{ user: UserAsShow policy: Policy }> { const { data } = await http.get(`/api/current-user`) return data }, } export default currentUserApi