package dev.lions.unionflow.client.service; import dev.lions.unionflow.client.security.AuthHeaderFactory; import dev.lions.unionflow.server.api.dto.audit.response.AuditTrailOperationResponse; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; import java.util.List; import java.util.UUID; import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** * Client REST de lecture audit trail (Sprint 11 ⇄ backend Sprint 10 CQRS read). */ @RegisterRestClient(configKey = "unionflow-api") @RegisterClientHeaders(AuthHeaderFactory.class) @Path("/api/audit-trail") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public interface AuditTrailRestClient { @GET @Path("/by-user/{userId}") List parUtilisateur( @PathParam("userId") UUID userId, @QueryParam("from") String from, @QueryParam("to") String to); @GET @Path("/by-entity/{type}/{id}") List historique( @PathParam("type") String entityType, @PathParam("id") UUID entityId); @GET @Path("/by-organisation/{orgId}") List parOrganisation(@PathParam("orgId") UUID orgId); @GET @Path("/sod-violations") List violationsSod(); @GET @Path("/financial/{orgId}") List operationsFinancieres( @PathParam("orgId") UUID orgId, @QueryParam("from") String from, @QueryParam("to") String to); }