package dev.lions.unionflow.client.service; import dev.lions.unionflow.server.api.dto.comptabilite.request.*; import dev.lions.unionflow.server.api.dto.comptabilite.response.*; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders; import jakarta.ws.rs.*; import jakarta.ws.rs.core.MediaType; import java.util.List; import java.util.UUID; /** * Service REST Client pour la gestion comptable * * @author UnionFlow Team * @version 1.0 */ @RegisterRestClient(configKey = "unionflow-api") @RegisterClientHeaders(dev.lions.unionflow.client.security.AuthHeaderFactory.class) @Path("/api/comptabilite") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public interface ComptabiliteService { // ======================================== // COMPTES COMPTABLES // ======================================== /** * Liste tous les comptes comptables actifs */ @GET @Path("/comptes") List listerComptes(); /** * Crée un nouveau compte comptable */ @POST @Path("/comptes") CompteComptableResponse creerCompte(CreateCompteComptableRequest request); /** * Trouve un compte comptable par son ID */ @GET @Path("/comptes/{id}") CompteComptableResponse obtenirCompte(@PathParam("id") UUID id); // ======================================== // JOURNAUX COMPTABLES // ======================================== /** * Liste tous les journaux comptables actifs */ @GET @Path("/journaux") List listerJournaux(); /** * Crée un nouveau journal comptable */ @POST @Path("/journaux") JournalComptableResponse creerJournal(CreateJournalComptableRequest request); /** * Trouve un journal comptable par son ID */ @GET @Path("/journaux/{id}") JournalComptableResponse obtenirJournal(@PathParam("id") UUID id); // ======================================== // ÉCRITURES COMPTABLES // ======================================== /** * Crée une nouvelle écriture comptable */ @POST @Path("/ecritures") EcritureComptableResponse creerEcriture(CreateEcritureComptableRequest request); /** * Trouve une écriture comptable par son ID */ @GET @Path("/ecritures/{id}") EcritureComptableResponse obtenirEcriture(@PathParam("id") UUID id); /** * Liste les écritures d'un journal */ @GET @Path("/ecritures/journal/{journalId}") List listerEcrituresParJournal(@PathParam("journalId") UUID journalId); /** * Liste les écritures d'une organisation */ @GET @Path("/ecritures/organisation/{organisationId}") List listerEcrituresParOrganisation(@PathParam("organisationId") UUID organisationId); }