namespace GestionaDenuncias.Shared.Models;

public sealed record ApiLoginResponse(
    string Username,
    string AccessToken,
    DateTimeOffset ExpiresAtUtc,
    string? Role);

public sealed record ApiGlobalLeaksSessionDto(
    string Username,
    string? Role,
    bool HasActiveSession,
    DateTimeOffset? UpdatedAt);

public sealed record RenewGlobalLeaksSessionRequest(string Authcode, string? PendingLoginId = null);

public sealed record InboxSnapshotResponse(
    IReadOnlyList<ContextDto> Contexts,
    IReadOnlyList<ReportDto> Reports,
    InboxUserState UserState);

public sealed record ImportReportRequest(ReportDto Report);

public sealed record MarkFicherosUploadedRequest(
    IReadOnlyList<string> FileNames,
    DateTime UploadedAtUtc);

public sealed record UpsertFicherosRequest(IReadOnlyList<FicherosDenuncias> Ficheros);

public sealed record TrackingSnapshotRequest(
    string Username,
    IReadOnlyList<ReportDto> Reports);

public sealed record MarkReportImportedRequest(
    string Username,
    ReportDto Report,
    int? ComplaintId);

public sealed record TrackingImportPermissionRequest(
    string Username,
    ReportDto Report);

public sealed record GestionaCreateFileRequest(
    Guid ProcedureId,
    string Subject,
    string DocumentSeries,
    string SiaCode);

public sealed record GestionaCreateFileResponse(
    string FileUrl,
    string? FileOpenUrl);

public sealed record GestionaOpenFileRequest(
    string FileUrl,
    string? FileOpenUrl,
    Guid ManagementUnitGroupId,
    Guid AssignedGroupId,
    bool Confidential,
    string FreeTitle,
    string SiaCode);

public sealed record GestionaEnsureThirdRequest(
    string FileUrl,
    ThirdPartyIdentityData ThirdParty);

public sealed record GestionaCreateFolderRequest(
    string FileUrl,
    string FolderName);

public sealed record GestionaCreateFolderResponse(
    Guid FolderId,
    string DocumentsTargetUrl);

public sealed record GestionaUploadDocumentRequest(
    string FileUrl,
    byte[] ContentBytes,
    string FileName);

public sealed record GestionaUploadDocumentResponse(string DocumentUrl);

public sealed record GestionaTramitarDocumentoRequest(
    string DocumentUrl,
    string AssignedGroupHref,
    int? ComplaintId);

public sealed record ManualPurgeRequest(string Date);

public sealed record ManualPurgeResponse(
    string Date,
    bool Success,
    int StatusCode,
    string ResponseBody);

public sealed record AppConfigurationDto(string? ExternalUpdateCutoffDate);

public sealed record UpdateExternalUpdateCutoffRequest(string? Date);
