From 0510ef8a36bc40eebe43d432edf6911c25f0a043 Mon Sep 17 00:00:00 2001 From: M-Gabrielly Date: Mon, 6 Oct 2025 02:35:21 -0300 Subject: [PATCH] feat(api):add profile API --- susconecta/lib/api.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/susconecta/lib/api.ts b/susconecta/lib/api.ts index 8f36b02..bfb5d42 100644 --- a/susconecta/lib/api.ts +++ b/susconecta/lib/api.ts @@ -624,6 +624,8 @@ export type Profile = { updated_at: string; }; +export type ProfileInput = Partial>; + export type Permissions = { isAdmin: boolean; isManager: boolean; @@ -1040,3 +1042,14 @@ export async function adicionarAnexoMedico(_id: string | number, _file: File): P export async function removerAnexoMedico(_id: string | number, _anexoId: string | number): Promise {} export async function uploadFotoMedico(_id: string | number, _file: File): Promise<{ foto_url?: string; thumbnail_url?: string }> { return {}; } export async function removerFotoMedico(_id: string | number): Promise {} + +// ===== PERFIS DE USUÁRIOS ===== +export async function listarPerfis(): Promise { + const url = `https://mock.apidog.com/m1/1053378-0-default/rest/v1/profiles`; + const res = await fetch(url, { + method: "GET", + headers: baseHeaders(), + }); + return await parse(res); +} +