package infrastructure.client.accounts.api;

import infrastructure.client.accounts.dto.request.CustomerAccountRequest;
import infrastructure.client.accounts.dto.respone.CustomerAccountResponse;
import infrastructure.interceptor.LoggingFilter;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

@RegisterRestClient(configKey = "customer-accounts")
@RegisterProvider(LoggingFilter.class)
public interface  CustomerAccountClient {
    @POST
    @ClientHeaderParam(name = "appId", value = "${app.appId}")
    CustomerAccountResponse readCustomerProducts(
            @HeaderParam("requestId") String requestId,
            CustomerAccountRequest request
    );
}