using salesbook.Shared.Core.Dto;
using salesbook.Shared.Core.Dto.Activity;
using salesbook.Shared.Core.Dto.Contact;
using salesbook.Shared.Core.Dto.JobProgress;
using salesbook.Shared.Core.Entity;

namespace salesbook.Shared.Core.Interface.IntegryApi;

public interface IIntegryApiService
{
    Task<bool> SystemOk();
    
    Task<List<StbActivity>?> RetrieveActivity(CRMRetrieveActivityRequestDTO activityRequest);
    Task<List<JtbComt>?> RetrieveAllCommesse(string? dateFilter = null);
    Task<UsersSyncResponseDTO> RetrieveAnagClie(CRMAnagRequestDTO request);
    Task<UsersSyncResponseDTO> RetrieveProspect(CRMProspectRequestDTO request);
    Task<SettingsResponseDTO> RetrieveSettings();
    Task<List<CRMAttachedResponseDTO>?> RetrieveAttached(string codJcom);

    Task DeleteActivity(string activityId);

    Task<List<StbActivity>?> SaveActivity(ActivityDTO activity);
    Task<CRMCreateContactResponseDTO?> SaveContact(CRMCreateContactRequestDTO request);
    Task<CheckVatResponseDTO> CheckVat(CheckVatRequestDTO request);
    Task<CRMTransferProspectResponseDTO> TransferProspect(CRMTransferProspectRequestDTO request);

    Task UploadFile(string id, byte[] file, string fileName);
    Task<List<ActivityFileDto>> GetActivityFile(string activityId);
    Task<Stream> DownloadFile(string activityId, string fileName);
    Task<Stream> DownloadFileFromRefUuid(string refUuid, string fileName);

    Task<CRMJobProgressResponseDTO> RetrieveJobProgress(string codJcom);

    //Position
    Task<PositionDTO> SavePosition(PositionDTO position);
    Task<PositionDTO> RetrievePosition(string id);

    //Google
    Task<List<IndirizzoDTO>?> Geocode(string address);
    Task<List<AutoCompleteAddressDTO>?> AutoCompleteAddress(string address, string language, string uuid);
    Task<IndirizzoDTO?> PlaceDetails(string placeId, string uuid);
}