-
Notifications
You must be signed in to change notification settings - Fork 676
/
IPackageSearchMetadata.cs
63 lines (56 loc) · 2.44 KB
/
IPackageSearchMetadata.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using NuGet.Packaging;
using NuGet.Packaging.Core;
namespace NuGet.Protocol.Core.Types
{
/// <summary>
/// Package metadata only containing select fields relevant to search results processing and presenting.
/// Immutable.
/// </summary>
public interface IPackageSearchMetadata
{
string Authors { get; }
IEnumerable<PackageDependencyGroup> DependencySets { get; }
string Description { get; }
long? DownloadCount { get; }
Uri IconUrl { get; }
PackageIdentity Identity { get; }
Uri LicenseUrl { get; }
Uri ProjectUrl { get; }
Uri ReportAbuseUrl { get; }
Uri PackageDetailsUrl { get; }
DateTimeOffset? Published { get; }
string Owners { get; }
bool RequireLicenseAcceptance { get; }
string Summary { get; }
string Tags { get; }
string Title { get; }
bool IsListed { get; }
bool PrefixReserved { get; }
LicenseMetadata LicenseMetadata { get; }
/// <summary>
/// Gets the deprecation metadata for the package.
/// </summary>
/// <remarks>
/// Deprecation metadata is only available through remote feeds, not local feeds. Some servers do not return deprecation information via
/// <see cref="PackageSearchResource" /> results, only through <see cref="PackageMetadataResource" /> or <see cref="FindPackageByIdResource" />.
/// </remarks>
Task<PackageDeprecationMetadata> GetDeprecationMetadataAsync();
/// <summary>
/// Lists the available versions of the package on the source.
/// </summary>
Task<IEnumerable<VersionInfo>> GetVersionsAsync();
/// <summary>
/// Gets the vulnerability metadata for the package.
/// </summary>
/// <remarks>
/// Vulnerability metadata is only available through remote feeds, not local feeds. Some servers do not return vulnerability information via
/// <see cref="PackageSearchResource" /> results, only through <see cref="PackageMetadataResource" /> or <see cref= "FindPackageByIdResource" />.
/// </remarks>
IEnumerable<PackageVulnerabilityMetadata> Vulnerabilities { get; }
}
}