namespace Argus.Contracts;

public sealed record AppReleaseDto(
    Guid Id,
    string Version,
    string Channel,
    string Platform,
    string PackageKind,
    string DownloadPath,
    string OriginalFileName,
    string ContentType,
    long PackageSizeBytes,
    string Sha256,
    DateTimeOffset PublishedAt,
    string? Notes);

public sealed record AppListItemDto(
    string Slug,
    string Name,
    string Summary,
    string? RepositoryUrl,
    string? HomepageUrl,
    DateTimeOffset UpdatedAt,
    AppReleaseDto? LatestRelease,
    int ReleaseCount);

public sealed record AppDetailDto(
    string Slug,
    string Name,
    string Summary,
    string Description,
    string? RepositoryUrl,
    string? HomepageUrl,
    DateTimeOffset CreatedAt,
    DateTimeOffset UpdatedAt,
    bool IsListed,
    IReadOnlyCollection<AppReleaseDto> Releases);

public sealed record AppManifestDto(
    string Slug,
    string Name,
    string Summary,
    string Description,
    string? RepositoryUrl,
    string? HomepageUrl,
    AppReleaseDto Release);

public sealed record ReleaseFeedItemDto(
    string Slug,
    string AppName,
    AppReleaseDto Release);
