// Caminho: services/usuariosApi.ts import api from './api'; export interface UserRole { id: any; user_id: string; role: string; [key: string]: any; } export interface User { id: any; email: string; [key: string]: any; } export interface FullUserData { user: User; profile: any; roles: string[]; permissions: any; } export const usuariosApi = { listRoles: async (): Promise => { const response = await api.get('/rest/v1/user_roles'); return response.data; }, createUser: async (data: { email: string; full_name: string; role: string; [key: string]: any }): Promise => { const response = await api.post('/functions/v1/create-user', data); return response.data; }, getCurrentUser: async (): Promise => { const response = await api.get('/auth/v1/user'); return response.data; }, getFullData: async (userId: string): Promise => { const response = await api.get(`/functions/v1/user-info?user_id=${userId}`); return response.data; }, };