Skip to content

Bump Submodule/github/rest-api-description from 5b01aaf to 38baa7a #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion Sources/meta/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,31 @@ public enum Components {
public var packages: [Swift.String]?
/// - Remark: Generated from `#/components/schemas/api-overview/domains/actions`.
public var actions: [Swift.String]?
/// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations`.
public struct artifact_attestationsPayload: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations/trust_domain`.
public var trust_domain: Swift.String?
/// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations/services`.
public var services: [Swift.String]?
/// Creates a new `artifact_attestationsPayload`.
///
/// - Parameters:
/// - trust_domain:
/// - services:
public init(
trust_domain: Swift.String? = nil,
services: [Swift.String]? = nil
) {
self.trust_domain = trust_domain
self.services = services
}
public enum CodingKeys: String, CodingKey {
case trust_domain
case services
}
}
/// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations`.
public var artifact_attestations: Components.Schemas.api_hyphen_overview.domainsPayload.artifact_attestationsPayload?
/// Creates a new `domainsPayload`.
///
/// - Parameters:
Expand All @@ -467,25 +492,29 @@ public enum Components {
/// - copilot:
/// - packages:
/// - actions:
/// - artifact_attestations:
public init(
website: [Swift.String]? = nil,
codespaces: [Swift.String]? = nil,
copilot: [Swift.String]? = nil,
packages: [Swift.String]? = nil,
actions: [Swift.String]? = nil
actions: [Swift.String]? = nil,
artifact_attestations: Components.Schemas.api_hyphen_overview.domainsPayload.artifact_attestationsPayload? = nil
) {
self.website = website
self.codespaces = codespaces
self.copilot = copilot
self.packages = packages
self.actions = actions
self.artifact_attestations = artifact_attestations
}
public enum CodingKeys: String, CodingKey {
case website
case codespaces
case copilot
case packages
case actions
case artifact_attestations
}
}
/// - Remark: Generated from `#/components/schemas/api-overview/domains`.
Expand Down
1 change: 0 additions & 1 deletion Sources/repos/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10976,7 +10976,6 @@ public enum Components {
case RepositoryRole = "RepositoryRole"
case Team = "Team"
case DeployKey = "DeployKey"
case EnterpriseTeam = "EnterpriseTeam"
}
/// The type of actor that can bypass a ruleset.
///
Expand Down
14 changes: 14 additions & 0 deletions Sources/security-advisories/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ public struct Client: APIProtocol {
name: "modified",
value: input.query.modified
)
try converter.setQueryItemAsURI(
in: &request,
style: .form,
explode: true,
name: "epss_percentage",
value: input.query.epss_percentage
)
try converter.setQueryItemAsURI(
in: &request,
style: .form,
explode: true,
name: "epss_percentile",
value: input.query.epss_percentile
)
try converter.setQueryItemAsURI(
in: &request,
style: .form,
Expand Down
52 changes: 52 additions & 0 deletions Sources/security-advisories/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,31 @@ public enum Components {
public typealias cwesPayload = [Components.Schemas.global_hyphen_advisory.cwesPayloadPayload]
/// - Remark: Generated from `#/components/schemas/global-advisory/cwes`.
public var cwes: Components.Schemas.global_hyphen_advisory.cwesPayload?
/// - Remark: Generated from `#/components/schemas/global-advisory/epss`.
public struct epssPayload: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/global-advisory/epss/percentage`.
public var percentage: Swift.Double?
/// - Remark: Generated from `#/components/schemas/global-advisory/epss/percentile`.
public var percentile: Swift.Double?
/// Creates a new `epssPayload`.
///
/// - Parameters:
/// - percentage:
/// - percentile:
public init(
percentage: Swift.Double? = nil,
percentile: Swift.Double? = nil
) {
self.percentage = percentage
self.percentile = percentile
}
public enum CodingKeys: String, CodingKey {
case percentage
case percentile
}
}
/// - Remark: Generated from `#/components/schemas/global-advisory/epss`.
public var epss: Components.Schemas.global_hyphen_advisory.epssPayload?
/// - Remark: Generated from `#/components/schemas/global-advisory/creditsPayload`.
public struct creditsPayloadPayload: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/global-advisory/creditsPayload/user`.
Expand Down Expand Up @@ -818,6 +843,7 @@ public enum Components {
/// - vulnerabilities: The products and respective version ranges affected by the advisory.
/// - cvss:
/// - cwes:
/// - epss:
/// - credits: The users who contributed to the advisory.
public init(
ghsa_id: Swift.String,
Expand All @@ -840,6 +866,7 @@ public enum Components {
vulnerabilities: [Components.Schemas.vulnerability]? = nil,
cvss: Components.Schemas.global_hyphen_advisory.cvssPayload? = nil,
cwes: Components.Schemas.global_hyphen_advisory.cwesPayload? = nil,
epss: Components.Schemas.global_hyphen_advisory.epssPayload? = nil,
credits: Components.Schemas.global_hyphen_advisory.creditsPayload? = nil
) {
self.ghsa_id = ghsa_id
Expand All @@ -862,6 +889,7 @@ public enum Components {
self.vulnerabilities = vulnerabilities
self.cvss = cvss
self.cwes = cwes
self.epss = epss
self.credits = credits
}
public enum CodingKeys: String, CodingKey {
Expand All @@ -885,6 +913,7 @@ public enum Components {
case vulnerabilities
case cvss
case cwes
case epss
case credits
}
public init(from decoder: any Decoder) throws {
Expand Down Expand Up @@ -969,6 +998,10 @@ public enum Components {
Components.Schemas.global_hyphen_advisory.cwesPayload.self,
forKey: .cwes
)
epss = try container.decodeIfPresent(
Components.Schemas.global_hyphen_advisory.epssPayload.self,
forKey: .epss
)
credits = try container.decodeIfPresent(
Components.Schemas.global_hyphen_advisory.creditsPayload.self,
forKey: .credits
Expand All @@ -994,6 +1027,7 @@ public enum Components {
"vulnerabilities",
"cvss",
"cwes",
"epss",
"credits"
])
}
Expand Down Expand Up @@ -6410,6 +6444,16 @@ public enum Operations {
///
/// - Remark: Generated from `#/paths/advisories/GET/query/modified`.
public var modified: Swift.String?
/// If specified, only return advisories that have an EPSS percentage score that matches the provided value.
/// The EPSS percentage represents the likelihood of a CVE being exploited.
///
/// - Remark: Generated from `#/paths/advisories/GET/query/epss_percentage`.
public var epss_percentage: Swift.String?
/// If specified, only return advisories that have an EPSS percentile score that matches the provided value.
/// The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.
///
/// - Remark: Generated from `#/paths/advisories/GET/query/epss_percentile`.
public var epss_percentile: Swift.String?
/// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
///
/// - Remark: Generated from `#/paths/advisories/GET/query/before`.
Expand All @@ -6435,6 +6479,8 @@ public enum Operations {
@frozen public enum sortPayload: String, Codable, Hashable, Sendable {
case updated = "updated"
case published = "published"
case epss_percentage = "epss_percentage"
case epss_percentile = "epss_percentile"
}
/// The property to sort the results by.
///
Expand All @@ -6454,6 +6500,8 @@ public enum Operations {
/// - published: If specified, only return advisories that were published on a date or date range.
/// - updated: If specified, only return advisories that were updated on a date or date range.
/// - modified: If specified, only show advisories that were updated or published on a date or date range.
/// - epss_percentage: If specified, only return advisories that have an EPSS percentage score that matches the provided value.
/// - epss_percentile: If specified, only return advisories that have an EPSS percentile score that matches the provided value.
/// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
/// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
/// - direction: The direction to sort the results by.
Expand All @@ -6471,6 +6519,8 @@ public enum Operations {
published: Swift.String? = nil,
updated: Swift.String? = nil,
modified: Swift.String? = nil,
epss_percentage: Swift.String? = nil,
epss_percentile: Swift.String? = nil,
before: Components.Parameters.pagination_hyphen_before? = nil,
after: Components.Parameters.pagination_hyphen_after? = nil,
direction: Components.Parameters.direction? = nil,
Expand All @@ -6488,6 +6538,8 @@ public enum Operations {
self.published = published
self.updated = updated
self.modified = modified
self.epss_percentage = epss_percentage
self.epss_percentile = epss_percentile
self.before = before
self.after = after
self.direction = direction
Expand Down
2 changes: 1 addition & 1 deletion Submodule/github/rest-api-description