Files
git.stella-ops.org/src/Concelier/StellaOps.Concelier.WebService/Contracts/LnmLinksetContracts.cs
StellaOps Bot 150b3730ef
Some checks failed
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
Mirror Thin Bundle Sign & Verify / mirror-sign (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
up
2025-11-24 07:52:25 +02:00

81 lines
4.4 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace StellaOps.Concelier.WebService.Contracts;
public sealed record LnmLinksetResponse(
[property: JsonPropertyName("advisoryId")] string AdvisoryId,
[property: JsonPropertyName("source")] string Source,
[property: JsonPropertyName("purl")] IReadOnlyList<string> Purl,
[property: JsonPropertyName("cpe")] IReadOnlyList<string> Cpe,
[property: JsonPropertyName("summary")] string? Summary,
[property: JsonPropertyName("publishedAt")] DateTimeOffset? PublishedAt,
[property: JsonPropertyName("modifiedAt")] DateTimeOffset? ModifiedAt,
[property: JsonPropertyName("severity")] string? Severity,
[property: JsonPropertyName("status")] string? Status,
[property: JsonPropertyName("provenance")] LnmLinksetProvenance? Provenance,
[property: JsonPropertyName("conflicts")] IReadOnlyList<LnmLinksetConflict> Conflicts,
[property: JsonPropertyName("timeline")] IReadOnlyList<LnmLinksetTimeline> Timeline,
[property: JsonPropertyName("normalized")] LnmLinksetNormalized? Normalized,
[property: JsonPropertyName("cached")] bool Cached,
[property: JsonPropertyName("remarks")] IReadOnlyList<string> Remarks,
[property: JsonPropertyName("observations")] IReadOnlyList<string> Observations);
public sealed record LnmLinksetPage(
[property: JsonPropertyName("items")] IReadOnlyList<LnmLinksetResponse> Items,
[property: JsonPropertyName("page")] int Page,
[property: JsonPropertyName("pageSize")] int PageSize,
[property: JsonPropertyName("total")] int? Total);
public sealed record LnmLinksetNormalized(
[property: JsonPropertyName("aliases")] IReadOnlyList<string>? Aliases,
[property: JsonPropertyName("purl")] IReadOnlyList<string>? Purl,
[property: JsonPropertyName("cpe")] IReadOnlyList<string>? Cpe,
[property: JsonPropertyName("versions")] IReadOnlyList<string>? Versions,
[property: JsonPropertyName("ranges")] IReadOnlyList<object>? Ranges,
[property: JsonPropertyName("severities")] IReadOnlyList<object>? Severities);
public sealed record LnmLinksetConflict(
[property: JsonPropertyName("field")] string Field,
[property: JsonPropertyName("reason")] string Reason,
[property: JsonPropertyName("observedValue")] string? ObservedValue,
[property: JsonPropertyName("observedAt")] DateTimeOffset? ObservedAt,
[property: JsonPropertyName("evidenceHash")] string? EvidenceHash);
public sealed record LnmLinksetTimeline(
[property: JsonPropertyName("event")] string Event,
[property: JsonPropertyName("at")] DateTimeOffset? At,
[property: JsonPropertyName("evidenceHash")] string? EvidenceHash);
public sealed record LnmLinksetProvenance(
[property: JsonPropertyName("ingestedAt")] DateTimeOffset? IngestedAt,
[property: JsonPropertyName("connectorId")] string? ConnectorId,
[property: JsonPropertyName("evidenceHash")] string? EvidenceHash,
[property: JsonPropertyName("dsseEnvelopeHash")] string? DsseEnvelopeHash);
public sealed record LnmLinksetQuery(
[Required]
[property: JsonPropertyName("advisoryId")] string AdvisoryId,
[property: JsonPropertyName("source")] string? Source = null,
[property: JsonPropertyName("includeConflicts")] bool IncludeConflicts = true,
[property: JsonPropertyName("includeObservations")] bool IncludeObservations = false);
public sealed record LnmLinksetSearchRequest(
[property: JsonPropertyName("purl")] IReadOnlyList<string>? Purl,
[property: JsonPropertyName("cpe")] IReadOnlyList<string>? Cpe,
[property: JsonPropertyName("ghsa")] string? Ghsa,
[property: JsonPropertyName("cve")] string? Cve,
[property: JsonPropertyName("advisoryId")] string? AdvisoryId,
[property: JsonPropertyName("source")] string? Source,
[property: JsonPropertyName("severityMin")] double? SeverityMin,
[property: JsonPropertyName("severityMax")] double? SeverityMax,
[property: JsonPropertyName("publishedSince")] DateTimeOffset? PublishedSince,
[property: JsonPropertyName("modifiedSince")] DateTimeOffset? ModifiedSince,
[property: JsonPropertyName("includeTimeline")] bool IncludeTimeline = false,
[property: JsonPropertyName("includeObservations")] bool IncludeObservations = false,
[property: JsonPropertyName("page")] int? Page = null,
[property: JsonPropertyName("pageSize")] int? PageSize = null,
[property: JsonPropertyName("sort")] string? Sort = null);