From 295693f39a5e90e316351017e750145aa3f78211 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 17 Sep 2024 17:41:28 +0800 Subject: [PATCH 001/129] Revert "Delete .gitmodules" --- .github/dependabot.yml | 9 ++++----- .gitmodules | 4 ++++ Submodule/github/rest-api-description | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 Submodule/github/rest-api-description diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 26a285de274..d92c5ad8035 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,8 +11,7 @@ updates: schedule: interval: "weekly" -# FIXME: Need other way to update OAS. - # - package-ecosystem: "gitsubmodule" - # directory: "/" - # schedule: - # interval: "weekly" + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..cfdc733eb75 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "Submodule/github/rest-api-description"] + path = Submodule/github/rest-api-description + url = https://github.com/github/rest-api-description.git + shallow = true diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description new file mode 160000 index 00000000000..38baa7aebf2 --- /dev/null +++ b/Submodule/github/rest-api-description @@ -0,0 +1 @@ +Subproject commit 38baa7aebf29fe927aac6aa0ae769b7a8d3204ca From cc8315ff0ecc1136c75a82e70e4c7c1d2da93dd6 Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 17:42:12 +0800 Subject: [PATCH 002/129] Create .github/workflows/Release.yml --- .github/workflows/Release.yml | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/Release.yml diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 00000000000..cdf920f02ab --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,82 @@ +name: Release + +on: + schedule: + - cron: '0 0 1 * *' # 每月的第一天 00:00 UTC + workflow_dispatch: # 允許手動觸發工作流 + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + + create-git-branch-release: + runs-on: ubuntu-latest + outputs: + branch: ${{ steps.release_branch.outputs.value }} + steps: + - uses: actions/checkout@v3 # Use the latest stable version + + - name: Create release branch + env: + RELEASE_BRANCH: release + id: release_branch + run: | + git checkout -B $RELEASE_BRANCH + echo "value=$RELEASE_BRANCH" >> $GITHUB_OUTPUT + + - name: Remove submodule (if exists) + env: + SUBMODULE_PATH: Submodule/github/rest-api-description + run: | + if [ -d "$SUBMODULE_PATH" ]; then + git submodule deinit -f $SUBMODULE_PATH || true + git rm -f $SUBMODULE_PATH || true + rm -rf .git/modules/$SUBMODULE_PATH || true + git commit -m "Remove submodule" + git push + else + echo "Submodule not found, skipping removal." + fi + + create-github-release: + needs: create-git-branch-release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get latest version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + LATEST_VERSION=$(gh release view --repo ${{ github.repository }} --json tagName --jq .tagName) + echo "Latest release version: $LATEST_VERSION" + echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV + + - name: Bump patch version + run: | + # Extract version numbers + VERSION=${LATEST_VERSION#v} + MAJOR=$(echo $VERSION | cut -d. -f1) + MINOR=$(echo $VERSION | cut -d. -f2) + PATCH=$(echo $VERSION | cut -d. -f3) + + # Bump the patch number + PATCH=$((PATCH+1)) + + # Form new version + NEW_VERSION="v$MAJOR.$MINOR.$PATCH" + echo "New version: $NEW_VERSION" + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + + - name: Create new GitHub release + env: + GIT_REF: ${{ needs.create-git-branch-release.outputs.branch }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create $NEW_VERSION \ + --repo ${{ github.repository }} \ + --generate-notes \ + --target "$GIT_REF" From f5aa1814f28a0aa64bb1bd5047c92fb16397b910 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:45:56 +0000 Subject: [PATCH 003/129] Bump Submodule/github/rest-api-description from `38baa7a` to `066dbf5` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `38baa7a` to `066dbf5`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/38baa7aebf29fe927aac6aa0ae769b7a8d3204ca...066dbf5dc65b77a59b36a517cafeda2feb369334) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 38baa7aebf2..066dbf5dc65 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 38baa7aebf29fe927aac6aa0ae769b7a8d3204ca +Subproject commit 066dbf5dc65b77a59b36a517cafeda2feb369334 From c6f85835e92c6df18c5f75331d675085cba455be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:46:00 +0000 Subject: [PATCH 004/129] Bump actions/checkout from 3 to 4 in /.github/workflows Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/Release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index cdf920f02ab..f6c3fa6c814 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -16,7 +16,7 @@ jobs: outputs: branch: ${{ steps.release_branch.outputs.value }} steps: - - uses: actions/checkout@v3 # Use the latest stable version + - uses: actions/checkout@v4 # Use the latest stable version - name: Create release branch env: @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get latest version env: From 9648d576e401c3f1ad28d0961c6b3dc07f21efce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:05:57 +0000 Subject: [PATCH 005/129] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Types.swift | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 098effdac07..4cba28c20b6 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -1631,10 +1631,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/description`. public var description: Swift.String? + /// A description of the rule used to detect the alert. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/full_description`. + public var full_description: Swift.String? /// A set of tags applicable for the rule. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/tags`. public var tags: [Swift.String]? + /// Detailed documentation for the rule as GitHub Flavored Markdown. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/help`. + public var help: Swift.String? + /// A link to the documentation for the rule used to detect the alert. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/help_uri`. + public var help_uri: Swift.String? /// Creates a new `code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary`. /// /// - Parameters: @@ -1643,21 +1655,30 @@ public enum Components { /// - severity: The severity of the alert. /// - security_severity_level: The security severity of the alert. /// - description: A short description of the rule used to detect the alert. + /// - full_description: A description of the rule used to detect the alert. /// - tags: A set of tags applicable for the rule. + /// - help: Detailed documentation for the rule as GitHub Flavored Markdown. + /// - help_uri: A link to the documentation for the rule used to detect the alert. public init( id: Swift.String? = nil, name: Swift.String? = nil, severity: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary.severityPayload? = nil, security_severity_level: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary.security_severity_levelPayload? = nil, description: Swift.String? = nil, - tags: [Swift.String]? = nil + full_description: Swift.String? = nil, + tags: [Swift.String]? = nil, + help: Swift.String? = nil, + help_uri: Swift.String? = nil ) { self.id = id self.name = name self.severity = severity self.security_severity_level = security_severity_level self.description = description + self.full_description = full_description self.tags = tags + self.help = help + self.help_uri = help_uri } public enum CodingKeys: String, CodingKey { case id @@ -1665,7 +1686,10 @@ public enum Components { case severity case security_severity_level case description + case full_description case tags + case help + case help_uri } } /// The version of the tool used to generate the code scanning analysis. @@ -2107,7 +2131,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule/description`. public var description: Swift.String? - /// description of the rule used to detect the alert. + /// A description of the rule used to detect the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule/full_description`. public var full_description: Swift.String? @@ -2131,7 +2155,7 @@ public enum Components { /// - severity: The severity of the alert. /// - security_severity_level: The security severity of the alert. /// - description: A short description of the rule used to detect the alert. - /// - full_description: description of the rule used to detect the alert. + /// - full_description: A description of the rule used to detect the alert. /// - tags: A set of tags applicable for the rule. /// - help: Detailed documentation for the rule as GitHub Flavored Markdown. /// - help_uri: A link to the documentation for the rule used to detect the alert. From 92126e70d3363ef7e7beb5292a8ede1d2bb7c8da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:07:00 +0000 Subject: [PATCH 006/129] Commit via running ake Sources/dependabot --- Sources/dependabot/Types.swift | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 3e93aff0c8b..07269ad7f7a 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -551,6 +551,83 @@ public enum Servers { public enum Components { /// Types generated from the `#/components/schemas` section of the OpenAPI document. public enum Schemas { + /// - Remark: Generated from `#/components/schemas/cvss-severities`. + public struct cvss_hyphen_severities: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public struct cvss_v3Payload: Codable, Hashable, Sendable { + /// The CVSS 3 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 3 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v3Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 3 vector string. + /// - score: The CVSS 3 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public var cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public struct cvss_v4Payload: Codable, Hashable, Sendable { + /// The CVSS 4 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 4 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v4Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 4 vector string. + /// - score: The CVSS 4 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public var cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? + /// Creates a new `cvss_hyphen_severities`. + /// + /// - Parameters: + /// - cvss_v3: + /// - cvss_v4: + public init( + cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? = nil, + cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? = nil + ) { + self.cvss_v3 = cvss_v3 + self.cvss_v4 = cvss_v4 + } + public enum CodingKeys: String, CodingKey { + case cvss_v3 + case cvss_v4 + } + } /// A GitHub user. /// /// - Remark: Generated from `#/components/schemas/simple-user`. @@ -1228,6 +1305,8 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/cvss`. public var cvss: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cvssPayload + /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/cvss_severities`. + public var cvss_severities: Components.Schemas.cvss_hyphen_severities? /// A CWE weakness assigned to the advisory. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/cwesPayload`. @@ -1398,6 +1477,7 @@ public enum Components { /// - vulnerabilities: Vulnerable version range information for the advisory. /// - severity: The severity of the advisory. /// - cvss: Details for the advisory pertaining to the Common Vulnerability Scoring System. + /// - cvss_severities: /// - cwes: Details for the advisory pertaining to Common Weakness Enumeration. /// - identifiers: Values that identify this advisory among security information sources. /// - references: Links to additional advisory information. @@ -1412,6 +1492,7 @@ public enum Components { vulnerabilities: [Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_vulnerability], severity: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.severityPayload, cvss: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cvssPayload, + cvss_severities: Components.Schemas.cvss_hyphen_severities? = nil, cwes: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cwesPayload, identifiers: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.identifiersPayload, references: Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.referencesPayload, @@ -1426,6 +1507,7 @@ public enum Components { self.vulnerabilities = vulnerabilities self.severity = severity self.cvss = cvss + self.cvss_severities = cvss_severities self.cwes = cwes self.identifiers = identifiers self.references = references @@ -1441,6 +1523,7 @@ public enum Components { case vulnerabilities case severity case cvss + case cvss_severities case cwes case identifiers case references @@ -1478,6 +1561,10 @@ public enum Components { Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cvssPayload.self, forKey: .cvss ) + cvss_severities = try container.decodeIfPresent( + Components.Schemas.cvss_hyphen_severities.self, + forKey: .cvss_severities + ) cwes = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cwesPayload.self, forKey: .cwes @@ -1510,6 +1597,7 @@ public enum Components { "vulnerabilities", "severity", "cvss", + "cvss_severities", "cwes", "identifiers", "references", From 04de8e74c00111943f9d50278386a6833c0334b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:07:41 +0000 Subject: [PATCH 007/129] Commit via running ake Sources/gists --- Sources/gists/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index 1b538eb8d6d..36b45b5f90b 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -2389,7 +2389,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The handle for the GitHub user account. /// /// - Remark: Generated from `#/components/parameters/username`. From c9ceaeadb5db8eb3c2d45d6b00e92de317cb816e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:08:43 +0000 Subject: [PATCH 008/129] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 094041126fb..205062939b1 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -7991,7 +7991,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// A list of comma separated label names. Example: `bug,ui,@high` /// /// - Remark: Generated from `#/components/parameters/labels`. From 32716934b0ffbc87d9e30054771501108959a264 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:10:06 +0000 Subject: [PATCH 009/129] Commit via running ake Sources/meta --- Sources/meta/Types.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/meta/Types.swift b/Sources/meta/Types.swift index 3ada4926c35..938e1e9ec1e 100644 --- a/Sources/meta/Types.swift +++ b/Sources/meta/Types.swift @@ -443,6 +443,8 @@ public enum Components { public var actions: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/actions_macos`. public var actions_macos: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/api-overview/codespaces`. + public var codespaces: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/dependabot`. public var dependabot: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/copilot`. @@ -535,6 +537,7 @@ public enum Components { /// - importer: /// - actions: /// - actions_macos: + /// - codespaces: /// - dependabot: /// - copilot: /// - domains: @@ -552,6 +555,7 @@ public enum Components { importer: [Swift.String]? = nil, actions: [Swift.String]? = nil, actions_macos: [Swift.String]? = nil, + codespaces: [Swift.String]? = nil, dependabot: [Swift.String]? = nil, copilot: [Swift.String]? = nil, domains: Components.Schemas.api_hyphen_overview.domainsPayload? = nil @@ -569,6 +573,7 @@ public enum Components { self.importer = importer self.actions = actions self.actions_macos = actions_macos + self.codespaces = codespaces self.dependabot = dependabot self.copilot = copilot self.domains = domains @@ -587,6 +592,7 @@ public enum Components { case importer case actions case actions_macos + case codespaces case dependabot case copilot case domains From a2d8ea1ce03d7744a039657f4c90c67db9f822b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:12:12 +0000 Subject: [PATCH 010/129] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 981a93264fc..2b0ecccaa7a 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -6761,7 +6761,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The property to sort the results by. /// /// - Remark: Generated from `#/components/parameters/sort`. From ecf43dbb672fd2109d7befa25357481b71c7c198 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:12:53 +0000 Subject: [PATCH 011/129] Commit via running ake Sources/reactions --- Sources/reactions/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/reactions/Types.swift b/Sources/reactions/Types.swift index 4d42b545b3a..0a4bf435183 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -1106,7 +1106,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. From 425a68bb59922444e0066a379004c535b74ad38d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:13:15 +0000 Subject: [PATCH 012/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 4 +- Sources/repos/Types.swift | 79 ++++---------------------------------- 2 files changed, 9 insertions(+), 74 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index de935b61842..d47ff7f774a 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -1675,9 +1675,9 @@ public struct Client: APIProtocol { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index f498e59a45c..248dfda1fe3 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -127,9 +127,9 @@ public protocol APIProtocol: Sendable { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. @@ -2319,9 +2319,9 @@ extension APIProtocol { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. @@ -10963,12 +10963,10 @@ public enum Components { public struct repository_hyphen_ruleset_hyphen_bypass_hyphen_actor: Codable, Hashable, Sendable { /// The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_id`. public var actor_id: Swift.Int? /// The type of actor that can bypass a ruleset. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_type`. @frozen public enum actor_typePayload: String, Codable, Hashable, Sendable { case Integration = "Integration" @@ -10979,12 +10977,10 @@ public enum Components { } /// The type of actor that can bypass a ruleset. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_type`. public var actor_type: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.actor_typePayload /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. @frozen public enum bypass_modePayload: String, Codable, Hashable, Sendable { case always = "always" @@ -10992,7 +10988,6 @@ public enum Components { } /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. /// - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. public var bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload /// Creates a new `repository_hyphen_ruleset_hyphen_bypass_hyphen_actor`. @@ -11236,7 +11231,6 @@ public enum Components { } /// Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. /// - /// /// - Remark: Generated from `#/components/schemas/org-ruleset-conditions`. @frozen public enum org_hyphen_ruleset_hyphen_conditions: Codable, Hashable, Sendable { /// Conditions to target repositories by name and refs by name @@ -12498,9 +12492,6 @@ public enum Components { case repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case15`. case repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern) - /// > [!NOTE] - /// > `file_path_restriction` is in beta and subject to change. - /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. @@ -12547,16 +12538,10 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `file_path_restriction` is in beta and subject to change. - /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. case case16(Components.Schemas.repository_hyphen_rule.Case16Payload) - /// > [!NOTE] - /// > `max_file_path_length` is in beta and subject to change. - /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. @@ -12603,16 +12588,10 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `max_file_path_length` is in beta and subject to change. - /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. case case17(Components.Schemas.repository_hyphen_rule.Case17Payload) - /// > [!NOTE] - /// > `file_extension_restriction` is in beta and subject to change. - /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. @@ -12659,16 +12638,10 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `file_extension_restriction` is in beta and subject to change. - /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. case case18(Components.Schemas.repository_hyphen_rule.Case18Payload) - /// > [!NOTE] - /// > `max_file_size` is in beta and subject to change. - /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. @@ -12715,9 +12688,6 @@ public enum Components { case parameters } } - /// > [!NOTE] - /// > `max_file_size` is in beta and subject to change. - /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. @@ -12921,9 +12891,6 @@ public enum Components { public var name: Swift.String /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -12932,9 +12899,6 @@ public enum Components { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/target`. public var target: Components.Schemas.repository_hyphen_ruleset.targetPayload? /// The type of the source of the ruleset @@ -22120,7 +22084,7 @@ public enum Components { /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. - public typealias comment_hyphen_id = Swift.Int + public typealias comment_hyphen_id = Swift.Int64 /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -22147,7 +22111,6 @@ public enum Components { public typealias invitation_hyphen_id = Swift.Int /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - /// /// - Remark: Generated from `#/components/parameters/ref-in-query`. public typealias ref_hyphen_in_hyphen_query = Swift.String /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. @@ -23692,9 +23655,6 @@ public enum Operations { public var name: Swift.String /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -23703,9 +23663,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/target`. public var target: Operations.repos_sol_create_hyphen_org_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/enforcement`. @@ -23931,7 +23888,6 @@ public enum Operations { public struct Query: Sendable, Hashable { /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/ref`. public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. @@ -24596,9 +24552,6 @@ public enum Operations { public var name: Swift.String? /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -24607,9 +24560,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. public var target: Operations.repos_sol_update_hyphen_org_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/enforcement`. @@ -26374,9 +26324,9 @@ public enum Operations { /// /// Store an artifact attestation and associate it with a repository. /// - /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required. /// - /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. @@ -28636,7 +28586,6 @@ public enum Operations { public var strict: Swift.Bool /// **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/PUT/requestBody/json/required_status_checks/contexts`. @available(*, deprecated) public var contexts: [Swift.String] @@ -31077,7 +31026,6 @@ public enum Operations { public var strict: Swift.Bool? /// **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/PATCH/requestBody/json/contexts`. @available(*, deprecated) public var contexts: [Swift.String]? @@ -57119,9 +57067,6 @@ public enum Operations { public var name: Swift.String /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -57130,9 +57075,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/target`. public var target: Operations.repos_sol_create_hyphen_repo_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/enforcement`. @@ -57367,7 +57309,6 @@ public enum Operations { public struct Query: Sendable, Hashable { /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/rule-suites/GET/query/ref`. public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? /// - Remark: Generated from `#/components/parameters/time-period`. @@ -58064,9 +58005,6 @@ public enum Operations { public var name: Swift.String? /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { case branch = "branch" @@ -58075,9 +58013,6 @@ public enum Operations { } /// The target of the ruleset /// - /// > [!NOTE] - /// > The `push` target is in beta and is subject to change. - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. public var target: Operations.repos_sol_update_hyphen_repo_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/enforcement`. From c45ed8fa55760c40d10f00c057db04b7b388df11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:15:41 +0000 Subject: [PATCH 013/129] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Types.swift | 99 +++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 4f7aa8f66c4..faf4c6ee707 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -423,6 +423,83 @@ public enum Components { case vulnerable_functions } } + /// - Remark: Generated from `#/components/schemas/cvss-severities`. + public struct cvss_hyphen_severities: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public struct cvss_v3Payload: Codable, Hashable, Sendable { + /// The CVSS 3 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 3 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v3Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 3 vector string. + /// - score: The CVSS 3 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v3`. + public var cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public struct cvss_v4Payload: Codable, Hashable, Sendable { + /// The CVSS 4 vector string. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/vector_string`. + public var vector_string: Swift.String? + /// The CVSS 4 score. + /// + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4/score`. + public var score: Swift.Double? + /// Creates a new `cvss_v4Payload`. + /// + /// - Parameters: + /// - vector_string: The CVSS 4 vector string. + /// - score: The CVSS 4 score. + public init( + vector_string: Swift.String? = nil, + score: Swift.Double? = nil + ) { + self.vector_string = vector_string + self.score = score + } + public enum CodingKeys: String, CodingKey { + case vector_string + case score + } + } + /// - Remark: Generated from `#/components/schemas/cvss-severities/cvss_v4`. + public var cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? + /// Creates a new `cvss_hyphen_severities`. + /// + /// - Parameters: + /// - cvss_v3: + /// - cvss_v4: + public init( + cvss_v3: Components.Schemas.cvss_hyphen_severities.cvss_v3Payload? = nil, + cvss_v4: Components.Schemas.cvss_hyphen_severities.cvss_v4Payload? = nil + ) { + self.cvss_v3 = cvss_v3 + self.cvss_v4 = cvss_v4 + } + public enum CodingKeys: String, CodingKey { + case cvss_v3 + case cvss_v4 + } + } /// A GitHub user. /// /// - Remark: Generated from `#/components/schemas/simple-user`. @@ -733,6 +810,8 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/global-advisory/cvss`. public var cvss: Components.Schemas.global_hyphen_advisory.cvssPayload? + /// - Remark: Generated from `#/components/schemas/global-advisory/cvss_severities`. + public var cvss_severities: Components.Schemas.cvss_hyphen_severities? /// - Remark: Generated from `#/components/schemas/global-advisory/cwesPayload`. public struct cwesPayloadPayload: Codable, Hashable, Sendable { /// The Common Weakness Enumeration (CWE) identifier. @@ -842,6 +921,7 @@ public enum Components { /// - withdrawn_at: The date and time of when the advisory was withdrawn, in ISO 8601 format. /// - vulnerabilities: The products and respective version ranges affected by the advisory. /// - cvss: + /// - cvss_severities: /// - cwes: /// - epss: /// - credits: The users who contributed to the advisory. @@ -865,6 +945,7 @@ public enum Components { withdrawn_at: Foundation.Date? = nil, vulnerabilities: [Components.Schemas.vulnerability]? = nil, cvss: Components.Schemas.global_hyphen_advisory.cvssPayload? = nil, + cvss_severities: Components.Schemas.cvss_hyphen_severities? = 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 @@ -888,6 +969,7 @@ public enum Components { self.withdrawn_at = withdrawn_at self.vulnerabilities = vulnerabilities self.cvss = cvss + self.cvss_severities = cvss_severities self.cwes = cwes self.epss = epss self.credits = credits @@ -912,6 +994,7 @@ public enum Components { case withdrawn_at case vulnerabilities case cvss + case cvss_severities case cwes case epss case credits @@ -994,6 +1077,10 @@ public enum Components { Components.Schemas.global_hyphen_advisory.cvssPayload.self, forKey: .cvss ) + cvss_severities = try container.decodeIfPresent( + Components.Schemas.cvss_hyphen_severities.self, + forKey: .cvss_severities + ) cwes = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.cwesPayload.self, forKey: .cwes @@ -1026,6 +1113,7 @@ public enum Components { "withdrawn_at", "vulnerabilities", "cvss", + "cvss_severities", "cwes", "epss", "credits" @@ -4889,6 +4977,8 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/repository-advisory/cvss`. public var cvss: Components.Schemas.repository_hyphen_advisory.cvssPayload? + /// - Remark: Generated from `#/components/schemas/repository-advisory/cvss_severities`. + public var cvss_severities: Components.Schemas.cvss_hyphen_severities? /// - Remark: Generated from `#/components/schemas/repository-advisory/cwesPayload`. public struct cwesPayloadPayload: Codable, Hashable, Sendable { /// The Common Weakness Enumeration (CWE) identifier. @@ -5009,6 +5099,7 @@ public enum Components { /// - submission: /// - vulnerabilities: /// - cvss: + /// - cvss_severities: /// - cwes: /// - cwe_ids: A list of only the CWE IDs. /// - credits: @@ -5036,6 +5127,7 @@ public enum Components { submission: Components.Schemas.repository_hyphen_advisory.submissionPayload? = nil, vulnerabilities: [Components.Schemas.repository_hyphen_advisory_hyphen_vulnerability]? = nil, cvss: Components.Schemas.repository_hyphen_advisory.cvssPayload? = nil, + cvss_severities: Components.Schemas.cvss_hyphen_severities? = nil, cwes: Components.Schemas.repository_hyphen_advisory.cwesPayload? = nil, cwe_ids: [Swift.String]? = nil, credits: Components.Schemas.repository_hyphen_advisory.creditsPayload? = nil, @@ -5063,6 +5155,7 @@ public enum Components { self.submission = submission self.vulnerabilities = vulnerabilities self.cvss = cvss + self.cvss_severities = cvss_severities self.cwes = cwes self.cwe_ids = cwe_ids self.credits = credits @@ -5091,6 +5184,7 @@ public enum Components { case submission case vulnerabilities case cvss + case cvss_severities case cwes case cwe_ids case credits @@ -5177,6 +5271,10 @@ public enum Components { Components.Schemas.repository_hyphen_advisory.cvssPayload.self, forKey: .cvss ) + cvss_severities = try container.decodeIfPresent( + Components.Schemas.cvss_hyphen_severities.self, + forKey: .cvss_severities + ) cwes = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.cwesPayload.self, forKey: .cwes @@ -5225,6 +5323,7 @@ public enum Components { "submission", "vulnerabilities", "cvss", + "cvss_severities", "cwes", "cwe_ids", "credits", From 14beb9ac5bada9fc8d2eb456898d166c506f1e48 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:15:58 +0800 Subject: [PATCH 014/129] Update Release.yml --- .github/workflows/Release.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index f6c3fa6c814..f38aea1b603 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -16,7 +16,7 @@ jobs: outputs: branch: ${{ steps.release_branch.outputs.value }} steps: - - uses: actions/checkout@v4 # Use the latest stable version + - uses: actions/checkout@v4 - name: Create release branch env: @@ -44,9 +44,6 @@ jobs: needs: create-git-branch-release runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Get latest version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 96b8665903547a85a033c47fbff441721def8289 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 17 Sep 2024 10:17:24 +0000 Subject: [PATCH 015/129] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 76d78c0936f..9b9bca817fe 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -1150,6 +1150,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. public var secret_scanning_validity_checks: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_validity_checksPayload? + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_non_provider_patterns`. + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_non_provider_patternsPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. @@ -1202,6 +1214,7 @@ public enum Components { /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks + /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non-provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting /// - enforcement: The enforcement status for a security configuration /// - url: The URL of the configuration @@ -1223,6 +1236,7 @@ public enum Components { secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? = nil, secret_scanning_validity_checks: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_validity_checksPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? = nil, enforcement: Components.Schemas.code_hyphen_security_hyphen_configuration.enforcementPayload? = nil, url: Swift.String? = nil, @@ -1244,6 +1258,7 @@ public enum Components { self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_validity_checks = secret_scanning_validity_checks + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting self.enforcement = enforcement self.url = url @@ -1266,6 +1281,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_validity_checks + case secret_scanning_non_provider_patterns case private_vulnerability_reporting case enforcement case url @@ -2004,6 +2020,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. public var secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? + /// The enablement status of secret scanning non provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_non_provider_patterns`. + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning non provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. @@ -2042,6 +2070,7 @@ public enum Operations { /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks + /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting /// - enforcement: The enforcement status for a security configuration public init( @@ -2057,6 +2086,7 @@ public enum Operations { secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, + secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, enforcement: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? = nil ) { @@ -2072,6 +2102,7 @@ public enum Operations { self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_validity_checks = secret_scanning_validity_checks + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting self.enforcement = enforcement } @@ -2088,6 +2119,7 @@ public enum Operations { case secret_scanning case secret_scanning_push_protection case secret_scanning_validity_checks + case secret_scanning_non_provider_patterns case private_vulnerability_reporting case enforcement } @@ -2141,6 +2173,10 @@ public enum Operations { Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) + secret_scanning_non_provider_patterns = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, + forKey: .secret_scanning_non_provider_patterns + ) private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting @@ -2162,6 +2198,7 @@ public enum Operations { "secret_scanning", "secret_scanning_push_protection", "secret_scanning_validity_checks", + "secret_scanning_non_provider_patterns", "private_vulnerability_reporting", "enforcement" ]) @@ -3123,6 +3160,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. public var secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_non_provider_patterns`. + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning non-provider patterns + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. @@ -3161,6 +3210,7 @@ public enum Operations { /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks + /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non-provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting /// - enforcement: The enforcement status for a security configuration public init( @@ -3176,6 +3226,7 @@ public enum Operations { secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, + secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, enforcement: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? = nil ) { @@ -3191,6 +3242,7 @@ public enum Operations { self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_validity_checks = secret_scanning_validity_checks + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting self.enforcement = enforcement } @@ -3207,6 +3259,7 @@ public enum Operations { case secret_scanning case secret_scanning_push_protection case secret_scanning_validity_checks + case secret_scanning_non_provider_patterns case private_vulnerability_reporting case enforcement } @@ -3260,6 +3313,10 @@ public enum Operations { Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) + secret_scanning_non_provider_patterns = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, + forKey: .secret_scanning_non_provider_patterns + ) private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting @@ -3281,6 +3338,7 @@ public enum Operations { "secret_scanning", "secret_scanning_push_protection", "secret_scanning_validity_checks", + "secret_scanning_non_provider_patterns", "private_vulnerability_reporting", "enforcement" ]) From 6250547bac9361ea58b733eaeaa4373d99755bce Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:26:30 +0800 Subject: [PATCH 016/129] Feat, uses make -j 3 --- .github/workflows/{Dependabot.yml => CI-Dependabot.yml} | 6 +++--- Makefile | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) rename .github/workflows/{Dependabot.yml => CI-Dependabot.yml} (88%) diff --git a/.github/workflows/Dependabot.yml b/.github/workflows/CI-Dependabot.yml similarity index 88% rename from .github/workflows/Dependabot.yml rename to .github/workflows/CI-Dependabot.yml index 8083e4d1339..df8e19bae5d 100644 --- a/.github/workflows/Dependabot.yml +++ b/.github/workflows/CI-Dependabot.yml @@ -31,13 +31,13 @@ jobs: os: ${{ matrix.os }} - name: "Sync code base" env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh pr checkout ${{ github.event.pull_request.number }} git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - make install + make -j 3 install git push gh pr merge --auto --merge "$PR_URL" gh pr review --approve "$PR_URL" diff --git a/Makefile b/Makefile index f608a353573..00ec777e20d 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,9 @@ commit: Sources/%: Sources/%/Client.swift Sources/%/Types.swift @$(MAKE) commit file="$@" +# Prevent submodule update from running in parallel with other jobs +.NOTPARALLEL: Submodule + # Update openapi specification if needed .PHONY: Submodule Submodule: From 9a00a32acf851667cbcbc6a3763e3c0f1cf9313e Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:28:40 +0800 Subject: [PATCH 017/129] Fix, Author identity unknown --- .github/workflows/Release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index f38aea1b603..e6c0f9b7463 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -31,6 +31,8 @@ jobs: SUBMODULE_PATH: Submodule/github/rest-api-description run: | if [ -d "$SUBMODULE_PATH" ]; then + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" git submodule deinit -f $SUBMODULE_PATH || true git rm -f $SUBMODULE_PATH || true rm -rf .git/modules/$SUBMODULE_PATH || true From 9b11396d96c09939f6eb5e4644085f982e5d62d7 Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:33:31 +0800 Subject: [PATCH 018/129] Fix, fatal: The current branch release has no upstream branch. --- .github/workflows/Release.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index e6c0f9b7463..b93696a0abf 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -13,18 +13,15 @@ jobs: create-git-branch-release: runs-on: ubuntu-latest + env: + RELEASE_BRANCH: release outputs: - branch: ${{ steps.release_branch.outputs.value }} + branch: ${{ env.RELEASE_BRANCH }} steps: - uses: actions/checkout@v4 - name: Create release branch - env: - RELEASE_BRANCH: release - id: release_branch - run: | - git checkout -B $RELEASE_BRANCH - echo "value=$RELEASE_BRANCH" >> $GITHUB_OUTPUT + run: git checkout -B $RELEASE_BRANCH - name: Remove submodule (if exists) env: @@ -37,11 +34,13 @@ jobs: git rm -f $SUBMODULE_PATH || true rm -rf .git/modules/$SUBMODULE_PATH || true git commit -m "Remove submodule" - git push else echo "Submodule not found, skipping removal." fi + - name: Push release branch + run: git push --force --set-upstream origin $RELEASE_BRANCH + create-github-release: needs: create-git-branch-release runs-on: ubuntu-latest From 1bbb90f0ba2766aa3155deb88cff95023dc25d71 Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:40:12 +0800 Subject: [PATCH 019/129] Fix, remote: Permission to Wei18/github-rest-api-swift-openapi.git denied to github-actions[bot]. --- .github/workflows/Release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index b93696a0abf..5ceec69bad0 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -13,6 +13,8 @@ jobs: create-git-branch-release: runs-on: ubuntu-latest + permissions: + contents: write env: RELEASE_BRANCH: release outputs: From 27dcaff35290b2fa16980a1e5f60a5f91076a6bf Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 17 Sep 2024 18:43:58 +0800 Subject: [PATCH 020/129] Fix, HTTP 403: Resource not accessible by integration (https://api.github.com/repos/Wei18/github-rest-api-swift-openapi/releases) --- .github/workflows/Release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 5ceec69bad0..1bab78419ed 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -46,6 +46,8 @@ jobs: create-github-release: needs: create-git-branch-release runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Get latest version env: From d5c11fe9082b738fdc963e72be93ef9e17814d20 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Wed, 18 Sep 2024 00:00:05 +0800 Subject: [PATCH 021/129] Update Release.yml --- .github/workflows/Release.yml | 40 ++++++----------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 1bab78419ed..42ee39db534 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,36 +49,10 @@ jobs: permissions: contents: write steps: - - name: Get latest version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST_VERSION=$(gh release view --repo ${{ github.repository }} --json tagName --jq .tagName) - echo "Latest release version: $LATEST_VERSION" - echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV - - - name: Bump patch version - run: | - # Extract version numbers - VERSION=${LATEST_VERSION#v} - MAJOR=$(echo $VERSION | cut -d. -f1) - MINOR=$(echo $VERSION | cut -d. -f2) - PATCH=$(echo $VERSION | cut -d. -f3) - - # Bump the patch number - PATCH=$((PATCH+1)) - - # Form new version - NEW_VERSION="v$MAJOR.$MINOR.$PATCH" - echo "New version: $NEW_VERSION" - echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV - - - name: Create new GitHub release - env: - GIT_REF: ${{ needs.create-git-branch-release.outputs.branch }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release create $NEW_VERSION \ - --repo ${{ github.repository }} \ - --generate-notes \ - --target "$GIT_REF" + - uses: Wei18/GitHubSwiftActions/Actions/Release@main + with: + owner: ${{ github.repository_owner }} + repo: ${{ github.event.repository.name }} + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ needs.create-git-branch-release.outputs.branch }} + type: "patch" From e14ce4586ab1951b73a81f83cabd4eb1c4db5996 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Wed, 18 Sep 2024 00:00:45 +0800 Subject: [PATCH 022/129] Update Release.yml --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 42ee39db534..1fdf097face 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,7 +49,7 @@ jobs: permissions: contents: write steps: - - uses: Wei18/GitHubSwiftActions/Actions/Release@main + - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.3 with: owner: ${{ github.repository_owner }} repo: ${{ github.event.repository.name }} From d60a45a4671294d69f8a3ed0a2af4b77eda3204e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 21:22:13 +0000 Subject: [PATCH 023/129] Bump Submodule/github/rest-api-description from `066dbf5` to `d6e386e` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `066dbf5` to `d6e386e`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/066dbf5dc65b77a59b36a517cafeda2feb369334...d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 066dbf5dc65..d6e386ed6bb 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 066dbf5dc65b77a59b36a517cafeda2feb369334 +Subproject commit d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1 From 5f5f0e18b3b2984021a73d04b01c031975b62b14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:48:06 +0000 Subject: [PATCH 024/129] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 2 +- Sources/orgs/Types.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index 3ab8bd3028e..ccf10410ff9 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -6735,7 +6735,7 @@ public struct Client: APIProtocol { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 4c8aef3c32c..dd1b77ecbff 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -700,7 +700,7 @@ public protocol APIProtocol: Sendable { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. @@ -1966,7 +1966,7 @@ extension APIProtocol { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. @@ -20384,7 +20384,7 @@ public enum Operations { /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. From e6692c2ef8caf6d8d55fb61cdf07a344b9156734 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:50:16 +0000 Subject: [PATCH 025/129] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 248dfda1fe3..57957a70520 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -13169,6 +13169,7 @@ public enum Components { @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable { case pass = "pass" case fail = "fail" + case bypass = "bypass" } /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. /// @@ -13281,14 +13282,15 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/rule-suite/result`. public var result: Components.Schemas.rule_hyphen_suite.resultPayload? - /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run. /// /// - Remark: Generated from `#/components/schemas/rule-suite/evaluation_result`. @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable { case pass = "pass" case fail = "fail" + case bypass = "bypass" } - /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run. /// /// - Remark: Generated from `#/components/schemas/rule-suite/evaluation_result`. public var evaluation_result: Components.Schemas.rule_hyphen_suite.evaluation_resultPayload? @@ -13358,7 +13360,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/rule-suite/rule_evaluationsPayload/rule_type`. public var rule_type: Swift.String? - /// Any associated details with the rule evaluation. + /// The detailed failure message for the rule. Null if the rule passed. /// /// - Remark: Generated from `#/components/schemas/rule-suite/rule_evaluationsPayload/details`. public var details: Swift.String? @@ -13369,7 +13371,7 @@ public enum Components { /// - enforcement: The enforcement level of this rule source. /// - result: The result of the evaluation of the individual rule. /// - rule_type: The type of rule. - /// - details: Any associated details with the rule evaluation. + /// - details: The detailed failure message for the rule. Null if the rule passed. public init( rule_source: Components.Schemas.rule_hyphen_suite.rule_evaluationsPayloadPayload.rule_sourcePayload? = nil, enforcement: Components.Schemas.rule_hyphen_suite.rule_evaluationsPayloadPayload.enforcementPayload? = nil, @@ -13412,7 +13414,7 @@ public enum Components { /// - repository_name: The name of the repository without the `.git` extension. /// - pushed_at: /// - result: The result of the rule evaluations for rules with the `active` enforcement status. - /// - evaluation_result: The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + /// - evaluation_result: The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run. /// - rule_evaluations: Details on the evaluated rules. public init( id: Swift.Int? = nil, @@ -17673,6 +17675,8 @@ public enum Components { public var path: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/sha`. public var sha: Swift.String + /// - Remark: Generated from `#/components/schemas/content-tree/content`. + public var content: Swift.String? /// - Remark: Generated from `#/components/schemas/content-tree/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/git_url`. @@ -17691,8 +17695,6 @@ public enum Components { public var name: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/path`. public var path: Swift.String - /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/content`. - public var content: Swift.String? /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/sha`. public var sha: Swift.String /// - Remark: Generated from `#/components/schemas/content-tree/entriesPayload/url`. @@ -17741,7 +17743,6 @@ public enum Components { /// - size: /// - name: /// - path: - /// - content: /// - sha: /// - url: /// - git_url: @@ -17753,7 +17754,6 @@ public enum Components { size: Swift.Int, name: Swift.String, path: Swift.String, - content: Swift.String? = nil, sha: Swift.String, url: Swift.String, git_url: Swift.String? = nil, @@ -17765,7 +17765,6 @@ public enum Components { self.size = size self.name = name self.path = path - self.content = content self.sha = sha self.url = url self.git_url = git_url @@ -17778,7 +17777,6 @@ public enum Components { case size case name case path - case content case sha case url case git_url @@ -17830,6 +17828,7 @@ public enum Components { /// - name: /// - path: /// - sha: + /// - content: /// - url: /// - git_url: /// - html_url: @@ -17842,6 +17841,7 @@ public enum Components { name: Swift.String, path: Swift.String, sha: Swift.String, + content: Swift.String? = nil, url: Swift.String, git_url: Swift.String? = nil, html_url: Swift.String? = nil, @@ -17854,6 +17854,7 @@ public enum Components { self.name = name self.path = path self.sha = sha + self.content = content self.url = url self.git_url = git_url self.html_url = html_url @@ -17867,6 +17868,7 @@ public enum Components { case name case path case sha + case content case url case git_url case html_url From d3579b408e9b33c309980fd52a777b32b64620bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:52:04 +0000 Subject: [PATCH 026/129] Commit via running ake Sources/codespaces --- Sources/codespaces/Client.swift | 2 -- Sources/codespaces/Types.swift | 6 ------ 2 files changed, 8 deletions(-) diff --git a/Sources/codespaces/Client.swift b/Sources/codespaces/Client.swift index afcb24fb1a8..3857cc6486d 100644 --- a/Sources/codespaces/Client.swift +++ b/Sources/codespaces/Client.swift @@ -3072,8 +3072,6 @@ public struct Client: APIProtocol { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index 1ecce119c17..3e31259f699 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -238,8 +238,6 @@ public protocol APIProtocol: Sendable { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. @@ -939,8 +937,6 @@ extension APIProtocol { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. @@ -12384,8 +12380,6 @@ public enum Operations { /// Gets your public key, which you need to encrypt secrets. You need to /// encrypt a secret before you can create or update secrets. /// - /// Anyone with read access to the repository can use this endpoint. - /// /// If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/codespaces/secrets/public-key`. From baf9c71151a4827d21bbcc2cbded5ce873ef71fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 23 Sep 2024 21:52:25 +0000 Subject: [PATCH 027/129] Commit via running ake Sources/copilot --- Sources/copilot/Types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 1b9fd1199b9..977bb18d727 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -1752,7 +1752,7 @@ public enum Components { case inactive_this_cycle } } - /// Information about the seat breakdown and policies set for an organization with a Copilot Business subscription. + /// Information about the seat breakdown and policies set for an organization with a Copilot Business or Copilot Enterprise subscription. /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details`. public struct copilot_hyphen_organization_hyphen_details: Codable, Hashable, Sendable { From 0755aedd7068c16d7c15ebfedd1ab9560a777457 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:25:18 +0000 Subject: [PATCH 028/129] Bump Submodule/github/rest-api-description from `d6e386e` to `aa5e982` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `d6e386e` to `aa5e982`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1...aa5e982025ea1f38241ba0319f72b512abf51896) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index d6e386ed6bb..aa5e982025e 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit d6e386ed6bb05e7d05e87ffdaea73c2b63d8cde1 +Subproject commit aa5e982025ea1f38241ba0319f72b512abf51896 From 661f54586cc2127db49c3040765908b3029b89d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:43:35 +0000 Subject: [PATCH 029/129] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 118 +++++-------------------------------- 1 file changed, 14 insertions(+), 104 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index ab0d2c93dc3..122d36f2fe2 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -2802,116 +2802,26 @@ public enum Operations { @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json`. @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case1/status`. - public var status: OpenAPIRuntime.OpenAPIValueContainer - /// A container of undocumented properties. - public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - status: - /// - additionalProperties: A container of undocumented properties. - public init( - status: OpenAPIRuntime.OpenAPIValueContainer, - additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() - ) { - self.status = status - self.additionalProperties = additionalProperties - } - public enum CodingKeys: String, CodingKey { - case status - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - status = try container.decode( - OpenAPIRuntime.OpenAPIValueContainer.self, - forKey: .status - ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "status" - ]) - } - public func encode(to encoder: any Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode( - status, - forKey: .status - ) - try encoder.encodeAdditionalProperties(additionalProperties) - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case1`. - case case1(Operations.checks_sol_create.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case2`. - public struct Case2Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case2/status`. - public var status: OpenAPIRuntime.OpenAPIValueContainer? - /// A container of undocumented properties. - public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `Case2Payload`. - /// - /// - Parameters: - /// - status: - /// - additionalProperties: A container of undocumented properties. - public init( - status: OpenAPIRuntime.OpenAPIValueContainer? = nil, - additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() - ) { - self.status = status - self.additionalProperties = additionalProperties - } - public enum CodingKeys: String, CodingKey { - case status - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - status = try container.decodeIfPresent( - OpenAPIRuntime.OpenAPIValueContainer.self, - forKey: .status - ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "status" - ]) - } - public func encode(to encoder: any Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent( - status, - forKey: .status - ) - try encoder.encodeAdditionalProperties(additionalProperties) - } + public enum CodingKeys: String, CodingKey { + case status } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/POST/requestBody/json/case2`. - case case2(Operations.checks_sol_create.Input.Body.jsonPayload.Case2Payload) public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: .status ) + switch discriminator { + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys.status, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } } public func encode(to encoder: any Encoder) throws { switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try value.encode(to: encoder) } } } From 59835d2dce8d285b67be7e60c6507900698fbdf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:43:56 +0000 Subject: [PATCH 030/129] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Client.swift | 21 +++++++++++++++++++++ Sources/code-scanning/Types.swift | 27 ++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index 4f1ba064bfe..a0d4edc944c 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -292,6 +292,13 @@ public struct Client: APIProtocol { name: "ref", value: input.query.ref ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "pr", + value: input.query.pr + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -755,6 +762,13 @@ public struct Client: APIProtocol { name: "ref", value: input.query.ref ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "pr", + value: input.query.pr + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -928,6 +942,13 @@ public struct Client: APIProtocol { name: "per_page", value: input.query.per_page ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "pr", + value: input.query.pr + ) try converter.setQueryItemAsURI( in: &request, style: .form, diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 4cba28c20b6..7681eaa8523 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -3296,6 +3296,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/git-ref`. public typealias git_hyphen_ref = Components.Schemas.code_hyphen_scanning_hyphen_ref + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/components/parameters/pr-alias`. + public typealias pr_hyphen_alias = Swift.Int /// The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. /// /// - Remark: Generated from `#/components/parameters/alert-number`. @@ -3899,6 +3903,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/ref`. public var ref: Components.Parameters.git_hyphen_ref? + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/pr`. + public var pr: Components.Parameters.pr_hyphen_alias? /// - Remark: Generated from `#/components/parameters/direction`. @frozen public enum direction: String, Codable, Hashable, Sendable { case asc = "asc" @@ -3933,6 +3941,7 @@ public enum Operations { /// - page: The page number of the results to fetch. 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)." /// - per_page: The number of results per page (max 100). 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)." /// - ref: The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + /// - pr: The number of the pull request for the results you want to list. /// - direction: The direction to sort the results by. /// - sort: The property by which to sort the results. /// - state: If specified, only code scanning alerts with this state will be returned. @@ -3943,6 +3952,7 @@ public enum Operations { page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, ref: Components.Parameters.git_hyphen_ref? = nil, + pr: Components.Parameters.pr_hyphen_alias? = nil, direction: Components.Parameters.direction? = nil, sort: Operations.code_hyphen_scanning_sol_list_hyphen_alerts_hyphen_for_hyphen_repo.Input.Query.sortPayload? = nil, state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state_hyphen_query? = nil, @@ -3953,6 +3963,7 @@ public enum Operations { self.page = page self.per_page = per_page self.ref = ref + self.pr = pr self.direction = direction self.sort = sort self.state = state @@ -4717,20 +4728,27 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances/GET/query/ref`. public var ref: Components.Parameters.git_hyphen_ref? + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances/GET/query/pr`. + public var pr: Components.Parameters.pr_hyphen_alias? /// Creates a new `Query`. /// /// - Parameters: /// - page: The page number of the results to fetch. 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)." /// - per_page: The number of results per page (max 100). 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)." /// - ref: The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + /// - pr: The number of the pull request for the results you want to list. public init( page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, - ref: Components.Parameters.git_hyphen_ref? = nil + ref: Components.Parameters.git_hyphen_ref? = nil, + pr: Components.Parameters.pr_hyphen_alias? = nil ) { self.page = page self.per_page = per_page self.ref = ref + self.pr = pr } } public var query: Operations.code_hyphen_scanning_sol_list_hyphen_alert_hyphen_instances.Input.Query @@ -4979,6 +4997,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? + /// The number of the pull request for the results you want to list. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/pr`. + public var pr: Components.Parameters.pr_hyphen_alias? /// The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/ref`. @@ -5011,6 +5033,7 @@ public enum Operations { /// - tool_guid: The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. /// - page: The page number of the results to fetch. 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)." /// - per_page: The number of results per page (max 100). 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)." + /// - pr: The number of the pull request for the results you want to list. /// - ref: The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. /// - sarif_id: Filter analyses belonging to the same SARIF upload. /// - direction: The direction to sort the results by. @@ -5020,6 +5043,7 @@ public enum Operations { tool_guid: Components.Parameters.tool_hyphen_guid? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, + pr: Components.Parameters.pr_hyphen_alias? = nil, ref: Components.Schemas.code_hyphen_scanning_hyphen_ref? = nil, sarif_id: Components.Schemas.code_hyphen_scanning_hyphen_analysis_hyphen_sarif_hyphen_id? = nil, direction: Components.Parameters.direction? = nil, @@ -5029,6 +5053,7 @@ public enum Operations { self.tool_guid = tool_guid self.page = page self.per_page = per_page + self.pr = pr self.ref = ref self.sarif_id = sarif_id self.direction = direction From 796caa71ef454430668f118cd1aef4593fca18f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:49:13 +0000 Subject: [PATCH 031/129] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 170 +++++++++++++++++++-------------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index dd1b77ecbff..8f37d238880 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -4085,91 +4085,6 @@ public enum Components { case html_url } } - /// A GitHub organization. - /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct organization_hyphen_simple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. - public var description: Swift.String? - /// Creates a new `organization_hyphen_simple`. - /// - /// - Parameters: - /// - login: - /// - id: - /// - node_id: - /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - public init( - login: Swift.String, - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, - issues_url: Swift.String, - members_url: Swift.String, - public_members_url: Swift.String, - avatar_url: Swift.String, - description: Swift.String? = nil - ) { - self.login = login - self.id = id - self.node_id = node_id - self.url = url - self.repos_url = repos_url - self.events_url = events_url - self.hooks_url = hooks_url - self.issues_url = issues_url - self.members_url = members_url - self.public_members_url = public_members_url - self.avatar_url = avatar_url - self.description = description - } - public enum CodingKeys: String, CodingKey { - case login - case id - case node_id - case url - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - } - } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. @@ -5183,6 +5098,91 @@ public enum Components { case security_and_analysis } } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `organization_hyphen_simple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - node_id: + /// - url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, + members_url: Swift.String, + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.node_id = node_id + self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case node_id + case url + case repos_url + case events_url + case hooks_url + case issues_url + case members_url + case public_members_url + case avatar_url + case description + } + } /// Organization Full /// /// - Remark: Generated from `#/components/schemas/organization-full`. From 2d605dbcc133ec150f6e0d7be3d6c54c1ed0a939 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:50:16 +0000 Subject: [PATCH 032/129] Commit via running ake Sources/pulls --- Sources/pulls/Client.swift | 1 + Sources/pulls/Types.swift | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Sources/pulls/Client.swift b/Sources/pulls/Client.swift index 0d806b85bb7..3849b3f6274 100644 --- a/Sources/pulls/Client.swift +++ b/Sources/pulls/Client.swift @@ -3094,6 +3094,7 @@ public struct Client: APIProtocol { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 2b0ecccaa7a..1b4851a6dd9 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -394,6 +394,7 @@ public protocol APIProtocol: Sendable { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. @@ -1025,6 +1026,7 @@ extension APIProtocol { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. @@ -13275,6 +13277,7 @@ public enum Operations { /// Update a pull request branch /// /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + /// Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/update-branch/put(pulls/update-branch)`. From d9540c0c7511074c3c29240e45275d25e09667c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:51:21 +0000 Subject: [PATCH 033/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 35 +-- Sources/repos/Types.swift | 495 ++++++++----------------------------- 2 files changed, 111 insertions(+), 419 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index d47ff7f774a..0729e4c8161 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -4575,10 +4575,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -4676,10 +4674,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -4777,10 +4773,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -5365,10 +5359,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -5470,10 +5462,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -5575,10 +5565,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -8255,8 +8243,7 @@ public struct Client: APIProtocol { let chosenContentType = try converter.bestContentType( received: contentType, options: [ - "application/vnd.github.object", - "application/json" + "application/vnd.github.object" ] ) switch chosenContentType { @@ -8268,14 +8255,6 @@ public struct Client: APIProtocol { .application_vnd_period_github_period_object(value) } ) - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.repos_sol_get_hyphen_content.Output.Ok.Body.jsonPayload.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) default: preconditionFailure("bestContentType chose an invalid content type.") } diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 57957a70520..58b0a108c8e 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -2868,7 +2868,7 @@ extension APIProtocol { public func repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Output { try await repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions(Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input( path: path, @@ -2887,7 +2887,7 @@ extension APIProtocol { public func repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Output { try await repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions(Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input( path: path, @@ -2906,7 +2906,7 @@ extension APIProtocol { public func repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Output { try await repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions(Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input( path: path, @@ -3020,7 +3020,7 @@ extension APIProtocol { public func repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Output { try await repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions(Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input( path: path, @@ -3043,7 +3043,7 @@ extension APIProtocol { public func repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Output { try await repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions(Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input( path: path, @@ -3066,7 +3066,7 @@ extension APIProtocol { public func repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions( path: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) async throws -> Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Output { try await repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions(Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input( path: path, @@ -10979,27 +10979,27 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_type`. public var actor_type: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.actor_typePayload - /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. + /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. @frozen public enum bypass_modePayload: String, Codable, Hashable, Sendable { case always = "always" case pull_request = "pull_request" } - /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. + /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. - public var bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload + public var bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload? /// Creates a new `repository_hyphen_ruleset_hyphen_bypass_hyphen_actor`. /// /// - Parameters: /// - actor_id: The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. /// - actor_type: The type of actor that can bypass a ruleset. - /// - bypass_mode: When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. + /// - bypass_mode: When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. public init( actor_id: Swift.Int? = nil, actor_type: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.actor_typePayload, - bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload + bypass_mode: Components.Schemas.repository_hyphen_ruleset_hyphen_bypass_hyphen_actor.bypass_modePayload? = nil ) { self.actor_id = actor_id self.actor_type = actor_type @@ -11229,7 +11229,9 @@ public enum Components { case repository_property } } - /// Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. + /// Conditions for an organization ruleset. + /// The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties. + /// The push rulesets conditions object does not require the `ref_name` property. /// /// - Remark: Generated from `#/components/schemas/org-ruleset-conditions`. @frozen public enum org_hyphen_ruleset_hyphen_conditions: Codable, Hashable, Sendable { @@ -32773,61 +32775,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case1/apps`. - public var apps: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - public init(apps: [Swift.String]) { - self.apps = apps - } - public enum CodingKeys: String, CodingKey { - case apps - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case1`. - case case1(Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/json/apps`. + public var apps: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + public init(apps: [Swift.String]) { + self.apps = apps } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case apps } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/POST/requestBody/content/application\/json`. case json(Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -32837,7 +32804,7 @@ public enum Operations { public init( path: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -33007,61 +32974,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case1/apps`. - public var apps: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - public init(apps: [Swift.String]) { - self.apps = apps - } - public enum CodingKeys: String, CodingKey { - case apps - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case1`. - case case1(Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/json/apps`. + public var apps: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + public init(apps: [Swift.String]) { + self.apps = apps } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case apps } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/PUT/requestBody/content/application\/json`. case json(Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -33071,7 +33003,7 @@ public enum Operations { public init( path: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -33241,61 +33173,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case1/apps`. - public var apps: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. - public init(apps: [Swift.String]) { - self.apps = apps - } - public enum CodingKeys: String, CodingKey { - case apps - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case1`. - case case1(Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/json/apps`. + public var apps: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - apps: The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + public init(apps: [Swift.String]) { + self.apps = apps } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case apps } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps/DELETE/requestBody/content/application\/json`. case json(Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -33305,7 +33202,7 @@ public enum Operations { public init( path: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_app_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -34533,61 +34430,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The username for users - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case1/users`. - public var users: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - users: The username for users - public init(users: [Swift.String]) { - self.users = users - } - public enum CodingKeys: String, CodingKey { - case users - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case1`. - case case1(Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The username for users + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/json/users`. + public var users: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - users: The username for users + public init(users: [Swift.String]) { + self.users = users } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case users } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/POST/requestBody/content/application\/json`. case json(Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -34597,7 +34459,7 @@ public enum Operations { public init( path: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_add_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -34771,61 +34633,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The username for users - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case1/users`. - public var users: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - users: The username for users - public init(users: [Swift.String]) { - self.users = users - } - public enum CodingKeys: String, CodingKey { - case users - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case1`. - case case1(Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The username for users + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/json/users`. + public var users: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - users: The username for users + public init(users: [Swift.String]) { + self.users = users } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case users } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/PUT/requestBody/content/application\/json`. case json(Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -34835,7 +34662,7 @@ public enum Operations { public init( path: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_set_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -35009,61 +34836,26 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The username for users - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case1/users`. - public var users: [Swift.String] - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - users: The username for users - public init(users: [Swift.String]) { - self.users = users - } - public enum CodingKeys: String, CodingKey { - case users - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case1`. - case case1(Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + public struct jsonPayload: Codable, Hashable, Sendable { + /// The username for users + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/json/users`. + public var users: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - users: The username for users + public init(users: [Swift.String]) { + self.users = users } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } + public enum CodingKeys: String, CodingKey { + case users } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users/DELETE/requestBody/content/application\/json`. case json(Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body.jsonPayload) } - public var body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? + public var body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -35073,7 +34865,7 @@ public enum Operations { public init( path: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Path, headers: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Headers = .init(), - body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body? = nil + body: Operations.repos_sol_remove_hyphen_user_hyphen_access_hyphen_restrictions.Input.Body ) { self.path = path self.headers = headers @@ -39909,85 +39701,6 @@ public enum Operations { switch self { case let .application_vnd_period_github_period_object(body): return body - default: - try throwUnexpectedResponseBody( - expectedContent: "application/vnd.github.object", - body: self - ) - } - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json`. - @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case1`. - case content_hyphen_directory(Components.Schemas.content_hyphen_directory) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case2`. - case content_hyphen_file(Components.Schemas.content_hyphen_file) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case3`. - case content_hyphen_symlink(Components.Schemas.content_hyphen_symlink) - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/json/case4`. - case content_hyphen_submodule(Components.Schemas.content_hyphen_submodule) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .content_hyphen_directory(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - do { - self = .content_hyphen_file(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .content_hyphen_symlink(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .content_hyphen_submodule(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .content_hyphen_directory(value): - try encoder.encodeToSingleValueContainer(value) - case let .content_hyphen_file(value): - try value.encode(to: encoder) - case let .content_hyphen_symlink(value): - try value.encode(to: encoder) - case let .content_hyphen_submodule(value): - try value.encode(to: encoder) - } - } - } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/GET/responses/200/content/application\/json`. - case json(Operations.repos_sol_get_hyphen_content.Output.Ok.Body.jsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.repos_sol_get_hyphen_content.Output.Ok.Body.jsonPayload { - get throws { - switch self { - case let .json(body): - return body - default: - try throwUnexpectedResponseBody( - expectedContent: "application/json", - body: self - ) } } } From 18395b1a8e9a40dff07b2522ade7d74e8037b0de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:53:28 +0000 Subject: [PATCH 034/129] Commit via running ake Sources/copilot --- Sources/copilot/Types.swift | 104 ++++++++---------------------------- 1 file changed, 23 insertions(+), 81 deletions(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 977bb18d727..389eebee9d1 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -779,33 +779,33 @@ public enum Components { } /// A GitHub organization. /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct organization_hyphen_simple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple`. + public struct nullable_hyphen_organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/login`. public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/repos_url`. public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/events_url`. public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/hooks_url`. public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/issues_url`. public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/members_url`. public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/public_members_url`. public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/avatar_url`. public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + /// - Remark: Generated from `#/components/schemas/nullable-organization-simple/description`. public var description: Swift.String? - /// Creates a new `organization_hyphen_simple`. + /// Creates a new `nullable_hyphen_organization_hyphen_simple`. /// /// - Parameters: /// - login: @@ -1184,68 +1184,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details`. public struct copilot_hyphen_seat_hyphen_details: Codable, Hashable, Sendable { - /// The assignee that has been granted access to GitHub Copilot. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. - @frozen public enum assigneePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case1`. - case simple_hyphen_user(Components.Schemas.simple_hyphen_user) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .simple_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .simple_hyphen_user(value): - try value.encode(to: encoder) - } - } - } - /// The assignee that has been granted access to GitHub Copilot. - /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. - public var assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload - /// The organization to which this seat belongs. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. - @frozen public enum organizationPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization/case1`. - case organization_hyphen_simple(Components.Schemas.organization_hyphen_simple) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .organization_hyphen_simple(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .organization_hyphen_simple(value): - try value.encode(to: encoder) - } - } - } - /// The organization to which this seat belongs. - /// + public var assignee: Components.Schemas.simple_hyphen_user /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. - public var organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? + public var organization: Components.Schemas.nullable_hyphen_organization_hyphen_simple? /// The team through which the assignee is granted access to GitHub Copilot, if applicable. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. @@ -1310,8 +1252,8 @@ public enum Components { /// Creates a new `copilot_hyphen_seat_hyphen_details`. /// /// - Parameters: - /// - assignee: The assignee that has been granted access to GitHub Copilot. - /// - organization: The organization to which this seat belongs. + /// - assignee: + /// - organization: /// - assigning_team: The team through which the assignee is granted access to GitHub Copilot, if applicable. /// - pending_cancellation_date: The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. /// - last_activity_at: Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. @@ -1319,8 +1261,8 @@ public enum Components { /// - created_at: Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. /// - updated_at: Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. public init( - assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload, - organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? = nil, + assignee: Components.Schemas.simple_hyphen_user, + organization: Components.Schemas.nullable_hyphen_organization_hyphen_simple? = nil, assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? = nil, pending_cancellation_date: Swift.String? = nil, last_activity_at: Foundation.Date? = nil, @@ -1350,11 +1292,11 @@ public enum Components { public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) assignee = try container.decode( - Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload.self, + Components.Schemas.simple_hyphen_user.self, forKey: .assignee ) organization = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload.self, + Components.Schemas.nullable_hyphen_organization_hyphen_simple.self, forKey: .organization ) assigning_team = try container.decodeIfPresent( From d32bb092fbc0f85374ce163f374f6879a3c67647 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 30 Sep 2024 21:54:31 +0000 Subject: [PATCH 035/129] Commit via running ake Sources/classroom --- Sources/classroom/Client.swift | 8 +++--- Sources/classroom/Types.swift | 50 +++++++++++++++++----------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Sources/classroom/Client.swift b/Sources/classroom/Client.swift index d1897771cd4..783acbf5322 100644 --- a/Sources/classroom/Client.swift +++ b/Sources/classroom/Client.swift @@ -129,11 +129,11 @@ public struct Client: APIProtocol { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - public func classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output { + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + public func classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output { try await client.send( input: input, - forOperation: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.id, + forOperation: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.id, serializer: { input in let path = try converter.renderedPath( template: "/assignments/{}/accepted_assignments", @@ -170,7 +170,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body + let body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ diff --git a/Sources/classroom/Types.swift b/Sources/classroom/Types.swift index 64f7c02223f..27a08163617 100644 --- a/Sources/classroom/Types.swift +++ b/Sources/classroom/Types.swift @@ -23,8 +23,8 @@ public protocol APIProtocol: Sendable { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - func classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + func classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment(_ input: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output /// Get assignment grades /// /// Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. @@ -77,13 +77,13 @@ extension APIProtocol { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - public func classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment( - path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, - query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), - headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() - ) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output { - try await classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment(Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input( + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + public func classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment( + path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, + query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), + headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() + ) async throws -> Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output { + try await classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment(Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input( path: path, query: query, headers: headers @@ -1168,9 +1168,9 @@ public enum Operations { /// Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. /// /// - Remark: HTTP `GET /assignments/{assignment_id}/accepted_assignments`. - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)`. - public enum classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment { - public static let id: Swift.String = "classroom/list-accepted-assigments-for-an-assignment" + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)`. + public enum classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment { + public static let id: Swift.String = "classroom/list-accepted-assignments-for-an-assignment" public struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/assignments/{assignment_id}/accepted_assignments/GET/path`. public struct Path: Sendable, Hashable { @@ -1186,7 +1186,7 @@ public enum Operations { self.assignment_id = assignment_id } } - public var path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path + public var path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path /// - Remark: Generated from `#/paths/assignments/{assignment_id}/accepted_assignments/GET/query`. public struct Query: Sendable, Hashable { /// The page number of the results to fetch. 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)." @@ -1210,19 +1210,19 @@ public enum Operations { self.per_page = per_page } } - public var query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query + public var query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query /// - Remark: Generated from `#/paths/assignments/{assignment_id}/accepted_assignments/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers + public var headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -1230,9 +1230,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, - query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), - headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() + path: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Path, + query: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Query = .init(), + headers: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Input.Headers = .init() ) { self.path = path self.query = query @@ -1259,26 +1259,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body + public var body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body) { + public init(body: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assigments-for-an-assignment)/responses/200`. + /// - Remark: Generated from `#/paths//assignments/{assignment_id}/accepted_assignments/get(classroom/list-accepted-assignments-for-an-assignment)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok) + case ok(Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.classroom_sol_list_hyphen_accepted_hyphen_assigments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok { + public var ok: Operations.classroom_sol_list_hyphen_accepted_hyphen_assignments_hyphen_for_hyphen_an_hyphen_assignment.Output.Ok { get throws { switch self { case let .ok(response): From c934b533a0feb967b53cff850d0df2a95ba82d1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 22:00:01 +0000 Subject: [PATCH 036/129] Bump Submodule/github/rest-api-description from `aa5e982` to `6b266a1` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `aa5e982` to `6b266a1`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/aa5e982025ea1f38241ba0319f72b512abf51896...6b266a1120ab13e630a3606d1906a62b44d6db36) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index aa5e982025e..6b266a1120a 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit aa5e982025ea1f38241ba0319f72b512abf51896 +Subproject commit 6b266a1120ab13e630a3606d1906a62b44d6db36 From 8621c4f9eaa614fa40a40c942c522b078de9454e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 7 Oct 2024 22:21:38 +0000 Subject: [PATCH 037/129] Commit via running ake Sources/issues --- Sources/issues/Client.swift | 2 +- Sources/issues/Types.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/issues/Client.swift b/Sources/issues/Client.swift index 8511215829f..9b6e5a7eb50 100644 --- a/Sources/issues/Client.swift +++ b/Sources/issues/Client.swift @@ -1844,7 +1844,7 @@ public struct Client: APIProtocol { } /// Update an issue /// - /// Issue owners and users with push access can edit an issue. + /// Issue owners and users with push access or Triage role can edit an issue. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 205062939b1..ba237ec6911 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -188,7 +188,7 @@ public protocol APIProtocol: Sendable { func issues_sol_get(_ input: Operations.issues_sol_get.Input) async throws -> Operations.issues_sol_get.Output /// Update an issue /// - /// Issue owners and users with push access can edit an issue. + /// Issue owners and users with push access or Triage role can edit an issue. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -712,7 +712,7 @@ extension APIProtocol { } /// Update an issue /// - /// Issue owners and users with push access can edit an issue. + /// Issue owners and users with push access or Triage role can edit an issue. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -11579,7 +11579,7 @@ public enum Operations { } /// Update an issue /// - /// Issue owners and users with push access can edit an issue. + /// Issue owners and users with push access or Triage role can edit an issue. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// From f1971ac56e92e92495fcc9919114d797bea9cfd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 7 Oct 2024 22:24:07 +0000 Subject: [PATCH 038/129] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 8f37d238880..88c91593325 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -7050,7 +7050,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/fine-grained-personal-access-token-id`. public typealias fine_hyphen_grained_hyphen_personal_hyphen_access_hyphen_token_hyphen_id = Swift.Int - /// The custom property name. The name is case sensitive. + /// The custom property name /// /// - Remark: Generated from `#/components/parameters/custom-property-name`. public typealias custom_hyphen_property_hyphen_name = Swift.String @@ -18497,7 +18497,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/GET/path/org`. public var org: Components.Parameters.org - /// The custom property name. The name is case sensitive. + /// The custom property name /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/GET/path/custom_property_name`. public var custom_property_name: Components.Parameters.custom_hyphen_property_hyphen_name @@ -18505,7 +18505,7 @@ public enum Operations { /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - /// - custom_property_name: The custom property name. The name is case sensitive. + /// - custom_property_name: The custom property name public init( org: Components.Parameters.org, custom_property_name: Components.Parameters.custom_hyphen_property_hyphen_name @@ -18688,7 +18688,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/PUT/path/org`. public var org: Components.Parameters.org - /// The custom property name. The name is case sensitive. + /// The custom property name /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/PUT/path/custom_property_name`. public var custom_property_name: Components.Parameters.custom_hyphen_property_hyphen_name @@ -18696,7 +18696,7 @@ public enum Operations { /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - /// - custom_property_name: The custom property name. The name is case sensitive. + /// - custom_property_name: The custom property name public init( org: Components.Parameters.org, custom_property_name: Components.Parameters.custom_hyphen_property_hyphen_name @@ -18986,7 +18986,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/DELETE/path/org`. public var org: Components.Parameters.org - /// The custom property name. The name is case sensitive. + /// The custom property name /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/DELETE/path/custom_property_name`. public var custom_property_name: Components.Parameters.custom_hyphen_property_hyphen_name @@ -18994,7 +18994,7 @@ public enum Operations { /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - /// - custom_property_name: The custom property name. The name is case sensitive. + /// - custom_property_name: The custom property name public init( org: Components.Parameters.org, custom_property_name: Components.Parameters.custom_hyphen_property_hyphen_name From e1fa40f26ed2ed6954822960e9fcb57e5c062192 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 7 Oct 2024 22:28:23 +0000 Subject: [PATCH 039/129] Commit via running ake Sources/copilot --- Sources/copilot/Types.swift | 52 ++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 389eebee9d1..b488e20f49f 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -1249,6 +1249,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/updated_at`. public var updated_at: Foundation.Date? + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/plan_type`. + @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable { + case business = "business" + case enterprise = "enterprise" + case unknown = "unknown" + } + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/plan_type`. + public var plan_type: Components.Schemas.copilot_hyphen_seat_hyphen_details.plan_typePayload? /// Creates a new `copilot_hyphen_seat_hyphen_details`. /// /// - Parameters: @@ -1260,6 +1272,7 @@ public enum Components { /// - last_activity_editor: Last editor that was used by the user for a GitHub Copilot completion. /// - created_at: Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. /// - updated_at: Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + /// - plan_type: The Copilot plan of the organization, or the parent enterprise, when applicable. public init( assignee: Components.Schemas.simple_hyphen_user, organization: Components.Schemas.nullable_hyphen_organization_hyphen_simple? = nil, @@ -1268,7 +1281,8 @@ public enum Components { last_activity_at: Foundation.Date? = nil, last_activity_editor: Swift.String? = nil, created_at: Foundation.Date, - updated_at: Foundation.Date? = nil + updated_at: Foundation.Date? = nil, + plan_type: Components.Schemas.copilot_hyphen_seat_hyphen_details.plan_typePayload? = nil ) { self.assignee = assignee self.organization = organization @@ -1278,6 +1292,7 @@ public enum Components { self.last_activity_editor = last_activity_editor self.created_at = created_at self.updated_at = updated_at + self.plan_type = plan_type } public enum CodingKeys: String, CodingKey { case assignee @@ -1288,6 +1303,7 @@ public enum Components { case last_activity_editor case created_at case updated_at + case plan_type } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) @@ -1323,6 +1339,10 @@ public enum Components { Foundation.Date.self, forKey: .updated_at ) + plan_type = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_seat_hyphen_details.plan_typePayload.self, + forKey: .plan_type + ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "assignee", "organization", @@ -1331,7 +1351,8 @@ public enum Components { "last_activity_at", "last_activity_editor", "created_at", - "updated_at" + "updated_at", + "plan_type" ]) } } @@ -1762,6 +1783,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. public var seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/plan_type`. + @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable { + case business = "business" + case enterprise = "enterprise" + case unknown = "unknown" + } + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/plan_type`. + public var plan_type: Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload? /// A container of undocumented properties. public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer /// Creates a new `copilot_hyphen_organization_hyphen_details`. @@ -1773,6 +1806,7 @@ public enum Components { /// - platform_chat: The organization policy for allowing or disallowing organization members to use Copilot features within github.com. /// - cli: The organization policy for allowing or disallowing organization members to use Copilot within their CLI. /// - seat_management_setting: The mode of assigning new seats. + /// - plan_type: The Copilot plan of the organization, or the parent enterprise, when applicable. /// - additionalProperties: A container of undocumented properties. public init( seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown, @@ -1781,6 +1815,7 @@ public enum Components { platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? = nil, cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? = nil, seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload, + plan_type: Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload? = nil, additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { self.seat_breakdown = seat_breakdown @@ -1789,6 +1824,7 @@ public enum Components { self.platform_chat = platform_chat self.cli = cli self.seat_management_setting = seat_management_setting + self.plan_type = plan_type self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { @@ -1798,6 +1834,7 @@ public enum Components { case platform_chat case cli case seat_management_setting + case plan_type } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) @@ -1825,13 +1862,18 @@ public enum Components { Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self, forKey: .seat_management_setting ) + plan_type = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload.self, + forKey: .plan_type + ) additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ "seat_breakdown", "public_code_suggestions", "ide_chat", "platform_chat", "cli", - "seat_management_setting" + "seat_management_setting", + "plan_type" ]) } public func encode(to encoder: any Encoder) throws { @@ -1860,6 +1902,10 @@ public enum Components { seat_management_setting, forKey: .seat_management_setting ) + try container.encodeIfPresent( + plan_type, + forKey: .plan_type + ) try encoder.encodeAdditionalProperties(additionalProperties) } } From 282c6236bf7606ada9e5fb73e3b0c4d83e12ee30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:08:08 +0000 Subject: [PATCH 040/129] Bump Submodule/github/rest-api-description from `6b266a1` to `5b32856` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `6b266a1` to `5b32856`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/6b266a1120ab13e630a3606d1906a62b44d6db36...5b32856c2a9e0b8bf9ec957b5a7d46afa6e6d8f4) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 6b266a1120a..5b32856c2a9 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 6b266a1120ab13e630a3606d1906a62b44d6db36 +Subproject commit 5b32856c2a9e0b8bf9ec957b5a7d46afa6e6d8f4 From 09c40c9413de3b784e64f0a14d7f8559c2f0a8e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 14 Oct 2024 21:32:21 +0000 Subject: [PATCH 041/129] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 88c91593325..0a8b499493a 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -5249,8 +5249,6 @@ public enum Components { public var private_gists: Swift.Int? /// - Remark: Generated from `#/components/schemas/organization-full/disk_usage`. public var disk_usage: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/collaborators`. - public var collaborators: Swift.Int? /// - Remark: Generated from `#/components/schemas/organization-full/billing_email`. public var billing_email: Swift.String? /// - Remark: Generated from `#/components/schemas/organization-full/plan`. @@ -5422,7 +5420,6 @@ public enum Components { /// - owned_private_repos: /// - private_gists: /// - disk_usage: - /// - collaborators: /// - billing_email: /// - plan: /// - default_repository_permission: @@ -5480,7 +5477,6 @@ public enum Components { owned_private_repos: Swift.Int? = nil, private_gists: Swift.Int? = nil, disk_usage: Swift.Int? = nil, - collaborators: Swift.Int? = nil, billing_email: Swift.String? = nil, plan: Components.Schemas.organization_hyphen_full.planPayload? = nil, default_repository_permission: Swift.String? = nil, @@ -5538,7 +5534,6 @@ public enum Components { self.owned_private_repos = owned_private_repos self.private_gists = private_gists self.disk_usage = disk_usage - self.collaborators = collaborators self.billing_email = billing_email self.plan = plan self.default_repository_permission = default_repository_permission @@ -5597,7 +5592,6 @@ public enum Components { case owned_private_repos case private_gists case disk_usage - case collaborators case billing_email case plan case default_repository_permission From 6e44aa9eb7f172551657eebbf121295a601314dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 14 Oct 2024 21:34:29 +0000 Subject: [PATCH 042/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 14 ++++++++++++++ Sources/repos/Types.swift | 31 +++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 0729e4c8161..778cbd9dda3 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -311,6 +311,13 @@ public struct Client: APIProtocol { name: "page", value: input.query.page ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "targets", + value: input.query.targets + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -16141,6 +16148,13 @@ public struct Client: APIProtocol { name: "includes_parents", value: input.query.includes_parents ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "targets", + value: input.query.targets + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 58b0a108c8e..32d32fa51e6 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -22113,6 +22113,13 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/invitation-id`. public typealias invitation_hyphen_id = Swift.Int + /// A comma-separated list of rule targets to filter by. + /// If provided, only rulesets that apply to the specified targets will be returned. + /// For example, `branch,tag,push`. + /// + /// + /// - Remark: Generated from `#/components/parameters/ruleset-targets`. + public typealias ruleset_hyphen_targets = Swift.String /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// /// - Remark: Generated from `#/components/parameters/ref-in-query`. @@ -23442,17 +23449,27 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/GET/query/page`. public var page: Components.Parameters.page? + /// A comma-separated list of rule targets to filter by. + /// If provided, only rulesets that apply to the specified targets will be returned. + /// For example, `branch,tag,push`. + /// + /// + /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/GET/query/targets`. + public var targets: Components.Parameters.ruleset_hyphen_targets? /// Creates a new `Query`. /// /// - Parameters: /// - per_page: The number of results per page (max 100). 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)." /// - page: The page number of the results to fetch. 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)." + /// - targets: A comma-separated list of rule targets to filter by. public init( per_page: Components.Parameters.per_hyphen_page? = nil, - page: Components.Parameters.page? = nil + page: Components.Parameters.page? = nil, + targets: Components.Parameters.ruleset_hyphen_targets? = nil ) { self.per_page = per_page self.page = page + self.targets = targets } } public var query: Operations.repos_sol_get_hyphen_org_hyphen_rulesets.Input.Query @@ -56553,20 +56570,30 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/GET/query/includes_parents`. public var includes_parents: Swift.Bool? + /// A comma-separated list of rule targets to filter by. + /// If provided, only rulesets that apply to the specified targets will be returned. + /// For example, `branch,tag,push`. + /// + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/GET/query/targets`. + public var targets: Components.Parameters.ruleset_hyphen_targets? /// Creates a new `Query`. /// /// - Parameters: /// - per_page: The number of results per page (max 100). 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)." /// - page: The page number of the results to fetch. 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)." /// - includes_parents: Include rulesets configured at higher levels that apply to this repository + /// - targets: A comma-separated list of rule targets to filter by. public init( per_page: Components.Parameters.per_hyphen_page? = nil, page: Components.Parameters.page? = nil, - includes_parents: Swift.Bool? = nil + includes_parents: Swift.Bool? = nil, + targets: Components.Parameters.ruleset_hyphen_targets? = nil ) { self.per_page = per_page self.page = page self.includes_parents = includes_parents + self.targets = targets } } public var query: Operations.repos_sol_get_hyphen_repo_hyphen_rulesets.Input.Query From 7ec5467493ad67d23b7f05b6354fe448494aec6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:50:13 +0000 Subject: [PATCH 043/129] Bump Submodule/github/rest-api-description from `5b32856` to `cf0948f` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `5b32856` to `cf0948f`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/5b32856c2a9e0b8bf9ec957b5a7d46afa6e6d8f4...cf0948fb6fe2d210da0d003466c82c3aea8783a7) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 5b32856c2a9..cf0948fb6fe 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 5b32856c2a9e0b8bf9ec957b5a7d46afa6e6d8f4 +Subproject commit cf0948fb6fe2d210da0d003466c82c3aea8783a7 From aa7c3ce35e3cb484d247e1099719f6a6d260f6c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:07:13 +0000 Subject: [PATCH 044/129] Commit via running ake Sources/actions --- Sources/actions/Client.swift | 798 ++++++++++++ Sources/actions/Types.swift | 2262 +++++++++++++++++++++++++++++++++- 2 files changed, 3055 insertions(+), 5 deletions(-) diff --git a/Sources/actions/Client.swift b/Sources/actions/Client.swift index add941952b2..904b4653304 100644 --- a/Sources/actions/Client.swift +++ b/Sources/actions/Client.swift @@ -779,6 +779,804 @@ public struct Client: APIProtocol { } ) } + /// List self-hosted runner groups for an organization + /// + /// Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/get(actions/list-self-hosted-runner-groups-for-org)`. + public func actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org(_ input: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "visible_to_repository", + value: input.query.visible_to_repository + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Create a self-hosted runner group for an organization + /// + /// Creates a new self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/post(actions/create-self-hosted-runner-group-for-org)`. + public func actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.runner_hyphen_groups_hyphen_org.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get a self-hosted runner group for an organization + /// + /// Gets a specific self-hosted runner group for an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/get(actions/get-self-hosted-runner-group-for-org)`. + public func actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}", + parameters: [ + input.path.org, + input.path.runner_group_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.runner_hyphen_groups_hyphen_org.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Update a self-hosted runner group for an organization + /// + /// Updates the `name` and `visibility` of a self-hosted runner group in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/patch(actions/update-self-hosted-runner-group-for-org)`. + public func actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}", + parameters: [ + input.path.org, + input.path.runner_group_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .patch + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.runner_hyphen_groups_hyphen_org.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Delete a self-hosted runner group from an organization + /// + /// Deletes a self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/delete(actions/delete-self-hosted-runner-group-from-org)`. + public func actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org(_ input: Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Input) async throws -> Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}", + parameters: [ + input.path.org, + input.path.runner_group_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// List repository access to a self-hosted runner group in an organization + /// + /// Lists the repositories with access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/get(actions/list-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/repositories", + parameters: [ + input.path.org, + input.path.runner_group_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Set repository access for a self-hosted runner group in an organization + /// + /// Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/put(actions/set-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/repositories", + parameters: [ + input.path.org, + input.path.runner_group_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + suppressMutabilityWarning(&request) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Add repository access to a self-hosted runner group in an organization + /// + /// Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/put(actions/add-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/repositories/{}", + parameters: [ + input.path.org, + input.path.runner_group_id, + input.path.repository_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + suppressMutabilityWarning(&request) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Remove repository access to a self-hosted runner group in an organization + /// + /// Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/delete(actions/remove-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/repositories/{}", + parameters: [ + input.path.org, + input.path.runner_group_id, + input.path.repository_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// List self-hosted runners in a group for an organization + /// + /// Lists self-hosted runners that are in a specific organization group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/get(actions/list-self-hosted-runners-in-group-for-org)`. + public func actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/runners", + parameters: [ + input.path.org, + input.path.runner_group_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Headers = .init(Link: try converter.getOptionalHeaderFieldAsURI( + in: response.headerFields, + name: "Link", + as: Components.Headers.link.self + )) + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init( + headers: headers, + body: body + )) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Set self-hosted runners in a group for an organization + /// + /// Replaces the list of self-hosted runners that are part of an organization runner group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/put(actions/set-self-hosted-runners-in-group-for-org)`. + public func actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/runners", + parameters: [ + input.path.org, + input.path.runner_group_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + suppressMutabilityWarning(&request) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Add a self-hosted runner to a group for an organization + /// + /// Adds a self-hosted runner to a runner group configured in an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/put(actions/add-self-hosted-runner-to-group-for-org)`. + public func actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/runners/{}", + parameters: [ + input.path.org, + input.path.runner_group_id, + input.path.runner_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + suppressMutabilityWarning(&request) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Remove a self-hosted runner from a group for an organization + /// + /// Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/delete(actions/remove-self-hosted-runner-from-group-for-org)`. + public func actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/runner-groups/{}/runners/{}", + parameters: [ + input.path.org, + input.path.runner_group_id, + input.path.runner_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// List self-hosted runners for an organization /// /// Lists all self-hosted runners configured in an organization. diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index b81f0496849..220613fe563 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -126,6 +126,123 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `PUT /orgs/{org}/actions/permissions/workflow`. /// - Remark: Generated from `#/paths//orgs/{org}/actions/permissions/workflow/put(actions/set-github-actions-default-workflow-permissions-organization)`. func actions_sol_set_hyphen_github_hyphen_actions_hyphen_default_hyphen_workflow_hyphen_permissions_hyphen_organization(_ input: Operations.actions_sol_set_hyphen_github_hyphen_actions_hyphen_default_hyphen_workflow_hyphen_permissions_hyphen_organization.Input) async throws -> Operations.actions_sol_set_hyphen_github_hyphen_actions_hyphen_default_hyphen_workflow_hyphen_permissions_hyphen_organization.Output + /// List self-hosted runner groups for an organization + /// + /// Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/get(actions/list-self-hosted-runner-groups-for-org)`. + func actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org(_ input: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output + /// Create a self-hosted runner group for an organization + /// + /// Creates a new self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/post(actions/create-self-hosted-runner-group-for-org)`. + func actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output + /// Get a self-hosted runner group for an organization + /// + /// Gets a specific self-hosted runner group for an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/get(actions/get-self-hosted-runner-group-for-org)`. + func actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output + /// Update a self-hosted runner group for an organization + /// + /// Updates the `name` and `visibility` of a self-hosted runner group in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/patch(actions/update-self-hosted-runner-group-for-org)`. + func actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output + /// Delete a self-hosted runner group from an organization + /// + /// Deletes a self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/delete(actions/delete-self-hosted-runner-group-from-org)`. + func actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org(_ input: Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Input) async throws -> Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Output + /// List repository access to a self-hosted runner group in an organization + /// + /// Lists the repositories with access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/get(actions/list-repo-access-to-self-hosted-runner-group-in-org)`. + func actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output + /// Set repository access for a self-hosted runner group in an organization + /// + /// Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/put(actions/set-repo-access-to-self-hosted-runner-group-in-org)`. + func actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output + /// Add repository access to a self-hosted runner group in an organization + /// + /// Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/put(actions/add-repo-access-to-self-hosted-runner-group-in-org)`. + func actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output + /// Remove repository access to a self-hosted runner group in an organization + /// + /// Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/delete(actions/remove-repo-access-to-self-hosted-runner-group-in-org)`. + func actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(_ input: Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input) async throws -> Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output + /// List self-hosted runners in a group for an organization + /// + /// Lists self-hosted runners that are in a specific organization group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/get(actions/list-self-hosted-runners-in-group-for-org)`. + func actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output + /// Set self-hosted runners in a group for an organization + /// + /// Replaces the list of self-hosted runners that are part of an organization runner group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/put(actions/set-self-hosted-runners-in-group-for-org)`. + func actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output + /// Add a self-hosted runner to a group for an organization + /// + /// Adds a self-hosted runner to a runner group configured in an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/put(actions/add-self-hosted-runner-to-group-for-org)`. + func actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Output + /// Remove a self-hosted runner from a group for an organization + /// + /// Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/delete(actions/remove-self-hosted-runner-from-group-for-org)`. + func actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org(_ input: Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Input) async throws -> Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Output /// List self-hosted runners for an organization /// /// Lists all self-hosted runners configured in an organization. @@ -1595,6 +1712,207 @@ extension APIProtocol { body: body )) } + /// List self-hosted runner groups for an organization + /// + /// Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/get(actions/list-self-hosted-runner-groups-for-org)`. + public func actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org( + path: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Path, + query: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Headers = .init() + ) async throws -> Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output { + try await actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org(Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input( + path: path, + query: query, + headers: headers + )) + } + /// Create a self-hosted runner group for an organization + /// + /// Creates a new self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/post(actions/create-self-hosted-runner-group-for-org)`. + public func actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org( + path: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path, + headers: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init(), + body: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body + ) async throws -> Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output { + try await actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input( + path: path, + headers: headers, + body: body + )) + } + /// Get a self-hosted runner group for an organization + /// + /// Gets a specific self-hosted runner group for an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/get(actions/get-self-hosted-runner-group-for-org)`. + public func actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org( + path: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path, + headers: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init() + ) async throws -> Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output { + try await actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input( + path: path, + headers: headers + )) + } + /// Update a self-hosted runner group for an organization + /// + /// Updates the `name` and `visibility` of a self-hosted runner group in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/patch(actions/update-self-hosted-runner-group-for-org)`. + public func actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org( + path: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path, + headers: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init(), + body: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body + ) async throws -> Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output { + try await actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org(Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input( + path: path, + headers: headers, + body: body + )) + } + /// Delete a self-hosted runner group from an organization + /// + /// Deletes a self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/delete(actions/delete-self-hosted-runner-group-from-org)`. + public func actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org(path: Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Input.Path) async throws -> Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Output { + try await actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org(Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Input(path: path)) + } + /// List repository access to a self-hosted runner group in an organization + /// + /// Lists the repositories with access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/get(actions/list-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org( + path: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path, + query: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Query = .init(), + headers: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Headers = .init() + ) async throws -> Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input( + path: path, + query: query, + headers: headers + )) + } + /// Set repository access for a self-hosted runner group in an organization + /// + /// Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/put(actions/set-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org( + path: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path, + body: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Body + ) async throws -> Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input( + path: path, + body: body + )) + } + /// Add repository access to a self-hosted runner group in an organization + /// + /// Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/put(actions/add-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(path: Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path) async throws -> Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input(path: path)) + } + /// Remove repository access to a self-hosted runner group in an organization + /// + /// Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/delete(actions/remove-repo-access-to-self-hosted-runner-group-in-org)`. + public func actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(path: Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path) async throws -> Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output { + try await actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org(Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input(path: path)) + } + /// List self-hosted runners in a group for an organization + /// + /// Lists self-hosted runners that are in a specific organization group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/get(actions/list-self-hosted-runners-in-group-for-org)`. + public func actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org( + path: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Path, + query: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init() + ) async throws -> Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output { + try await actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org(Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input( + path: path, + query: query, + headers: headers + )) + } + /// Set self-hosted runners in a group for an organization + /// + /// Replaces the list of self-hosted runners that are part of an organization runner group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/put(actions/set-self-hosted-runners-in-group-for-org)`. + public func actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org( + path: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Path, + body: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Body + ) async throws -> Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output { + try await actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org(Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input( + path: path, + body: body + )) + } + /// Add a self-hosted runner to a group for an organization + /// + /// Adds a self-hosted runner to a runner group configured in an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/put(actions/add-self-hosted-runner-to-group-for-org)`. + public func actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org(path: Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Input.Path) async throws -> Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Output { + try await actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org(Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Input(path: path)) + } + /// Remove a self-hosted runner from a group for an organization + /// + /// Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/delete(actions/remove-self-hosted-runner-from-group-for-org)`. + public func actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org(path: Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Input.Path) async throws -> Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Output { + try await actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org(Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Input(path: path)) + } /// List self-hosted runners for an organization /// /// Lists all self-hosted runners configured in an organization. @@ -3775,6 +4093,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -3799,6 +4119,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -3820,7 +4141,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -3843,6 +4165,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -3866,6 +4189,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -3982,6 +4306,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -4006,6 +4332,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -4027,7 +4354,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -4050,6 +4378,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -4073,6 +4402,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Scim Error @@ -4421,7 +4751,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -4609,7 +4939,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -5550,6 +5880,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -5558,18 +5910,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -5577,6 +5932,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -6424,6 +6780,103 @@ public enum Components { case can_approve_pull_request_reviews } } + /// - Remark: Generated from `#/components/schemas/runner-groups-org`. + public struct runner_hyphen_groups_hyphen_org: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/runner-groups-org/id`. + public var id: Swift.Double + /// - Remark: Generated from `#/components/schemas/runner-groups-org/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/runner-groups-org/visibility`. + public var visibility: Swift.String + /// - Remark: Generated from `#/components/schemas/runner-groups-org/default`. + public var _default: Swift.Bool + /// Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` + /// + /// - Remark: Generated from `#/components/schemas/runner-groups-org/selected_repositories_url`. + public var selected_repositories_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/runner-groups-org/runners_url`. + public var runners_url: Swift.String + /// - Remark: Generated from `#/components/schemas/runner-groups-org/hosted_runners_url`. + public var hosted_runners_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/runner-groups-org/inherited`. + public var inherited: Swift.Bool + /// - Remark: Generated from `#/components/schemas/runner-groups-org/inherited_allows_public_repositories`. + public var inherited_allows_public_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/runner-groups-org/allows_public_repositories`. + public var allows_public_repositories: Swift.Bool + /// If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + /// + /// - Remark: Generated from `#/components/schemas/runner-groups-org/workflow_restrictions_read_only`. + public var workflow_restrictions_read_only: Swift.Bool? + /// If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + /// + /// - Remark: Generated from `#/components/schemas/runner-groups-org/restricted_to_workflows`. + public var restricted_to_workflows: Swift.Bool? + /// List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + /// + /// - Remark: Generated from `#/components/schemas/runner-groups-org/selected_workflows`. + public var selected_workflows: [Swift.String]? + /// Creates a new `runner_hyphen_groups_hyphen_org`. + /// + /// - Parameters: + /// - id: + /// - name: + /// - visibility: + /// - _default: + /// - selected_repositories_url: Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` + /// - runners_url: + /// - hosted_runners_url: + /// - inherited: + /// - inherited_allows_public_repositories: + /// - allows_public_repositories: + /// - workflow_restrictions_read_only: If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + /// - restricted_to_workflows: If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + /// - selected_workflows: List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + public init( + id: Swift.Double, + name: Swift.String, + visibility: Swift.String, + _default: Swift.Bool, + selected_repositories_url: Swift.String? = nil, + runners_url: Swift.String, + hosted_runners_url: Swift.String? = nil, + inherited: Swift.Bool, + inherited_allows_public_repositories: Swift.Bool? = nil, + allows_public_repositories: Swift.Bool, + workflow_restrictions_read_only: Swift.Bool? = nil, + restricted_to_workflows: Swift.Bool? = nil, + selected_workflows: [Swift.String]? = nil + ) { + self.id = id + self.name = name + self.visibility = visibility + self._default = _default + self.selected_repositories_url = selected_repositories_url + self.runners_url = runners_url + self.hosted_runners_url = hosted_runners_url + self.inherited = inherited + self.inherited_allows_public_repositories = inherited_allows_public_repositories + self.allows_public_repositories = allows_public_repositories + self.workflow_restrictions_read_only = workflow_restrictions_read_only + self.restricted_to_workflows = restricted_to_workflows + self.selected_workflows = selected_workflows + } + public enum CodingKeys: String, CodingKey { + case id + case name + case visibility + case _default = "default" + case selected_repositories_url + case runners_url + case hosted_runners_url + case inherited + case inherited_allows_public_repositories + case allows_public_repositories + case workflow_restrictions_read_only + case restricted_to_workflows + case selected_workflows + } + } /// A label for a self hosted runner /// /// - Remark: Generated from `#/components/schemas/runner-label`. @@ -9035,6 +9488,14 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/repository-id`. public typealias repository_hyphen_id = Swift.Int + /// Only return runner groups that are allowed to be used by this repository. + /// + /// - Remark: Generated from `#/components/parameters/visible-to-repository`. + public typealias visible_hyphen_to_hyphen_repository = Swift.String + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/components/parameters/runner-group-id`. + public typealias runner_hyphen_group_hyphen_id = Swift.Int /// Unique identifier of the self-hosted runner. /// /// - Remark: Generated from `#/components/parameters/runner-id`. @@ -11038,6 +11499,1797 @@ public enum Operations { case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } } + /// List self-hosted runner groups for an organization + /// + /// Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/get(actions/list-self-hosted-runner-groups-for-org)`. + public enum actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/list-self-hosted-runner-groups-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/query`. + public struct Query: Sendable, Hashable { + /// The number of results per page (max 100). 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/orgs/{org}/actions/runner-groups/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// The page number of the results to fetch. 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/orgs/{org}/actions/runner-groups/GET/query/page`. + public var page: Components.Parameters.page? + /// Only return runner groups that are allowed to be used by this repository. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/query/visible_to_repository`. + public var visible_to_repository: Components.Parameters.visible_hyphen_to_hyphen_repository? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - per_page: The number of results per page (max 100). 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)." + /// - page: The page number of the results to fetch. 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)." + /// - visible_to_repository: Only return runner groups that are allowed to be used by this repository. + public init( + per_page: Components.Parameters.per_hyphen_page? = nil, + page: Components.Parameters.page? = nil, + visible_to_repository: Components.Parameters.visible_hyphen_to_hyphen_repository? = nil + ) { + self.per_page = per_page + self.page = page + self.visible_to_repository = visible_to_repository + } + } + public var query: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Path, + query: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/responses/200/content/json/total_count`. + public var total_count: Swift.Double + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/responses/200/content/json/runner_groups`. + public var runner_groups: [Components.Schemas.runner_hyphen_groups_hyphen_org] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - total_count: + /// - runner_groups: + public init( + total_count: Swift.Double, + runner_groups: [Components.Schemas.runner_hyphen_groups_hyphen_org] + ) { + self.total_count = total_count + self.runner_groups = runner_groups + } + public enum CodingKeys: String, CodingKey { + case total_count + case runner_groups + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/GET/responses/200/content/application\/json`. + case json(Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/get(actions/list-self-hosted-runner-groups-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_groups_hyphen_for_hyphen_org.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Create a self-hosted runner group for an organization + /// + /// Creates a new self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/actions/runner-groups`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/post(actions/create-self-hosted-runner-group-for-org)`. + public enum actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/create-self-hosted-runner-group-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// Name of the runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/name`. + public var name: Swift.String + /// Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/visibility`. + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + case selected = "selected" + case all = "all" + case _private = "private" + } + /// Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/visibility`. + public var visibility: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body.jsonPayload.visibilityPayload? + /// List of repository IDs that can access the runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/selected_repository_ids`. + public var selected_repository_ids: [Swift.Int]? + /// List of runner IDs to add to the runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/runners`. + public var runners: [Swift.Int]? + /// Whether the runner group can be used by `public` repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/allows_public_repositories`. + public var allows_public_repositories: Swift.Bool? + /// If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/restricted_to_workflows`. + public var restricted_to_workflows: Swift.Bool? + /// List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/selected_workflows`. + public var selected_workflows: [Swift.String]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - name: Name of the runner group. + /// - visibility: Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + /// - selected_repository_ids: List of repository IDs that can access the runner group. + /// - runners: List of runner IDs to add to the runner group. + /// - allows_public_repositories: Whether the runner group can be used by `public` repositories. + /// - restricted_to_workflows: If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + /// - selected_workflows: List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + public init( + name: Swift.String, + visibility: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body.jsonPayload.visibilityPayload? = nil, + selected_repository_ids: [Swift.Int]? = nil, + runners: [Swift.Int]? = nil, + allows_public_repositories: Swift.Bool? = nil, + restricted_to_workflows: Swift.Bool? = nil, + selected_workflows: [Swift.String]? = nil + ) { + self.name = name + self.visibility = visibility + self.selected_repository_ids = selected_repository_ids + self.runners = runners + self.allows_public_repositories = allows_public_repositories + self.restricted_to_workflows = restricted_to_workflows + self.selected_workflows = selected_workflows + } + public enum CodingKeys: String, CodingKey { + case name + case visibility + case selected_repository_ids + case runners + case allows_public_repositories + case restricted_to_workflows + case selected_workflows + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/content/application\/json`. + case json(Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body.jsonPayload) + } + public var body: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path, + headers: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init(), + body: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/responses/201/content/application\/json`. + case json(Components.Schemas.runner_hyphen_groups_hyphen_org) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.runner_hyphen_groups_hyphen_org { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Created.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/post(actions/create-self-hosted-runner-group-for-org)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.actions_sol_create_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get a self-hosted runner group for an organization + /// + /// Gets a specific self-hosted runner group for an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/get(actions/get-self-hosted-runner-group-for-org)`. + public enum actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/get-self-hosted-runner-group-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/GET/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/GET/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + } + } + public var path: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path, + headers: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.runner_hyphen_groups_hyphen_org) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.runner_hyphen_groups_hyphen_org { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/get(actions/get-self-hosted-runner-group-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.actions_sol_get_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Update a self-hosted runner group for an organization + /// + /// Updates the `name` and `visibility` of a self-hosted runner group in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/patch(actions/update-self-hosted-runner-group-for-org)`. + public enum actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/update-self-hosted-runner-group-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + } + } + public var path: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// Name of the runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json/name`. + public var name: Swift.String + /// Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json/visibility`. + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + case selected = "selected" + case all = "all" + case _private = "private" + } + /// Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json/visibility`. + public var visibility: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body.jsonPayload.visibilityPayload? + /// Whether the runner group can be used by `public` repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json/allows_public_repositories`. + public var allows_public_repositories: Swift.Bool? + /// If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json/restricted_to_workflows`. + public var restricted_to_workflows: Swift.Bool? + /// List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json/selected_workflows`. + public var selected_workflows: [Swift.String]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - name: Name of the runner group. + /// - visibility: Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + /// - allows_public_repositories: Whether the runner group can be used by `public` repositories. + /// - restricted_to_workflows: If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + /// - selected_workflows: List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + public init( + name: Swift.String, + visibility: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body.jsonPayload.visibilityPayload? = nil, + allows_public_repositories: Swift.Bool? = nil, + restricted_to_workflows: Swift.Bool? = nil, + selected_workflows: [Swift.String]? = nil + ) { + self.name = name + self.visibility = visibility + self.allows_public_repositories = allows_public_repositories + self.restricted_to_workflows = restricted_to_workflows + self.selected_workflows = selected_workflows + } + public enum CodingKeys: String, CodingKey { + case name + case visibility + case allows_public_repositories + case restricted_to_workflows + case selected_workflows + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/content/application\/json`. + case json(Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body.jsonPayload) + } + public var body: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Path, + headers: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init(), + body: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.runner_hyphen_groups_hyphen_org) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.runner_hyphen_groups_hyphen_org { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/patch(actions/update-self-hosted-runner-group-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.actions_sol_update_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_for_hyphen_org.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Delete a self-hosted runner group from an organization + /// + /// Deletes a self-hosted runner group for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/delete(actions/delete-self-hosted-runner-group-from-org)`. + public enum actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org { + public static let id: Swift.String = "actions/delete-self-hosted-runner-group-from-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/DELETE/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/DELETE/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + } + } + public var path: Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Input.Path) { + self.path = path + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/delete(actions/delete-self-hosted-runner-group-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + } + /// List repository access to a self-hosted runner group in an organization + /// + /// Lists the repositories with access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/get(actions/list-repo-access-to-self-hosted-runner-group-in-org)`. + public enum actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org { + public static let id: Swift.String = "actions/list-repo-access-to-self-hosted-runner-group-in-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + } + } + public var path: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/query`. + public struct Query: Sendable, Hashable { + /// The page number of the results to fetch. 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/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of results per page (max 100). 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/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of results per page (max 100). 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)." + public init( + page: Components.Parameters.page? = nil, + per_page: Components.Parameters.per_hyphen_page? = nil + ) { + self.page = page + self.per_page = per_page + } + } + public var query: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path, + query: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Query = .init(), + headers: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/responses/200/content/json/total_count`. + public var total_count: Swift.Double + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/responses/200/content/json/repositories`. + public var repositories: [Components.Schemas.minimal_hyphen_repository] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - total_count: + /// - repositories: + public init( + total_count: Swift.Double, + repositories: [Components.Schemas.minimal_hyphen_repository] + ) { + self.total_count = total_count + self.repositories = repositories + } + public enum CodingKeys: String, CodingKey { + case total_count + case repositories + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/GET/responses/200/content/application\/json`. + case json(Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/get(actions/list-repo-access-to-self-hosted-runner-group-in-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.actions_sol_list_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Set repository access for a self-hosted runner group in an organization + /// + /// Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/put(actions/set-repo-access-to-self-hosted-runner-group-in-org)`. + public enum actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org { + public static let id: Swift.String = "actions/set-repo-access-to-self-hosted-runner-group-in-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/PUT/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/PUT/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/PUT/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + } + } + public var path: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/PUT/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// List of repository IDs that can access the runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/PUT/requestBody/json/selected_repository_ids`. + public var selected_repository_ids: [Swift.Int] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - selected_repository_ids: List of repository IDs that can access the runner group. + public init(selected_repository_ids: [Swift.Int]) { + self.selected_repository_ids = selected_repository_ids + } + public enum CodingKeys: String, CodingKey { + case selected_repository_ids + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/PUT/requestBody/content/application\/json`. + case json(Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Body.jsonPayload) + } + public var body: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - body: + public init( + path: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path, + body: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Body + ) { + self.path = path + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/put(actions/set-repo-access-to-self-hosted-runner-group-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + } + /// Add repository access to a self-hosted runner group in an organization + /// + /// Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/put(actions/add-repo-access-to-self-hosted-runner-group-in-org)`. + public enum actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org { + public static let id: Swift.String = "actions/add-repo-access-to-self-hosted-runner-group-in-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/PUT/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/PUT/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/PUT/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// The unique identifier of the repository. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/PUT/path/repository_id`. + public var repository_id: Components.Parameters.repository_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + /// - repository_id: The unique identifier of the repository. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id, + repository_id: Components.Parameters.repository_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + self.repository_id = repository_id + } + } + public var path: Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path) { + self.path = path + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/put(actions/add-repo-access-to-self-hosted-runner-group-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + } + /// Remove repository access to a self-hosted runner group in an organization + /// + /// Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/delete(actions/remove-repo-access-to-self-hosted-runner-group-in-org)`. + public enum actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org { + public static let id: Swift.String = "actions/remove-repo-access-to-self-hosted-runner-group-in-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/DELETE/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/DELETE/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// The unique identifier of the repository. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/DELETE/path/repository_id`. + public var repository_id: Components.Parameters.repository_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + /// - repository_id: The unique identifier of the repository. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id, + repository_id: Components.Parameters.repository_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + self.repository_id = repository_id + } + } + public var path: Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Input.Path) { + self.path = path + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/delete(actions/remove-repo-access-to-self-hosted-runner-group-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + } + /// List self-hosted runners in a group for an organization + /// + /// Lists self-hosted runners that are in a specific organization group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/get(actions/list-self-hosted-runners-in-group-for-org)`. + public enum actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/list-self-hosted-runners-in-group-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + } + } + public var path: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/query`. + public struct Query: Sendable, Hashable { + /// The number of results per page (max 100). 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/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// The page number of the results to fetch. 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/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/query/page`. + public var page: Components.Parameters.page? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - per_page: The number of results per page (max 100). 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)." + /// - page: The page number of the results to fetch. 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)." + public init( + per_page: Components.Parameters.per_hyphen_page? = nil, + page: Components.Parameters.page? = nil + ) { + self.per_page = per_page + self.page = page + } + } + public var query: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Path, + query: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/responses/200/headers/Link`. + public var Link: Components.Headers.link? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - Link: + public init(Link: Components.Headers.link? = nil) { + self.Link = Link + } + } + /// Received HTTP response headers + public var headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/responses/200/content/json/total_count`. + public var total_count: Swift.Double + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/responses/200/content/json/runners`. + public var runners: [Components.Schemas.runner] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - total_count: + /// - runners: + public init( + total_count: Swift.Double, + runners: [Components.Schemas.runner] + ) { + self.total_count = total_count + self.runners = runners + } + public enum CodingKeys: String, CodingKey { + case total_count + case runners + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/GET/responses/200/content/application\/json`. + case json(Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Headers = .init(), + body: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok.Body + ) { + self.headers = headers + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/get(actions/list-self-hosted-runners-in-group-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.actions_sol_list_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Set self-hosted runners in a group for an organization + /// + /// Replaces the list of self-hosted runners that are part of an organization runner group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/put(actions/set-self-hosted-runners-in-group-for-org)`. + public enum actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/set-self-hosted-runners-in-group-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/PUT/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/PUT/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/PUT/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + } + } + public var path: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/PUT/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// List of runner IDs to add to the runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/PUT/requestBody/json/runners`. + public var runners: [Swift.Int] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - runners: List of runner IDs to add to the runner group. + public init(runners: [Swift.Int]) { + self.runners = runners + } + public enum CodingKeys: String, CodingKey { + case runners + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/PUT/requestBody/content/application\/json`. + case json(Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Body.jsonPayload) + } + public var body: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - body: + public init( + path: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Path, + body: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Input.Body + ) { + self.path = path + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/put(actions/set-self-hosted-runners-in-group-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + } + /// Add a self-hosted runner to a group for an organization + /// + /// Adds a self-hosted runner to a runner group configured in an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/put(actions/add-self-hosted-runner-to-group-for-org)`. + public enum actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/add-self-hosted-runner-to-group-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/PUT/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/PUT/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/PUT/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Unique identifier of the self-hosted runner. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/PUT/path/runner_id`. + public var runner_id: Components.Parameters.runner_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + /// - runner_id: Unique identifier of the self-hosted runner. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id, + runner_id: Components.Parameters.runner_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + self.runner_id = runner_id + } + } + public var path: Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Input.Path) { + self.path = path + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/put(actions/add-self-hosted-runner-to-group-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + } + /// Remove a self-hosted runner from a group for an organization + /// + /// Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/delete(actions/remove-self-hosted-runner-from-group-for-org)`. + public enum actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org { + public static let id: Swift.String = "actions/remove-self-hosted-runner-from-group-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/DELETE/path/org`. + public var org: Components.Parameters.org + /// Unique identifier of the self-hosted runner group. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/DELETE/path/runner_group_id`. + public var runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id + /// Unique identifier of the self-hosted runner. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/DELETE/path/runner_id`. + public var runner_id: Components.Parameters.runner_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - runner_group_id: Unique identifier of the self-hosted runner group. + /// - runner_id: Unique identifier of the self-hosted runner. + public init( + org: Components.Parameters.org, + runner_group_id: Components.Parameters.runner_hyphen_group_hyphen_id, + runner_id: Components.Parameters.runner_hyphen_id + ) { + self.org = org + self.runner_group_id = runner_group_id + self.runner_id = runner_id + } + } + public var path: Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Input.Path) { + self.path = path + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/delete(actions/remove-self-hosted-runner-from-group-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + } /// List self-hosted runners for an organization /// /// Lists all self-hosted runners configured in an organization. From b0470360a3e0b5784e11665882fe870f7a37ca64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:07:34 +0000 Subject: [PATCH 045/129] Commit via running ake Sources/activity --- Sources/activity/Types.swift | 48 ++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index e764875c002..bccbb3c7352 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -889,6 +889,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -913,6 +915,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -934,7 +937,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -957,6 +961,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -980,6 +985,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1065,6 +1071,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1089,6 +1097,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1110,7 +1119,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1133,6 +1143,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1156,6 +1167,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error @@ -1580,7 +1592,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -1768,7 +1780,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -3547,6 +3559,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -3555,18 +3589,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -3574,6 +3611,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository From 78512e380ba4c9a3ae9d90aa1911c8cb9a850352 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:07:55 +0000 Subject: [PATCH 046/129] Commit via running ake Sources/apps --- Sources/apps/Types.swift | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index cf1b9cc4451..7c320828b2e 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -1027,6 +1027,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -1051,6 +1053,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1072,7 +1075,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1095,6 +1099,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1118,6 +1123,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1234,6 +1240,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1258,6 +1266,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1279,7 +1288,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1302,6 +1312,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1325,6 +1336,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. @@ -2654,13 +2666,13 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`. public var organization_custom_properties: Components.Schemas.app_hyphen_permissions.organization_custom_propertiesPayload? - /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_copilot_seat_management`. @frozen public enum organization_copilot_seat_managementPayload: String, Codable, Hashable, Sendable { case write = "write" } - /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_copilot_seat_management`. public var organization_copilot_seat_management: Components.Schemas.app_hyphen_permissions.organization_copilot_seat_managementPayload? @@ -2728,7 +2740,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_plan`. public var organization_plan: Components.Schemas.app_hyphen_permissions.organization_planPayload? - /// The level of permission to grant the access token to manage organization projects and projects beta (where available). + /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_projects`. @frozen public enum organization_projectsPayload: String, Codable, Hashable, Sendable { @@ -2736,7 +2748,7 @@ public enum Components { case write = "write" case admin = "admin" } - /// The level of permission to grant the access token to manage organization projects and projects beta (where available). + /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_projects`. public var organization_projects: Components.Schemas.app_hyphen_permissions.organization_projectsPayload? @@ -2902,14 +2914,14 @@ public enum Components { /// - organization_custom_roles: The level of permission to grant the access token for custom repository roles management. /// - organization_custom_org_roles: The level of permission to grant the access token for custom organization roles management. /// - organization_custom_properties: The level of permission to grant the access token for custom property management. - /// - organization_copilot_seat_management: The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + /// - organization_copilot_seat_management: The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// - organization_announcement_banners: The level of permission to grant the access token to view and manage announcement banners for an organization. /// - organization_events: The level of permission to grant the access token to view events triggered by an activity in an organization. /// - organization_hooks: The level of permission to grant the access token to manage the post-receive hooks for an organization. /// - organization_personal_access_tokens: The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. /// - organization_personal_access_token_requests: The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. /// - organization_plan: The level of permission to grant the access token for viewing an organization's plan. - /// - organization_projects: The level of permission to grant the access token to manage organization projects and projects beta (where available). + /// - organization_projects: The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// - organization_packages: The level of permission to grant the access token for organization packages published to GitHub Packages. /// - organization_secrets: The level of permission to grant the access token to manage organization secrets. /// - organization_self_hosted_runners: The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. @@ -3560,7 +3572,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -3748,7 +3760,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. From 65b1610bc339bee967ce0c2591b8fa87eb7477ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:08:37 +0000 Subject: [PATCH 047/129] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 44 +++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 122d36f2fe2..65c72b9f68b 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -463,6 +463,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -487,6 +489,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -508,7 +511,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -531,6 +535,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -554,6 +559,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -639,6 +645,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -663,6 +671,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -684,7 +693,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -707,6 +717,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -730,6 +741,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Code Of Conduct @@ -1124,6 +1136,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1132,18 +1166,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -1151,6 +1188,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository From 11b2456f8f6dff3dcd8fea78fc2aff2e05dc6a18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:08:58 +0000 Subject: [PATCH 048/129] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Client.swift | 16 ++++++++++++- Sources/code-scanning/Types.swift | 36 +++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index a0d4edc944c..288da633614 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -306,6 +306,20 @@ public struct Client: APIProtocol { name: "direction", value: input.query.direction ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -891,7 +905,7 @@ public struct Client: APIProtocol { /// and `0` is returned in this field. /// /// > [!WARNING] - /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > **Closing down notice:** The `tool_name` field is closing down and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 7681eaa8523..751fe9c7ccf 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -75,7 +75,7 @@ public protocol APIProtocol: Sendable { /// and `0` is returned in this field. /// /// > [!WARNING] - /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > **Closing down notice:** The `tool_name` field is closing down and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// @@ -413,7 +413,7 @@ extension APIProtocol { /// and `0` is returned in this field. /// /// > [!WARNING] - /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > **Closing down notice:** The `tool_name` field is closing down and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// @@ -803,6 +803,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -827,6 +829,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -848,7 +851,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -871,6 +875,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -894,6 +899,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -979,6 +985,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1003,6 +1011,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1024,7 +1033,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1047,6 +1057,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1070,6 +1081,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Scim Error @@ -3916,6 +3928,14 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/direction`. public var direction: Components.Parameters.direction? + /// 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/repos/{owner}/{repo}/code-scanning/alerts/GET/query/before`. + public var before: Components.Parameters.pagination_hyphen_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 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)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/sort`. @frozen public enum sortPayload: String, Codable, Hashable, Sendable { case created = "created" @@ -3943,6 +3963,8 @@ public enum Operations { /// - ref: The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. /// - pr: The number of the pull request for the results you want to list. /// - direction: The direction to sort the results by. + /// - 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)." /// - sort: The property by which to sort the results. /// - state: If specified, only code scanning alerts with this state will be returned. /// - severity: If specified, only code scanning alerts with this severity will be returned. @@ -3954,6 +3976,8 @@ public enum Operations { ref: Components.Parameters.git_hyphen_ref? = nil, pr: Components.Parameters.pr_hyphen_alias? = nil, direction: Components.Parameters.direction? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil, sort: Operations.code_hyphen_scanning_sol_list_hyphen_alerts_hyphen_for_hyphen_repo.Input.Query.sortPayload? = nil, state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state_hyphen_query? = nil, severity: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_severity? = nil @@ -3965,6 +3989,8 @@ public enum Operations { self.ref = ref self.pr = pr self.direction = direction + self.before = before + self.after = after self.sort = sort self.state = state self.severity = severity @@ -4946,7 +4972,7 @@ public enum Operations { /// and `0` is returned in this field. /// /// > [!WARNING] - /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > **Closing down notice:** The `tool_name` field is closing down and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// From 83a5f5c1b7ca528fc1bde3ae311c088189d141a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:10:01 +0000 Subject: [PATCH 049/129] Commit via running ake Sources/dependabot --- Sources/dependabot/Types.swift | 48 ++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 07269ad7f7a..26aece0dc31 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -674,6 +674,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -698,6 +700,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -719,7 +722,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -742,6 +746,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -765,6 +770,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -881,6 +887,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -905,6 +913,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -926,7 +935,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -949,6 +959,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -972,6 +983,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Scim Error @@ -2397,6 +2409,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2405,18 +2439,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -2424,6 +2461,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -5852,7 +5890,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/direction`. public var direction: Components.Parameters.direction? - /// **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. + /// **Closing down notice**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/page`. @available(*, deprecated) @@ -5893,7 +5931,7 @@ public enum Operations { /// - scope: The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. /// - sort: The property by which to sort the results. /// - direction: The direction to sort the results by. - /// - page: **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. + /// - page: **Closing down notice**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. /// - per_page: The number of results per page (max 100). 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)." /// - 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)." From fc6b1fdd2e8fba1050ce2aa7ee8cb4594f58ea60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:10:43 +0000 Subject: [PATCH 050/129] Commit via running ake Sources/gists --- Sources/gists/Types.swift | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index 36b45b5f90b..b1c5539cb04 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -619,6 +619,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -643,6 +645,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -664,7 +667,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -687,6 +691,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -710,6 +715,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -795,6 +801,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -819,6 +827,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -840,7 +849,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -863,6 +873,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -886,6 +897,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error @@ -1226,6 +1238,8 @@ public enum Components { public var login: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/id`. public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/public-user/user_view_type`. + public var user_view_type: Swift.String? /// - Remark: Generated from `#/components/schemas/public-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/avatar_url`. @@ -1325,8 +1339,6 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/public-user/plan`. public var plan: Components.Schemas.public_hyphen_user.planPayload? - /// - Remark: Generated from `#/components/schemas/public-user/suspended_at`. - public var suspended_at: Foundation.Date? /// - Remark: Generated from `#/components/schemas/public-user/private_gists`. public var private_gists: Swift.Int? /// - Remark: Generated from `#/components/schemas/public-user/total_private_repos`. @@ -1342,6 +1354,7 @@ public enum Components { /// - Parameters: /// - login: /// - id: + /// - user_view_type: /// - node_id: /// - avatar_url: /// - gravatar_id: @@ -1374,7 +1387,6 @@ public enum Components { /// - created_at: /// - updated_at: /// - plan: - /// - suspended_at: /// - private_gists: /// - total_private_repos: /// - owned_private_repos: @@ -1383,6 +1395,7 @@ public enum Components { public init( login: Swift.String, id: Swift.Int64, + user_view_type: Swift.String? = nil, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1415,7 +1428,6 @@ public enum Components { created_at: Foundation.Date, updated_at: Foundation.Date, plan: Components.Schemas.public_hyphen_user.planPayload? = nil, - suspended_at: Foundation.Date? = nil, private_gists: Swift.Int? = nil, total_private_repos: Swift.Int? = nil, owned_private_repos: Swift.Int? = nil, @@ -1424,6 +1436,7 @@ public enum Components { ) { self.login = login self.id = id + self.user_view_type = user_view_type self.node_id = node_id self.avatar_url = avatar_url self.gravatar_id = gravatar_id @@ -1456,7 +1469,6 @@ public enum Components { self.created_at = created_at self.updated_at = updated_at self.plan = plan - self.suspended_at = suspended_at self.private_gists = private_gists self.total_private_repos = total_private_repos self.owned_private_repos = owned_private_repos @@ -1466,6 +1478,7 @@ public enum Components { public enum CodingKeys: String, CodingKey { case login case id + case user_view_type case node_id case avatar_url case gravatar_id @@ -1498,7 +1511,6 @@ public enum Components { case created_at case updated_at case plan - case suspended_at case private_gists case total_private_repos case owned_private_repos @@ -1515,6 +1527,10 @@ public enum Components { Swift.Int64.self, forKey: .id ) + user_view_type = try container.decodeIfPresent( + Swift.String.self, + forKey: .user_view_type + ) node_id = try container.decode( Swift.String.self, forKey: .node_id @@ -1643,10 +1659,6 @@ public enum Components { Components.Schemas.public_hyphen_user.planPayload.self, forKey: .plan ) - suspended_at = try container.decodeIfPresent( - Foundation.Date.self, - forKey: .suspended_at - ) private_gists = try container.decodeIfPresent( Swift.Int.self, forKey: .private_gists @@ -1670,6 +1682,7 @@ public enum Components { try decoder.ensureNoAdditionalProperties(knownKeys: [ "login", "id", + "user_view_type", "node_id", "avatar_url", "gravatar_id", @@ -1702,7 +1715,6 @@ public enum Components { "created_at", "updated_at", "plan", - "suspended_at", "private_gists", "total_private_repos", "owned_private_repos", From 75558dcbdcc7e96a3c0199d8b74de56498581b2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:11:46 +0000 Subject: [PATCH 051/129] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index ba237ec6911..e109cb7ae36 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -1251,6 +1251,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -1275,6 +1277,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1296,7 +1299,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1319,6 +1323,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1342,6 +1347,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1427,6 +1433,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1451,6 +1459,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1472,7 +1481,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1495,6 +1505,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1518,6 +1529,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. @@ -2220,7 +2232,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -2408,7 +2420,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -6974,11 +6986,11 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/path`. public var path: Swift.String - /// The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + /// The line index in the diff to which the comment applies. This field is closing down; use `line` instead. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/position`. public var position: Swift.Int? - /// The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + /// The index of the original line in the diff to which the comment applies. This field is closing down; use `original_line` instead. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/original_position`. public var original_position: Swift.Int? @@ -7154,8 +7166,8 @@ public enum Components { /// - node_id: The node ID of the pull request review comment. /// - diff_hunk: The diff of the line that the comment refers to. /// - path: The relative path of the file to which the comment applies. - /// - position: The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. - /// - original_position: The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + /// - position: The line index in the diff to which the comment applies. This field is closing down; use `line` instead. + /// - original_position: The index of the original line in the diff to which the comment applies. This field is closing down; use `original_line` instead. /// - commit_id: The SHA of the commit to which the comment applies. /// - original_commit_id: The SHA of the original commit to which the comment applies. /// - in_reply_to_id: The comment ID to reply to. @@ -9736,7 +9748,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/body`. public var body: Swift.String? - /// Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ + /// Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is closing down.**_ /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/POST/requestBody/json/assignee`. public var assignee: Swift.String? @@ -9866,7 +9878,7 @@ public enum Operations { /// - Parameters: /// - title: The title of the issue. /// - body: The contents of the issue. - /// - assignee: Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ + /// - assignee: Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is closing down.**_ /// - milestone: /// - labels: Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ /// - assignees: Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ @@ -11685,7 +11697,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/body`. public var body: Swift.String? - /// Username to assign to this issue. **This field is deprecated.** + /// Username to assign to this issue. **This field is closing down.** /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/assignee`. public var assignee: Swift.String? @@ -11838,7 +11850,7 @@ public enum Operations { /// - Parameters: /// - title: The title of the issue. /// - body: The contents of the issue. - /// - assignee: Username to assign to this issue. **This field is deprecated.** + /// - assignee: Username to assign to this issue. **This field is closing down.** /// - state: The open or closed state of the issue. /// - state_reason: The reason for the state change. Ignored unless `state` is changed. /// - milestone: From 08b15ecadc11367d59ea9d8972e06670a1c22bed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:13:31 +0000 Subject: [PATCH 052/129] Commit via running ake Sources/migrations --- Sources/migrations/Client.swift | 16 +++--- Sources/migrations/Types.swift | 96 +++++++++++++++++++++++---------- 2 files changed, 75 insertions(+), 37 deletions(-) diff --git a/Sources/migrations/Client.swift b/Sources/migrations/Client.swift index f0366d78270..6b752e13353 100644 --- a/Sources/migrations/Client.swift +++ b/Sources/migrations/Client.swift @@ -667,7 +667,7 @@ public struct Client: APIProtocol { /// View the progress of an import. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -818,7 +818,7 @@ public struct Client: APIProtocol { /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -922,7 +922,7 @@ public struct Client: APIProtocol { /// return a status `422 Unprocessable Entity` response. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -1074,7 +1074,7 @@ public struct Client: APIProtocol { /// Stop an import for a repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -1147,7 +1147,7 @@ public struct Client: APIProtocol { /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -1268,7 +1268,7 @@ public struct Client: APIProtocol { /// new commits to the repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -1415,7 +1415,7 @@ public struct Client: APIProtocol { /// List files larger than 100MB found during the import /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -1510,7 +1510,7 @@ public struct Client: APIProtocol { /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. diff --git a/Sources/migrations/Types.swift b/Sources/migrations/Types.swift index 186e2d975f7..2ab6b3f543c 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -74,7 +74,7 @@ public protocol APIProtocol: Sendable { /// View the progress of an import. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -123,7 +123,7 @@ public protocol APIProtocol: Sendable { /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -136,7 +136,7 @@ public protocol APIProtocol: Sendable { /// return a status `422 Unprocessable Entity` response. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -147,7 +147,7 @@ public protocol APIProtocol: Sendable { /// Stop an import for a repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -160,7 +160,7 @@ public protocol APIProtocol: Sendable { /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -172,7 +172,7 @@ public protocol APIProtocol: Sendable { /// new commits to the repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -183,7 +183,7 @@ public protocol APIProtocol: Sendable { /// List files larger than 100MB found during the import /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -198,7 +198,7 @@ public protocol APIProtocol: Sendable { /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. @@ -411,7 +411,7 @@ extension APIProtocol { /// View the progress of an import. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -468,7 +468,7 @@ extension APIProtocol { /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -491,7 +491,7 @@ extension APIProtocol { /// return a status `422 Unprocessable Entity` response. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -512,7 +512,7 @@ extension APIProtocol { /// Stop an import for a repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -533,7 +533,7 @@ extension APIProtocol { /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -555,7 +555,7 @@ extension APIProtocol { /// new commits to the repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -576,7 +576,7 @@ extension APIProtocol { /// List files larger than 100MB found during the import /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -599,7 +599,7 @@ extension APIProtocol { /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. @@ -813,6 +813,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -837,6 +839,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -858,7 +861,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -881,6 +885,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -904,6 +909,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -989,6 +995,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1013,6 +1021,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1034,7 +1043,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1057,6 +1067,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1080,6 +1091,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error @@ -1504,7 +1516,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -1692,7 +1704,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -2159,6 +2171,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2167,18 +2201,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -2186,6 +2223,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -4736,7 +4774,7 @@ public enum Operations { /// View the progress of an import. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -4964,7 +5002,7 @@ public enum Operations { /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -5194,7 +5232,7 @@ public enum Operations { /// return a status `422 Unprocessable Entity` response. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -5495,7 +5533,7 @@ public enum Operations { /// Stop an import for a repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -5640,7 +5678,7 @@ public enum Operations { /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -5849,7 +5887,7 @@ public enum Operations { /// new commits to the repository. /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -6118,7 +6156,7 @@ public enum Operations { /// List files larger than 100MB found during the import /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -6289,7 +6327,7 @@ public enum Operations { /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// /// > [!WARNING] - /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. From 5d916f76ea8494914b076623bd6178230280c1da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:14:13 +0000 Subject: [PATCH 053/129] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 6 +- Sources/orgs/Types.swift | 134 +++++++++++++++++++++++++------------- 2 files changed, 92 insertions(+), 48 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index ccf10410ff9..3c6b205c57f 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -224,10 +224,10 @@ public struct Client: APIProtocol { /// Update an organization /// /// > [!WARNING] - /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > **Closing down notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// /// > [!WARNING] - /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -6729,7 +6729,7 @@ public struct Client: APIProtocol { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 0a8b499493a..aaf3c3ffe68 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -39,10 +39,10 @@ public protocol APIProtocol: Sendable { /// Update an organization /// /// > [!WARNING] - /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > **Closing down notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// /// > [!WARNING] - /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -694,7 +694,7 @@ public protocol APIProtocol: Sendable { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// @@ -793,10 +793,10 @@ extension APIProtocol { /// Update an organization /// /// > [!WARNING] - /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > **Closing down notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// /// > [!WARNING] - /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -1960,7 +1960,7 @@ extension APIProtocol { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// @@ -2125,6 +2125,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -2149,6 +2151,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -2170,7 +2173,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -2193,6 +2197,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -2216,6 +2221,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -2332,6 +2338,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -2356,6 +2364,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -2377,7 +2386,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -2400,6 +2410,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -2423,6 +2434,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// The URL to which the payloads will be delivered. @@ -3433,13 +3445,13 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`. public var organization_custom_properties: Components.Schemas.app_hyphen_permissions.organization_custom_propertiesPayload? - /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_copilot_seat_management`. @frozen public enum organization_copilot_seat_managementPayload: String, Codable, Hashable, Sendable { case write = "write" } - /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_copilot_seat_management`. public var organization_copilot_seat_management: Components.Schemas.app_hyphen_permissions.organization_copilot_seat_managementPayload? @@ -3507,7 +3519,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_plan`. public var organization_plan: Components.Schemas.app_hyphen_permissions.organization_planPayload? - /// The level of permission to grant the access token to manage organization projects and projects beta (where available). + /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_projects`. @frozen public enum organization_projectsPayload: String, Codable, Hashable, Sendable { @@ -3515,7 +3527,7 @@ public enum Components { case write = "write" case admin = "admin" } - /// The level of permission to grant the access token to manage organization projects and projects beta (where available). + /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_projects`. public var organization_projects: Components.Schemas.app_hyphen_permissions.organization_projectsPayload? @@ -3681,14 +3693,14 @@ public enum Components { /// - organization_custom_roles: The level of permission to grant the access token for custom repository roles management. /// - organization_custom_org_roles: The level of permission to grant the access token for custom organization roles management. /// - organization_custom_properties: The level of permission to grant the access token for custom property management. - /// - organization_copilot_seat_management: The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + /// - organization_copilot_seat_management: The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// - organization_announcement_banners: The level of permission to grant the access token to view and manage announcement banners for an organization. /// - organization_events: The level of permission to grant the access token to view events triggered by an activity in an organization. /// - organization_hooks: The level of permission to grant the access token to manage the post-receive hooks for an organization. /// - organization_personal_access_tokens: The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. /// - organization_personal_access_token_requests: The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. /// - organization_plan: The level of permission to grant the access token for viewing an organization's plan. - /// - organization_projects: The level of permission to grant the access token to manage organization projects and projects beta (where available). + /// - organization_projects: The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// - organization_packages: The level of permission to grant the access token for organization packages published to GitHub Packages. /// - organization_secrets: The level of permission to grant the access token to manage organization secrets. /// - organization_self_hosted_runners: The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. @@ -4450,6 +4462,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -4458,18 +4492,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -4477,6 +4514,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -5318,7 +5356,7 @@ public enum Components { public var members_can_fork_private_repositories: Swift.Bool? /// - Remark: Generated from `#/components/schemas/organization-full/web_commit_signoff_required`. public var web_commit_signoff_required: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. /// @@ -5327,7 +5365,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-full/advanced_security_enabled_for_new_repositories`. @available(*, deprecated) public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization. /// @@ -5336,7 +5374,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_alerts_enabled_for_new_repositories`. @available(*, deprecated) public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization. /// @@ -5345,7 +5383,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_security_updates_enabled_for_new_repositories`. @available(*, deprecated) public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization. /// @@ -5354,7 +5392,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-full/dependency_graph_enabled_for_new_repositories`. @available(*, deprecated) public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization. /// @@ -5363,7 +5401,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_enabled_for_new_repositories`. @available(*, deprecated) public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization. /// @@ -5434,12 +5472,12 @@ public enum Components { /// - members_can_create_private_pages: /// - members_can_fork_private_repositories: /// - web_commit_signoff_required: - /// - advanced_security_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - dependabot_alerts_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - dependabot_security_updates_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - dependency_graph_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - secret_scanning_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - secret_scanning_push_protection_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - advanced_security_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_alerts_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_security_updates_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependency_graph_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_push_protection_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// - secret_scanning_push_protection_custom_link: An optional URL string to display to contributors who are blocked from pushing a secret. /// - created_at: @@ -6265,6 +6303,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/user-role-assignment/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/user-role-assignment/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `user_hyphen_role_hyphen_assignment`. /// /// - Parameters: @@ -6289,6 +6329,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -6310,7 +6351,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -6333,6 +6375,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -6356,6 +6399,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Minimal representation of an organization programmatic access grant request for enumerations @@ -7693,10 +7737,10 @@ public enum Operations { /// Update an organization /// /// > [!WARNING] - /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > **Closing down notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// /// > [!WARNING] - /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -7806,7 +7850,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_can_create_public_repositories`. public var members_can_create_public_repositories: Swift.Bool? /// Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - /// **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + /// **Note:** This parameter is closing down and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_allowed_repository_creation_type`. @frozen public enum members_allowed_repository_creation_typePayload: String, Codable, Hashable, Sendable { @@ -7815,7 +7859,7 @@ public enum Operations { case none = "none" } /// Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - /// **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + /// **Note:** This parameter is closing down and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_allowed_repository_creation_type`. public var members_allowed_repository_creation_type: Operations.orgs_sol_update.Input.Body.jsonPayload.members_allowed_repository_creation_typePayload? @@ -7841,7 +7885,7 @@ public enum Operations { public var web_commit_signoff_required: Swift.Bool? /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/blog`. public var blog: Swift.String? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization. /// @@ -7852,7 +7896,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/advanced_security_enabled_for_new_repositories`. @available(*, deprecated) public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization. /// @@ -7863,7 +7907,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependabot_alerts_enabled_for_new_repositories`. @available(*, deprecated) public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization. /// @@ -7874,7 +7918,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependabot_security_updates_enabled_for_new_repositories`. @available(*, deprecated) public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization. /// @@ -7885,7 +7929,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependency_graph_enabled_for_new_repositories`. @available(*, deprecated) public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization. /// @@ -7896,7 +7940,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/secret_scanning_enabled_for_new_repositories`. @available(*, deprecated) public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// /// Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization. /// @@ -7939,12 +7983,12 @@ public enum Operations { /// - members_can_fork_private_repositories: Whether organization members can fork private organization repositories. /// - web_commit_signoff_required: Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. /// - blog: - /// - advanced_security_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - dependabot_alerts_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - dependabot_security_updates_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - dependency_graph_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - secret_scanning_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. - /// - secret_scanning_push_protection_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - advanced_security_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_alerts_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_security_updates_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependency_graph_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_push_protection_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// - secret_scanning_push_protection_custom_link: If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. public init( @@ -20372,7 +20416,7 @@ public enum Operations { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// From 0a79744035d2efcedf7064cba963a8b4a40ba76c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:14:34 +0000 Subject: [PATCH 054/129] Commit via running ake Sources/packages --- Sources/packages/Types.swift | 44 +++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index 097e4b06541..fd5d57efb80 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -871,6 +871,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -895,6 +897,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -916,7 +919,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -939,6 +943,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -962,6 +967,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1047,6 +1053,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1071,6 +1079,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1092,7 +1101,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1115,6 +1125,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1138,6 +1149,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Code Of Conduct @@ -1303,6 +1315,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1311,18 +1345,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -1330,6 +1367,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository From 0dd51457be0f4b7981c8dca586be52a17b527bca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:14:55 +0000 Subject: [PATCH 055/129] Commit via running ake Sources/projects --- Sources/projects/Types.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Sources/projects/Types.swift b/Sources/projects/Types.swift index 1cb1cfdeb73..aa7bc1787d7 100644 --- a/Sources/projects/Types.swift +++ b/Sources/projects/Types.swift @@ -659,6 +659,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -683,6 +685,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -704,7 +707,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -727,6 +731,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -750,6 +755,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -866,6 +872,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -890,6 +898,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -911,7 +920,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -934,6 +944,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -957,6 +968,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error From 6852075bf6b37c148364ef5f8fa1822ef7b4ada2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:15:16 +0000 Subject: [PATCH 056/129] Commit via running ake Sources/pulls --- Sources/pulls/Client.swift | 2 +- Sources/pulls/Types.swift | 70 +++++++++++++++++++++++++++++--------- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/Sources/pulls/Client.swift b/Sources/pulls/Client.swift index 3849b3f6274..a591521912a 100644 --- a/Sources/pulls/Client.swift +++ b/Sources/pulls/Client.swift @@ -1126,7 +1126,7 @@ public struct Client: APIProtocol { /// /// If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request. /// - /// The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + /// The `position` parameter is closing down. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 1b4851a6dd9..bd928709691 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -165,7 +165,7 @@ public protocol APIProtocol: Sendable { /// /// If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request. /// - /// The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + /// The `position` parameter is closing down. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." @@ -641,7 +641,7 @@ extension APIProtocol { /// /// If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request. /// - /// The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + /// The `position` parameter is closing down. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." @@ -1103,6 +1103,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -1127,6 +1129,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1148,7 +1151,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1171,6 +1175,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1194,6 +1199,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1310,6 +1316,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1334,6 +1342,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1355,7 +1364,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1378,6 +1388,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1401,6 +1412,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error @@ -1825,7 +1837,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -2013,7 +2025,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -3848,11 +3860,11 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/path`. public var path: Swift.String - /// The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + /// The line index in the diff to which the comment applies. This field is closing down; use `line` instead. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/position`. public var position: Swift.Int? - /// The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + /// The index of the original line in the diff to which the comment applies. This field is closing down; use `original_line` instead. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/original_position`. public var original_position: Swift.Int? @@ -4028,8 +4040,8 @@ public enum Components { /// - node_id: The node ID of the pull request review comment. /// - diff_hunk: The diff of the line that the comment refers to. /// - path: The relative path of the file to which the comment applies. - /// - position: The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. - /// - original_position: The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + /// - position: The line index in the diff to which the comment applies. This field is closing down; use `line` instead. + /// - original_position: The index of the original line in the diff to which the comment applies. This field is closing down; use `original_line` instead. /// - commit_id: The SHA of the commit to which the comment applies. /// - original_commit_id: The SHA of the original commit to which the comment applies. /// - in_reply_to_id: The comment ID to reply to. @@ -4390,6 +4402,8 @@ public enum Components { public var _type: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/url`. public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `ownerPayload`. /// /// - Parameters: @@ -4411,6 +4425,7 @@ public enum Components { /// - subscriptions_url: /// - _type: /// - url: + /// - user_view_type: public init( avatar_url: Swift.String, events_url: Swift.String, @@ -4429,7 +4444,8 @@ public enum Components { starred_url: Swift.String, subscriptions_url: Swift.String, _type: Swift.String, - url: Swift.String + url: Swift.String, + user_view_type: Swift.String? = nil ) { self.avatar_url = avatar_url self.events_url = events_url @@ -4449,6 +4465,7 @@ public enum Components { self.subscriptions_url = subscriptions_url self._type = _type self.url = url + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case avatar_url @@ -4469,6 +4486,7 @@ public enum Components { case subscriptions_url case _type = "type" case url + case user_view_type } } /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner`. @@ -5048,6 +5066,8 @@ public enum Components { public var _type: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/head/user/url`. public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request/head/user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `userPayload`. /// /// - Parameters: @@ -5069,6 +5089,7 @@ public enum Components { /// - subscriptions_url: /// - _type: /// - url: + /// - user_view_type: public init( avatar_url: Swift.String, events_url: Swift.String, @@ -5087,7 +5108,8 @@ public enum Components { starred_url: Swift.String, subscriptions_url: Swift.String, _type: Swift.String, - url: Swift.String + url: Swift.String, + user_view_type: Swift.String? = nil ) { self.avatar_url = avatar_url self.events_url = events_url @@ -5107,6 +5129,7 @@ public enum Components { self.subscriptions_url = subscriptions_url self._type = _type self.url = url + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case avatar_url @@ -5127,6 +5150,7 @@ public enum Components { case subscriptions_url case _type = "type" case url + case user_view_type } } /// - Remark: Generated from `#/components/schemas/pull-request/head/user`. @@ -5278,6 +5302,8 @@ public enum Components { public var _type: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/url`. public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `ownerPayload`. /// /// - Parameters: @@ -5299,6 +5325,7 @@ public enum Components { /// - subscriptions_url: /// - _type: /// - url: + /// - user_view_type: public init( avatar_url: Swift.String, events_url: Swift.String, @@ -5317,7 +5344,8 @@ public enum Components { starred_url: Swift.String, subscriptions_url: Swift.String, _type: Swift.String, - url: Swift.String + url: Swift.String, + user_view_type: Swift.String? = nil ) { self.avatar_url = avatar_url self.events_url = events_url @@ -5337,6 +5365,7 @@ public enum Components { self.subscriptions_url = subscriptions_url self._type = _type self.url = url + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case avatar_url @@ -5357,6 +5386,7 @@ public enum Components { case subscriptions_url case _type = "type" case url + case user_view_type } } /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner`. @@ -5893,6 +5923,8 @@ public enum Components { public var _type: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/base/user/url`. public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request/base/user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `userPayload`. /// /// - Parameters: @@ -5914,6 +5946,7 @@ public enum Components { /// - subscriptions_url: /// - _type: /// - url: + /// - user_view_type: public init( avatar_url: Swift.String, events_url: Swift.String, @@ -5932,7 +5965,8 @@ public enum Components { starred_url: Swift.String, subscriptions_url: Swift.String, _type: Swift.String, - url: Swift.String + url: Swift.String, + user_view_type: Swift.String? = nil ) { self.avatar_url = avatar_url self.events_url = events_url @@ -5952,6 +5986,7 @@ public enum Components { self.subscriptions_url = subscriptions_url self._type = _type self.url = url + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case avatar_url @@ -5972,6 +6007,7 @@ public enum Components { case subscriptions_url case _type = "type" case url + case user_view_type } } /// - Remark: Generated from `#/components/schemas/pull-request/base/user`. @@ -9156,7 +9192,7 @@ public enum Operations { /// /// If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request. /// - /// The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + /// The `position` parameter is closing down. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." @@ -9232,7 +9268,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/POST/requestBody/json/path`. public var path: Swift.String - /// **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + /// **This parameter is closing down. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/POST/requestBody/json/position`. @available(*, deprecated) @@ -9289,7 +9325,7 @@ public enum Operations { /// - body: The text of the review comment. /// - commit_id: The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. /// - path: The relative path to the file that necessitates a comment. - /// - position: **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + /// - position: **This parameter is closing down. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. /// - side: In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. /// - line: **Required unless using `subject_type:file`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. /// - start_line: **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. From 9534d0a9119ed9b792eb1f4c906f7d3ffa8ecb65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:15:37 +0000 Subject: [PATCH 057/129] Commit via running ake Sources/rate-limit --- Sources/rate-limit/Client.swift | 2 +- Sources/rate-limit/Types.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/rate-limit/Client.swift b/Sources/rate-limit/Client.swift index 5cfda7888c1..318dec3f412 100644 --- a/Sources/rate-limit/Client.swift +++ b/Sources/rate-limit/Client.swift @@ -55,7 +55,7 @@ public struct Client: APIProtocol { /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// /// > [!NOTE] - /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > The `rate` object is closing down. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. diff --git a/Sources/rate-limit/Types.swift b/Sources/rate-limit/Types.swift index dc38c7028d0..1d24c69e143 100644 --- a/Sources/rate-limit/Types.swift +++ b/Sources/rate-limit/Types.swift @@ -28,7 +28,7 @@ public protocol APIProtocol: Sendable { /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// /// > [!NOTE] - /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > The `rate` object is closing down. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. @@ -54,7 +54,7 @@ extension APIProtocol { /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// /// > [!NOTE] - /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > The `rate` object is closing down. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. @@ -315,7 +315,7 @@ public enum Operations { /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// /// > [!NOTE] - /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > The `rate` object is closing down. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. From c029fe0f48039baa3844c9d2c5382beec86b80b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:15:58 +0000 Subject: [PATCH 058/129] Commit via running ake Sources/reactions --- Sources/reactions/Client.swift | 8 ++++---- Sources/reactions/Types.swift | 32 +++++++++++++++++++------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Sources/reactions/Client.swift b/Sources/reactions/Client.swift index 21656304d0d..2c8e1bbc585 100644 --- a/Sources/reactions/Client.swift +++ b/Sources/reactions/Client.swift @@ -1980,7 +1980,7 @@ public struct Client: APIProtocol { /// List reactions for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -2081,7 +2081,7 @@ public struct Client: APIProtocol { /// Create reaction for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -2164,7 +2164,7 @@ public struct Client: APIProtocol { /// List reactions for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -2264,7 +2264,7 @@ public struct Client: APIProtocol { /// Create reaction for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// diff --git a/Sources/reactions/Types.swift b/Sources/reactions/Types.swift index 0a4bf435183..358b85e7ee5 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -210,7 +210,7 @@ public protocol APIProtocol: Sendable { /// List reactions for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -223,7 +223,7 @@ public protocol APIProtocol: Sendable { /// Create reaction for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -238,7 +238,7 @@ public protocol APIProtocol: Sendable { /// List reactions for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -251,7 +251,7 @@ public protocol APIProtocol: Sendable { /// Create reaction for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -620,7 +620,7 @@ extension APIProtocol { /// List reactions for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -643,7 +643,7 @@ extension APIProtocol { /// Create reaction for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -668,7 +668,7 @@ extension APIProtocol { /// List reactions for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -691,7 +691,7 @@ extension APIProtocol { /// Create reaction for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -812,6 +812,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -836,6 +838,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -857,7 +860,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -880,6 +884,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -903,6 +908,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error @@ -5337,7 +5343,7 @@ public enum Operations { /// List reactions for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -5554,7 +5560,7 @@ public enum Operations { /// Create reaction for a team discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -5748,7 +5754,7 @@ public enum Operations { /// List reactions for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -5958,7 +5964,7 @@ public enum Operations { /// Create reaction for a team discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// From 1408ae719e996422a51820d16b7a7faee664b6ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:16:20 +0000 Subject: [PATCH 059/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 12 +-- Sources/repos/Types.swift | 179 ++++++++++++++++++++++++++++--------- 2 files changed, 143 insertions(+), 48 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 778cbd9dda3..c5e569e6e21 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -17570,10 +17570,10 @@ public struct Client: APIProtocol { } ) } - /// Deprecated - List tag protection states for a repository + /// Closing down - List tag protection states for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -17685,10 +17685,10 @@ public struct Client: APIProtocol { } ) } - /// Deprecated - Create a tag protection state for a repository + /// Closing down - Create a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -17808,10 +17808,10 @@ public struct Client: APIProtocol { } ) } - /// Deprecated - Delete a tag protection state for a repository + /// Closing down - Delete a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 32d32fa51e6..ec0d084fe0f 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -1869,10 +1869,10 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /repos/{owner}/{repo}/tags`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/get(repos/list-tags)`. func repos_sol_list_hyphen_tags(_ input: Operations.repos_sol_list_hyphen_tags.Input) async throws -> Operations.repos_sol_list_hyphen_tags.Output - /// Deprecated - List tag protection states for a repository + /// Closing down - List tag protection states for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -1882,10 +1882,10 @@ public protocol APIProtocol: Sendable { /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/get(repos/list-tag-protection)`. @available(*, deprecated) func repos_sol_list_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_list_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_list_hyphen_tag_hyphen_protection.Output - /// Deprecated - Create a tag protection state for a repository + /// Closing down - Create a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -1894,10 +1894,10 @@ public protocol APIProtocol: Sendable { /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/post(repos/create-tag-protection)`. @available(*, deprecated) func repos_sol_create_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_create_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_create_hyphen_tag_hyphen_protection.Output - /// Deprecated - Delete a tag protection state for a repository + /// Closing down - Delete a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -5455,10 +5455,10 @@ extension APIProtocol { headers: headers )) } - /// Deprecated - List tag protection states for a repository + /// Closing down - List tag protection states for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -5476,10 +5476,10 @@ extension APIProtocol { headers: headers )) } - /// Deprecated - Create a tag protection state for a repository + /// Closing down - Create a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -5498,10 +5498,10 @@ extension APIProtocol { body: body )) } - /// Deprecated - Delete a tag protection state for a repository + /// Closing down - Delete a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -5907,6 +5907,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -5931,6 +5933,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -5952,7 +5955,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -5975,6 +5979,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -5998,6 +6003,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -6114,6 +6120,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -6138,6 +6146,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -6159,7 +6168,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -6182,6 +6192,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -6205,6 +6216,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. @@ -7345,7 +7357,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -7533,7 +7545,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -8680,6 +8692,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -8688,18 +8722,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -8707,6 +8744,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -9652,7 +9690,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -9840,7 +9878,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -14105,6 +14143,8 @@ public enum Components { public var _type: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/site_admin`. public var site_admin: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `usersPayloadPayload`. /// /// - Parameters: @@ -14126,6 +14166,7 @@ public enum Components { /// - received_events_url: /// - _type: /// - site_admin: + /// - user_view_type: public init( login: Swift.String? = nil, id: Swift.Int64? = nil, @@ -14144,7 +14185,8 @@ public enum Components { events_url: Swift.String? = nil, received_events_url: Swift.String? = nil, _type: Swift.String? = nil, - site_admin: Swift.Bool? = nil + site_admin: Swift.Bool? = nil, + user_view_type: Swift.String? = nil ) { self.login = login self.id = id @@ -14164,6 +14206,7 @@ public enum Components { self.received_events_url = received_events_url self._type = _type self.site_admin = site_admin + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case login @@ -14184,6 +14227,7 @@ public enum Components { case received_events_url case _type = "type" case site_admin + case user_view_type } } /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/users`. @@ -14339,6 +14383,8 @@ public enum Components { public var _type: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/owner/site_admin`. public var site_admin: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/owner/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `ownerPayload`. /// /// - Parameters: @@ -14365,6 +14411,7 @@ public enum Components { /// - received_events_url: /// - _type: /// - site_admin: + /// - user_view_type: public init( login: Swift.String? = nil, id: Swift.Int? = nil, @@ -14388,7 +14435,8 @@ public enum Components { organizations_url: Swift.String? = nil, received_events_url: Swift.String? = nil, _type: Swift.String? = nil, - site_admin: Swift.Bool? = nil + site_admin: Swift.Bool? = nil, + user_view_type: Swift.String? = nil ) { self.login = login self.id = id @@ -14413,6 +14461,7 @@ public enum Components { self.received_events_url = received_events_url self._type = _type self.site_admin = site_admin + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case login @@ -14438,6 +14487,7 @@ public enum Components { case received_events_url case _type = "type" case site_admin + case user_view_type } } /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/owner`. @@ -16141,6 +16191,8 @@ public enum Components { public var permissions: Components.Schemas.collaborator.permissionsPayload? /// - Remark: Generated from `#/components/schemas/collaborator/role_name`. public var role_name: Swift.String + /// - Remark: Generated from `#/components/schemas/collaborator/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `collaborator`. /// /// - Parameters: @@ -16166,6 +16218,7 @@ public enum Components { /// - site_admin: /// - permissions: /// - role_name: + /// - user_view_type: public init( login: Swift.String, id: Swift.Int64, @@ -16188,7 +16241,8 @@ public enum Components { _type: Swift.String, site_admin: Swift.Bool, permissions: Components.Schemas.collaborator.permissionsPayload? = nil, - role_name: Swift.String + role_name: Swift.String, + user_view_type: Swift.String? = nil ) { self.login = login self.id = id @@ -16212,6 +16266,7 @@ public enum Components { self.site_admin = site_admin self.permissions = permissions self.role_name = role_name + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case login @@ -16236,6 +16291,7 @@ public enum Components { case site_admin case permissions case role_name + case user_view_type } } /// Repository invitations let you manage who you collaborate with. @@ -16418,6 +16474,8 @@ public enum Components { public var permissions: Components.Schemas.nullable_hyphen_collaborator.permissionsPayload? /// - Remark: Generated from `#/components/schemas/nullable-collaborator/role_name`. public var role_name: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-collaborator/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_collaborator`. /// /// - Parameters: @@ -16443,6 +16501,7 @@ public enum Components { /// - site_admin: /// - permissions: /// - role_name: + /// - user_view_type: public init( login: Swift.String, id: Swift.Int64, @@ -16465,7 +16524,8 @@ public enum Components { _type: Swift.String, site_admin: Swift.Bool, permissions: Components.Schemas.nullable_hyphen_collaborator.permissionsPayload? = nil, - role_name: Swift.String + role_name: Swift.String, + user_view_type: Swift.String? = nil ) { self.login = login self.id = id @@ -16489,6 +16549,7 @@ public enum Components { self.site_admin = site_admin self.permissions = permissions self.role_name = role_name + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case login @@ -16513,6 +16574,7 @@ public enum Components { case site_admin case permissions case role_name + case user_view_type } } /// Repository Collaborator Permission @@ -18835,6 +18897,8 @@ public enum Components { public var email: Swift.String? /// - Remark: Generated from `#/components/schemas/contributor/name`. public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/contributor/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `contributor`. /// /// - Parameters: @@ -18859,6 +18923,7 @@ public enum Components { /// - contributions: /// - email: /// - name: + /// - user_view_type: public init( login: Swift.String? = nil, id: Swift.Int? = nil, @@ -18880,7 +18945,8 @@ public enum Components { site_admin: Swift.Bool? = nil, contributions: Swift.Int, email: Swift.String? = nil, - name: Swift.String? = nil + name: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.login = login self.id = id @@ -18903,6 +18969,7 @@ public enum Components { self.contributions = contributions self.email = email self.name = name + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case login @@ -18926,6 +18993,7 @@ public enum Components { case contributions case email case name + case user_view_type } } /// The status of a deployment. @@ -18964,7 +19032,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/deployment-status/environment`. public var environment: Swift.String? - /// Deprecated: the URL to associate with this status. + /// Closing down notice: the URL to associate with this status. /// /// - Remark: Generated from `#/components/schemas/deployment-status/target_url`. public var target_url: Swift.String @@ -18996,7 +19064,7 @@ public enum Components { /// - creator: /// - description: A short description of the status. /// - environment: The environment of the deployment that the status is for. - /// - target_url: Deprecated: the URL to associate with this status. + /// - target_url: Closing down notice: the URL to associate with this status. /// - created_at: /// - updated_at: /// - deployment_url: @@ -23027,7 +23095,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/delete_branch_on_merge`. public var delete_branch_on_merge: Swift.Bool? - /// Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -23160,7 +23228,7 @@ public enum Operations { /// - allow_rebase_merge: Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. /// - allow_auto_merge: Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. /// - delete_branch_on_merge: Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. **The authenticated user must be an organization owner to set this property to `true`.** - /// - use_squash_pr_title_as_default: Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: Required when using `squash_merge_commit_message`. /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: Required when using `merge_commit_message`. @@ -25310,6 +25378,29 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? + /// Use the `status` property to enable or disable secret scanning AI detection for this repository. For more information, see "[Responsible detection of generic secrets with AI](https://docs.github.com/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/generic-secret-detection/responsible-ai-generic-secrets)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// Can be `enabled` or `disabled`. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_ai_detection/status`. + public var status: Swift.String? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: Can be `enabled` or `disabled`. + public init(status: Swift.String? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// Use the `status` property to enable or disable secret scanning AI detection for this repository. For more information, see "[Responsible detection of generic secrets with AI](https://docs.github.com/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/generic-secret-detection/responsible-ai-generic-secrets)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_ai_detectionPayload? /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns`. @@ -25339,22 +25430,26 @@ public enum Operations { /// - advanced_security: Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." /// - secret_scanning: Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." /// - secret_scanning_push_protection: Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + /// - secret_scanning_ai_detection: Use the `status` property to enable or disable secret scanning AI detection for this repository. For more information, see "[Responsible detection of generic secrets with AI](https://docs.github.com/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/generic-secret-detection/responsible-ai-generic-secrets)." /// - secret_scanning_non_provider_patterns: Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." public init( advanced_security: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.advanced_securityPayload? = nil, secret_scanning: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? = nil, + secret_scanning_ai_detection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_ai_detectionPayload? = nil, secret_scanning_non_provider_patterns: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_ai_detection = secret_scanning_ai_detection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case secret_scanning case secret_scanning_push_protection + case secret_scanning_ai_detection case secret_scanning_non_provider_patterns } } @@ -25413,7 +25508,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -25532,7 +25627,7 @@ public enum Operations { /// - allow_auto_merge: Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. /// - delete_branch_on_merge: Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. /// - allow_update_branch: Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. - /// - use_squash_pr_title_as_default: Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: Required when using `squash_merge_commit_message`. /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: Required when using `merge_commit_message`. @@ -28605,7 +28700,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/PUT/requestBody/json/required_status_checks/strict`. public var strict: Swift.Bool - /// **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + /// **Closing down notice**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/PUT/requestBody/json/required_status_checks/contexts`. @available(*, deprecated) @@ -28649,7 +28744,7 @@ public enum Operations { /// /// - Parameters: /// - strict: Require branches to be up to date before merging. - /// - contexts: **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + /// - contexts: **Closing down notice**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// - checks: The list of status checks to require in order to merge into this branch. public init( strict: Swift.Bool, @@ -31045,7 +31140,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/PATCH/requestBody/json/strict`. public var strict: Swift.Bool? - /// **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + /// **Closing down notice**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/PATCH/requestBody/json/contexts`. @available(*, deprecated) @@ -31089,7 +31184,7 @@ public enum Operations { /// /// - Parameters: /// - strict: Require branches to be up to date before merging. - /// - contexts: **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + /// - contexts: **Closing down notice**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. /// - checks: The list of status checks to require in order to merge into this branch. public init( strict: Swift.Bool? = nil, @@ -37984,7 +38079,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/{commit_sha}/comments/POST/requestBody/json/position`. public var position: Swift.Int? - /// **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + /// **Closing down notice**. Use **position** parameter instead. Line number in the file to comment on. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/{commit_sha}/comments/POST/requestBody/json/line`. public var line: Swift.Int? @@ -37994,7 +38089,7 @@ public enum Operations { /// - body: The contents of the comment. /// - path: Relative path of the file to comment on. /// - position: Line index in the diff to comment on. - /// - line: **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + /// - line: **Closing down notice**. Use **position** parameter instead. Line number in the file to comment on. public init( body: Swift.String, path: Swift.String? = nil, @@ -59476,10 +59571,10 @@ public enum Operations { } } } - /// Deprecated - List tag protection states for a repository + /// Closing down - List tag protection states for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -59668,10 +59763,10 @@ public enum Operations { } } } - /// Deprecated - Create a tag protection state for a repository + /// Closing down - Create a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -59885,10 +59980,10 @@ public enum Operations { } } } - /// Deprecated - Delete a tag protection state for a repository + /// Closing down - Delete a tag protection state for a repository /// /// > [!WARNING] - /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. From 88a4049ddfa89ec24567c4f07a428e1c2f193713 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:16:41 +0000 Subject: [PATCH 060/129] Commit via running ake Sources/search --- Sources/search/Types.swift | 64 ++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 2fb5e9d41fa..682f5a19352 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -375,6 +375,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -399,6 +401,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -420,7 +423,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -443,6 +447,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -466,6 +471,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -551,6 +557,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -575,6 +583,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -596,7 +605,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -619,6 +629,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -642,6 +653,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error @@ -1066,7 +1078,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -1254,7 +1266,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -2156,6 +2168,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2164,18 +2198,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -2183,6 +2220,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -4513,6 +4551,8 @@ public enum Components { public var company: Swift.String? /// - Remark: Generated from `#/components/schemas/user-search-result-item/suspended_at`. public var suspended_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/user-search-result-item/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `user_hyphen_search_hyphen_result_hyphen_item`. /// /// - Parameters: @@ -4550,6 +4590,7 @@ public enum Components { /// - blog: /// - company: /// - suspended_at: + /// - user_view_type: public init( login: Swift.String, id: Swift.Int64, @@ -4584,7 +4625,8 @@ public enum Components { text_matches: Components.Schemas.search_hyphen_result_hyphen_text_hyphen_matches? = nil, blog: Swift.String? = nil, company: Swift.String? = nil, - suspended_at: Foundation.Date? = nil + suspended_at: Foundation.Date? = nil, + user_view_type: Swift.String? = nil ) { self.login = login self.id = id @@ -4620,6 +4662,7 @@ public enum Components { self.blog = blog self.company = company self.suspended_at = suspended_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case login @@ -4656,6 +4699,7 @@ public enum Components { case blog case company case suspended_at + case user_view_type } } } @@ -4871,7 +4915,7 @@ public enum Operations { @frozen public enum sortPayload: String, Codable, Hashable, Sendable { case indexed = "indexed" } - /// **This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + /// **This field is closing down.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) /// /// - Remark: Generated from `#/paths/search/code/GET/query/sort`. @available(*, deprecated) @@ -4881,7 +4925,7 @@ public enum Operations { case desc = "desc" case asc = "asc" } - /// **This field is deprecated.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + /// **This field is closing down.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. /// /// - Remark: Generated from `#/paths/search/code/GET/query/order`. @available(*, deprecated) @@ -4898,8 +4942,8 @@ public enum Operations { /// /// - Parameters: /// - q: The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/searching-code)" for a detailed list of qualifiers. - /// - sort: **This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) - /// - order: **This field is deprecated.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + /// - sort: **This field is closing down.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + /// - order: **This field is closing down.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. /// - per_page: The number of results per page (max 100). 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)." /// - page: The page number of the results to fetch. 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)." public init( From 4a049be099373d07db43e73aacc3ae1f15272b51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:17:02 +0000 Subject: [PATCH 061/129] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Types.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 7e1c7b29706..704e1b0ddb9 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -303,6 +303,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -327,6 +329,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -348,7 +351,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -371,6 +375,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -394,6 +399,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -479,6 +485,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -503,6 +511,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -524,7 +533,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -547,6 +557,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -570,6 +581,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// The security alert number. From 86fe37d502232c1d092444b82813c186412191e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:17:23 +0000 Subject: [PATCH 062/129] Commit via running ake Sources/teams --- Sources/teams/Client.swift | 60 ++++----- Sources/teams/Types.swift | 242 +++++++++++++++++++++---------------- 2 files changed, 170 insertions(+), 132 deletions(-) diff --git a/Sources/teams/Client.swift b/Sources/teams/Client.swift index 50c05979d3d..6909dfcfd7b 100644 --- a/Sources/teams/Client.swift +++ b/Sources/teams/Client.swift @@ -2403,7 +2403,7 @@ public struct Client: APIProtocol { /// Get a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -2491,7 +2491,7 @@ public struct Client: APIProtocol { /// Update a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// @@ -2659,7 +2659,7 @@ public struct Client: APIProtocol { /// Delete a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -2753,7 +2753,7 @@ public struct Client: APIProtocol { /// List discussions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -2852,7 +2852,7 @@ public struct Client: APIProtocol { /// Create a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -2933,7 +2933,7 @@ public struct Client: APIProtocol { /// Get a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -3004,7 +3004,7 @@ public struct Client: APIProtocol { /// Update a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -3086,7 +3086,7 @@ public struct Client: APIProtocol { /// Delete a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -3133,7 +3133,7 @@ public struct Client: APIProtocol { /// List discussion comments (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -3233,7 +3233,7 @@ public struct Client: APIProtocol { /// Create a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -3315,7 +3315,7 @@ public struct Client: APIProtocol { /// Get a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -3387,7 +3387,7 @@ public struct Client: APIProtocol { /// Update a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -3468,7 +3468,7 @@ public struct Client: APIProtocol { /// Delete a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -3516,7 +3516,7 @@ public struct Client: APIProtocol { /// List pending team invitations (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -3606,7 +3606,7 @@ public struct Client: APIProtocol { /// List team members (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -3724,7 +3724,7 @@ public struct Client: APIProtocol { } /// Get team member (Legacy) /// - /// The "Get team member" endpoint (described below) is deprecated. + /// The "Get team member" endpoint (described below) is closing down. /// /// We recommend using the [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. /// @@ -3772,7 +3772,7 @@ public struct Client: APIProtocol { } /// Add team member (Legacy) /// - /// The "Add team member" endpoint (described below) is deprecated. + /// The "Add team member" endpoint (described below) is closing down. /// /// We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. /// @@ -3855,7 +3855,7 @@ public struct Client: APIProtocol { } /// Remove team member (Legacy) /// - /// The "Remove team member" endpoint (described below) is deprecated. + /// The "Remove team member" endpoint (described below) is closing down. /// /// We recommend using the [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. /// @@ -3909,7 +3909,7 @@ public struct Client: APIProtocol { /// Get team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -4007,7 +4007,7 @@ public struct Client: APIProtocol { /// Add or update team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -4122,7 +4122,7 @@ public struct Client: APIProtocol { /// Remove team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -4174,7 +4174,7 @@ public struct Client: APIProtocol { /// List team projects (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -4286,7 +4286,7 @@ public struct Client: APIProtocol { /// Check team permissions for a project (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -4357,7 +4357,7 @@ public struct Client: APIProtocol { /// Add or update team project permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -4483,7 +4483,7 @@ public struct Client: APIProtocol { /// Remove a project from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -4576,7 +4576,7 @@ public struct Client: APIProtocol { /// List team repositories (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -4686,7 +4686,7 @@ public struct Client: APIProtocol { /// Check team permissions for a repository (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// /// > [!NOTE] /// > Repositories inherited through a parent team will also be checked. @@ -4763,7 +4763,7 @@ public struct Client: APIProtocol { /// Add or update team repository permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -4870,7 +4870,7 @@ public struct Client: APIProtocol { /// Remove a repository from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -4916,7 +4916,7 @@ public struct Client: APIProtocol { /// List child teams (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 9b55f8ce3fb..3daad2d0994 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -354,7 +354,7 @@ public protocol APIProtocol: Sendable { /// Get a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -363,7 +363,7 @@ public protocol APIProtocol: Sendable { /// Update a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// @@ -377,7 +377,7 @@ public protocol APIProtocol: Sendable { /// Delete a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -390,7 +390,7 @@ public protocol APIProtocol: Sendable { /// List discussions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -403,7 +403,7 @@ public protocol APIProtocol: Sendable { /// Create a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -418,7 +418,7 @@ public protocol APIProtocol: Sendable { /// Get a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -431,7 +431,7 @@ public protocol APIProtocol: Sendable { /// Update a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -444,7 +444,7 @@ public protocol APIProtocol: Sendable { /// Delete a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -457,7 +457,7 @@ public protocol APIProtocol: Sendable { /// List discussion comments (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -470,7 +470,7 @@ public protocol APIProtocol: Sendable { /// Create a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -485,7 +485,7 @@ public protocol APIProtocol: Sendable { /// Get a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -498,7 +498,7 @@ public protocol APIProtocol: Sendable { /// Update a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -511,7 +511,7 @@ public protocol APIProtocol: Sendable { /// Delete a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -524,7 +524,7 @@ public protocol APIProtocol: Sendable { /// List pending team invitations (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -535,7 +535,7 @@ public protocol APIProtocol: Sendable { /// List team members (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -545,7 +545,7 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_members_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_members_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_members_hyphen_legacy.Output /// Get team member (Legacy) /// - /// The "Get team member" endpoint (described below) is deprecated. + /// The "Get team member" endpoint (described below) is closing down. /// /// We recommend using the [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. /// @@ -557,7 +557,7 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_member_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_member_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_member_hyphen_legacy.Output /// Add team member (Legacy) /// - /// The "Add team member" endpoint (described below) is deprecated. + /// The "Add team member" endpoint (described below) is closing down. /// /// We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. /// @@ -576,7 +576,7 @@ public protocol APIProtocol: Sendable { func teams_sol_add_hyphen_member_hyphen_legacy(_ input: Operations.teams_sol_add_hyphen_member_hyphen_legacy.Input) async throws -> Operations.teams_sol_add_hyphen_member_hyphen_legacy.Output /// Remove team member (Legacy) /// - /// The "Remove team member" endpoint (described below) is deprecated. + /// The "Remove team member" endpoint (described below) is closing down. /// /// We recommend using the [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. /// @@ -594,7 +594,7 @@ public protocol APIProtocol: Sendable { /// Get team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -612,7 +612,7 @@ public protocol APIProtocol: Sendable { /// Add or update team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -632,7 +632,7 @@ public protocol APIProtocol: Sendable { /// Remove team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -648,7 +648,7 @@ public protocol APIProtocol: Sendable { /// List team projects (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -659,7 +659,7 @@ public protocol APIProtocol: Sendable { /// Check team permissions for a project (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -670,7 +670,7 @@ public protocol APIProtocol: Sendable { /// Add or update team project permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -681,7 +681,7 @@ public protocol APIProtocol: Sendable { /// Remove a project from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -692,7 +692,7 @@ public protocol APIProtocol: Sendable { /// List team repositories (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -701,7 +701,7 @@ public protocol APIProtocol: Sendable { /// Check team permissions for a repository (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// /// > [!NOTE] /// > Repositories inherited through a parent team will also be checked. @@ -715,7 +715,7 @@ public protocol APIProtocol: Sendable { /// Add or update team repository permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -728,7 +728,7 @@ public protocol APIProtocol: Sendable { /// Remove a repository from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -739,7 +739,7 @@ public protocol APIProtocol: Sendable { /// List child teams (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. @@ -1332,7 +1332,7 @@ extension APIProtocol { /// Get a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -1349,7 +1349,7 @@ extension APIProtocol { /// Update a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// @@ -1373,7 +1373,7 @@ extension APIProtocol { /// Delete a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -1394,7 +1394,7 @@ extension APIProtocol { /// List discussions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -1417,7 +1417,7 @@ extension APIProtocol { /// Create a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -1442,7 +1442,7 @@ extension APIProtocol { /// Get a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -1463,7 +1463,7 @@ extension APIProtocol { /// Update a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -1486,7 +1486,7 @@ extension APIProtocol { /// Delete a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -1501,7 +1501,7 @@ extension APIProtocol { /// List discussion comments (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -1524,7 +1524,7 @@ extension APIProtocol { /// Create a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -1549,7 +1549,7 @@ extension APIProtocol { /// Get a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -1570,7 +1570,7 @@ extension APIProtocol { /// Update a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -1593,7 +1593,7 @@ extension APIProtocol { /// Delete a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -1608,7 +1608,7 @@ extension APIProtocol { /// List pending team invitations (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -1629,7 +1629,7 @@ extension APIProtocol { /// List team members (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -1649,7 +1649,7 @@ extension APIProtocol { } /// Get team member (Legacy) /// - /// The "Get team member" endpoint (described below) is deprecated. + /// The "Get team member" endpoint (described below) is closing down. /// /// We recommend using the [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. /// @@ -1663,7 +1663,7 @@ extension APIProtocol { } /// Add team member (Legacy) /// - /// The "Add team member" endpoint (described below) is deprecated. + /// The "Add team member" endpoint (described below) is closing down. /// /// We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. /// @@ -1690,7 +1690,7 @@ extension APIProtocol { } /// Remove team member (Legacy) /// - /// The "Remove team member" endpoint (described below) is deprecated. + /// The "Remove team member" endpoint (described below) is closing down. /// /// We recommend using the [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. /// @@ -1710,7 +1710,7 @@ extension APIProtocol { /// Get team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -1736,7 +1736,7 @@ extension APIProtocol { /// Add or update team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -1766,7 +1766,7 @@ extension APIProtocol { /// Remove team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -1784,7 +1784,7 @@ extension APIProtocol { /// List team projects (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -1805,7 +1805,7 @@ extension APIProtocol { /// Check team permissions for a project (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -1824,7 +1824,7 @@ extension APIProtocol { /// Add or update team project permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -1845,7 +1845,7 @@ extension APIProtocol { /// Remove a project from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -1864,7 +1864,7 @@ extension APIProtocol { /// List team repositories (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -1883,7 +1883,7 @@ extension APIProtocol { /// Check team permissions for a repository (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// /// > [!NOTE] /// > Repositories inherited through a parent team will also be checked. @@ -1905,7 +1905,7 @@ extension APIProtocol { /// Add or update team repository permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -1928,7 +1928,7 @@ extension APIProtocol { /// Remove a repository from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -1941,7 +1941,7 @@ extension APIProtocol { /// List child teams (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. @@ -2039,6 +2039,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -2063,6 +2065,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -2084,7 +2087,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -2107,6 +2111,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -2130,6 +2135,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -2215,6 +2221,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -2239,6 +2247,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -2260,7 +2269,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -2283,6 +2293,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -2306,6 +2317,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Validation Error @@ -2961,6 +2973,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2969,18 +3003,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -2988,6 +3025,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -5702,14 +5740,14 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/notification_setting`. public var notification_setting: Operations.teams_sol_create.Input.Body.jsonPayload.notification_settingPayload? - /// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/permission`. @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { case pull = "pull" case push = "push" } - /// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/permission`. public var permission: Operations.teams_sol_create.Input.Body.jsonPayload.permissionPayload? @@ -5726,7 +5764,7 @@ public enum Operations { /// - repo_names: The full name (e.g., "organization-name/repository-name") of repositories to add the team to. /// - privacy: The level of privacy this team should have. The options are: /// - notification_setting: The notification setting the team has chosen. The options are: - /// - permission: **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// - permission: **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// - parent_team_id: The ID of a team to set as the parent team. public init( name: Swift.String, @@ -6170,7 +6208,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/PATCH/requestBody/json/notification_setting`. public var notification_setting: Operations.teams_sol_update_hyphen_in_hyphen_org.Input.Body.jsonPayload.notification_settingPayload? - /// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/PATCH/requestBody/json/permission`. @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { @@ -6178,7 +6216,7 @@ public enum Operations { case push = "push" case admin = "admin" } - /// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/PATCH/requestBody/json/permission`. public var permission: Operations.teams_sol_update_hyphen_in_hyphen_org.Input.Body.jsonPayload.permissionPayload? @@ -6193,7 +6231,7 @@ public enum Operations { /// - description: The description of the team. /// - privacy: The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: /// - notification_setting: The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: - /// - permission: **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// - permission: **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// - parent_team_id: The ID of a team to set as the parent team. public init( name: Swift.String? = nil, @@ -10630,7 +10668,7 @@ public enum Operations { /// Get a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -10786,7 +10824,7 @@ public enum Operations { /// Update a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// @@ -10873,7 +10911,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/teams/{team_id}/PATCH/requestBody/json/notification_setting`. public var notification_setting: Operations.teams_sol_update_hyphen_legacy.Input.Body.jsonPayload.notification_settingPayload? - /// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/teams/{team_id}/PATCH/requestBody/json/permission`. @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { @@ -10881,7 +10919,7 @@ public enum Operations { case push = "push" case admin = "admin" } - /// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/teams/{team_id}/PATCH/requestBody/json/permission`. public var permission: Operations.teams_sol_update_hyphen_legacy.Input.Body.jsonPayload.permissionPayload? @@ -10896,7 +10934,7 @@ public enum Operations { /// - description: The description of the team. /// - privacy: The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: /// - notification_setting: The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: - /// - permission: **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + /// - permission: **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// - parent_team_id: The ID of a team to set as the parent team. public init( name: Swift.String, @@ -11148,7 +11186,7 @@ public enum Operations { /// Delete a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -11307,7 +11345,7 @@ public enum Operations { /// List discussions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -11502,7 +11540,7 @@ public enum Operations { /// Create a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -11685,7 +11723,7 @@ public enum Operations { /// Get a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -11831,7 +11869,7 @@ public enum Operations { /// Update a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -12013,7 +12051,7 @@ public enum Operations { /// Delete a discussion (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -12093,7 +12131,7 @@ public enum Operations { /// List discussion comments (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -12297,7 +12335,7 @@ public enum Operations { /// Create a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -12471,7 +12509,7 @@ public enum Operations { /// Get a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -12624,7 +12662,7 @@ public enum Operations { /// Update a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -12803,7 +12841,7 @@ public enum Operations { /// Delete a discussion comment (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -12890,7 +12928,7 @@ public enum Operations { /// List pending team invitations (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -13071,7 +13109,7 @@ public enum Operations { /// List team members (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -13287,7 +13325,7 @@ public enum Operations { } /// Get team member (Legacy) /// - /// The "Get team member" endpoint (described below) is deprecated. + /// The "Get team member" endpoint (described below) is closing down. /// /// We recommend using the [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. /// @@ -13393,7 +13431,7 @@ public enum Operations { } /// Add team member (Legacy) /// - /// The "Add team member" endpoint (described below) is deprecated. + /// The "Add team member" endpoint (described below) is closing down. /// /// We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. /// @@ -13598,7 +13636,7 @@ public enum Operations { } /// Remove team member (Legacy) /// - /// The "Remove team member" endpoint (described below) is deprecated. + /// The "Remove team member" endpoint (described below) is closing down. /// /// We recommend using the [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. /// @@ -13710,7 +13748,7 @@ public enum Operations { /// Get team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -13884,7 +13922,7 @@ public enum Operations { /// Add or update team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -14147,7 +14185,7 @@ public enum Operations { /// Remove team membership for a user (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// @@ -14257,7 +14295,7 @@ public enum Operations { /// List team projects (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -14461,7 +14499,7 @@ public enum Operations { /// Check team permissions for a project (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -14632,7 +14670,7 @@ public enum Operations { /// Add or update team project permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -14906,7 +14944,7 @@ public enum Operations { /// Remove a project from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -15072,7 +15110,7 @@ public enum Operations { /// List team repositories (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -15274,7 +15312,7 @@ public enum Operations { /// Check team permissions for a repository (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// /// > [!NOTE] /// > Repositories inherited through a parent team will also be checked. @@ -15482,7 +15520,7 @@ public enum Operations { /// Add or update team repository permissions (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -15691,7 +15729,7 @@ public enum Operations { /// Remove a repository from a team (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -15776,7 +15814,7 @@ public enum Operations { /// List child teams (Legacy) /// /// > [!WARNING] - /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. From c5f5135b362f448cdac67ca74da211e716ce16c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:17:44 +0000 Subject: [PATCH 063/129] Commit via running ake Sources/users --- Sources/users/Types.swift | 186 ++++++++++++++++++++------------------ 1 file changed, 99 insertions(+), 87 deletions(-) diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index 2cb9a226f61..1c5f2066824 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -1137,6 +1137,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -1161,6 +1163,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1182,7 +1185,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1205,6 +1209,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1228,6 +1233,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1400,6 +1406,8 @@ public enum Components { public var login: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/id`. public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/public-user/user_view_type`. + public var user_view_type: Swift.String? /// - Remark: Generated from `#/components/schemas/public-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/avatar_url`. @@ -1499,8 +1507,6 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/public-user/plan`. public var plan: Components.Schemas.public_hyphen_user.planPayload? - /// - Remark: Generated from `#/components/schemas/public-user/suspended_at`. - public var suspended_at: Foundation.Date? /// - Remark: Generated from `#/components/schemas/public-user/private_gists`. public var private_gists: Swift.Int? /// - Remark: Generated from `#/components/schemas/public-user/total_private_repos`. @@ -1516,6 +1522,7 @@ public enum Components { /// - Parameters: /// - login: /// - id: + /// - user_view_type: /// - node_id: /// - avatar_url: /// - gravatar_id: @@ -1548,7 +1555,6 @@ public enum Components { /// - created_at: /// - updated_at: /// - plan: - /// - suspended_at: /// - private_gists: /// - total_private_repos: /// - owned_private_repos: @@ -1557,6 +1563,7 @@ public enum Components { public init( login: Swift.String, id: Swift.Int64, + user_view_type: Swift.String? = nil, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1589,7 +1596,6 @@ public enum Components { created_at: Foundation.Date, updated_at: Foundation.Date, plan: Components.Schemas.public_hyphen_user.planPayload? = nil, - suspended_at: Foundation.Date? = nil, private_gists: Swift.Int? = nil, total_private_repos: Swift.Int? = nil, owned_private_repos: Swift.Int? = nil, @@ -1598,6 +1604,7 @@ public enum Components { ) { self.login = login self.id = id + self.user_view_type = user_view_type self.node_id = node_id self.avatar_url = avatar_url self.gravatar_id = gravatar_id @@ -1630,7 +1637,6 @@ public enum Components { self.created_at = created_at self.updated_at = updated_at self.plan = plan - self.suspended_at = suspended_at self.private_gists = private_gists self.total_private_repos = total_private_repos self.owned_private_repos = owned_private_repos @@ -1640,6 +1646,7 @@ public enum Components { public enum CodingKeys: String, CodingKey { case login case id + case user_view_type case node_id case avatar_url case gravatar_id @@ -1672,7 +1679,6 @@ public enum Components { case created_at case updated_at case plan - case suspended_at case private_gists case total_private_repos case owned_private_repos @@ -1689,6 +1695,10 @@ public enum Components { Swift.Int64.self, forKey: .id ) + user_view_type = try container.decodeIfPresent( + Swift.String.self, + forKey: .user_view_type + ) node_id = try container.decode( Swift.String.self, forKey: .node_id @@ -1817,10 +1827,6 @@ public enum Components { Components.Schemas.public_hyphen_user.planPayload.self, forKey: .plan ) - suspended_at = try container.decodeIfPresent( - Foundation.Date.self, - forKey: .suspended_at - ) private_gists = try container.decodeIfPresent( Swift.Int.self, forKey: .private_gists @@ -1844,6 +1850,7 @@ public enum Components { try decoder.ensureNoAdditionalProperties(knownKeys: [ "login", "id", + "user_view_type", "node_id", "avatar_url", "gravatar_id", @@ -1876,7 +1883,6 @@ public enum Components { "created_at", "updated_at", "plan", - "suspended_at", "private_gists", "total_private_repos", "owned_private_repos", @@ -1903,6 +1909,8 @@ public enum Components { public var login: Swift.String /// - Remark: Generated from `#/components/schemas/private-user/id`. public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/private-user/user_view_type`. + public var user_view_type: Swift.String? /// - Remark: Generated from `#/components/schemas/private-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/private-user/avatar_url`. @@ -2014,8 +2022,6 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/private-user/plan`. public var plan: Components.Schemas.private_hyphen_user.planPayload? - /// - Remark: Generated from `#/components/schemas/private-user/suspended_at`. - public var suspended_at: Foundation.Date? /// - Remark: Generated from `#/components/schemas/private-user/business_plus`. public var business_plus: Swift.Bool? /// - Remark: Generated from `#/components/schemas/private-user/ldap_dn`. @@ -2025,6 +2031,7 @@ public enum Components { /// - Parameters: /// - login: /// - id: + /// - user_view_type: /// - node_id: /// - avatar_url: /// - gravatar_id: @@ -2063,12 +2070,12 @@ public enum Components { /// - collaborators: /// - two_factor_authentication: /// - plan: - /// - suspended_at: /// - business_plus: /// - ldap_dn: public init( login: Swift.String, id: Swift.Int64, + user_view_type: Swift.String? = nil, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2107,12 +2114,12 @@ public enum Components { collaborators: Swift.Int, two_factor_authentication: Swift.Bool, plan: Components.Schemas.private_hyphen_user.planPayload? = nil, - suspended_at: Foundation.Date? = nil, business_plus: Swift.Bool? = nil, ldap_dn: Swift.String? = nil ) { self.login = login self.id = id + self.user_view_type = user_view_type self.node_id = node_id self.avatar_url = avatar_url self.gravatar_id = gravatar_id @@ -2151,13 +2158,13 @@ public enum Components { self.collaborators = collaborators self.two_factor_authentication = two_factor_authentication self.plan = plan - self.suspended_at = suspended_at self.business_plus = business_plus self.ldap_dn = ldap_dn } public enum CodingKeys: String, CodingKey { case login case id + case user_view_type case node_id case avatar_url case gravatar_id @@ -2196,7 +2203,6 @@ public enum Components { case collaborators case two_factor_authentication case plan - case suspended_at case business_plus case ldap_dn } @@ -3135,35 +3141,37 @@ public enum Operations { @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/user/GET/responses/200/content/json`. @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/user/GET/responses/200/content/json/case1`. - case private_hyphen_user(Components.Schemas.private_hyphen_user) - /// - Remark: Generated from `#/paths/user/GET/responses/200/content/json/case2`. - case public_hyphen_user(Components.Schemas.public_hyphen_user) + /// - Remark: Generated from `#/paths/user/GET/responses/200/content/json/private_hyphen_user`. + case _private(Components.Schemas.private_hyphen_user) + /// - Remark: Generated from `#/paths/user/GET/responses/200/content/json/public_hyphen_user`. + case _public(Components.Schemas.public_hyphen_user) + public enum CodingKeys: String, CodingKey { + case user_view_type + } public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .private_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .public_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: .user_view_type ) + switch discriminator { + case "private": + self = ._private(try .init(from: decoder)) + case "public": + self = ._public(try .init(from: decoder)) + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys.user_view_type, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } } public func encode(to encoder: any Encoder) throws { switch self { - case let .private_hyphen_user(value): + case let ._private(value): try value.encode(to: encoder) - case let .public_hyphen_user(value): + case let ._public(value): try value.encode(to: encoder) } } @@ -10625,35 +10633,37 @@ public enum Operations { @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json`. @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json/case1`. - case private_hyphen_user(Components.Schemas.private_hyphen_user) - /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json/case2`. - case public_hyphen_user(Components.Schemas.public_hyphen_user) + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json/private_hyphen_user`. + case _private(Components.Schemas.private_hyphen_user) + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json/public_hyphen_user`. + case _public(Components.Schemas.public_hyphen_user) + public enum CodingKeys: String, CodingKey { + case user_view_type + } public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .private_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .public_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: .user_view_type ) + switch discriminator { + case "private": + self = ._private(try .init(from: decoder)) + case "public": + self = ._public(try .init(from: decoder)) + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys.user_view_type, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } } public func encode(to encoder: any Encoder) throws { switch self { - case let .private_hyphen_user(value): + case let ._private(value): try value.encode(to: encoder) - case let .public_hyphen_user(value): + case let ._public(value): try value.encode(to: encoder) } } @@ -11004,35 +11014,37 @@ public enum Operations { @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/users/{username}/GET/responses/200/content/json`. @frozen public enum jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/users/{username}/GET/responses/200/content/json/case1`. - case private_hyphen_user(Components.Schemas.private_hyphen_user) - /// - Remark: Generated from `#/paths/users/{username}/GET/responses/200/content/json/case2`. - case public_hyphen_user(Components.Schemas.public_hyphen_user) + /// - Remark: Generated from `#/paths/users/{username}/GET/responses/200/content/json/private_hyphen_user`. + case _private(Components.Schemas.private_hyphen_user) + /// - Remark: Generated from `#/paths/users/{username}/GET/responses/200/content/json/public_hyphen_user`. + case _public(Components.Schemas.public_hyphen_user) + public enum CodingKeys: String, CodingKey { + case user_view_type + } public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .private_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .public_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: .user_view_type ) + switch discriminator { + case "private": + self = ._private(try .init(from: decoder)) + case "public": + self = ._public(try .init(from: decoder)) + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys.user_view_type, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } } public func encode(to encoder: any Encoder) throws { switch self { - case let .private_hyphen_user(value): + case let ._private(value): try value.encode(to: encoder) - case let .public_hyphen_user(value): + case let ._public(value): try value.encode(to: encoder) } } From 9c92253398802565f3535447b9ef740181a2149b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:18:05 +0000 Subject: [PATCH 064/129] Commit via running ake Sources/codespaces --- Sources/codespaces/Types.swift | 76 +++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index 3e31259f699..8c76b52204a 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -1445,6 +1445,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -1469,6 +1471,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1490,7 +1493,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1513,6 +1517,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1536,6 +1541,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1621,6 +1627,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1645,6 +1653,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1666,7 +1675,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1689,6 +1699,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1712,6 +1723,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Scim Error @@ -2185,7 +2197,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -2373,7 +2385,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -2840,6 +2852,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2848,18 +2882,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -2867,6 +2904,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// Minimal Repository @@ -4289,7 +4327,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -4477,7 +4515,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -10558,7 +10596,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/codespaces/POST/requestBody/json/location`. public var location: Swift.String? - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/codespaces/POST/requestBody/json/geo`. @frozen public enum geoPayload: String, Codable, Hashable, Sendable { @@ -10567,7 +10605,7 @@ public enum Operations { case UsEast = "UsEast" case UsWest = "UsWest" } - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/codespaces/POST/requestBody/json/geo`. public var geo: Operations.codespaces_sol_create_hyphen_with_hyphen_repo_hyphen_for_hyphen_authenticated_hyphen_user.Input.Body.jsonPayload.geoPayload? @@ -10608,7 +10646,7 @@ public enum Operations { /// - Parameters: /// - ref: Git ref (typically a branch name) for this codespace /// - location: The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. - /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// - client_ip: IP for location auto-detection when proxying a request /// - machine: Machine type to use for this codespace /// - devcontainer_path: Path to devcontainer.json config to use for this codespace @@ -13029,7 +13067,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/codespaces/POST/requestBody/json/location`. public var location: Swift.String? - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/codespaces/POST/requestBody/json/geo`. @frozen public enum geoPayload: String, Codable, Hashable, Sendable { @@ -13038,7 +13076,7 @@ public enum Operations { case UsEast = "UsEast" case UsWest = "UsWest" } - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/codespaces/POST/requestBody/json/geo`. public var geo: Operations.codespaces_sol_create_hyphen_with_hyphen_pr_hyphen_for_hyphen_authenticated_hyphen_user.Input.Body.jsonPayload.geoPayload? @@ -13078,7 +13116,7 @@ public enum Operations { /// /// - Parameters: /// - location: The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. - /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// - client_ip: IP for location auto-detection when proxying a request /// - machine: Machine type to use for this codespace /// - devcontainer_path: Path to devcontainer.json config to use for this codespace @@ -13700,7 +13738,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case1/location`. public var location: Swift.String? - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case1/geo`. @frozen public enum geoPayload: String, Codable, Hashable, Sendable { @@ -13709,7 +13747,7 @@ public enum Operations { case UsEast = "UsEast" case UsWest = "UsWest" } - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case1/geo`. public var geo: Operations.codespaces_sol_create_hyphen_for_hyphen_authenticated_hyphen_user.Input.Body.jsonPayload.Case1Payload.geoPayload? @@ -13751,7 +13789,7 @@ public enum Operations { /// - repository_id: Repository id for this codespace /// - ref: Git ref (typically a branch name) for this codespace /// - location: The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. - /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// - client_ip: IP for location auto-detection when proxying a request /// - machine: Machine type to use for this codespace /// - devcontainer_path: Path to devcontainer.json config to use for this codespace @@ -13843,7 +13881,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case2/location`. public var location: Swift.String? - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case2/geo`. @frozen public enum geoPayload: String, Codable, Hashable, Sendable { @@ -13852,7 +13890,7 @@ public enum Operations { case UsEast = "UsEast" case UsWest = "UsWest" } - /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case2/geo`. public var geo: Operations.codespaces_sol_create_hyphen_for_hyphen_authenticated_hyphen_user.Input.Body.jsonPayload.Case2Payload.geoPayload? @@ -13877,7 +13915,7 @@ public enum Operations { /// - Parameters: /// - pull_request: Pull request number for this codespace /// - location: The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. - /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + /// - geo: The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// - machine: Machine type to use for this codespace /// - devcontainer_path: Path to devcontainer.json config to use for this codespace /// - working_directory: Working directory for this codespace From b62b30e48404916ee0243610cc2bf4d762484d8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:18:26 +0000 Subject: [PATCH 065/129] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 24 +++++------ Sources/copilot/Types.swift | 80 +++++++++++++++++++----------------- 2 files changed, 55 insertions(+), 49 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 601629eab90..184dac7718b 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -41,7 +41,7 @@ public struct Client: APIProtocol { /// List all Copilot seat assignments for an enterprise /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -226,7 +226,7 @@ public struct Client: APIProtocol { /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -419,7 +419,7 @@ public struct Client: APIProtocol { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -616,7 +616,7 @@ public struct Client: APIProtocol { /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -779,7 +779,7 @@ public struct Client: APIProtocol { /// List all Copilot seat assignments for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -959,7 +959,7 @@ public struct Client: APIProtocol { /// Add teams to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -1136,7 +1136,7 @@ public struct Client: APIProtocol { /// Remove teams from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -1311,7 +1311,7 @@ public struct Client: APIProtocol { /// Add users to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -1488,7 +1488,7 @@ public struct Client: APIProtocol { /// Remove users from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -1663,7 +1663,7 @@ public struct Client: APIProtocol { /// Get a summary of Copilot usage for organization members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -1856,7 +1856,7 @@ public struct Client: APIProtocol { /// Get Copilot seat assignment details for a user /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// @@ -2018,7 +2018,7 @@ public struct Client: APIProtocol { /// Get a summary of Copilot usage for a team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index b488e20f49f..e2f9fd058be 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -14,7 +14,7 @@ public protocol APIProtocol: Sendable { /// List all Copilot seat assignments for an enterprise /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -32,7 +32,7 @@ public protocol APIProtocol: Sendable { /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -52,7 +52,7 @@ public protocol APIProtocol: Sendable { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -75,7 +75,7 @@ public protocol APIProtocol: Sendable { /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -91,7 +91,7 @@ public protocol APIProtocol: Sendable { /// List all Copilot seat assignments for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -104,7 +104,7 @@ public protocol APIProtocol: Sendable { /// Add teams to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -125,7 +125,7 @@ public protocol APIProtocol: Sendable { /// Remove teams from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -144,7 +144,7 @@ public protocol APIProtocol: Sendable { /// Add users to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -165,7 +165,7 @@ public protocol APIProtocol: Sendable { /// Remove users from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -184,7 +184,7 @@ public protocol APIProtocol: Sendable { /// Get a summary of Copilot usage for organization members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -204,7 +204,7 @@ public protocol APIProtocol: Sendable { /// Get Copilot seat assignment details for a user /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// @@ -218,7 +218,7 @@ public protocol APIProtocol: Sendable { /// Get a summary of Copilot usage for a team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -245,7 +245,7 @@ extension APIProtocol { /// List all Copilot seat assignments for an enterprise /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -273,7 +273,7 @@ extension APIProtocol { /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -303,7 +303,7 @@ extension APIProtocol { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -336,7 +336,7 @@ extension APIProtocol { /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -360,7 +360,7 @@ extension APIProtocol { /// List all Copilot seat assignments for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -383,7 +383,7 @@ extension APIProtocol { /// Add teams to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -414,7 +414,7 @@ extension APIProtocol { /// Remove teams from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -443,7 +443,7 @@ extension APIProtocol { /// Add users to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -474,7 +474,7 @@ extension APIProtocol { /// Remove users from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -503,7 +503,7 @@ extension APIProtocol { /// Get a summary of Copilot usage for organization members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -533,7 +533,7 @@ extension APIProtocol { /// Get Copilot seat assignment details for a user /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// @@ -555,7 +555,7 @@ extension APIProtocol { /// Get a summary of Copilot usage for a team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -647,6 +647,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -671,6 +673,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -692,7 +695,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -715,6 +719,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -738,6 +743,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -2062,7 +2068,7 @@ public enum Operations { /// List all Copilot seat assignments for an enterprise /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -2368,7 +2374,7 @@ public enum Operations { /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -2646,7 +2652,7 @@ public enum Operations { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -2936,7 +2942,7 @@ public enum Operations { /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -3196,7 +3202,7 @@ public enum Operations { /// List all Copilot seat assignments for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -3497,7 +3503,7 @@ public enum Operations { /// Add teams to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -3805,7 +3811,7 @@ public enum Operations { /// Remove teams from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -4111,7 +4117,7 @@ public enum Operations { /// Add users to the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -4419,7 +4425,7 @@ public enum Operations { /// Remove users from the Copilot subscription for an organization /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -4725,7 +4731,7 @@ public enum Operations { /// Get a summary of Copilot usage for organization members /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -5003,7 +5009,7 @@ public enum Operations { /// Get Copilot seat assignment details for a user /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// @@ -5270,7 +5276,7 @@ public enum Operations { /// Get a summary of Copilot usage for a team /// /// > [!NOTE] - /// > This endpoint is in beta and is subject to change. + /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. From 6aeff9f5c662f63a86ada15e29cd29328d8475d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:18:47 +0000 Subject: [PATCH 066/129] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Types.swift | 52 +++++++++++++++++++++---- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index faf4c6ee707..55c347a5955 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -546,6 +546,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -570,6 +572,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -591,7 +594,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -614,6 +618,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -637,6 +642,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// The type of credit the user is receiving. @@ -1234,6 +1240,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/nullable-simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `nullable_hyphen_simple_hyphen_user`. /// /// - Parameters: @@ -1258,6 +1266,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -1279,7 +1288,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -1302,6 +1312,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -1325,6 +1336,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Scim Error @@ -1798,7 +1810,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -1986,7 +1998,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. @@ -3034,6 +3046,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? + /// Creates a new `secret_scanning_ai_detectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. + public var secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -3042,18 +3076,21 @@ public enum Components { /// - secret_scanning: /// - secret_scanning_push_protection: /// - secret_scanning_non_provider_patterns: + /// - secret_scanning_ai_detection: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, - secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil, + secret_scanning_ai_detection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_ai_detectionPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns + self.secret_scanning_ai_detection = secret_scanning_ai_detection } public enum CodingKeys: String, CodingKey { case advanced_security @@ -3061,6 +3098,7 @@ public enum Components { case secret_scanning case secret_scanning_push_protection case secret_scanning_non_provider_patterns + case secret_scanning_ai_detection } } /// A repository on GitHub. @@ -3311,7 +3349,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-repository/allow_update_branch`. public var allow_update_branch: Swift.Bool? - /// Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/use_squash_pr_title_as_default`. @available(*, deprecated) @@ -3499,7 +3537,7 @@ public enum Components { /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged /// - allow_update_branch: Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. - /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + /// - use_squash_pr_title_as_default: Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. /// - squash_merge_commit_title: The default value for a squash merge commit title: /// - squash_merge_commit_message: The default value for a squash merge commit message: /// - merge_commit_title: The default value for a merge commit title. From 4447de6ce670a77ae6acc817995b87475358f18f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:20:32 +0000 Subject: [PATCH 067/129] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 9b9bca817fe..41b8a18cd9d 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -435,6 +435,8 @@ public enum Components { public var site_admin: Swift.Bool /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. public var starred_at: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`. + public var user_view_type: Swift.String? /// Creates a new `simple_hyphen_user`. /// /// - Parameters: @@ -459,6 +461,7 @@ public enum Components { /// - _type: /// - site_admin: /// - starred_at: + /// - user_view_type: public init( name: Swift.String? = nil, email: Swift.String? = nil, @@ -480,7 +483,8 @@ public enum Components { received_events_url: Swift.String, _type: Swift.String, site_admin: Swift.Bool, - starred_at: Swift.String? = nil + starred_at: Swift.String? = nil, + user_view_type: Swift.String? = nil ) { self.name = name self.email = email @@ -503,6 +507,7 @@ public enum Components { self._type = _type self.site_admin = site_admin self.starred_at = starred_at + self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { case name @@ -526,6 +531,7 @@ public enum Components { case _type = "type" case site_admin case starred_at + case user_view_type } } /// Basic Error @@ -1011,6 +1017,7 @@ public enum Components { @frozen public enum target_typePayload: String, Codable, Hashable, Sendable { case global = "global" case organization = "organization" + case enterprise = "enterprise" } /// The type of the code security configuration. /// From 071a45f291651bfa451dfacbecef5b98bb6b703a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:20:53 +0000 Subject: [PATCH 068/129] Commit via running ake Sources/private-registries --- Sources/private-registries/Client.swift | 41 +++++++++++++++++++++++ Sources/private-registries/Types.swift | 44 +++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 Sources/private-registries/Client.swift create mode 100644 Sources/private-registries/Types.swift diff --git a/Sources/private-registries/Client.swift b/Sources/private-registries/Client.swift new file mode 100644 index 00000000000..87202523ac7 --- /dev/null +++ b/Sources/private-registries/Client.swift @@ -0,0 +1,41 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +import HTTPTypes +/// GitHub's v3 REST API. +public struct Client: APIProtocol { + /// The underlying HTTP client. + private let client: UniversalClient + /// Creates a new client. + /// - Parameters: + /// - serverURL: The server URL that the client connects to. Any server + /// URLs defined in the OpenAPI document are available as static methods + /// on the ``Servers`` type. + /// - configuration: A set of configuration values for the client. + /// - transport: A transport that performs HTTP operations. + /// - middlewares: A list of middlewares to call before the transport. + public init( + serverURL: Foundation.URL, + configuration: Configuration = .init(), + transport: any ClientTransport, + middlewares: [any ClientMiddleware] = [] + ) { + self.client = .init( + serverURL: serverURL, + configuration: configuration, + transport: transport, + middlewares: middlewares + ) + } + private var converter: Converter { + client.converter + } +} diff --git a/Sources/private-registries/Types.swift b/Sources/private-registries/Types.swift new file mode 100644 index 00000000000..2a210decbff --- /dev/null +++ b/Sources/private-registries/Types.swift @@ -0,0 +1,44 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +/// A type that performs HTTP operations defined by the OpenAPI document. +public protocol APIProtocol: Sendable {} + +/// Convenience overloads for operation inputs. +extension APIProtocol { +} + +/// Server URLs defined in the OpenAPI document. +public enum Servers { + public static func server1() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } +} + +/// Types generated from the components section of the OpenAPI document. +public enum Components { + /// Types generated from the `#/components/schemas` section of the OpenAPI document. + public enum Schemas {} + /// Types generated from the `#/components/parameters` section of the OpenAPI document. + public enum Parameters {} + /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. + public enum RequestBodies {} + /// Types generated from the `#/components/responses` section of the OpenAPI document. + public enum Responses {} + /// Types generated from the `#/components/headers` section of the OpenAPI document. + public enum Headers {} +} + +/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. +public enum Operations {} From 7f880d4dc2fffe7dc1c038bb855ca123eb0a3977 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:20:54 +0000 Subject: [PATCH 069/129] Commit via running ake Package.swift --- Package.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Package.swift b/Package.swift index abb5eac1ca7..be43e368b45 100644 --- a/Package.swift +++ b/Package.swift @@ -40,6 +40,7 @@ let package = Package( .library(name: "GitHubRestAPIOidc", targets: ["GitHubRestAPIOidc"]), .library(name: "GitHubRestAPIOrgs", targets: ["GitHubRestAPIOrgs"]), .library(name: "GitHubRestAPIPackages", targets: ["GitHubRestAPIPackages"]), + .library(name: "GitHubRestAPIPrivate_Registries", targets: ["GitHubRestAPIPrivate_Registries"]), .library(name: "GitHubRestAPIProjects", targets: ["GitHubRestAPIProjects"]), .library(name: "GitHubRestAPIPulls", targets: ["GitHubRestAPIPulls"]), .library(name: "GitHubRestAPIRate_Limit", targets: ["GitHubRestAPIRate_Limit"]), @@ -288,6 +289,14 @@ let package = Package( ], path: "Sources/packages" ), + .target( + name: "GitHubRestAPIPrivate_Registries", + dependencies: [ + .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), + .product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"), + ], + path: "Sources/private-registries" + ), .target( name: "GitHubRestAPIProjects", dependencies: [ From 7f5bf489210b719629171dfd0fcf0ed33fec7e1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Oct 2024 22:20:55 +0000 Subject: [PATCH 070/129] Commit via running ake .spi.yml --- .spi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.spi.yml b/.spi.yml index c5f8ce72eeb..f829d7e353b 100644 --- a/.spi.yml +++ b/.spi.yml @@ -31,6 +31,7 @@ builder: - GitHubRestAPIOidc - GitHubRestAPIOrgs - GitHubRestAPIPackages + - GitHubRestAPIPrivate_Registries - GitHubRestAPIProjects - GitHubRestAPIPulls - GitHubRestAPIRate_Limit From 3f59e05e707e0bc9822025482f4436f23adefa7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:30:31 +0000 Subject: [PATCH 071/129] Bump Submodule/github/rest-api-description from `cf0948f` to `531ec66` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `cf0948f` to `531ec66`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/cf0948fb6fe2d210da0d003466c82c3aea8783a7...531ec66f506b4a24468ca33192dc1ca5489f8a1b) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index cf0948fb6fe..531ec66f506 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit cf0948fb6fe2d210da0d003466c82c3aea8783a7 +Subproject commit 531ec66f506b4a24468ca33192dc1ca5489f8a1b From 8453fe28f892cf3f2c441de0c3007a5557cfbad6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 28 Oct 2024 21:48:58 +0000 Subject: [PATCH 072/129] Commit via running ake Sources/activity --- Sources/activity/Client.swift | 2 +- Sources/activity/Types.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/activity/Client.swift b/Sources/activity/Client.swift index b052b53df12..7cbcb22f697 100644 --- a/Sources/activity/Client.swift +++ b/Sources/activity/Client.swift @@ -2616,7 +2616,7 @@ public struct Client: APIProtocol { } /// List events for the authenticated user /// - /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read). /// /// > [!NOTE] /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index bccbb3c7352..2b16781dd87 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -219,7 +219,7 @@ public protocol APIProtocol: Sendable { func activity_sol_list_hyphen_watched_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_watched_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_watched_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user.Output /// List events for the authenticated user /// - /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read). /// /// > [!NOTE] /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. @@ -694,7 +694,7 @@ extension APIProtocol { } /// List events for the authenticated user /// - /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read). /// /// > [!NOTE] /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. @@ -9765,7 +9765,7 @@ public enum Operations { } /// List events for the authenticated user /// - /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read). /// /// > [!NOTE] /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. From b0a05d75fbca63ddfd67e425662db9514bf8c92a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 28 Oct 2024 21:50:21 +0000 Subject: [PATCH 073/129] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 751fe9c7ccf..1f47dc564cc 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -1910,7 +1910,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/code-scanning-organization-alert-items/instances_url`. public var instances_url: Components.Schemas.alert_hyphen_instances_hyphen_url /// - Remark: Generated from `#/components/schemas/code-scanning-organization-alert-items/state`. - public var state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state + public var state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state? /// - Remark: Generated from `#/components/schemas/code-scanning-organization-alert-items/fixed_at`. public var fixed_at: Components.Schemas.alert_hyphen_fixed_hyphen_at? /// - Remark: Generated from `#/components/schemas/code-scanning-organization-alert-items/dismissed_by`. @@ -1955,7 +1955,7 @@ public enum Components { url: Components.Schemas.alert_hyphen_url, html_url: Components.Schemas.alert_hyphen_html_hyphen_url, instances_url: Components.Schemas.alert_hyphen_instances_hyphen_url, - state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state, + state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state? = nil, fixed_at: Components.Schemas.alert_hyphen_fixed_hyphen_at? = nil, dismissed_by: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, dismissed_at: Components.Schemas.alert_hyphen_dismissed_hyphen_at? = nil, @@ -2017,7 +2017,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/code-scanning-alert-items/instances_url`. public var instances_url: Components.Schemas.alert_hyphen_instances_hyphen_url /// - Remark: Generated from `#/components/schemas/code-scanning-alert-items/state`. - public var state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state + public var state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state? /// - Remark: Generated from `#/components/schemas/code-scanning-alert-items/fixed_at`. public var fixed_at: Components.Schemas.alert_hyphen_fixed_hyphen_at? /// - Remark: Generated from `#/components/schemas/code-scanning-alert-items/dismissed_by`. @@ -2059,7 +2059,7 @@ public enum Components { url: Components.Schemas.alert_hyphen_url, html_url: Components.Schemas.alert_hyphen_html_hyphen_url, instances_url: Components.Schemas.alert_hyphen_instances_hyphen_url, - state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state, + state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state? = nil, fixed_at: Components.Schemas.alert_hyphen_fixed_hyphen_at? = nil, dismissed_by: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, dismissed_at: Components.Schemas.alert_hyphen_dismissed_hyphen_at? = nil, @@ -2219,7 +2219,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/code-scanning-alert/instances_url`. public var instances_url: Components.Schemas.alert_hyphen_instances_hyphen_url /// - Remark: Generated from `#/components/schemas/code-scanning-alert/state`. - public var state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state + public var state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state? /// - Remark: Generated from `#/components/schemas/code-scanning-alert/fixed_at`. public var fixed_at: Components.Schemas.alert_hyphen_fixed_hyphen_at? /// - Remark: Generated from `#/components/schemas/code-scanning-alert/dismissed_by`. @@ -2261,7 +2261,7 @@ public enum Components { url: Components.Schemas.alert_hyphen_url, html_url: Components.Schemas.alert_hyphen_html_hyphen_url, instances_url: Components.Schemas.alert_hyphen_instances_hyphen_url, - state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state, + state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state? = nil, fixed_at: Components.Schemas.alert_hyphen_fixed_hyphen_at? = nil, dismissed_by: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, dismissed_at: Components.Schemas.alert_hyphen_dismissed_hyphen_at? = nil, From 9b71e9ce1e0ee525b149738b6d20ae06e5a1158a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 28 Oct 2024 21:55:33 +0000 Subject: [PATCH 074/129] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 3 +++ Sources/orgs/Types.swift | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index 3c6b205c57f..f77961fc261 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -7201,6 +7201,9 @@ public struct Client: APIProtocol { /// /// For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. /// + /// > [!NOTE] + /// > Requests using a fine-grained access token will receive a `200 Success` response with an empty list. + /// /// - Remark: HTTP `GET /user/orgs`. /// - Remark: Generated from `#/paths//user/orgs/get(orgs/list-for-authenticated-user)`. public func orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Output { diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index aaf3c3ffe68..200e17216fa 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -733,6 +733,9 @@ public protocol APIProtocol: Sendable { /// /// For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. /// + /// > [!NOTE] + /// > Requests using a fine-grained access token will receive a `200 Success` response with an empty list. + /// /// - Remark: HTTP `GET /user/orgs`. /// - Remark: Generated from `#/paths//user/orgs/get(orgs/list-for-authenticated-user)`. func orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Output @@ -2033,6 +2036,9 @@ extension APIProtocol { /// /// For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. /// + /// > [!NOTE] + /// > Requests using a fine-grained access token will receive a `200 Success` response with an empty list. + /// /// - Remark: HTTP `GET /user/orgs`. /// - Remark: Generated from `#/paths//user/orgs/get(orgs/list-for-authenticated-user)`. public func orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user( @@ -5287,6 +5293,12 @@ public enum Components { public var private_gists: Swift.Int? /// - Remark: Generated from `#/components/schemas/organization-full/disk_usage`. public var disk_usage: Swift.Int? + /// The number of collaborators on private repositories. + /// + /// This field may be null if the number of private repositories is over 50,000. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/collaborators`. + public var collaborators: Swift.Int? /// - Remark: Generated from `#/components/schemas/organization-full/billing_email`. public var billing_email: Swift.String? /// - Remark: Generated from `#/components/schemas/organization-full/plan`. @@ -5458,6 +5470,7 @@ public enum Components { /// - owned_private_repos: /// - private_gists: /// - disk_usage: + /// - collaborators: The number of collaborators on private repositories. /// - billing_email: /// - plan: /// - default_repository_permission: @@ -5515,6 +5528,7 @@ public enum Components { owned_private_repos: Swift.Int? = nil, private_gists: Swift.Int? = nil, disk_usage: Swift.Int? = nil, + collaborators: Swift.Int? = nil, billing_email: Swift.String? = nil, plan: Components.Schemas.organization_hyphen_full.planPayload? = nil, default_repository_permission: Swift.String? = nil, @@ -5572,6 +5586,7 @@ public enum Components { self.owned_private_repos = owned_private_repos self.private_gists = private_gists self.disk_usage = disk_usage + self.collaborators = collaborators self.billing_email = billing_email self.plan = plan self.default_repository_permission = default_repository_permission @@ -5630,6 +5645,7 @@ public enum Components { case owned_private_repos case private_gists case disk_usage + case collaborators case billing_email case plan case default_repository_permission @@ -21265,6 +21281,9 @@ public enum Operations { /// /// For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. /// + /// > [!NOTE] + /// > Requests using a fine-grained access token will receive a `200 Success` response with an empty list. + /// /// - Remark: HTTP `GET /user/orgs`. /// - Remark: Generated from `#/paths//user/orgs/get(orgs/list-for-authenticated-user)`. public enum orgs_sol_list_hyphen_for_hyphen_authenticated_hyphen_user { From c6227f541b8953038ddecd82091da12fb53f45b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 28 Oct 2024 21:56:35 +0000 Subject: [PATCH 075/129] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 1685 +------------------------------------ 1 file changed, 8 insertions(+), 1677 deletions(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index bd928709691..e5378774f36 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -4295,866 +4295,11 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request/head/ref`. public var ref: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/head/repo`. - public struct repoPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/archive_url`. - public var archive_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/assignees_url`. - public var assignees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/blobs_url`. - public var blobs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/branches_url`. - public var branches_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/collaborators_url`. - public var collaborators_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/comments_url`. - public var comments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/commits_url`. - public var commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/compare_url`. - public var compare_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/contents_url`. - public var contents_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/contributors_url`. - public var contributors_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/deployments_url`. - public var deployments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/downloads_url`. - public var downloads_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/fork`. - public var fork: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/forks_url`. - public var forks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/full_name`. - public var full_name: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/git_commits_url`. - public var git_commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/git_refs_url`. - public var git_refs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/git_tags_url`. - public var git_tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/issue_comment_url`. - public var issue_comment_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/issue_events_url`. - public var issue_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/keys_url`. - public var keys_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/labels_url`. - public var labels_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/languages_url`. - public var languages_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/merges_url`. - public var merges_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/milestones_url`. - public var milestones_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/notifications_url`. - public var notifications_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner`. - public struct ownerPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/followers_url`. - public var followers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/following_url`. - public var following_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/gists_url`. - public var gists_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/gravatar_id`. - public var gravatar_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/organizations_url`. - public var organizations_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/received_events_url`. - public var received_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/site_admin`. - public var site_admin: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/starred_url`. - public var starred_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/subscriptions_url`. - public var subscriptions_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner/user_view_type`. - public var user_view_type: Swift.String? - /// Creates a new `ownerPayload`. - /// - /// - Parameters: - /// - avatar_url: - /// - events_url: - /// - followers_url: - /// - following_url: - /// - gists_url: - /// - gravatar_id: - /// - html_url: - /// - id: - /// - node_id: - /// - login: - /// - organizations_url: - /// - received_events_url: - /// - repos_url: - /// - site_admin: - /// - starred_url: - /// - subscriptions_url: - /// - _type: - /// - url: - /// - user_view_type: - public init( - avatar_url: Swift.String, - events_url: Swift.String, - followers_url: Swift.String, - following_url: Swift.String, - gists_url: Swift.String, - gravatar_id: Swift.String? = nil, - html_url: Swift.String, - id: Swift.Int, - node_id: Swift.String, - login: Swift.String, - organizations_url: Swift.String, - received_events_url: Swift.String, - repos_url: Swift.String, - site_admin: Swift.Bool, - starred_url: Swift.String, - subscriptions_url: Swift.String, - _type: Swift.String, - url: Swift.String, - user_view_type: Swift.String? = nil - ) { - self.avatar_url = avatar_url - self.events_url = events_url - self.followers_url = followers_url - self.following_url = following_url - self.gists_url = gists_url - self.gravatar_id = gravatar_id - self.html_url = html_url - self.id = id - self.node_id = node_id - self.login = login - self.organizations_url = organizations_url - self.received_events_url = received_events_url - self.repos_url = repos_url - self.site_admin = site_admin - self.starred_url = starred_url - self.subscriptions_url = subscriptions_url - self._type = _type - self.url = url - self.user_view_type = user_view_type - } - public enum CodingKeys: String, CodingKey { - case avatar_url - case events_url - case followers_url - case following_url - case gists_url - case gravatar_id - case html_url - case id - case node_id - case login - case organizations_url - case received_events_url - case repos_url - case site_admin - case starred_url - case subscriptions_url - case _type = "type" - case url - case user_view_type - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/owner`. - public var owner: Components.Schemas.pull_hyphen_request.headPayload.repoPayload.ownerPayload - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/private`. - public var _private: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/pulls_url`. - public var pulls_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/releases_url`. - public var releases_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/stargazers_url`. - public var stargazers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/statuses_url`. - public var statuses_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/subscribers_url`. - public var subscribers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/subscription_url`. - public var subscription_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/tags_url`. - public var tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/teams_url`. - public var teams_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/trees_url`. - public var trees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/clone_url`. - public var clone_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/default_branch`. - public var default_branch: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/forks`. - public var forks: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/forks_count`. - public var forks_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/git_url`. - public var git_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/has_downloads`. - public var has_downloads: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/has_issues`. - public var has_issues: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/has_projects`. - public var has_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/has_wiki`. - public var has_wiki: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/has_pages`. - public var has_pages: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/has_discussions`. - public var has_discussions: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/homepage`. - public var homepage: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/language`. - public var language: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/master_branch`. - public var master_branch: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/archived`. - public var archived: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/disabled`. - public var disabled: Swift.Bool - /// The repository visibility: public, private, or internal. - /// - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/visibility`. - public var visibility: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/mirror_url`. - public var mirror_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/open_issues`. - public var open_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/open_issues_count`. - public var open_issues_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/permissions/admin`. - public var admin: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/permissions/maintain`. - public var maintain: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/permissions/triage`. - public var triage: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/permissions/pull`. - public var pull: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - admin: - /// - maintain: - /// - push: - /// - triage: - /// - pull: - public init( - admin: Swift.Bool, - maintain: Swift.Bool? = nil, - push: Swift.Bool, - triage: Swift.Bool? = nil, - pull: Swift.Bool - ) { - self.admin = admin - self.maintain = maintain - self.push = push - self.triage = triage - self.pull = pull - } - public enum CodingKeys: String, CodingKey { - case admin - case maintain - case push - case triage - case pull - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/permissions`. - public var permissions: Components.Schemas.pull_hyphen_request.headPayload.repoPayload.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/temp_clone_token`. - public var temp_clone_token: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/allow_merge_commit`. - public var allow_merge_commit: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/allow_squash_merge`. - public var allow_squash_merge: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/allow_rebase_merge`. - public var allow_rebase_merge: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/license`. - public struct licensePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/license/key`. - public var key: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/license/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/license/url`. - public var url: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/license/spdx_id`. - public var spdx_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/license/node_id`. - public var node_id: Swift.String - /// Creates a new `licensePayload`. - /// - /// - Parameters: - /// - key: - /// - name: - /// - url: - /// - spdx_id: - /// - node_id: - public init( - key: Swift.String, - name: Swift.String, - url: Swift.String? = nil, - spdx_id: Swift.String? = nil, - node_id: Swift.String - ) { - self.key = key - self.name = name - self.url = url - self.spdx_id = spdx_id - self.node_id = node_id - } - public enum CodingKeys: String, CodingKey { - case key - case name - case url - case spdx_id - case node_id - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/license`. - public var license: Components.Schemas.pull_hyphen_request.headPayload.repoPayload.licensePayload? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/pushed_at`. - public var pushed_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/size`. - public var size: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/ssh_url`. - public var ssh_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/stargazers_count`. - public var stargazers_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/svn_url`. - public var svn_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/topics`. - public var topics: [Swift.String]? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/watchers`. - public var watchers: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/watchers_count`. - public var watchers_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/allow_forking`. - public var allow_forking: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/is_template`. - public var is_template: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo/web_commit_signoff_required`. - public var web_commit_signoff_required: Swift.Bool? - /// Creates a new `repoPayload`. - /// - /// - Parameters: - /// - archive_url: - /// - assignees_url: - /// - blobs_url: - /// - branches_url: - /// - collaborators_url: - /// - comments_url: - /// - commits_url: - /// - compare_url: - /// - contents_url: - /// - contributors_url: - /// - deployments_url: - /// - description: - /// - downloads_url: - /// - events_url: - /// - fork: - /// - forks_url: - /// - full_name: - /// - git_commits_url: - /// - git_refs_url: - /// - git_tags_url: - /// - hooks_url: - /// - html_url: - /// - id: - /// - node_id: - /// - issue_comment_url: - /// - issue_events_url: - /// - issues_url: - /// - keys_url: - /// - labels_url: - /// - languages_url: - /// - merges_url: - /// - milestones_url: - /// - name: - /// - notifications_url: - /// - owner: - /// - _private: - /// - pulls_url: - /// - releases_url: - /// - stargazers_url: - /// - statuses_url: - /// - subscribers_url: - /// - subscription_url: - /// - tags_url: - /// - teams_url: - /// - trees_url: - /// - url: - /// - clone_url: - /// - default_branch: - /// - forks: - /// - forks_count: - /// - git_url: - /// - has_downloads: - /// - has_issues: - /// - has_projects: - /// - has_wiki: - /// - has_pages: - /// - has_discussions: - /// - homepage: - /// - language: - /// - master_branch: - /// - archived: - /// - disabled: - /// - visibility: The repository visibility: public, private, or internal. - /// - mirror_url: - /// - open_issues: - /// - open_issues_count: - /// - permissions: - /// - temp_clone_token: - /// - allow_merge_commit: - /// - allow_squash_merge: - /// - allow_rebase_merge: - /// - license: - /// - pushed_at: - /// - size: - /// - ssh_url: - /// - stargazers_count: - /// - svn_url: - /// - topics: - /// - watchers: - /// - watchers_count: - /// - created_at: - /// - updated_at: - /// - allow_forking: - /// - is_template: - /// - web_commit_signoff_required: - public init( - archive_url: Swift.String, - assignees_url: Swift.String, - blobs_url: Swift.String, - branches_url: Swift.String, - collaborators_url: Swift.String, - comments_url: Swift.String, - commits_url: Swift.String, - compare_url: Swift.String, - contents_url: Swift.String, - contributors_url: Swift.String, - deployments_url: Swift.String, - description: Swift.String? = nil, - downloads_url: Swift.String, - events_url: Swift.String, - fork: Swift.Bool, - forks_url: Swift.String, - full_name: Swift.String, - git_commits_url: Swift.String, - git_refs_url: Swift.String, - git_tags_url: Swift.String, - hooks_url: Swift.String, - html_url: Swift.String, - id: Swift.Int, - node_id: Swift.String, - issue_comment_url: Swift.String, - issue_events_url: Swift.String, - issues_url: Swift.String, - keys_url: Swift.String, - labels_url: Swift.String, - languages_url: Swift.String, - merges_url: Swift.String, - milestones_url: Swift.String, - name: Swift.String, - notifications_url: Swift.String, - owner: Components.Schemas.pull_hyphen_request.headPayload.repoPayload.ownerPayload, - _private: Swift.Bool, - pulls_url: Swift.String, - releases_url: Swift.String, - stargazers_url: Swift.String, - statuses_url: Swift.String, - subscribers_url: Swift.String, - subscription_url: Swift.String, - tags_url: Swift.String, - teams_url: Swift.String, - trees_url: Swift.String, - url: Swift.String, - clone_url: Swift.String, - default_branch: Swift.String, - forks: Swift.Int, - forks_count: Swift.Int, - git_url: Swift.String, - has_downloads: Swift.Bool, - has_issues: Swift.Bool, - has_projects: Swift.Bool, - has_wiki: Swift.Bool, - has_pages: Swift.Bool, - has_discussions: Swift.Bool, - homepage: Swift.String? = nil, - language: Swift.String? = nil, - master_branch: Swift.String? = nil, - archived: Swift.Bool, - disabled: Swift.Bool, - visibility: Swift.String? = nil, - mirror_url: Swift.String? = nil, - open_issues: Swift.Int, - open_issues_count: Swift.Int, - permissions: Components.Schemas.pull_hyphen_request.headPayload.repoPayload.permissionsPayload? = nil, - temp_clone_token: Swift.String? = nil, - allow_merge_commit: Swift.Bool? = nil, - allow_squash_merge: Swift.Bool? = nil, - allow_rebase_merge: Swift.Bool? = nil, - license: Components.Schemas.pull_hyphen_request.headPayload.repoPayload.licensePayload? = nil, - pushed_at: Foundation.Date, - size: Swift.Int, - ssh_url: Swift.String, - stargazers_count: Swift.Int, - svn_url: Swift.String, - topics: [Swift.String]? = nil, - watchers: Swift.Int, - watchers_count: Swift.Int, - created_at: Foundation.Date, - updated_at: Foundation.Date, - allow_forking: Swift.Bool? = nil, - is_template: Swift.Bool? = nil, - web_commit_signoff_required: Swift.Bool? = nil - ) { - self.archive_url = archive_url - self.assignees_url = assignees_url - self.blobs_url = blobs_url - self.branches_url = branches_url - self.collaborators_url = collaborators_url - self.comments_url = comments_url - self.commits_url = commits_url - self.compare_url = compare_url - self.contents_url = contents_url - self.contributors_url = contributors_url - self.deployments_url = deployments_url - self.description = description - self.downloads_url = downloads_url - self.events_url = events_url - self.fork = fork - self.forks_url = forks_url - self.full_name = full_name - self.git_commits_url = git_commits_url - self.git_refs_url = git_refs_url - self.git_tags_url = git_tags_url - self.hooks_url = hooks_url - self.html_url = html_url - self.id = id - self.node_id = node_id - self.issue_comment_url = issue_comment_url - self.issue_events_url = issue_events_url - self.issues_url = issues_url - self.keys_url = keys_url - self.labels_url = labels_url - self.languages_url = languages_url - self.merges_url = merges_url - self.milestones_url = milestones_url - self.name = name - self.notifications_url = notifications_url - self.owner = owner - self._private = _private - self.pulls_url = pulls_url - self.releases_url = releases_url - self.stargazers_url = stargazers_url - self.statuses_url = statuses_url - self.subscribers_url = subscribers_url - self.subscription_url = subscription_url - self.tags_url = tags_url - self.teams_url = teams_url - self.trees_url = trees_url - self.url = url - self.clone_url = clone_url - self.default_branch = default_branch - self.forks = forks - self.forks_count = forks_count - self.git_url = git_url - self.has_downloads = has_downloads - self.has_issues = has_issues - self.has_projects = has_projects - self.has_wiki = has_wiki - self.has_pages = has_pages - self.has_discussions = has_discussions - self.homepage = homepage - self.language = language - self.master_branch = master_branch - self.archived = archived - self.disabled = disabled - self.visibility = visibility - self.mirror_url = mirror_url - self.open_issues = open_issues - self.open_issues_count = open_issues_count - self.permissions = permissions - self.temp_clone_token = temp_clone_token - self.allow_merge_commit = allow_merge_commit - self.allow_squash_merge = allow_squash_merge - self.allow_rebase_merge = allow_rebase_merge - self.license = license - self.pushed_at = pushed_at - self.size = size - self.ssh_url = ssh_url - self.stargazers_count = stargazers_count - self.svn_url = svn_url - self.topics = topics - self.watchers = watchers - self.watchers_count = watchers_count - self.created_at = created_at - self.updated_at = updated_at - self.allow_forking = allow_forking - self.is_template = is_template - self.web_commit_signoff_required = web_commit_signoff_required - } - public enum CodingKeys: String, CodingKey { - case archive_url - case assignees_url - case blobs_url - case branches_url - case collaborators_url - case comments_url - case commits_url - case compare_url - case contents_url - case contributors_url - case deployments_url - case description - case downloads_url - case events_url - case fork - case forks_url - case full_name - case git_commits_url - case git_refs_url - case git_tags_url - case hooks_url - case html_url - case id - case node_id - case issue_comment_url - case issue_events_url - case issues_url - case keys_url - case labels_url - case languages_url - case merges_url - case milestones_url - case name - case notifications_url - case owner - case _private = "private" - case pulls_url - case releases_url - case stargazers_url - case statuses_url - case subscribers_url - case subscription_url - case tags_url - case teams_url - case trees_url - case url - case clone_url - case default_branch - case forks - case forks_count - case git_url - case has_downloads - case has_issues - case has_projects - case has_wiki - case has_pages - case has_discussions - case homepage - case language - case master_branch - case archived - case disabled - case visibility - case mirror_url - case open_issues - case open_issues_count - case permissions - case temp_clone_token - case allow_merge_commit - case allow_squash_merge - case allow_rebase_merge - case license - case pushed_at - case size - case ssh_url - case stargazers_count - case svn_url - case topics - case watchers - case watchers_count - case created_at - case updated_at - case allow_forking - case is_template - case web_commit_signoff_required - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/head/repo`. - public var repo: Components.Schemas.pull_hyphen_request.headPayload.repoPayload? + public var repo: Components.Schemas.repository /// - Remark: Generated from `#/components/schemas/pull-request/head/sha`. public var sha: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/head/user`. - public struct userPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/followers_url`. - public var followers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/following_url`. - public var following_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/gists_url`. - public var gists_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/gravatar_id`. - public var gravatar_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/id`. - public var id: Swift.Int64 - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/organizations_url`. - public var organizations_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/received_events_url`. - public var received_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/site_admin`. - public var site_admin: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/starred_url`. - public var starred_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/subscriptions_url`. - public var subscriptions_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/head/user/user_view_type`. - public var user_view_type: Swift.String? - /// Creates a new `userPayload`. - /// - /// - Parameters: - /// - avatar_url: - /// - events_url: - /// - followers_url: - /// - following_url: - /// - gists_url: - /// - gravatar_id: - /// - html_url: - /// - id: - /// - node_id: - /// - login: - /// - organizations_url: - /// - received_events_url: - /// - repos_url: - /// - site_admin: - /// - starred_url: - /// - subscriptions_url: - /// - _type: - /// - url: - /// - user_view_type: - public init( - avatar_url: Swift.String, - events_url: Swift.String, - followers_url: Swift.String, - following_url: Swift.String, - gists_url: Swift.String, - gravatar_id: Swift.String? = nil, - html_url: Swift.String, - id: Swift.Int64, - node_id: Swift.String, - login: Swift.String, - organizations_url: Swift.String, - received_events_url: Swift.String, - repos_url: Swift.String, - site_admin: Swift.Bool, - starred_url: Swift.String, - subscriptions_url: Swift.String, - _type: Swift.String, - url: Swift.String, - user_view_type: Swift.String? = nil - ) { - self.avatar_url = avatar_url - self.events_url = events_url - self.followers_url = followers_url - self.following_url = following_url - self.gists_url = gists_url - self.gravatar_id = gravatar_id - self.html_url = html_url - self.id = id - self.node_id = node_id - self.login = login - self.organizations_url = organizations_url - self.received_events_url = received_events_url - self.repos_url = repos_url - self.site_admin = site_admin - self.starred_url = starred_url - self.subscriptions_url = subscriptions_url - self._type = _type - self.url = url - self.user_view_type = user_view_type - } - public enum CodingKeys: String, CodingKey { - case avatar_url - case events_url - case followers_url - case following_url - case gists_url - case gravatar_id - case html_url - case id - case node_id - case login - case organizations_url - case received_events_url - case repos_url - case site_admin - case starred_url - case subscriptions_url - case _type = "type" - case url - case user_view_type - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/head/user`. - public var user: Components.Schemas.pull_hyphen_request.headPayload.userPayload + public var user: Components.Schemas.simple_hyphen_user /// Creates a new `headPayload`. /// /// - Parameters: @@ -5166,9 +4311,9 @@ public enum Components { public init( label: Swift.String, ref: Swift.String, - repo: Components.Schemas.pull_hyphen_request.headPayload.repoPayload? = nil, + repo: Components.Schemas.repository, sha: Swift.String, - user: Components.Schemas.pull_hyphen_request.headPayload.userPayload + user: Components.Schemas.simple_hyphen_user ) { self.label = label self.ref = ref @@ -5193,825 +4338,11 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request/base/ref`. public var ref: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/base/repo`. - public struct repoPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/archive_url`. - public var archive_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/assignees_url`. - public var assignees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/blobs_url`. - public var blobs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/branches_url`. - public var branches_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/collaborators_url`. - public var collaborators_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/comments_url`. - public var comments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/commits_url`. - public var commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/compare_url`. - public var compare_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/contents_url`. - public var contents_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/contributors_url`. - public var contributors_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/deployments_url`. - public var deployments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/downloads_url`. - public var downloads_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/fork`. - public var fork: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/forks_url`. - public var forks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/full_name`. - public var full_name: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/git_commits_url`. - public var git_commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/git_refs_url`. - public var git_refs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/git_tags_url`. - public var git_tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/is_template`. - public var is_template: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/issue_comment_url`. - public var issue_comment_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/issue_events_url`. - public var issue_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/keys_url`. - public var keys_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/labels_url`. - public var labels_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/languages_url`. - public var languages_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/merges_url`. - public var merges_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/milestones_url`. - public var milestones_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/notifications_url`. - public var notifications_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner`. - public struct ownerPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/followers_url`. - public var followers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/following_url`. - public var following_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/gists_url`. - public var gists_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/gravatar_id`. - public var gravatar_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/organizations_url`. - public var organizations_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/received_events_url`. - public var received_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/site_admin`. - public var site_admin: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/starred_url`. - public var starred_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/subscriptions_url`. - public var subscriptions_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner/user_view_type`. - public var user_view_type: Swift.String? - /// Creates a new `ownerPayload`. - /// - /// - Parameters: - /// - avatar_url: - /// - events_url: - /// - followers_url: - /// - following_url: - /// - gists_url: - /// - gravatar_id: - /// - html_url: - /// - id: - /// - node_id: - /// - login: - /// - organizations_url: - /// - received_events_url: - /// - repos_url: - /// - site_admin: - /// - starred_url: - /// - subscriptions_url: - /// - _type: - /// - url: - /// - user_view_type: - public init( - avatar_url: Swift.String, - events_url: Swift.String, - followers_url: Swift.String, - following_url: Swift.String, - gists_url: Swift.String, - gravatar_id: Swift.String? = nil, - html_url: Swift.String, - id: Swift.Int, - node_id: Swift.String, - login: Swift.String, - organizations_url: Swift.String, - received_events_url: Swift.String, - repos_url: Swift.String, - site_admin: Swift.Bool, - starred_url: Swift.String, - subscriptions_url: Swift.String, - _type: Swift.String, - url: Swift.String, - user_view_type: Swift.String? = nil - ) { - self.avatar_url = avatar_url - self.events_url = events_url - self.followers_url = followers_url - self.following_url = following_url - self.gists_url = gists_url - self.gravatar_id = gravatar_id - self.html_url = html_url - self.id = id - self.node_id = node_id - self.login = login - self.organizations_url = organizations_url - self.received_events_url = received_events_url - self.repos_url = repos_url - self.site_admin = site_admin - self.starred_url = starred_url - self.subscriptions_url = subscriptions_url - self._type = _type - self.url = url - self.user_view_type = user_view_type - } - public enum CodingKeys: String, CodingKey { - case avatar_url - case events_url - case followers_url - case following_url - case gists_url - case gravatar_id - case html_url - case id - case node_id - case login - case organizations_url - case received_events_url - case repos_url - case site_admin - case starred_url - case subscriptions_url - case _type = "type" - case url - case user_view_type - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/owner`. - public var owner: Components.Schemas.pull_hyphen_request.basePayload.repoPayload.ownerPayload - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/private`. - public var _private: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/pulls_url`. - public var pulls_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/releases_url`. - public var releases_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/stargazers_url`. - public var stargazers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/statuses_url`. - public var statuses_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/subscribers_url`. - public var subscribers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/subscription_url`. - public var subscription_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/tags_url`. - public var tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/teams_url`. - public var teams_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/trees_url`. - public var trees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/clone_url`. - public var clone_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/default_branch`. - public var default_branch: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/forks`. - public var forks: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/forks_count`. - public var forks_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/git_url`. - public var git_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/has_downloads`. - public var has_downloads: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/has_issues`. - public var has_issues: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/has_projects`. - public var has_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/has_wiki`. - public var has_wiki: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/has_pages`. - public var has_pages: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/has_discussions`. - public var has_discussions: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/homepage`. - public var homepage: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/language`. - public var language: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/master_branch`. - public var master_branch: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/archived`. - public var archived: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/disabled`. - public var disabled: Swift.Bool - /// The repository visibility: public, private, or internal. - /// - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/visibility`. - public var visibility: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/mirror_url`. - public var mirror_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/open_issues`. - public var open_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/open_issues_count`. - public var open_issues_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/permissions/admin`. - public var admin: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/permissions/maintain`. - public var maintain: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/permissions/triage`. - public var triage: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/permissions/pull`. - public var pull: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - admin: - /// - maintain: - /// - push: - /// - triage: - /// - pull: - public init( - admin: Swift.Bool, - maintain: Swift.Bool? = nil, - push: Swift.Bool, - triage: Swift.Bool? = nil, - pull: Swift.Bool - ) { - self.admin = admin - self.maintain = maintain - self.push = push - self.triage = triage - self.pull = pull - } - public enum CodingKeys: String, CodingKey { - case admin - case maintain - case push - case triage - case pull - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/permissions`. - public var permissions: Components.Schemas.pull_hyphen_request.basePayload.repoPayload.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/temp_clone_token`. - public var temp_clone_token: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/allow_merge_commit`. - public var allow_merge_commit: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/allow_squash_merge`. - public var allow_squash_merge: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/allow_rebase_merge`. - public var allow_rebase_merge: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/license`. - public var license: Components.Schemas.nullable_hyphen_license_hyphen_simple? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/pushed_at`. - public var pushed_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/size`. - public var size: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/ssh_url`. - public var ssh_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/stargazers_count`. - public var stargazers_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/svn_url`. - public var svn_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/topics`. - public var topics: [Swift.String]? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/watchers`. - public var watchers: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/watchers_count`. - public var watchers_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/allow_forking`. - public var allow_forking: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo/web_commit_signoff_required`. - public var web_commit_signoff_required: Swift.Bool? - /// Creates a new `repoPayload`. - /// - /// - Parameters: - /// - archive_url: - /// - assignees_url: - /// - blobs_url: - /// - branches_url: - /// - collaborators_url: - /// - comments_url: - /// - commits_url: - /// - compare_url: - /// - contents_url: - /// - contributors_url: - /// - deployments_url: - /// - description: - /// - downloads_url: - /// - events_url: - /// - fork: - /// - forks_url: - /// - full_name: - /// - git_commits_url: - /// - git_refs_url: - /// - git_tags_url: - /// - hooks_url: - /// - html_url: - /// - id: - /// - is_template: - /// - node_id: - /// - issue_comment_url: - /// - issue_events_url: - /// - issues_url: - /// - keys_url: - /// - labels_url: - /// - languages_url: - /// - merges_url: - /// - milestones_url: - /// - name: - /// - notifications_url: - /// - owner: - /// - _private: - /// - pulls_url: - /// - releases_url: - /// - stargazers_url: - /// - statuses_url: - /// - subscribers_url: - /// - subscription_url: - /// - tags_url: - /// - teams_url: - /// - trees_url: - /// - url: - /// - clone_url: - /// - default_branch: - /// - forks: - /// - forks_count: - /// - git_url: - /// - has_downloads: - /// - has_issues: - /// - has_projects: - /// - has_wiki: - /// - has_pages: - /// - has_discussions: - /// - homepage: - /// - language: - /// - master_branch: - /// - archived: - /// - disabled: - /// - visibility: The repository visibility: public, private, or internal. - /// - mirror_url: - /// - open_issues: - /// - open_issues_count: - /// - permissions: - /// - temp_clone_token: - /// - allow_merge_commit: - /// - allow_squash_merge: - /// - allow_rebase_merge: - /// - license: - /// - pushed_at: - /// - size: - /// - ssh_url: - /// - stargazers_count: - /// - svn_url: - /// - topics: - /// - watchers: - /// - watchers_count: - /// - created_at: - /// - updated_at: - /// - allow_forking: - /// - web_commit_signoff_required: - public init( - archive_url: Swift.String, - assignees_url: Swift.String, - blobs_url: Swift.String, - branches_url: Swift.String, - collaborators_url: Swift.String, - comments_url: Swift.String, - commits_url: Swift.String, - compare_url: Swift.String, - contents_url: Swift.String, - contributors_url: Swift.String, - deployments_url: Swift.String, - description: Swift.String? = nil, - downloads_url: Swift.String, - events_url: Swift.String, - fork: Swift.Bool, - forks_url: Swift.String, - full_name: Swift.String, - git_commits_url: Swift.String, - git_refs_url: Swift.String, - git_tags_url: Swift.String, - hooks_url: Swift.String, - html_url: Swift.String, - id: Swift.Int, - is_template: Swift.Bool? = nil, - node_id: Swift.String, - issue_comment_url: Swift.String, - issue_events_url: Swift.String, - issues_url: Swift.String, - keys_url: Swift.String, - labels_url: Swift.String, - languages_url: Swift.String, - merges_url: Swift.String, - milestones_url: Swift.String, - name: Swift.String, - notifications_url: Swift.String, - owner: Components.Schemas.pull_hyphen_request.basePayload.repoPayload.ownerPayload, - _private: Swift.Bool, - pulls_url: Swift.String, - releases_url: Swift.String, - stargazers_url: Swift.String, - statuses_url: Swift.String, - subscribers_url: Swift.String, - subscription_url: Swift.String, - tags_url: Swift.String, - teams_url: Swift.String, - trees_url: Swift.String, - url: Swift.String, - clone_url: Swift.String, - default_branch: Swift.String, - forks: Swift.Int, - forks_count: Swift.Int, - git_url: Swift.String, - has_downloads: Swift.Bool, - has_issues: Swift.Bool, - has_projects: Swift.Bool, - has_wiki: Swift.Bool, - has_pages: Swift.Bool, - has_discussions: Swift.Bool, - homepage: Swift.String? = nil, - language: Swift.String? = nil, - master_branch: Swift.String? = nil, - archived: Swift.Bool, - disabled: Swift.Bool, - visibility: Swift.String? = nil, - mirror_url: Swift.String? = nil, - open_issues: Swift.Int, - open_issues_count: Swift.Int, - permissions: Components.Schemas.pull_hyphen_request.basePayload.repoPayload.permissionsPayload? = nil, - temp_clone_token: Swift.String? = nil, - allow_merge_commit: Swift.Bool? = nil, - allow_squash_merge: Swift.Bool? = nil, - allow_rebase_merge: Swift.Bool? = nil, - license: Components.Schemas.nullable_hyphen_license_hyphen_simple? = nil, - pushed_at: Foundation.Date, - size: Swift.Int, - ssh_url: Swift.String, - stargazers_count: Swift.Int, - svn_url: Swift.String, - topics: [Swift.String]? = nil, - watchers: Swift.Int, - watchers_count: Swift.Int, - created_at: Foundation.Date, - updated_at: Foundation.Date, - allow_forking: Swift.Bool? = nil, - web_commit_signoff_required: Swift.Bool? = nil - ) { - self.archive_url = archive_url - self.assignees_url = assignees_url - self.blobs_url = blobs_url - self.branches_url = branches_url - self.collaborators_url = collaborators_url - self.comments_url = comments_url - self.commits_url = commits_url - self.compare_url = compare_url - self.contents_url = contents_url - self.contributors_url = contributors_url - self.deployments_url = deployments_url - self.description = description - self.downloads_url = downloads_url - self.events_url = events_url - self.fork = fork - self.forks_url = forks_url - self.full_name = full_name - self.git_commits_url = git_commits_url - self.git_refs_url = git_refs_url - self.git_tags_url = git_tags_url - self.hooks_url = hooks_url - self.html_url = html_url - self.id = id - self.is_template = is_template - self.node_id = node_id - self.issue_comment_url = issue_comment_url - self.issue_events_url = issue_events_url - self.issues_url = issues_url - self.keys_url = keys_url - self.labels_url = labels_url - self.languages_url = languages_url - self.merges_url = merges_url - self.milestones_url = milestones_url - self.name = name - self.notifications_url = notifications_url - self.owner = owner - self._private = _private - self.pulls_url = pulls_url - self.releases_url = releases_url - self.stargazers_url = stargazers_url - self.statuses_url = statuses_url - self.subscribers_url = subscribers_url - self.subscription_url = subscription_url - self.tags_url = tags_url - self.teams_url = teams_url - self.trees_url = trees_url - self.url = url - self.clone_url = clone_url - self.default_branch = default_branch - self.forks = forks - self.forks_count = forks_count - self.git_url = git_url - self.has_downloads = has_downloads - self.has_issues = has_issues - self.has_projects = has_projects - self.has_wiki = has_wiki - self.has_pages = has_pages - self.has_discussions = has_discussions - self.homepage = homepage - self.language = language - self.master_branch = master_branch - self.archived = archived - self.disabled = disabled - self.visibility = visibility - self.mirror_url = mirror_url - self.open_issues = open_issues - self.open_issues_count = open_issues_count - self.permissions = permissions - self.temp_clone_token = temp_clone_token - self.allow_merge_commit = allow_merge_commit - self.allow_squash_merge = allow_squash_merge - self.allow_rebase_merge = allow_rebase_merge - self.license = license - self.pushed_at = pushed_at - self.size = size - self.ssh_url = ssh_url - self.stargazers_count = stargazers_count - self.svn_url = svn_url - self.topics = topics - self.watchers = watchers - self.watchers_count = watchers_count - self.created_at = created_at - self.updated_at = updated_at - self.allow_forking = allow_forking - self.web_commit_signoff_required = web_commit_signoff_required - } - public enum CodingKeys: String, CodingKey { - case archive_url - case assignees_url - case blobs_url - case branches_url - case collaborators_url - case comments_url - case commits_url - case compare_url - case contents_url - case contributors_url - case deployments_url - case description - case downloads_url - case events_url - case fork - case forks_url - case full_name - case git_commits_url - case git_refs_url - case git_tags_url - case hooks_url - case html_url - case id - case is_template - case node_id - case issue_comment_url - case issue_events_url - case issues_url - case keys_url - case labels_url - case languages_url - case merges_url - case milestones_url - case name - case notifications_url - case owner - case _private = "private" - case pulls_url - case releases_url - case stargazers_url - case statuses_url - case subscribers_url - case subscription_url - case tags_url - case teams_url - case trees_url - case url - case clone_url - case default_branch - case forks - case forks_count - case git_url - case has_downloads - case has_issues - case has_projects - case has_wiki - case has_pages - case has_discussions - case homepage - case language - case master_branch - case archived - case disabled - case visibility - case mirror_url - case open_issues - case open_issues_count - case permissions - case temp_clone_token - case allow_merge_commit - case allow_squash_merge - case allow_rebase_merge - case license - case pushed_at - case size - case ssh_url - case stargazers_count - case svn_url - case topics - case watchers - case watchers_count - case created_at - case updated_at - case allow_forking - case web_commit_signoff_required - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/base/repo`. - public var repo: Components.Schemas.pull_hyphen_request.basePayload.repoPayload + public var repo: Components.Schemas.repository /// - Remark: Generated from `#/components/schemas/pull-request/base/sha`. public var sha: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/base/user`. - public struct userPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/followers_url`. - public var followers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/following_url`. - public var following_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/gists_url`. - public var gists_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/gravatar_id`. - public var gravatar_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/id`. - public var id: Swift.Int64 - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/organizations_url`. - public var organizations_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/received_events_url`. - public var received_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/site_admin`. - public var site_admin: Swift.Bool - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/starred_url`. - public var starred_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/subscriptions_url`. - public var subscriptions_url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request/base/user/user_view_type`. - public var user_view_type: Swift.String? - /// Creates a new `userPayload`. - /// - /// - Parameters: - /// - avatar_url: - /// - events_url: - /// - followers_url: - /// - following_url: - /// - gists_url: - /// - gravatar_id: - /// - html_url: - /// - id: - /// - node_id: - /// - login: - /// - organizations_url: - /// - received_events_url: - /// - repos_url: - /// - site_admin: - /// - starred_url: - /// - subscriptions_url: - /// - _type: - /// - url: - /// - user_view_type: - public init( - avatar_url: Swift.String, - events_url: Swift.String, - followers_url: Swift.String, - following_url: Swift.String, - gists_url: Swift.String, - gravatar_id: Swift.String? = nil, - html_url: Swift.String, - id: Swift.Int64, - node_id: Swift.String, - login: Swift.String, - organizations_url: Swift.String, - received_events_url: Swift.String, - repos_url: Swift.String, - site_admin: Swift.Bool, - starred_url: Swift.String, - subscriptions_url: Swift.String, - _type: Swift.String, - url: Swift.String, - user_view_type: Swift.String? = nil - ) { - self.avatar_url = avatar_url - self.events_url = events_url - self.followers_url = followers_url - self.following_url = following_url - self.gists_url = gists_url - self.gravatar_id = gravatar_id - self.html_url = html_url - self.id = id - self.node_id = node_id - self.login = login - self.organizations_url = organizations_url - self.received_events_url = received_events_url - self.repos_url = repos_url - self.site_admin = site_admin - self.starred_url = starred_url - self.subscriptions_url = subscriptions_url - self._type = _type - self.url = url - self.user_view_type = user_view_type - } - public enum CodingKeys: String, CodingKey { - case avatar_url - case events_url - case followers_url - case following_url - case gists_url - case gravatar_id - case html_url - case id - case node_id - case login - case organizations_url - case received_events_url - case repos_url - case site_admin - case starred_url - case subscriptions_url - case _type = "type" - case url - case user_view_type - } - } - /// - Remark: Generated from `#/components/schemas/pull-request/base/user`. - public var user: Components.Schemas.pull_hyphen_request.basePayload.userPayload + public var user: Components.Schemas.simple_hyphen_user /// Creates a new `basePayload`. /// /// - Parameters: @@ -6023,9 +4354,9 @@ public enum Components { public init( label: Swift.String, ref: Swift.String, - repo: Components.Schemas.pull_hyphen_request.basePayload.repoPayload, + repo: Components.Schemas.repository, sha: Swift.String, - user: Components.Schemas.pull_hyphen_request.basePayload.userPayload + user: Components.Schemas.simple_hyphen_user ) { self.label = label self.ref = ref From 6fa30e3281dc848556411ae96918ecf5a9b7de9b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 28 Oct 2024 21:57:38 +0000 Subject: [PATCH 076/129] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index ec0d084fe0f..2491f48000d 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -42838,7 +42838,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dispatches/POST/requestBody/json/event_type`. public var event_type: Swift.String - /// JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. + /// JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. The total size of the JSON payload must be less than 64KB. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dispatches/POST/requestBody/json/client_payload`. public struct client_payloadPayload: Codable, Hashable, Sendable { @@ -42858,7 +42858,7 @@ public enum Operations { try encoder.encodeAdditionalProperties(additionalProperties) } } - /// JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. + /// JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. The total size of the JSON payload must be less than 64KB. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dispatches/POST/requestBody/json/client_payload`. public var client_payload: Operations.repos_sol_create_hyphen_dispatch_hyphen_event.Input.Body.jsonPayload.client_payloadPayload? @@ -42866,7 +42866,7 @@ public enum Operations { /// /// - Parameters: /// - event_type: A custom webhook event name. Must be 100 characters or fewer. - /// - client_payload: JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. + /// - client_payload: JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. The total size of the JSON payload must be less than 64KB. public init( event_type: Swift.String, client_payload: Operations.repos_sol_create_hyphen_dispatch_hyphen_event.Input.Body.jsonPayload.client_payloadPayload? = nil From e0489a5c04c5b135ae5cc4edc389448f474acd73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 28 Oct 2024 21:58:20 +0000 Subject: [PATCH 077/129] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Client.swift | 42 +++++++++++++ Sources/secret-scanning/Types.swift | 92 ++++++++++++++++++++++++++-- 2 files changed, 129 insertions(+), 5 deletions(-) diff --git a/Sources/secret-scanning/Client.swift b/Sources/secret-scanning/Client.swift index c66162b2ebb..e64a11ba3b0 100644 --- a/Sources/secret-scanning/Client.swift +++ b/Sources/secret-scanning/Client.swift @@ -129,6 +129,20 @@ public struct Client: APIProtocol { name: "validity", value: input.query.validity ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "is_publicly_leaked", + value: input.query.is_publicly_leaked + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "is_multi_repo", + value: input.query.is_multi_repo + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -319,6 +333,20 @@ public struct Client: APIProtocol { name: "validity", value: input.query.validity ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "is_publicly_leaked", + value: input.query.is_publicly_leaked + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "is_multi_repo", + value: input.query.is_multi_repo + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -510,6 +538,20 @@ public struct Client: APIProtocol { name: "validity", value: input.query.validity ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "is_publicly_leaked", + value: input.query.is_publicly_leaked + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "is_multi_repo", + value: input.query.is_multi_repo + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 704e1b0ddb9..87ebbd97553 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -1066,6 +1066,14 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/validity`. public var validity: Components.Schemas.organization_hyphen_secret_hyphen_scanning_hyphen_alert.validityPayload? + /// Whether the secret was publicly leaked. + /// + /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/publicly_leaked`. + public var publicly_leaked: Swift.Bool? + /// Whether the detected secret was found in multiple repositories in the same organization or enterprise. + /// + /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/multi_repo`. + public var multi_repo: Swift.Bool? /// Creates a new `organization_hyphen_secret_hyphen_scanning_hyphen_alert`. /// /// - Parameters: @@ -1088,6 +1096,8 @@ public enum Components { /// - push_protection_bypassed_at: The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. /// - resolution_comment: The comment that was optionally added when this alert was closed /// - validity: The token status as of the latest validity check. + /// - publicly_leaked: Whether the secret was publicly leaked. + /// - multi_repo: Whether the detected secret was found in multiple repositories in the same organization or enterprise. public init( number: Components.Schemas.alert_hyphen_number? = nil, created_at: Components.Schemas.alert_hyphen_created_hyphen_at? = nil, @@ -1107,7 +1117,9 @@ public enum Components { push_protection_bypassed_by: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, push_protection_bypassed_at: Foundation.Date? = nil, resolution_comment: Swift.String? = nil, - validity: Components.Schemas.organization_hyphen_secret_hyphen_scanning_hyphen_alert.validityPayload? = nil + validity: Components.Schemas.organization_hyphen_secret_hyphen_scanning_hyphen_alert.validityPayload? = nil, + publicly_leaked: Swift.Bool? = nil, + multi_repo: Swift.Bool? = nil ) { self.number = number self.created_at = created_at @@ -1128,6 +1140,8 @@ public enum Components { self.push_protection_bypassed_at = push_protection_bypassed_at self.resolution_comment = resolution_comment self.validity = validity + self.publicly_leaked = publicly_leaked + self.multi_repo = multi_repo } public enum CodingKeys: String, CodingKey { case number @@ -1149,6 +1163,8 @@ public enum Components { case push_protection_bypassed_at case resolution_comment case validity + case publicly_leaked + case multi_repo } } /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. @@ -1220,6 +1236,14 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/validity`. public var validity: Components.Schemas.secret_hyphen_scanning_hyphen_alert.validityPayload? + /// Whether the detected secret was publicly leaked. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/publicly_leaked`. + public var publicly_leaked: Swift.Bool? + /// Whether the detected secret was found in multiple repositories under the same organization or enterprise. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/multi_repo`. + public var multi_repo: Swift.Bool? /// Creates a new `secret_hyphen_scanning_hyphen_alert`. /// /// - Parameters: @@ -1241,6 +1265,8 @@ public enum Components { /// - push_protection_bypassed_by: /// - push_protection_bypassed_at: The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. /// - validity: The token status as of the latest validity check. + /// - publicly_leaked: Whether the detected secret was publicly leaked. + /// - multi_repo: Whether the detected secret was found in multiple repositories under the same organization or enterprise. public init( number: Components.Schemas.alert_hyphen_number? = nil, created_at: Components.Schemas.alert_hyphen_created_hyphen_at? = nil, @@ -1259,7 +1285,9 @@ public enum Components { push_protection_bypassed: Swift.Bool? = nil, push_protection_bypassed_by: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, push_protection_bypassed_at: Foundation.Date? = nil, - validity: Components.Schemas.secret_hyphen_scanning_hyphen_alert.validityPayload? = nil + validity: Components.Schemas.secret_hyphen_scanning_hyphen_alert.validityPayload? = nil, + publicly_leaked: Swift.Bool? = nil, + multi_repo: Swift.Bool? = nil ) { self.number = number self.created_at = created_at @@ -1279,6 +1307,8 @@ public enum Components { self.push_protection_bypassed_by = push_protection_bypassed_by self.push_protection_bypassed_at = push_protection_bypassed_at self.validity = validity + self.publicly_leaked = publicly_leaked + self.multi_repo = multi_repo } public enum CodingKeys: String, CodingKey { case number @@ -1299,6 +1329,8 @@ public enum Components { case push_protection_bypassed_by case push_protection_bypassed_at case validity + case publicly_leaked + case multi_repo } } /// An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. @@ -1971,6 +2003,14 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-validity`. public typealias secret_hyphen_scanning_hyphen_alert_hyphen_validity = Swift.String + /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + /// + /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-publicly-leaked`. + public typealias secret_hyphen_scanning_hyphen_alert_hyphen_publicly_hyphen_leaked = Swift.Bool + /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. + /// + /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-multi-repo`. + public typealias secret_hyphen_scanning_hyphen_alert_hyphen_multi_hyphen_repo = Swift.Bool /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -2184,6 +2224,14 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/validity`. public var validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? + /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/is_publicly_leaked`. + public var is_publicly_leaked: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_publicly_hyphen_leaked? + /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/is_multi_repo`. + public var is_multi_repo: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_multi_hyphen_repo? /// Creates a new `Query`. /// /// - Parameters: @@ -2196,6 +2244,8 @@ public enum Operations { /// - 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)." /// - validity: A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. + /// - is_publicly_leaked: A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + /// - is_multi_repo: A boolean value representing whether or not to filter alerts by the multi-repo tag being present. public init( state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? = nil, secret_type: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_secret_hyphen_type? = nil, @@ -2205,7 +2255,9 @@ public enum Operations { per_page: Components.Parameters.per_hyphen_page? = nil, before: Components.Parameters.pagination_hyphen_before? = nil, after: Components.Parameters.pagination_hyphen_after? = nil, - validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? = nil + validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? = nil, + is_publicly_leaked: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_publicly_hyphen_leaked? = nil, + is_multi_repo: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_multi_hyphen_repo? = nil ) { self.state = state self.secret_type = secret_type @@ -2216,6 +2268,8 @@ public enum Operations { self.before = before self.after = after self.validity = validity + self.is_publicly_leaked = is_publicly_leaked + self.is_multi_repo = is_multi_repo } } public var query: Operations.secret_hyphen_scanning_sol_list_hyphen_alerts_hyphen_for_hyphen_enterprise.Input.Query @@ -2482,6 +2536,14 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/validity`. public var validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? + /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/is_publicly_leaked`. + public var is_publicly_leaked: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_publicly_hyphen_leaked? + /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/is_multi_repo`. + public var is_multi_repo: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_multi_hyphen_repo? /// Creates a new `Query`. /// /// - Parameters: @@ -2495,6 +2557,8 @@ public enum Operations { /// - 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 events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. /// - 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 events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. /// - validity: A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. + /// - is_publicly_leaked: A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + /// - is_multi_repo: A boolean value representing whether or not to filter alerts by the multi-repo tag being present. public init( state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? = nil, secret_type: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_secret_hyphen_type? = nil, @@ -2505,7 +2569,9 @@ public enum Operations { per_page: Components.Parameters.per_hyphen_page? = nil, before: Components.Parameters.secret_hyphen_scanning_hyphen_pagination_hyphen_before_hyphen_org_hyphen_repo? = nil, after: Components.Parameters.secret_hyphen_scanning_hyphen_pagination_hyphen_after_hyphen_org_hyphen_repo? = nil, - validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? = nil + validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? = nil, + is_publicly_leaked: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_publicly_hyphen_leaked? = nil, + is_multi_repo: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_multi_hyphen_repo? = nil ) { self.state = state self.secret_type = secret_type @@ -2517,6 +2583,8 @@ public enum Operations { self.before = before self.after = after self.validity = validity + self.is_publicly_leaked = is_publicly_leaked + self.is_multi_repo = is_multi_repo } } public var query: Operations.secret_hyphen_scanning_sol_list_hyphen_alerts_hyphen_for_hyphen_org.Input.Query @@ -2792,6 +2860,14 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/validity`. public var validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? + /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/is_publicly_leaked`. + public var is_publicly_leaked: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_publicly_hyphen_leaked? + /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/is_multi_repo`. + public var is_multi_repo: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_multi_hyphen_repo? /// Creates a new `Query`. /// /// - Parameters: @@ -2805,6 +2881,8 @@ public enum Operations { /// - 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 events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. /// - 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 events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. /// - validity: A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. + /// - is_publicly_leaked: A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + /// - is_multi_repo: A boolean value representing whether or not to filter alerts by the multi-repo tag being present. public init( state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? = nil, secret_type: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_secret_hyphen_type? = nil, @@ -2815,7 +2893,9 @@ public enum Operations { per_page: Components.Parameters.per_hyphen_page? = nil, before: Components.Parameters.secret_hyphen_scanning_hyphen_pagination_hyphen_before_hyphen_org_hyphen_repo? = nil, after: Components.Parameters.secret_hyphen_scanning_hyphen_pagination_hyphen_after_hyphen_org_hyphen_repo? = nil, - validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? = nil + validity: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_validity? = nil, + is_publicly_leaked: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_publicly_hyphen_leaked? = nil, + is_multi_repo: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_multi_hyphen_repo? = nil ) { self.state = state self.secret_type = secret_type @@ -2827,6 +2907,8 @@ public enum Operations { self.before = before self.after = after self.validity = validity + self.is_publicly_leaked = is_publicly_leaked + self.is_multi_repo = is_multi_repo } } public var query: Operations.secret_hyphen_scanning_sol_list_hyphen_alerts_hyphen_for_hyphen_repo.Input.Query From 5e2b972aafdb4ebbf9700a52a466330320846b53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 28 Oct 2024 22:01:49 +0000 Subject: [PATCH 078/129] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 264 ++++++++++++++++++++++++++++++ 1 file changed, 264 insertions(+) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 41b8a18cd9d..488a692044a 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -1145,6 +1145,79 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning delegated bypass + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass`. + @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning delegated bypass + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass`. + public var secret_scanning_delegated_bypass: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypassPayload? + /// Feature options for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options`. + public struct secret_scanning_delegated_bypass_optionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options/reviewersPayload`. + public struct reviewersPayloadPayload: Codable, Hashable, Sendable { + /// The ID of the team or role selected as a bypass reviewer + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_id`. + public var reviewer_id: Swift.Int + /// The type of the bypass reviewer + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. + @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable { + case TEAM = "TEAM" + case ROLE = "ROLE" + } + /// The type of the bypass reviewer + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. + public var reviewer_type: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload.reviewer_typePayload + /// Creates a new `reviewersPayloadPayload`. + /// + /// - Parameters: + /// - reviewer_id: The ID of the team or role selected as a bypass reviewer + /// - reviewer_type: The type of the bypass reviewer + public init( + reviewer_id: Swift.Int, + reviewer_type: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload.reviewer_typePayload + ) { + self.reviewer_id = reviewer_id + self.reviewer_type = reviewer_type + } + public enum CodingKeys: String, CodingKey { + case reviewer_id + case reviewer_type + } + } + /// The bypass reviewers for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options/reviewers`. + public typealias reviewersPayload = [Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload] + /// The bypass reviewers for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options/reviewers`. + public var reviewers: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypass_optionsPayload.reviewersPayload? + /// Creates a new `secret_scanning_delegated_bypass_optionsPayload`. + /// + /// - Parameters: + /// - reviewers: The bypass reviewers for secret scanning delegated bypass + public init(reviewers: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypass_optionsPayload.reviewersPayload? = nil) { + self.reviewers = reviewers + } + public enum CodingKeys: String, CodingKey { + case reviewers + } + } + /// Feature options for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options`. + public var secret_scanning_delegated_bypass_options: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypass_optionsPayload? /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. @@ -1220,6 +1293,8 @@ public enum Components { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - secret_scanning_delegated_bypass: The enablement status of secret scanning delegated bypass + /// - secret_scanning_delegated_bypass_options: Feature options for secret scanning delegated bypass /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non-provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting @@ -1242,6 +1317,8 @@ public enum Components { code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? = nil, secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? = nil, + secret_scanning_delegated_bypass: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypassPayload? = nil, + secret_scanning_delegated_bypass_options: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypass_optionsPayload? = nil, secret_scanning_validity_checks: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_validity_checksPayload? = nil, secret_scanning_non_provider_patterns: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? = nil, @@ -1264,6 +1341,8 @@ public enum Components { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_delegated_bypass = secret_scanning_delegated_bypass + self.secret_scanning_delegated_bypass_options = secret_scanning_delegated_bypass_options self.secret_scanning_validity_checks = secret_scanning_validity_checks self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting @@ -1287,6 +1366,8 @@ public enum Components { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_delegated_bypass + case secret_scanning_delegated_bypass_options case secret_scanning_validity_checks case secret_scanning_non_provider_patterns case private_vulnerability_reporting @@ -2015,6 +2096,79 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass`. + @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass`. + public var secret_scanning_delegated_bypass: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload? + /// Feature options for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options`. + public struct secret_scanning_delegated_bypass_optionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload`. + public struct reviewersPayloadPayload: Codable, Hashable, Sendable { + /// The ID of the team or role selected as a bypass reviewer + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_id`. + public var reviewer_id: Swift.Int + /// The type of the bypass reviewer + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. + @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable { + case TEAM = "TEAM" + case ROLE = "ROLE" + } + /// The type of the bypass reviewer + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. + public var reviewer_type: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload.reviewer_typePayload + /// Creates a new `reviewersPayloadPayload`. + /// + /// - Parameters: + /// - reviewer_id: The ID of the team or role selected as a bypass reviewer + /// - reviewer_type: The type of the bypass reviewer + public init( + reviewer_id: Swift.Int, + reviewer_type: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload.reviewer_typePayload + ) { + self.reviewer_id = reviewer_id + self.reviewer_type = reviewer_type + } + public enum CodingKeys: String, CodingKey { + case reviewer_id + case reviewer_type + } + } + /// The bypass reviewers for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options/reviewers`. + public typealias reviewersPayload = [Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload] + /// The bypass reviewers for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options/reviewers`. + public var reviewers: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayload? + /// Creates a new `secret_scanning_delegated_bypass_optionsPayload`. + /// + /// - Parameters: + /// - reviewers: The bypass reviewers for secret scanning delegated bypass + public init(reviewers: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayload? = nil) { + self.reviewers = reviewers + } + public enum CodingKeys: String, CodingKey { + case reviewers + } + } + /// Feature options for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options`. + public var secret_scanning_delegated_bypass_options: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload? /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. @@ -2076,6 +2230,8 @@ public enum Operations { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - secret_scanning_delegated_bypass: The enablement status of secret scanning delegated bypass + /// - secret_scanning_delegated_bypass_options: Feature options for secret scanning delegated bypass /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting @@ -2092,6 +2248,8 @@ public enum Operations { code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, + secret_scanning_delegated_bypass: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload? = nil, + secret_scanning_delegated_bypass_options: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload? = nil, secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, @@ -2108,6 +2266,8 @@ public enum Operations { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_delegated_bypass = secret_scanning_delegated_bypass + self.secret_scanning_delegated_bypass_options = secret_scanning_delegated_bypass_options self.secret_scanning_validity_checks = secret_scanning_validity_checks self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting @@ -2125,6 +2285,8 @@ public enum Operations { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_delegated_bypass + case secret_scanning_delegated_bypass_options case secret_scanning_validity_checks case secret_scanning_non_provider_patterns case private_vulnerability_reporting @@ -2176,6 +2338,14 @@ public enum Operations { Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) + secret_scanning_delegated_bypass = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload.self, + forKey: .secret_scanning_delegated_bypass + ) + secret_scanning_delegated_bypass_options = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.self, + forKey: .secret_scanning_delegated_bypass_options + ) secret_scanning_validity_checks = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks @@ -2204,6 +2374,8 @@ public enum Operations { "code_scanning_default_setup", "secret_scanning", "secret_scanning_push_protection", + "secret_scanning_delegated_bypass", + "secret_scanning_delegated_bypass_options", "secret_scanning_validity_checks", "secret_scanning_non_provider_patterns", "private_vulnerability_reporting", @@ -3155,6 +3327,79 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass`. + @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass`. + public var secret_scanning_delegated_bypass: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload? + /// Feature options for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options`. + public struct secret_scanning_delegated_bypass_optionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload`. + public struct reviewersPayloadPayload: Codable, Hashable, Sendable { + /// The ID of the team or role selected as a bypass reviewer + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_id`. + public var reviewer_id: Swift.Int + /// The type of the bypass reviewer + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. + @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable { + case TEAM = "TEAM" + case ROLE = "ROLE" + } + /// The type of the bypass reviewer + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. + public var reviewer_type: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload.reviewer_typePayload + /// Creates a new `reviewersPayloadPayload`. + /// + /// - Parameters: + /// - reviewer_id: The ID of the team or role selected as a bypass reviewer + /// - reviewer_type: The type of the bypass reviewer + public init( + reviewer_id: Swift.Int, + reviewer_type: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload.reviewer_typePayload + ) { + self.reviewer_id = reviewer_id + self.reviewer_type = reviewer_type + } + public enum CodingKeys: String, CodingKey { + case reviewer_id + case reviewer_type + } + } + /// The bypass reviewers for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options/reviewers`. + public typealias reviewersPayload = [Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayloadPayload] + /// The bypass reviewers for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options/reviewers`. + public var reviewers: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayload? + /// Creates a new `secret_scanning_delegated_bypass_optionsPayload`. + /// + /// - Parameters: + /// - reviewers: The bypass reviewers for secret scanning delegated bypass + public init(reviewers: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.reviewersPayload? = nil) { + self.reviewers = reviewers + } + public enum CodingKeys: String, CodingKey { + case reviewers + } + } + /// Feature options for secret scanning delegated bypass + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options`. + public var secret_scanning_delegated_bypass_options: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload? /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. @@ -3216,6 +3461,8 @@ public enum Operations { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - secret_scanning_delegated_bypass: The enablement status of secret scanning delegated bypass + /// - secret_scanning_delegated_bypass_options: Feature options for secret scanning delegated bypass /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - secret_scanning_non_provider_patterns: The enablement status of secret scanning non-provider patterns /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting @@ -3232,6 +3479,8 @@ public enum Operations { code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, + secret_scanning_delegated_bypass: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload? = nil, + secret_scanning_delegated_bypass_options: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload? = nil, secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, secret_scanning_non_provider_patterns: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload? = nil, private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, @@ -3248,6 +3497,8 @@ public enum Operations { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_delegated_bypass = secret_scanning_delegated_bypass + self.secret_scanning_delegated_bypass_options = secret_scanning_delegated_bypass_options self.secret_scanning_validity_checks = secret_scanning_validity_checks self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns self.private_vulnerability_reporting = private_vulnerability_reporting @@ -3265,6 +3516,8 @@ public enum Operations { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_delegated_bypass + case secret_scanning_delegated_bypass_options case secret_scanning_validity_checks case secret_scanning_non_provider_patterns case private_vulnerability_reporting @@ -3316,6 +3569,14 @@ public enum Operations { Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) + secret_scanning_delegated_bypass = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload.self, + forKey: .secret_scanning_delegated_bypass + ) + secret_scanning_delegated_bypass_options = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.self, + forKey: .secret_scanning_delegated_bypass_options + ) secret_scanning_validity_checks = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks @@ -3344,6 +3605,8 @@ public enum Operations { "code_scanning_default_setup", "secret_scanning", "secret_scanning_push_protection", + "secret_scanning_delegated_bypass", + "secret_scanning_delegated_bypass_options", "secret_scanning_validity_checks", "secret_scanning_non_provider_patterns", "private_vulnerability_reporting", @@ -3758,6 +4021,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/scope`. @frozen public enum scopePayload: String, Codable, Hashable, Sendable { case all = "all" + case all_without_configurations = "all_without_configurations" case _public = "public" case private_or_internal = "private_or_internal" case selected = "selected" From b2599545a2a2a494dcdadc6889372746fdc4633d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:33:31 +0000 Subject: [PATCH 079/129] Bump Submodule/github/rest-api-description from `531ec66` to `10e2f15` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `531ec66` to `10e2f15`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/531ec66f506b4a24468ca33192dc1ca5489f8a1b...10e2f151b45a960f135417e71bd6f0ac5ce0aa97) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 531ec66f506..10e2f151b45 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 531ec66f506b4a24468ca33192dc1ca5489f8a1b +Subproject commit 10e2f151b45a960f135417e71bd6f0ac5ce0aa97 From c9deb74dc1c7a2615cde5fe00b800273d6d82090 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 21:55:07 +0000 Subject: [PATCH 080/129] Commit via running ake Sources/apps --- Sources/apps/Client.swift | 7 ------- Sources/apps/Types.swift | 7 +------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Sources/apps/Client.swift b/Sources/apps/Client.swift index dfae4f8f131..5022336e307 100644 --- a/Sources/apps/Client.swift +++ b/Sources/apps/Client.swift @@ -383,13 +383,6 @@ public struct Client: APIProtocol { name: "cursor", value: input.query.cursor ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "redelivery", - value: input.query.redelivery - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index 7c320828b2e..5b43918dddd 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -5728,22 +5728,17 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/app/hook/deliveries/GET/query/cursor`. public var cursor: Components.Parameters.cursor? - /// - Remark: Generated from `#/paths/app/hook/deliveries/GET/query/redelivery`. - public var redelivery: Swift.Bool? /// Creates a new `Query`. /// /// - Parameters: /// - per_page: The number of results per page (max 100). 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)." /// - cursor: Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. - /// - redelivery: public init( per_page: Components.Parameters.per_hyphen_page? = nil, - cursor: Components.Parameters.cursor? = nil, - redelivery: Swift.Bool? = nil + cursor: Components.Parameters.cursor? = nil ) { self.per_page = per_page self.cursor = cursor - self.redelivery = redelivery } } public var query: Operations.apps_sol_list_hyphen_webhook_hyphen_deliveries.Input.Query From bd5e1e84ddcae81c31b6eb642d8ade54820a952d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 21:55:49 +0000 Subject: [PATCH 081/129] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 65c72b9f68b..5a86e0e5cf2 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -2483,7 +2483,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/check-suite`. public struct check_hyphen_suite: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/check-suite/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/check-suite/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/check-suite/head_branch`. @@ -2571,7 +2571,7 @@ public enum Components { /// - rerequestable: /// - runs_rerequestable: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, head_branch: Swift.String? = nil, head_sha: Swift.String, From 055eefec0554a7f3f67e08eadb8489761b79652f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 21:56:10 +0000 Subject: [PATCH 082/129] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Client.swift | 118 ++++++++++++++- Sources/code-scanning/Types.swift | 233 ++++++++++++++++++++++++++++- 2 files changed, 343 insertions(+), 8 deletions(-) diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index 288da633614..694f4025f5c 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -1493,7 +1493,7 @@ public struct Client: APIProtocol { /// /// Lists the CodeQL databases that are available in a repository. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/get(code-scanning/list-codeql-databases)`. @@ -1632,7 +1632,7 @@ public struct Client: APIProtocol { /// your HTTP client is configured to follow redirects or use the `Location` header /// to make a second request to get the redirect URL. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)`. @@ -1764,6 +1764,120 @@ public struct Client: APIProtocol { } ) } + /// Delete a CodeQL database + /// + /// Deletes a CodeQL database for a language in a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)`. + public func code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database(_ input: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input) async throws -> Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/code-scanning/codeql/databases/{}", + parameters: [ + input.path.owner, + input.path.repo, + input.path.language + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.code_scanning_forbidden_write.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.service_unavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Responses.service_unavailable.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Create a CodeQL variant analysis /// /// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories. diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 1f47dc564cc..ee84b6fa5d8 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -179,7 +179,7 @@ public protocol APIProtocol: Sendable { /// /// Lists the CodeQL databases that are available in a repository. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/get(code-scanning/list-codeql-databases)`. @@ -194,11 +194,20 @@ public protocol APIProtocol: Sendable { /// your HTTP client is configured to follow redirects or use the `Location` header /// to make a second request to get the redirect URL. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)`. func code_hyphen_scanning_sol_get_hyphen_codeql_hyphen_database(_ input: Operations.code_hyphen_scanning_sol_get_hyphen_codeql_hyphen_database.Input) async throws -> Operations.code_hyphen_scanning_sol_get_hyphen_codeql_hyphen_database.Output + /// Delete a CodeQL database + /// + /// Deletes a CodeQL database for a language in a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)`. + func code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database(_ input: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input) async throws -> Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output /// Create a CodeQL variant analysis /// /// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories. @@ -545,7 +554,7 @@ extension APIProtocol { /// /// Lists the CodeQL databases that are available in a repository. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/get(code-scanning/list-codeql-databases)`. @@ -568,7 +577,7 @@ extension APIProtocol { /// your HTTP client is configured to follow redirects or use the `Location` header /// to make a second request to get the redirect URL. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)`. @@ -581,6 +590,23 @@ extension APIProtocol { headers: headers )) } + /// Delete a CodeQL database + /// + /// Deletes a CodeQL database for a language in a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)`. + public func code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database( + path: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input.Path, + headers: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output { + try await code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database(Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input( + path: path, + headers: headers + )) + } /// Create a CodeQL variant analysis /// /// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories. @@ -5861,7 +5887,7 @@ public enum Operations { /// /// Lists the CodeQL databases that are available in a repository. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/get(code-scanning/list-codeql-databases)`. @@ -6079,7 +6105,7 @@ public enum Operations { /// your HTTP client is configured to follow redirects or use the `Location` header /// to make a second request to get the redirect URL. /// - /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)`. @@ -6317,6 +6343,201 @@ public enum Operations { } } } + /// Delete a CodeQL database + /// + /// Deletes a CodeQL database for a language in a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)`. + public enum code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database { + public static let id: Swift.String = "code-scanning/delete-codeql-database" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/DELETE/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/DELETE/path/repo`. + public var repo: Components.Parameters.repo + /// The language of the CodeQL database. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/DELETE/path/language`. + public var language: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + /// - language: The language of the CodeQL database. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo, + language: Swift.String + ) { + self.owner = owner + self.repo = repo + self.language = language + } + } + public var path: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input.Path, + headers: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.code_scanning_forbidden_write) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.code_scanning_forbidden_write { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Components.Responses.service_unavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Components.Responses.service_unavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// Create a CodeQL variant analysis /// /// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories. From fb7e629b09a17a39771944dc7cc5bc9afa64312d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 22:01:26 +0000 Subject: [PATCH 083/129] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 823 +++++++++++++- Sources/orgs/Types.swift | 2226 ++++++++++++++++++++++++++++++++++++- 2 files changed, 3034 insertions(+), 15 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index f77961fc261..fa05bb49a73 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -1641,13 +1641,6 @@ public struct Client: APIProtocol { name: "cursor", value: input.query.cursor ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "redelivery", - value: input.query.redelivery - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -2064,6 +2057,822 @@ public struct Client: APIProtocol { } ) } + /// Get route stats by actor + /// + /// Get API request count statistics for an actor broken down by route within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/get(api-insights/get-route-stats-by-actor)`. + public func api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor(_ input: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/route-stats/{}/{}", + parameters: [ + input.path.org, + input.path.actor_type, + input.path.actor_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "direction", + value: input.query.direction + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "sort", + value: input.query.sort + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_route_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get subject stats + /// + /// Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/subject-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/subject-stats/get(api-insights/get-subject-stats)`. + public func api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/subject-stats", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "direction", + value: input.query.direction + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "sort", + value: input.query.sort + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_subject_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get summary stats + /// + /// Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/get(api-insights/get-summary-stats)`. + public func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/summary-stats", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get summary stats by user + /// + /// Get overall statistics of API requests within the organization for a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/users/{user_id}/get(api-insights/get-summary-stats-by-user)`. + public func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user(_ input: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/summary-stats/users/{}", + parameters: [ + input.path.org, + input.path.user_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get summary stats by actor + /// + /// Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/get(api-insights/get-summary-stats-by-actor)`. + public func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor(_ input: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/summary-stats/{}/{}", + parameters: [ + input.path.org, + input.path.actor_type, + input.path.actor_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get time stats + /// + /// Get the number of API requests and rate-limited requests made within an organization over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/get(api-insights/get-time-stats)`. + public func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/time-stats", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "timestamp_increment", + value: input.query.timestamp_increment + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get time stats by user + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/users/{user_id}/get(api-insights/get-time-stats-by-user)`. + public func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user(_ input: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/time-stats/users/{}", + parameters: [ + input.path.org, + input.path.user_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "timestamp_increment", + value: input.query.timestamp_increment + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get time stats by actor + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/get(api-insights/get-time-stats-by-actor)`. + public func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor(_ input: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/time-stats/{}/{}", + parameters: [ + input.path.org, + input.path.actor_type, + input.path.actor_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "timestamp_increment", + value: input.query.timestamp_increment + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get user stats + /// + /// Get API usage statistics within an organization for a user broken down by the type of access. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/user-stats/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/user-stats/{user_id}/get(api-insights/get-user-stats)`. + public func api_hyphen_insights_sol_get_hyphen_user_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output { + try await client.send( + input: input, + forOperation: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/insights/api/user-stats/{}", + parameters: [ + input.path.org, + input.path.user_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "min_timestamp", + value: input.query.min_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "max_timestamp", + value: input.query.max_timestamp + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "direction", + value: input.query.direction + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "sort", + value: input.query.sort + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.api_hyphen_insights_hyphen_user_hyphen_stats.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// List app installations for an organization /// /// Lists all GitHub Apps in an organization. The installation count includes diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 200e17216fa..ec2df9e14aa 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -246,6 +246,69 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `POST /orgs/{org}/hooks/{hook_id}/pings`. /// - Remark: Generated from `#/paths//orgs/{org}/hooks/{hook_id}/pings/post(orgs/ping-webhook)`. func orgs_sol_ping_hyphen_webhook(_ input: Operations.orgs_sol_ping_hyphen_webhook.Input) async throws -> Operations.orgs_sol_ping_hyphen_webhook.Output + /// Get route stats by actor + /// + /// Get API request count statistics for an actor broken down by route within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/get(api-insights/get-route-stats-by-actor)`. + func api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor(_ input: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output + /// Get subject stats + /// + /// Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/subject-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/subject-stats/get(api-insights/get-subject-stats)`. + func api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output + /// Get summary stats + /// + /// Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/get(api-insights/get-summary-stats)`. + func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output + /// Get summary stats by user + /// + /// Get overall statistics of API requests within the organization for a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/users/{user_id}/get(api-insights/get-summary-stats-by-user)`. + func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user(_ input: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output + /// Get summary stats by actor + /// + /// Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/get(api-insights/get-summary-stats-by-actor)`. + func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor(_ input: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output + /// Get time stats + /// + /// Get the number of API requests and rate-limited requests made within an organization over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/get(api-insights/get-time-stats)`. + func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output + /// Get time stats by user + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/users/{user_id}/get(api-insights/get-time-stats-by-user)`. + func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user(_ input: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output + /// Get time stats by actor + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/get(api-insights/get-time-stats-by-actor)`. + func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor(_ input: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output + /// Get user stats + /// + /// Get API usage statistics within an organization for a user broken down by the type of access. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/user-stats/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/user-stats/{user_id}/get(api-insights/get-user-stats)`. + func api_hyphen_insights_sol_get_hyphen_user_hyphen_stats(_ input: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output /// List app installations for an organization /// /// Lists all GitHub Apps in an organization. The installation count includes @@ -1167,6 +1230,159 @@ extension APIProtocol { headers: headers )) } + /// Get route stats by actor + /// + /// Get API request count statistics for an actor broken down by route within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/get(api-insights/get-route-stats-by-actor)`. + public func api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor( + path: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output { + try await api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor(Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get subject stats + /// + /// Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/subject-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/subject-stats/get(api-insights/get-subject-stats)`. + public func api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats( + path: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output { + try await api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats(Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get summary stats + /// + /// Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/get(api-insights/get-summary-stats)`. + public func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats( + path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output { + try await api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats(Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get summary stats by user + /// + /// Get overall statistics of API requests within the organization for a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/users/{user_id}/get(api-insights/get-summary-stats-by-user)`. + public func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user( + path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output { + try await api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user(Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get summary stats by actor + /// + /// Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/get(api-insights/get-summary-stats-by-actor)`. + public func api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor( + path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output { + try await api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor(Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get time stats + /// + /// Get the number of API requests and rate-limited requests made within an organization over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/get(api-insights/get-time-stats)`. + public func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats( + path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output { + try await api_hyphen_insights_sol_get_hyphen_time_hyphen_stats(Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get time stats by user + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/users/{user_id}/get(api-insights/get-time-stats-by-user)`. + public func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user( + path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output { + try await api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user(Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get time stats by actor + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/get(api-insights/get-time-stats-by-actor)`. + public func api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor( + path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output { + try await api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor(Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get user stats + /// + /// Get API usage statistics within an organization for a user broken down by the type of access. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/user-stats/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/user-stats/{user_id}/get(api-insights/get-user-stats)`. + public func api_hyphen_insights_sol_get_hyphen_user_hyphen_stats( + path: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Headers = .init() + ) async throws -> Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output { + try await api_hyphen_insights_sol_get_hyphen_user_hyphen_stats(Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input( + path: path, + query: query, + headers: headers + )) + } /// List app installations for an organization /// /// Lists all GitHub Apps in an organization. The installation count includes @@ -5872,6 +6088,253 @@ public enum Components { case _type = "type" } } + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_route_hyphen_stats`. + public struct api_hyphen_insights_hyphen_route_hyphen_statsPayload: Codable, Hashable, Sendable { + /// The HTTP method + /// + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_route_hyphen_stats/http_method`. + public var http_method: Swift.String? + /// The API path's route template + /// + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_route_hyphen_stats/api_route`. + public var api_route: Swift.String? + /// The total number of requests within the queried time period + /// + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_route_hyphen_stats/total_request_count`. + public var total_request_count: Swift.Int64? + /// The total number of requests that were rate limited within the queried time period + /// + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_route_hyphen_stats/rate_limited_request_count`. + public var rate_limited_request_count: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_route_hyphen_stats/last_rate_limited_timestamp`. + public var last_rate_limited_timestamp: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_route_hyphen_stats/last_request_timestamp`. + public var last_request_timestamp: Swift.String? + /// Creates a new `api_hyphen_insights_hyphen_route_hyphen_statsPayload`. + /// + /// - Parameters: + /// - http_method: The HTTP method + /// - api_route: The API path's route template + /// - total_request_count: The total number of requests within the queried time period + /// - rate_limited_request_count: The total number of requests that were rate limited within the queried time period + /// - last_rate_limited_timestamp: + /// - last_request_timestamp: + public init( + http_method: Swift.String? = nil, + api_route: Swift.String? = nil, + total_request_count: Swift.Int64? = nil, + rate_limited_request_count: Swift.Int64? = nil, + last_rate_limited_timestamp: Swift.String? = nil, + last_request_timestamp: Swift.String? = nil + ) { + self.http_method = http_method + self.api_route = api_route + self.total_request_count = total_request_count + self.rate_limited_request_count = rate_limited_request_count + self.last_rate_limited_timestamp = last_rate_limited_timestamp + self.last_request_timestamp = last_request_timestamp + } + public enum CodingKeys: String, CodingKey { + case http_method + case api_route + case total_request_count + case rate_limited_request_count + case last_rate_limited_timestamp + case last_request_timestamp + } + } + /// API Insights usage route stats for an actor + /// + /// - Remark: Generated from `#/components/schemas/api-insights-route-stats`. + public typealias api_hyphen_insights_hyphen_route_hyphen_stats = [Components.Schemas.api_hyphen_insights_hyphen_route_hyphen_statsPayload] + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats`. + public struct api_hyphen_insights_hyphen_subject_hyphen_statsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats/subject_type`. + public var subject_type: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats/subject_name`. + public var subject_name: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats/subject_id`. + public var subject_id: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats/total_request_count`. + public var total_request_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats/rate_limited_request_count`. + public var rate_limited_request_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats/last_rate_limited_timestamp`. + public var last_rate_limited_timestamp: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_subject_hyphen_stats/last_request_timestamp`. + public var last_request_timestamp: Swift.String? + /// Creates a new `api_hyphen_insights_hyphen_subject_hyphen_statsPayload`. + /// + /// - Parameters: + /// - subject_type: + /// - subject_name: + /// - subject_id: + /// - total_request_count: + /// - rate_limited_request_count: + /// - last_rate_limited_timestamp: + /// - last_request_timestamp: + public init( + subject_type: Swift.String? = nil, + subject_name: Swift.String? = nil, + subject_id: Swift.Int64? = nil, + total_request_count: Swift.Int? = nil, + rate_limited_request_count: Swift.Int? = nil, + last_rate_limited_timestamp: Swift.String? = nil, + last_request_timestamp: Swift.String? = nil + ) { + self.subject_type = subject_type + self.subject_name = subject_name + self.subject_id = subject_id + self.total_request_count = total_request_count + self.rate_limited_request_count = rate_limited_request_count + self.last_rate_limited_timestamp = last_rate_limited_timestamp + self.last_request_timestamp = last_request_timestamp + } + public enum CodingKeys: String, CodingKey { + case subject_type + case subject_name + case subject_id + case total_request_count + case rate_limited_request_count + case last_rate_limited_timestamp + case last_request_timestamp + } + } + /// API Insights usage subject stats for an organization + /// + /// - Remark: Generated from `#/components/schemas/api-insights-subject-stats`. + public typealias api_hyphen_insights_hyphen_subject_hyphen_stats = [Components.Schemas.api_hyphen_insights_hyphen_subject_hyphen_statsPayload] + /// API Insights usage summary stats for an organization + /// + /// - Remark: Generated from `#/components/schemas/api-insights-summary-stats`. + public struct api_hyphen_insights_hyphen_summary_hyphen_stats: Codable, Hashable, Sendable { + /// The total number of requests within the queried time period + /// + /// - Remark: Generated from `#/components/schemas/api-insights-summary-stats/total_request_count`. + public var total_request_count: Swift.Int64? + /// The total number of requests that were rate limited within the queried time period + /// + /// - Remark: Generated from `#/components/schemas/api-insights-summary-stats/rate_limited_request_count`. + public var rate_limited_request_count: Swift.Int64? + /// Creates a new `api_hyphen_insights_hyphen_summary_hyphen_stats`. + /// + /// - Parameters: + /// - total_request_count: The total number of requests within the queried time period + /// - rate_limited_request_count: The total number of requests that were rate limited within the queried time period + public init( + total_request_count: Swift.Int64? = nil, + rate_limited_request_count: Swift.Int64? = nil + ) { + self.total_request_count = total_request_count + self.rate_limited_request_count = rate_limited_request_count + } + public enum CodingKeys: String, CodingKey { + case total_request_count + case rate_limited_request_count + } + } + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_time_hyphen_stats`. + public struct api_hyphen_insights_hyphen_time_hyphen_statsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_time_hyphen_stats/timestamp`. + public var timestamp: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_time_hyphen_stats/total_request_count`. + public var total_request_count: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_time_hyphen_stats/rate_limited_request_count`. + public var rate_limited_request_count: Swift.Int64? + /// Creates a new `api_hyphen_insights_hyphen_time_hyphen_statsPayload`. + /// + /// - Parameters: + /// - timestamp: + /// - total_request_count: + /// - rate_limited_request_count: + public init( + timestamp: Swift.String? = nil, + total_request_count: Swift.Int64? = nil, + rate_limited_request_count: Swift.Int64? = nil + ) { + self.timestamp = timestamp + self.total_request_count = total_request_count + self.rate_limited_request_count = rate_limited_request_count + } + public enum CodingKeys: String, CodingKey { + case timestamp + case total_request_count + case rate_limited_request_count + } + } + /// API Insights usage time stats for an organization + /// + /// - Remark: Generated from `#/components/schemas/api-insights-time-stats`. + public typealias api_hyphen_insights_hyphen_time_hyphen_stats = [Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_statsPayload] + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats`. + public struct api_hyphen_insights_hyphen_user_hyphen_statsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/actor_type`. + public var actor_type: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/actor_name`. + public var actor_name: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/actor_id`. + public var actor_id: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/integration_id`. + public var integration_id: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/oauth_application_id`. + public var oauth_application_id: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/total_request_count`. + public var total_request_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/rate_limited_request_count`. + public var rate_limited_request_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/last_rate_limited_timestamp`. + public var last_rate_limited_timestamp: Swift.String? + /// - Remark: Generated from `#/components/schemas/api_hyphen_insights_hyphen_user_hyphen_stats/last_request_timestamp`. + public var last_request_timestamp: Swift.String? + /// Creates a new `api_hyphen_insights_hyphen_user_hyphen_statsPayload`. + /// + /// - Parameters: + /// - actor_type: + /// - actor_name: + /// - actor_id: + /// - integration_id: + /// - oauth_application_id: + /// - total_request_count: + /// - rate_limited_request_count: + /// - last_rate_limited_timestamp: + /// - last_request_timestamp: + public init( + actor_type: Swift.String? = nil, + actor_name: Swift.String? = nil, + actor_id: Swift.Int64? = nil, + integration_id: Swift.Int64? = nil, + oauth_application_id: Swift.Int64? = nil, + total_request_count: Swift.Int? = nil, + rate_limited_request_count: Swift.Int? = nil, + last_rate_limited_timestamp: Swift.String? = nil, + last_request_timestamp: Swift.String? = nil + ) { + self.actor_type = actor_type + self.actor_name = actor_name + self.actor_id = actor_id + self.integration_id = integration_id + self.oauth_application_id = oauth_application_id + self.total_request_count = total_request_count + self.rate_limited_request_count = rate_limited_request_count + self.last_rate_limited_timestamp = last_rate_limited_timestamp + self.last_request_timestamp = last_request_timestamp + } + public enum CodingKeys: String, CodingKey { + case actor_type + case actor_name + case actor_id + case integration_id + case oauth_application_id + case total_request_count + case rate_limited_request_count + case last_rate_limited_timestamp + case last_request_timestamp + } + } + /// API Insights usage stats for a user + /// + /// - Remark: Generated from `#/components/schemas/api-insights-user-stats`. + public typealias api_hyphen_insights_hyphen_user_hyphen_stats = [Components.Schemas.api_hyphen_insights_hyphen_user_hyphen_statsPayload] /// Org Membership /// /// - Remark: Generated from `#/components/schemas/org-membership`. @@ -6541,6 +7004,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request/created_at`. public var created_at: Swift.String + /// Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + /// + /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request/token_id`. + public var token_id: Swift.Int /// Whether the associated fine-grained personal access token has expired. /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request/token_expired`. @@ -6563,6 +7030,7 @@ public enum Components { /// - repositories_url: URL to the list of repositories requested to be accessed via fine-grained personal access token. Should only be followed when `repository_selection` is `subset`. /// - permissions: Permissions requested, categorized by type of permission. /// - created_at: Date and time when the request for access was created. + /// - token_id: Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. /// - token_expired: Whether the associated fine-grained personal access token has expired. /// - token_expires_at: Date and time when the associated fine-grained personal access token expires. /// - token_last_used_at: Date and time when the associated fine-grained personal access token was last used for authentication. @@ -6574,6 +7042,7 @@ public enum Components { repositories_url: Swift.String, permissions: Components.Schemas.organization_hyphen_programmatic_hyphen_access_hyphen_grant_hyphen_request.permissionsPayload, created_at: Swift.String, + token_id: Swift.Int, token_expired: Swift.Bool, token_expires_at: Swift.String? = nil, token_last_used_at: Swift.String? = nil @@ -6585,6 +7054,7 @@ public enum Components { self.repositories_url = repositories_url self.permissions = permissions self.created_at = created_at + self.token_id = token_id self.token_expired = token_expired self.token_expires_at = token_expires_at self.token_last_used_at = token_last_used_at @@ -6597,6 +7067,7 @@ public enum Components { case repositories_url case permissions case created_at + case token_id case token_expired case token_expires_at case token_last_used_at @@ -6606,7 +7077,7 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant`. public struct organization_hyphen_programmatic_hyphen_access_hyphen_grant: Codable, Hashable, Sendable { - /// Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. + /// Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/id`. public var id: Swift.Int @@ -6721,6 +7192,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/access_granted_at`. public var access_granted_at: Swift.String + /// Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + /// + /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/token_id`. + public var token_id: Swift.Int /// Whether the associated fine-grained personal access token has expired. /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/token_expired`. @@ -6736,12 +7211,13 @@ public enum Components { /// Creates a new `organization_hyphen_programmatic_hyphen_access_hyphen_grant`. /// /// - Parameters: - /// - id: Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. + /// - id: Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. /// - owner: /// - repository_selection: Type of repository selection requested. /// - repositories_url: URL to the list of repositories the fine-grained personal access token can access. Only follow when `repository_selection` is `subset`. /// - permissions: Permissions requested, categorized by type of permission. /// - access_granted_at: Date and time when the fine-grained personal access token was approved to access the organization. + /// - token_id: Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. /// - token_expired: Whether the associated fine-grained personal access token has expired. /// - token_expires_at: Date and time when the associated fine-grained personal access token expires. /// - token_last_used_at: Date and time when the associated fine-grained personal access token was last used for authentication. @@ -6752,6 +7228,7 @@ public enum Components { repositories_url: Swift.String, permissions: Components.Schemas.organization_hyphen_programmatic_hyphen_access_hyphen_grant.permissionsPayload, access_granted_at: Swift.String, + token_id: Swift.Int, token_expired: Swift.Bool, token_expires_at: Swift.String? = nil, token_last_used_at: Swift.String? = nil @@ -6762,6 +7239,7 @@ public enum Components { self.repositories_url = repositories_url self.permissions = permissions self.access_granted_at = access_granted_at + self.token_id = token_id self.token_expired = token_expired self.token_expires_at = token_expires_at self.token_last_used_at = token_last_used_at @@ -6773,6 +7251,7 @@ public enum Components { case repositories_url case permissions case access_granted_at + case token_id case token_expired case token_expires_at case token_last_used_at @@ -7066,6 +7545,61 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/hook-id`. public typealias hook_hyphen_id = Swift.Int + /// The type of the actor + /// + /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + case installations = "installations" + case classic_pats = "classic_pats" + case fine_grained_pats = "fine_grained_pats" + case oauth_apps = "oauth_apps" + case github_apps_user_to_server = "github_apps_user_to_server" + } + /// The ID of the actor + /// + /// - Remark: Generated from `#/components/parameters/api-insights-actor-id`. + public typealias api_hyphen_insights_hyphen_actor_hyphen_id = Swift.Int + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/components/parameters/api-insights-min-timestamp`. + public typealias api_hyphen_insights_hyphen_min_hyphen_timestamp = Swift.String + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/components/parameters/api-insights-max-timestamp`. + public typealias api_hyphen_insights_hyphen_max_hyphen_timestamp = Swift.String + /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort`. + @frozen public enum api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload: String, Codable, Hashable, Sendable { + case last_rate_limited_timestamp = "last_rate_limited_timestamp" + case last_request_timestamp = "last_request_timestamp" + case rate_limited_request_count = "rate_limited_request_count" + case http_method = "http_method" + case api_route = "api_route" + case total_request_count = "total_request_count" + } + /// The property to sort the results by. + /// + /// - Remark: Generated from `#/components/parameters/api-insights-route-stats-sort`. + public typealias api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort = [Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload] + /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_sort`. + @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable { + case last_rate_limited_timestamp = "last_rate_limited_timestamp" + case last_request_timestamp = "last_request_timestamp" + case rate_limited_request_count = "rate_limited_request_count" + case subject_name = "subject_name" + case total_request_count = "total_request_count" + } + /// The property to sort the results by. + /// + /// - Remark: Generated from `#/components/parameters/api-insights-sort`. + public typealias api_hyphen_insights_hyphen_sort = [Components.Parameters.api_hyphen_insights_hyphen_sortPayload] + /// The ID of the user to query for stats + /// + /// - Remark: Generated from `#/components/parameters/api-insights-user-id`. + public typealias api_hyphen_insights_hyphen_user_hyphen_id = Swift.String + /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + /// + /// - Remark: Generated from `#/components/parameters/api-insights-timestamp-increment`. + public typealias api_hyphen_insights_hyphen_timestamp_hyphen_increment = Swift.String /// The unique identifier of the invitation. /// /// - Remark: Generated from `#/components/parameters/invitation-id`. @@ -10988,22 +11522,17 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/hooks/{hook_id}/deliveries/GET/query/cursor`. public var cursor: Components.Parameters.cursor? - /// - Remark: Generated from `#/paths/orgs/{org}/hooks/{hook_id}/deliveries/GET/query/redelivery`. - public var redelivery: Swift.Bool? /// Creates a new `Query`. /// /// - Parameters: /// - per_page: The number of results per page (max 100). 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)." /// - cursor: Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. - /// - redelivery: public init( per_page: Components.Parameters.per_hyphen_page? = nil, - cursor: Components.Parameters.cursor? = nil, - redelivery: Swift.Bool? = nil + cursor: Components.Parameters.cursor? = nil ) { self.per_page = per_page self.cursor = cursor - self.redelivery = redelivery } } public var query: Operations.orgs_sol_list_hyphen_webhook_hyphen_deliveries.Input.Query @@ -11694,6 +12223,1687 @@ public enum Operations { } } } + /// Get route stats by actor + /// + /// Get API request count statistics for an actor broken down by route within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/get(api-insights/get-route-stats-by-actor)`. + public enum api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor { + public static let id: Swift.String = "api-insights/get-route-stats-by-actor" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/path/org`. + public var org: Components.Parameters.org + /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + case installations = "installations" + case classic_pats = "classic_pats" + case fine_grained_pats = "fine_grained_pats" + case oauth_apps = "oauth_apps" + case github_apps_user_to_server = "github_apps_user_to_server" + } + /// The type of the actor + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/path/actor_type`. + public var actor_type: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_type + /// The ID of the actor + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/path/actor_id`. + public var actor_id: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - actor_type: The type of the actor + /// - actor_id: The ID of the actor + public init( + org: Components.Parameters.org, + actor_type: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_type, + actor_id: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_id + ) { + self.org = org + self.actor_type = actor_type + self.actor_id = actor_id + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// The page number of the results to fetch. 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/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of results per page (max 100). 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/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// - Remark: Generated from `#/components/parameters/direction`. + @frozen public enum direction: String, Codable, Hashable, Sendable { + case asc = "asc" + case desc = "desc" + } + /// The direction to sort the results by. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/direction`. + public var direction: Components.Parameters.direction? + /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort`. + @frozen public enum api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload: String, Codable, Hashable, Sendable { + case last_rate_limited_timestamp = "last_rate_limited_timestamp" + case last_request_timestamp = "last_request_timestamp" + case rate_limited_request_count = "rate_limited_request_count" + case http_method = "http_method" + case api_route = "api_route" + case total_request_count = "total_request_count" + } + /// - Remark: Generated from `#/components/parameters/api-insights-route-stats-sort`. + public typealias api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort = [Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload] + /// The property to sort the results by. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/sort`. + public var sort: Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of results per page (max 100). 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. + /// - sort: The property to sort the results by. + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + page: Components.Parameters.page? = nil, + per_page: Components.Parameters.per_hyphen_page? = nil, + direction: Components.Parameters.direction? = nil, + sort: Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort? = nil + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + self.page = page + self.per_page = per_page + self.direction = direction + self.sort = sort + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_route_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_route_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/get(api-insights/get-route-stats-by-actor)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get subject stats + /// + /// Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/subject-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/subject-stats/get(api-insights/get-subject-stats)`. + public enum api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats { + public static let id: Swift.String = "api-insights/get-subject-stats" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// The page number of the results to fetch. 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/orgs/{org}/insights/api/subject-stats/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of results per page (max 100). 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/orgs/{org}/insights/api/subject-stats/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// - Remark: Generated from `#/components/parameters/direction`. + @frozen public enum direction: String, Codable, Hashable, Sendable { + case asc = "asc" + case desc = "desc" + } + /// The direction to sort the results by. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/direction`. + public var direction: Components.Parameters.direction? + /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_sort`. + @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable { + case last_rate_limited_timestamp = "last_rate_limited_timestamp" + case last_request_timestamp = "last_request_timestamp" + case rate_limited_request_count = "rate_limited_request_count" + case subject_name = "subject_name" + case total_request_count = "total_request_count" + } + /// - Remark: Generated from `#/components/parameters/api-insights-sort`. + public typealias api_hyphen_insights_hyphen_sort = [Components.Parameters.api_hyphen_insights_hyphen_sortPayload] + /// The property to sort the results by. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/sort`. + public var sort: Components.Parameters.api_hyphen_insights_hyphen_sort? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of results per page (max 100). 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. + /// - sort: The property to sort the results by. + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + page: Components.Parameters.page? = nil, + per_page: Components.Parameters.per_hyphen_page? = nil, + direction: Components.Parameters.direction? = nil, + sort: Components.Parameters.api_hyphen_insights_hyphen_sort? = nil + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + self.page = page + self.per_page = per_page + self.direction = direction + self.sort = sort + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_subject_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_subject_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/subject-stats/get(api-insights/get-subject-stats)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get summary stats + /// + /// Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/get(api-insights/get-summary-stats)`. + public enum api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats { + public static let id: Swift.String = "api-insights/get-summary-stats" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/get(api-insights/get-summary-stats)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get summary stats by user + /// + /// Get overall statistics of API requests within the organization for a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/users/{user_id}/get(api-insights/get-summary-stats-by-user)`. + public enum api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user { + public static let id: Swift.String = "api-insights/get-summary-stats-by-user" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/path/org`. + public var org: Components.Parameters.org + /// The ID of the user to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/path/user_id`. + public var user_id: Components.Parameters.api_hyphen_insights_hyphen_user_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - user_id: The ID of the user to query for stats + public init( + org: Components.Parameters.org, + user_id: Components.Parameters.api_hyphen_insights_hyphen_user_hyphen_id + ) { + self.org = org + self.user_id = user_id + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/users/{user_id}/get(api-insights/get-summary-stats-by-user)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get summary stats by actor + /// + /// Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/get(api-insights/get-summary-stats-by-actor)`. + public enum api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor { + public static let id: Swift.String = "api-insights/get-summary-stats-by-actor" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/path/org`. + public var org: Components.Parameters.org + /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + case installations = "installations" + case classic_pats = "classic_pats" + case fine_grained_pats = "fine_grained_pats" + case oauth_apps = "oauth_apps" + case github_apps_user_to_server = "github_apps_user_to_server" + } + /// The type of the actor + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/path/actor_type`. + public var actor_type: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_type + /// The ID of the actor + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/path/actor_id`. + public var actor_id: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - actor_type: The type of the actor + /// - actor_id: The ID of the actor + public init( + org: Components.Parameters.org, + actor_type: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_type, + actor_id: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_id + ) { + self.org = org + self.actor_type = actor_type + self.actor_id = actor_id + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_summary_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/get(api-insights/get-summary-stats-by-actor)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get time stats + /// + /// Get the number of API requests and rate-limited requests made within an organization over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/get(api-insights/get-time-stats)`. + public enum api_hyphen_insights_sol_get_hyphen_time_hyphen_stats { + public static let id: Swift.String = "api-insights/get-time-stats" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query/timestamp_increment`. + public var timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + /// - timestamp_increment: The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + self.timestamp_increment = timestamp_increment + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/get(api-insights/get-time-stats)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get time stats by user + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/users/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/users/{user_id}/get(api-insights/get-time-stats-by-user)`. + public enum api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user { + public static let id: Swift.String = "api-insights/get-time-stats-by-user" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/path/org`. + public var org: Components.Parameters.org + /// The ID of the user to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/path/user_id`. + public var user_id: Components.Parameters.api_hyphen_insights_hyphen_user_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - user_id: The ID of the user to query for stats + public init( + org: Components.Parameters.org, + user_id: Components.Parameters.api_hyphen_insights_hyphen_user_hyphen_id + ) { + self.org = org + self.user_id = user_id + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query/timestamp_increment`. + public var timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + /// - timestamp_increment: The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + self.timestamp_increment = timestamp_increment + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/users/{user_id}/get(api-insights/get-time-stats-by-user)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get time stats by actor + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/get(api-insights/get-time-stats-by-actor)`. + public enum api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor { + public static let id: Swift.String = "api-insights/get-time-stats-by-actor" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/path/org`. + public var org: Components.Parameters.org + /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + case installations = "installations" + case classic_pats = "classic_pats" + case fine_grained_pats = "fine_grained_pats" + case oauth_apps = "oauth_apps" + case github_apps_user_to_server = "github_apps_user_to_server" + } + /// The type of the actor + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/path/actor_type`. + public var actor_type: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_type + /// The ID of the actor + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/path/actor_id`. + public var actor_id: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - actor_type: The type of the actor + /// - actor_id: The ID of the actor + public init( + org: Components.Parameters.org, + actor_type: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_type, + actor_id: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_id + ) { + self.org = org + self.actor_type = actor_type + self.actor_id = actor_id + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query/timestamp_increment`. + public var timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + /// - timestamp_increment: The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + self.timestamp_increment = timestamp_increment + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_time_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/get(api-insights/get-time-stats-by-actor)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get user stats + /// + /// Get API usage statistics within an organization for a user broken down by the type of access. + /// + /// - Remark: HTTP `GET /orgs/{org}/insights/api/user-stats/{user_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/user-stats/{user_id}/get(api-insights/get-user-stats)`. + public enum api_hyphen_insights_sol_get_hyphen_user_hyphen_stats { + public static let id: Swift.String = "api-insights/get-user-stats" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/path/org`. + public var org: Components.Parameters.org + /// The ID of the user to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/path/user_id`. + public var user_id: Components.Parameters.api_hyphen_insights_hyphen_user_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - user_id: The ID of the user to query for stats + public init( + org: Components.Parameters.org, + user_id: Components.Parameters.api_hyphen_insights_hyphen_user_hyphen_id + ) { + self.org = org + self.user_id = user_id + } + } + public var path: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query`. + public struct Query: Sendable, Hashable { + /// The minimum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/min_timestamp`. + public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp + /// The maximum timestamp to query for stats + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/max_timestamp`. + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + /// The page number of the results to fetch. 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/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of results per page (max 100). 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/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// - Remark: Generated from `#/components/parameters/direction`. + @frozen public enum direction: String, Codable, Hashable, Sendable { + case asc = "asc" + case desc = "desc" + } + /// The direction to sort the results by. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/direction`. + public var direction: Components.Parameters.direction? + /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_sort`. + @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable { + case last_rate_limited_timestamp = "last_rate_limited_timestamp" + case last_request_timestamp = "last_request_timestamp" + case rate_limited_request_count = "rate_limited_request_count" + case subject_name = "subject_name" + case total_request_count = "total_request_count" + } + /// - Remark: Generated from `#/components/parameters/api-insights-sort`. + public typealias api_hyphen_insights_hyphen_sort = [Components.Parameters.api_hyphen_insights_hyphen_sortPayload] + /// The property to sort the results by. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/sort`. + public var sort: Components.Parameters.api_hyphen_insights_hyphen_sort? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - min_timestamp: The minimum timestamp to query for stats + /// - max_timestamp: The maximum timestamp to query for stats + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of results per page (max 100). 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. + /// - sort: The property to sort the results by. + public init( + min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + page: Components.Parameters.page? = nil, + per_page: Components.Parameters.per_hyphen_page? = nil, + direction: Components.Parameters.direction? = nil, + sort: Components.Parameters.api_hyphen_insights_hyphen_sort? = nil + ) { + self.min_timestamp = min_timestamp + self.max_timestamp = max_timestamp + self.page = page + self.per_page = per_page + self.direction = direction + self.sort = sort + } + } + public var query: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Path, + query: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Query, + headers: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.api_hyphen_insights_hyphen_user_hyphen_stats) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.api_hyphen_insights_hyphen_user_hyphen_stats { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/insights/api/user-stats/{user_id}/get(api-insights/get-user-stats)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// List app installations for an organization /// /// Lists all GitHub Apps in an organization. The installation count includes From 5b53edbdc0749dba0993dd58bdebb447fc36faa0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 22:01:47 +0000 Subject: [PATCH 084/129] Commit via running ake Sources/packages --- Sources/packages/Client.swift | 48 ++++++------ Sources/packages/Types.swift | 144 +++++++++++++++++----------------- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/Sources/packages/Client.swift b/Sources/packages/Client.swift index 05b645285f8..e5046653064 100644 --- a/Sources/packages/Client.swift +++ b/Sources/packages/Client.swift @@ -152,7 +152,7 @@ public struct Client: APIProtocol { /// /// Lists packages in an organization readable by the user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/get(packages/list-packages-for-organization)`. @@ -292,7 +292,7 @@ public struct Client: APIProtocol { /// /// Gets a specific package in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/get(packages/get-package-for-organization)`. @@ -362,7 +362,7 @@ public struct Client: APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-org)`. @@ -482,7 +482,7 @@ public struct Client: APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-org)`. @@ -603,7 +603,7 @@ public struct Client: APIProtocol { /// /// Lists package versions for a package owned by an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-org)`. @@ -758,7 +758,7 @@ public struct Client: APIProtocol { /// /// Gets a specific package version in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-organization)`. @@ -829,7 +829,7 @@ public struct Client: APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-org)`. @@ -950,7 +950,7 @@ public struct Client: APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-org)`. @@ -1129,7 +1129,7 @@ public struct Client: APIProtocol { /// /// Lists packages owned by the authenticated user within the user's namespace. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages`. /// - Remark: Generated from `#/paths//user/packages/get(packages/list-packages-for-authenticated-user)`. @@ -1223,7 +1223,7 @@ public struct Client: APIProtocol { /// /// Gets a specific package for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/get(packages/get-package-for-authenticated-user)`. @@ -1290,7 +1290,7 @@ public struct Client: APIProtocol { /// /// Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/delete(packages/delete-package-for-authenticated-user)`. @@ -1407,7 +1407,7 @@ public struct Client: APIProtocol { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-authenticated-user)`. @@ -1527,7 +1527,7 @@ public struct Client: APIProtocol { /// /// Lists package versions for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-authenticated-user)`. @@ -1681,7 +1681,7 @@ public struct Client: APIProtocol { /// /// Gets a specific package version for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-authenticated-user)`. @@ -1751,7 +1751,7 @@ public struct Client: APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-authenticated-user)`. @@ -1869,7 +1869,7 @@ public struct Client: APIProtocol { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-authenticated-user)`. @@ -2093,7 +2093,7 @@ public struct Client: APIProtocol { /// /// Lists all packages in a user's namespace for which the requesting user has access. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages`. /// - Remark: Generated from `#/paths//users/{username}/packages/get(packages/list-packages-for-user)`. @@ -2233,7 +2233,7 @@ public struct Client: APIProtocol { /// /// Gets a specific package metadata for a public package owned by a user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/get(packages/get-package-for-user)`. @@ -2303,7 +2303,7 @@ public struct Client: APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-user)`. @@ -2423,7 +2423,7 @@ public struct Client: APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-user)`. @@ -2544,7 +2544,7 @@ public struct Client: APIProtocol { /// /// Lists package versions for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-user)`. @@ -2678,7 +2678,7 @@ public struct Client: APIProtocol { /// /// Gets a specific package version for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-user)`. @@ -2749,7 +2749,7 @@ public struct Client: APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-user)`. @@ -2870,7 +2870,7 @@ public struct Client: APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-user)`. diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index fd5d57efb80..d3603767eed 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -24,7 +24,7 @@ public protocol APIProtocol: Sendable { /// /// Lists packages in an organization readable by the user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/get(packages/list-packages-for-organization)`. @@ -33,7 +33,7 @@ public protocol APIProtocol: Sendable { /// /// Gets a specific package in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/get(packages/get-package-for-organization)`. @@ -44,7 +44,7 @@ public protocol APIProtocol: Sendable { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-org)`. @@ -59,7 +59,7 @@ public protocol APIProtocol: Sendable { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-org)`. @@ -68,7 +68,7 @@ public protocol APIProtocol: Sendable { /// /// Lists package versions for a package owned by an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-org)`. @@ -77,7 +77,7 @@ public protocol APIProtocol: Sendable { /// /// Gets a specific package version in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-organization)`. @@ -88,7 +88,7 @@ public protocol APIProtocol: Sendable { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-org)`. @@ -103,7 +103,7 @@ public protocol APIProtocol: Sendable { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-org)`. @@ -121,7 +121,7 @@ public protocol APIProtocol: Sendable { /// /// Lists packages owned by the authenticated user within the user's namespace. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages`. /// - Remark: Generated from `#/paths//user/packages/get(packages/list-packages-for-authenticated-user)`. @@ -130,7 +130,7 @@ public protocol APIProtocol: Sendable { /// /// Gets a specific package for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/get(packages/get-package-for-authenticated-user)`. @@ -139,7 +139,7 @@ public protocol APIProtocol: Sendable { /// /// Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/delete(packages/delete-package-for-authenticated-user)`. @@ -152,7 +152,7 @@ public protocol APIProtocol: Sendable { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-authenticated-user)`. @@ -161,7 +161,7 @@ public protocol APIProtocol: Sendable { /// /// Lists package versions for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-authenticated-user)`. @@ -170,7 +170,7 @@ public protocol APIProtocol: Sendable { /// /// Gets a specific package version for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-authenticated-user)`. @@ -181,7 +181,7 @@ public protocol APIProtocol: Sendable { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-authenticated-user)`. @@ -194,7 +194,7 @@ public protocol APIProtocol: Sendable { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-authenticated-user)`. @@ -212,7 +212,7 @@ public protocol APIProtocol: Sendable { /// /// Lists all packages in a user's namespace for which the requesting user has access. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages`. /// - Remark: Generated from `#/paths//users/{username}/packages/get(packages/list-packages-for-user)`. @@ -221,7 +221,7 @@ public protocol APIProtocol: Sendable { /// /// Gets a specific package metadata for a public package owned by a user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/get(packages/get-package-for-user)`. @@ -232,7 +232,7 @@ public protocol APIProtocol: Sendable { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-user)`. @@ -247,7 +247,7 @@ public protocol APIProtocol: Sendable { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-user)`. @@ -256,7 +256,7 @@ public protocol APIProtocol: Sendable { /// /// Lists package versions for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-user)`. @@ -265,7 +265,7 @@ public protocol APIProtocol: Sendable { /// /// Gets a specific package version for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-user)`. @@ -276,7 +276,7 @@ public protocol APIProtocol: Sendable { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-user)`. @@ -291,7 +291,7 @@ public protocol APIProtocol: Sendable { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-user)`. @@ -321,7 +321,7 @@ extension APIProtocol { /// /// Lists packages in an organization readable by the user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/get(packages/list-packages-for-organization)`. @@ -340,7 +340,7 @@ extension APIProtocol { /// /// Gets a specific package in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/get(packages/get-package-for-organization)`. @@ -359,7 +359,7 @@ extension APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-org)`. @@ -382,7 +382,7 @@ extension APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-org)`. @@ -401,7 +401,7 @@ extension APIProtocol { /// /// Lists package versions for a package owned by an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-org)`. @@ -420,7 +420,7 @@ extension APIProtocol { /// /// Gets a specific package version in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-organization)`. @@ -439,7 +439,7 @@ extension APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-org)`. @@ -462,7 +462,7 @@ extension APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-org)`. @@ -490,7 +490,7 @@ extension APIProtocol { /// /// Lists packages owned by the authenticated user within the user's namespace. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages`. /// - Remark: Generated from `#/paths//user/packages/get(packages/list-packages-for-authenticated-user)`. @@ -507,7 +507,7 @@ extension APIProtocol { /// /// Gets a specific package for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/get(packages/get-package-for-authenticated-user)`. @@ -524,7 +524,7 @@ extension APIProtocol { /// /// Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/delete(packages/delete-package-for-authenticated-user)`. @@ -545,7 +545,7 @@ extension APIProtocol { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-authenticated-user)`. @@ -564,7 +564,7 @@ extension APIProtocol { /// /// Lists package versions for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-authenticated-user)`. @@ -583,7 +583,7 @@ extension APIProtocol { /// /// Gets a specific package version for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-authenticated-user)`. @@ -602,7 +602,7 @@ extension APIProtocol { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-authenticated-user)`. @@ -623,7 +623,7 @@ extension APIProtocol { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-authenticated-user)`. @@ -657,7 +657,7 @@ extension APIProtocol { /// /// Lists all packages in a user's namespace for which the requesting user has access. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages`. /// - Remark: Generated from `#/paths//users/{username}/packages/get(packages/list-packages-for-user)`. @@ -676,7 +676,7 @@ extension APIProtocol { /// /// Gets a specific package metadata for a public package owned by a user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/get(packages/get-package-for-user)`. @@ -695,7 +695,7 @@ extension APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-user)`. @@ -718,7 +718,7 @@ extension APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-user)`. @@ -737,7 +737,7 @@ extension APIProtocol { /// /// Lists package versions for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-user)`. @@ -754,7 +754,7 @@ extension APIProtocol { /// /// Gets a specific package version for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-user)`. @@ -773,7 +773,7 @@ extension APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-user)`. @@ -796,7 +796,7 @@ extension APIProtocol { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-user)`. @@ -2572,7 +2572,7 @@ public enum Operations { /// /// Lists packages in an organization readable by the user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/get(packages/list-packages-for-organization)`. @@ -2834,7 +2834,7 @@ public enum Operations { /// /// Gets a specific package in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/get(packages/get-package-for-organization)`. @@ -2995,7 +2995,7 @@ public enum Operations { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-org)`. @@ -3205,7 +3205,7 @@ public enum Operations { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-org)`. @@ -3427,7 +3427,7 @@ public enum Operations { /// /// Lists package versions for a package owned by an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-org)`. @@ -3694,7 +3694,7 @@ public enum Operations { /// /// Gets a specific package version in an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-organization)`. @@ -3862,7 +3862,7 @@ public enum Operations { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-org)`. @@ -4079,7 +4079,7 @@ public enum Operations { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-org)`. @@ -4404,7 +4404,7 @@ public enum Operations { /// /// Lists packages owned by the authenticated user within the user's namespace. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages`. /// - Remark: Generated from `#/paths//user/packages/get(packages/list-packages-for-authenticated-user)`. @@ -4602,7 +4602,7 @@ public enum Operations { /// /// Gets a specific package for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/get(packages/get-package-for-authenticated-user)`. @@ -4754,7 +4754,7 @@ public enum Operations { /// /// Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/delete(packages/delete-package-for-authenticated-user)`. @@ -4955,7 +4955,7 @@ public enum Operations { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-authenticated-user)`. @@ -5170,7 +5170,7 @@ public enum Operations { /// /// Lists package versions for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-authenticated-user)`. @@ -5430,7 +5430,7 @@ public enum Operations { /// /// Gets a specific package version for a package owned by the authenticated user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-authenticated-user)`. @@ -5591,7 +5591,7 @@ public enum Operations { /// /// The authenticated user must have admin permissions in the organization to use this endpoint. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-authenticated-user)`. @@ -5799,7 +5799,7 @@ public enum Operations { /// - The package was deleted within the last 30 days. /// - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-authenticated-user)`. @@ -6183,7 +6183,7 @@ public enum Operations { /// /// Lists all packages in a user's namespace for which the requesting user has access. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages`. /// - Remark: Generated from `#/paths//users/{username}/packages/get(packages/list-packages-for-user)`. @@ -6445,7 +6445,7 @@ public enum Operations { /// /// Gets a specific package metadata for a public package owned by a user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/get(packages/get-package-for-user)`. @@ -6606,7 +6606,7 @@ public enum Operations { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-user)`. @@ -6816,7 +6816,7 @@ public enum Operations { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-user)`. @@ -7038,7 +7038,7 @@ public enum Operations { /// /// Lists package versions for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/get(packages/get-all-package-versions-for-package-owned-by-user)`. @@ -7266,7 +7266,7 @@ public enum Operations { /// /// Gets a specific package version for a public package owned by a specified user. /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/get(packages/get-package-version-for-user)`. @@ -7434,7 +7434,7 @@ public enum Operations { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-user)`. @@ -7651,7 +7651,7 @@ public enum Operations { /// /// If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// - /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." /// /// - Remark: HTTP `POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore`. /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-user)`. From 20507baf0b95d0501fce44f56f97ba2509b1ae89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 22:03:33 +0000 Subject: [PATCH 085/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 7 ------- Sources/repos/Types.swift | 7 +------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index c5e569e6e21..5dfc5c51512 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -11730,13 +11730,6 @@ public struct Client: APIProtocol { name: "cursor", value: input.query.cursor ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "redelivery", - value: input.query.redelivery - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 2491f48000d..c63ec4e96bc 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -47455,22 +47455,17 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/GET/query/cursor`. public var cursor: Components.Parameters.cursor? - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/GET/query/redelivery`. - public var redelivery: Swift.Bool? /// Creates a new `Query`. /// /// - Parameters: /// - per_page: The number of results per page (max 100). 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)." /// - cursor: Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. - /// - redelivery: public init( per_page: Components.Parameters.per_hyphen_page? = nil, - cursor: Components.Parameters.cursor? = nil, - redelivery: Swift.Bool? = nil + cursor: Components.Parameters.cursor? = nil ) { self.per_page = per_page self.cursor = cursor - self.redelivery = redelivery } } public var query: Operations.repos_sol_list_hyphen_webhook_hyphen_deliveries.Input.Query From d3f1967187221d9b7167e5b9344700e10aae1ccd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 22:04:58 +0000 Subject: [PATCH 086/129] Commit via running ake Sources/users --- Sources/users/Client.swift | 22 ++++++++++++++++++++++ Sources/users/Types.swift | 23 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/Sources/users/Client.swift b/Sources/users/Client.swift index 61359f3a9e4..03227230960 100644 --- a/Sources/users/Client.swift +++ b/Sources/users/Client.swift @@ -1907,6 +1907,28 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .unauthorized(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.validation_failed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.validation_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) default: return .undocumented( statusCode: response.status.code, diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index 1c5f2066824..2b2c7e469d7 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -6475,6 +6475,29 @@ public enum Operations { } } } + /// Validation failed, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//user/following/{username}/put(users/follow)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.validation_failed) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. From 24e3abcae4c6509b19934e1b7c0d0955ce31c223 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Nov 2024 22:05:40 +0000 Subject: [PATCH 087/129] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 1231 +++++++++--- Sources/copilot/Types.swift | 3664 +++++++++++++++++++++++++++------- 2 files changed, 3945 insertions(+), 950 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 184dac7718b..4d43edfcdb4 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -223,32 +223,28 @@ public struct Client: APIProtocol { } ) } - /// Get a summary of Copilot usage for enterprise members - /// - /// > [!NOTE] - /// > This endpoint is in public preview and is subject to change. + /// Get Copilot metrics for an enterprise /// - /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE - /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, - /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Only owners and billing managers can view Copilot usage metrics for the enterprise. + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only enterprise owners and billing managers can view Copilot metrics for the enterprise. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. - public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output { + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.id, + forOperation: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.id, serializer: { input in let path = try converter.renderedPath( - template: "/enterprises/{}/copilot/usage", + template: "/enterprises/{}/copilot/metrics", parameters: [ input.path.enterprise ] @@ -296,7 +292,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body + let body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -306,7 +302,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.copilot_hyphen_usage_hyphen_metrics].self, + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day].self, from: responseBody, transforming: { value in .json(value) @@ -338,9 +334,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .internalServerError(.init(body: body)) - case 401: + case 403: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.requires_authentication.Body + let body: Components.Responses.forbidden.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -359,10 +355,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .unauthorized(.init(body: body)) - case 403: + return .forbidden(.init(body: body)) + case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.forbidden.Body + let body: Components.Responses.not_found.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -381,10 +377,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .forbidden(.init(body: body)) - case 404: + return .notFound(.init(body: body)) + case 422: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.not_found.Body + let body: Components.Responses.usage_metrics_api_disabled.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -403,7 +399,7 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .notFound(.init(body: body)) + return .unprocessableContent(.init(body: body)) default: return .undocumented( statusCode: response.status.code, @@ -416,38 +412,34 @@ public struct Client: APIProtocol { } ) } - /// Get a summary of Copilot usage for an enterprise team + /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE - /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. - /// See the response schema tab for detailed metrics definitions. + /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, + /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. /// /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// > [!NOTE] - /// > This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day. - /// - /// Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team. + /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)`. - public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output { + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.id, + forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.id, serializer: { input in let path = try converter.renderedPath( - template: "/enterprises/{}/team/{}/copilot/usage", + template: "/enterprises/{}/copilot/usage", parameters: [ - input.path.enterprise, - input.path.team_slug + input.path.enterprise ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -493,7 +485,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body + let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -613,30 +605,34 @@ public struct Client: APIProtocol { } ) } - /// Get Copilot seat information and settings for an organization + /// Get Copilot metrics for an enterprise team /// - /// > [!NOTE] - /// > This endpoint is in public preview and is subject to change. + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. /// - /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. - /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. /// - /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. /// - /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team. /// - /// - Remark: HTTP `GET /orgs/{org}/copilot/billing`. - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. - public func copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details(_ input: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Input) async throws -> Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output { + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.id, + forOperation: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/copilot/billing", + template: "/enterprises/{}/team/{}/copilot/metrics", parameters: [ - input.path.org + input.path.enterprise, + input.path.team_slug ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -644,6 +640,34 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "since", + value: input.query.since + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "until", + value: input.query.until + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -654,7 +678,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output.Ok.Body + let body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -664,7 +688,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.copilot_hyphen_organization_hyphen_details.self, + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day].self, from: responseBody, transforming: { value in .json(value) @@ -696,9 +720,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .internalServerError(.init(body: body)) - case 401: + case 403: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.requires_authentication.Body + let body: Components.Responses.forbidden.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -717,10 +741,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .unauthorized(.init(body: body)) - case 403: + return .forbidden(.init(body: body)) + case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.forbidden.Body + let body: Components.Responses.not_found.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -739,10 +763,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .forbidden(.init(body: body)) - case 404: + return .notFound(.init(body: body)) + case 422: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.not_found.Body + let body: Components.Responses.usage_metrics_api_disabled.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -761,9 +785,7 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .notFound(.init(body: body)) - case 422: - return .unprocessableContent(.init()) + return .unprocessableContent(.init(body: body)) default: return .undocumented( statusCode: response.status.code, @@ -776,27 +798,38 @@ public struct Client: APIProtocol { } ) } - /// List all Copilot seat assignments for an organization + /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. - /// Only organization owners can view assigned seats. + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. /// - /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. /// - /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. - public func copilot_sol_list_hyphen_copilot_hyphen_seats(_ input: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Input) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output { + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.id, + forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/copilot/billing/seats", + template: "/enterprises/{}/team/{}/copilot/usage", parameters: [ - input.path.org + input.path.enterprise, + input.path.team_slug ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -804,6 +837,20 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "since", + value: input.query.since + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "until", + value: input.query.until + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -827,13 +874,8 @@ public struct Client: APIProtocol { deserializer: { response, responseBody in switch response.status.code { case 200: - let headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output.Ok.Headers = .init(Link: try converter.getOptionalHeaderFieldAsURI( - in: response.headerFields, - name: "Link", - as: Components.Headers.link.self - )) let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output.Ok.Body + let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -843,7 +885,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output.Ok.Body.jsonPayload.self, + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics].self, from: responseBody, transforming: { value in .json(value) @@ -852,10 +894,7 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init( - headers: headers, - body: body - )) + return .ok(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.internal_error.Body @@ -956,62 +995,48 @@ public struct Client: APIProtocol { } ) } - /// Add teams to the Copilot subscription for an organization + /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Purchases a GitHub Copilot seat for all users within each specified team. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". - /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// Gets information about an organization's Copilot subscription, including seat breakdown + /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. + /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// - /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// - /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/post(copilot/add-copilot-seats-for-teams)`. - public func copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams(_ input: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Input) async throws -> Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output { + /// - Remark: HTTP `GET /orgs/{org}/copilot/billing`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. + public func copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details(_ input: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Input) async throws -> Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.id, + forOperation: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/copilot/billing/selected_teams", + template: "/orgs/{}/copilot/billing", parameters: [ input.path.org ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .post + method: .get ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { - case 201: + case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output.Created.Body + let body: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -1021,7 +1046,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output.Created.Body.jsonPayload.self, + Components.Schemas.copilot_hyphen_organization_hyphen_details.self, from: responseBody, transforming: { value in .json(value) @@ -1030,7 +1055,7 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .created(.init(body: body)) + return .ok(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.internal_error.Body @@ -1133,60 +1158,64 @@ public struct Client: APIProtocol { } ) } - /// Remove teams from the Copilot subscription for an organization + /// List all Copilot seat assignments for an organization /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for all members of each team specified. - /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. - /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". - /// - /// Only organization owners can cancel Copilot seats for their organization members. + /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Only organization owners can view assigned seats. /// - /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// - /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. - public func copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams(_ input: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Input) async throws -> Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output { + /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. + public func copilot_sol_list_hyphen_copilot_hyphen_seats(_ input: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Input) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.id, + forOperation: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/copilot/billing/selected_teams", + template: "/orgs/{}/copilot/billing/seats", parameters: [ input.path.org ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .delete + method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) + return (request, nil) }, deserializer: { response, responseBody in switch response.status.code { case 200: + let headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output.Ok.Headers = .init(Link: try converter.getOptionalHeaderFieldAsURI( + in: response.headerFields, + name: "Link", + as: Components.Headers.link.self + )) let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output.Ok.Body + let body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -1196,7 +1225,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output.Ok.Body.jsonPayload.self, + Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output.Ok.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -1205,7 +1234,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .ok(.init( + headers: headers, + body: body + )) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.internal_error.Body @@ -1294,8 +1326,6 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .notFound(.init(body: body)) - case 422: - return .unprocessableContent(.init()) default: return .undocumented( statusCode: response.status.code, @@ -1308,12 +1338,12 @@ public struct Client: APIProtocol { } ) } - /// Add users to the Copilot subscription for an organization + /// Add teams to the Copilot subscription for an organization /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Purchases a GitHub Copilot seat for each user specified. + /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// /// Only organization owners can add Copilot seats for their organization members. @@ -1326,15 +1356,15 @@ public struct Client: APIProtocol { /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// - /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/post(copilot/add-copilot-seats-for-users)`. - public func copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users(_ input: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Input) async throws -> Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output { + /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/post(copilot/add-copilot-seats-for-teams)`. + public func copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams(_ input: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Input) async throws -> Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.id, + forOperation: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/copilot/billing/selected_users", + template: "/orgs/{}/copilot/billing/selected_teams", parameters: [ input.path.org ] @@ -1363,7 +1393,7 @@ public struct Client: APIProtocol { switch response.status.code { case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output.Created.Body + let body: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -1373,7 +1403,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output.Created.Body.jsonPayload.self, + Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output.Created.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -1485,13 +1515,13 @@ public struct Client: APIProtocol { } ) } - /// Remove users from the Copilot subscription for an organization + /// Remove teams from the Copilot subscription for an organization /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for each user specified. - /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Cancels the Copilot seat assignment for all members of each team specified. + /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. /// /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// @@ -1501,15 +1531,15 @@ public struct Client: APIProtocol { /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// - /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)`. - public func copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users(_ input: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Input) async throws -> Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output { + /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. + public func copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams(_ input: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Input) async throws -> Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.id, + forOperation: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/copilot/billing/selected_users", + template: "/orgs/{}/copilot/billing/selected_teams", parameters: [ input.path.org ] @@ -1538,7 +1568,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.Ok.Body + let body: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -1548,7 +1578,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.Ok.Body.jsonPayload.self, + Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output.Ok.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -1660,80 +1690,62 @@ public struct Client: APIProtocol { } ) } - /// Get a summary of Copilot usage for organization members + /// Add users to the Copilot subscription for an organization /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE - /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. - /// See the response schema tab for detailed metrics definitions. + /// Purchases a GitHub Copilot seat for each user specified. + /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, - /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, - /// they must have telemetry enabled in their IDE. + /// Only organization owners can add Copilot seats for their organization members. /// - /// Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics. + /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". + /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// - /// - Remark: HTTP `GET /orgs/{org}/copilot/usage`. - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/usage/get(copilot/usage-metrics-for-org)`. - public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Output { + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/post(copilot/add-copilot-seats-for-users)`. + public func copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users(_ input: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Input) async throws -> Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.id, + forOperation: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/copilot/usage", + template: "/orgs/{}/copilot/billing/selected_users", parameters: [ input.path.org ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .post ) suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "since", - value: input.query.since - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "until", - value: input.query.until - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "page", - value: input.query.page - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "per_page", - value: input.query.per_page - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { - case 200: + case 201: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Output.Ok.Body + let body: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output.Created.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -1743,7 +1755,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.copilot_hyphen_usage_hyphen_metrics].self, + Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output.Created.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -1752,7 +1764,7 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .ok(.init(body: body)) + return .created(.init(body: body)) case 500: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.internal_error.Body @@ -1841,6 +1853,8 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .notFound(.init(body: body)) + case 422: + return .unprocessableContent(.init()) default: return .undocumented( statusCode: response.status.code, @@ -1853,47 +1867,60 @@ public struct Client: APIProtocol { } ) } - /// Get Copilot seat assignment details for a user + /// Remove users from the Copilot subscription for an organization /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + /// Cancels the Copilot seat assignment for each user specified. + /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. /// - /// Only organization owners can view Copilot seat assignment details for members of their organization. + /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. - public func copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user(_ input: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Input) async throws -> Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Output { + /// Only organization owners can cancel Copilot seats for their organization members. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)`. + public func copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users(_ input: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Input) async throws -> Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output { try await client.send( input: input, - forOperation: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.id, + forOperation: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.id, serializer: { input in let path = try converter.renderedPath( - template: "/orgs/{}/members/{}/copilot", + template: "/orgs/{}/copilot/billing/selected_users", parameters: [ - input.path.org, - input.path.username + input.path.org ] ) var request: HTTPTypes.HTTPRequest = .init( soar_path: path, - method: .get + method: .delete ) suppressMutabilityWarning(&request) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept ) - return (request, nil) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) }, deserializer: { response, responseBody in switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Output.Ok.Body + let body: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -1903,7 +1930,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.copilot_hyphen_seat_hyphen_details.self, + Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.Ok.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -2015,6 +2042,746 @@ public struct Client: APIProtocol { } ) } + /// Get Copilot metrics for an organization + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization. + /// Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/copilot/metrics", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "since", + value: input.query.since + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "until", + value: input.query.until + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.usage_metrics_api_disabled.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get a summary of Copilot usage for organization members + /// + /// > [!NOTE] + /// > This endpoint is in public preview and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/copilot/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/usage/get(copilot/usage-metrics-for-org)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/copilot/usage", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "since", + value: input.query.since + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "until", + value: input.query.until + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.requires_authentication.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get Copilot seat assignment details for a user + /// + /// > [!NOTE] + /// > This endpoint is in public preview and is subject to change. + /// + /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + /// + /// Only organization owners can view Copilot seat assignment details for members of their organization. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. + public func copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user(_ input: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Input) async throws -> Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/members/{}/copilot", + parameters: [ + input.path.org, + input.path.username + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.copilot_hyphen_seat_hyphen_details.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.requires_authentication.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 422: + return .unprocessableContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get Copilot metrics for a team + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings. + /// Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/team/{}/copilot/metrics", + parameters: [ + input.path.org, + input.path.team_slug + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "since", + value: input.query.since + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "until", + value: input.query.until + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.usage_metrics_api_disabled.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Get a summary of Copilot usage for a team /// /// > [!NOTE] diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index e2f9fd058be..884622db1f0 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -29,6 +29,22 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)`. func copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output + /// Get Copilot metrics for an enterprise + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only enterprise owners and billing managers can view Copilot metrics for the enterprise. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)`. + func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] @@ -49,6 +65,25 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output + /// Get Copilot metrics for an enterprise team + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)`. + func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] @@ -181,6 +216,25 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)`. func copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users(_ input: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Input) async throws -> Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output + /// Get Copilot metrics for an organization + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization. + /// Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)`. + func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output /// Get a summary of Copilot usage for organization members /// /// > [!NOTE] @@ -215,6 +269,25 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. func copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user(_ input: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Input) async throws -> Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Output + /// Get Copilot metrics for a team + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings. + /// Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)`. + func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team(_ input: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output /// Get a summary of Copilot usage for a team /// /// > [!NOTE] @@ -270,6 +343,32 @@ extension APIProtocol { headers: headers )) } + /// Get Copilot metrics for an enterprise + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only enterprise owners and billing managers can view Copilot metrics for the enterprise. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise( + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output { + try await copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input( + path: path, + query: query, + headers: headers + )) + } /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] @@ -300,6 +399,35 @@ extension APIProtocol { headers: headers )) } + /// Get Copilot metrics for an enterprise team + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team( + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output { + try await copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input( + path: path, + query: query, + headers: headers + )) + } /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] @@ -500,6 +628,35 @@ extension APIProtocol { body: body )) } + /// Get Copilot metrics for an organization + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization. + /// Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization( + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output { + try await copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input( + path: path, + query: query, + headers: headers + )) + } /// Get a summary of Copilot usage for organization members /// /// > [!NOTE] @@ -552,6 +709,35 @@ extension APIProtocol { headers: headers )) } + /// Get Copilot metrics for a team + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings. + /// Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)`. + public func copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team( + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output { + try await copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input( + path: path, + query: query, + headers: headers + )) + } /// Get a summary of Copilot usage for a team /// /// > [!NOTE] @@ -1362,734 +1548,2235 @@ public enum Components { ]) } } - /// Summary of Copilot usage. + /// Usage metrics for Copilot editor code completions in the IDE. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics`. - public struct copilot_hyphen_usage_hyphen_metrics: Codable, Hashable, Sendable { - /// The date for which the usage metrics are reported, in `YYYY-MM-DD` format. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/day`. - public var day: Swift.String - /// The total number of Copilot code completion suggestions shown to users. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_suggestions_count`. - public var total_suggestions_count: Swift.Int? - /// The total number of Copilot code completion suggestions accepted by users. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_acceptances_count`. - public var total_acceptances_count: Swift.Int? - /// The total number of lines of code completions suggested by Copilot. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_suggested`. - public var total_lines_suggested: Swift.Int? - /// The total number of lines of code completions accepted by users. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_accepted`. - public var total_lines_accepted: Swift.Int? - /// The total number of users who were shown Copilot code completion suggestions during the day specified. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_users`. - public var total_active_users: Swift.Int? - /// The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_acceptances`. - public var total_chat_acceptances: Swift.Int? - /// The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions`. + public struct copilot_hyphen_ide_hyphen_code_hyphen_completions: Codable, Hashable, Sendable { + /// Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_turns`. - public var total_chat_turns: Swift.Int? - /// The total number of users who interacted with Copilot Chat in the IDE during the day specified. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_chat_users`. - public var total_active_chat_users: Swift.Int? - /// Breakdown of Copilot usage by editor for this language + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// Usage metrics for a given language for the given editor for Copilot code completions. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload`. - public struct breakdownPayloadPayload: Codable, Hashable, Sendable { - /// The language in which Copilot suggestions were shown to users in the specified editor. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/languagesPayload`. + public struct languagesPayloadPayload: Codable, Hashable, Sendable { + /// Name of the language used for Copilot code completion suggestions. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/language`. - public var language: Swift.String? - /// The editor in which Copilot suggestions were shown to users for the specified language. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/languagesPayload/name`. + public var name: Swift.String? + /// Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/editor`. - public var editor: Swift.String? - /// The number of Copilot suggestions shown to users in the editor specified during the day specified. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/languagesPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// Creates a new `languagesPayloadPayload`. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/suggestions_count`. - public var suggestions_count: Swift.Int? - /// The number of Copilot suggestions accepted by users in the editor specified during the day specified. + /// - Parameters: + /// - name: Name of the language used for Copilot code completion suggestions. + /// - total_engaged_users: Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances. + public init( + name: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil + ) { + self.name = name + self.total_engaged_users = total_engaged_users + } + public enum CodingKeys: String, CodingKey { + case name + case total_engaged_users + } + } + /// Code completion metrics for active languages. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/languages`. + public typealias languagesPayload = [Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.languagesPayloadPayload] + /// Code completion metrics for active languages. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/languages`. + public var languages: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.languagesPayload? + /// Copilot code completion metrics for active editors. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload`. + public struct editorsPayloadPayload: Codable, Hashable, Sendable { + /// Name of the given editor. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/acceptances_count`. - public var acceptances_count: Swift.Int? - /// The number of lines of code suggested by Copilot in the editor specified during the day specified. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/name`. + public var name: Swift.String? + /// Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_suggested`. - public var lines_suggested: Swift.Int? - /// The number of lines of code accepted by users in the editor specified during the day specified. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload`. + public struct modelsPayloadPayload: Codable, Hashable, Sendable { + /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/name`. + public var name: Swift.String? + /// Indicates whether a model is custom or default. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/is_custom_model`. + public var is_custom_model: Swift.Bool? + /// The training date for the custom model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/custom_model_training_date`. + public var custom_model_training_date: Swift.String? + /// Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// Usage metrics for a given language for the given editor for Copilot code completions. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languagesPayload`. + public struct languagesPayloadPayload: Codable, Hashable, Sendable { + /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languagesPayload/name`. + public var name: Swift.String? + /// Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languagesPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// The number of Copilot code suggestions generated for the given editor, for the given language. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languagesPayload/total_code_suggestions`. + public var total_code_suggestions: Swift.Int? + /// The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languagesPayload/total_code_acceptances`. + public var total_code_acceptances: Swift.Int? + /// The number of lines of code suggested by Copilot code completions for the given editor, for the given language. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languagesPayload/total_code_lines_suggested`. + public var total_code_lines_suggested: Swift.Int? + /// The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languagesPayload/total_code_lines_accepted`. + public var total_code_lines_accepted: Swift.Int? + /// Creates a new `languagesPayloadPayload`. + /// + /// - Parameters: + /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - total_engaged_users: Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances. + /// - total_code_suggestions: The number of Copilot code suggestions generated for the given editor, for the given language. + /// - total_code_acceptances: The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances. + /// - total_code_lines_suggested: The number of lines of code suggested by Copilot code completions for the given editor, for the given language. + /// - total_code_lines_accepted: The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language. + public init( + name: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil, + total_code_suggestions: Swift.Int? = nil, + total_code_acceptances: Swift.Int? = nil, + total_code_lines_suggested: Swift.Int? = nil, + total_code_lines_accepted: Swift.Int? = nil + ) { + self.name = name + self.total_engaged_users = total_engaged_users + self.total_code_suggestions = total_code_suggestions + self.total_code_acceptances = total_code_acceptances + self.total_code_lines_suggested = total_code_lines_suggested + self.total_code_lines_accepted = total_code_lines_accepted + } + public enum CodingKeys: String, CodingKey { + case name + case total_engaged_users + case total_code_suggestions + case total_code_acceptances + case total_code_lines_suggested + case total_code_lines_accepted + } + } + /// Code completion metrics for active languages, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languages`. + public typealias languagesPayload = [Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayloadPayload.languagesPayloadPayload] + /// Code completion metrics for active languages, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/languages`. + public var languages: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayloadPayload.languagesPayload? + /// Creates a new `modelsPayloadPayload`. + /// + /// - Parameters: + /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - is_custom_model: Indicates whether a model is custom or default. + /// - custom_model_training_date: The training date for the custom model. + /// - total_engaged_users: Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. + /// - languages: Code completion metrics for active languages, for the given editor. + public init( + name: Swift.String? = nil, + is_custom_model: Swift.Bool? = nil, + custom_model_training_date: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil, + languages: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayloadPayload.languagesPayload? = nil + ) { + self.name = name + self.is_custom_model = is_custom_model + self.custom_model_training_date = custom_model_training_date + self.total_engaged_users = total_engaged_users + self.languages = languages + } + public enum CodingKeys: String, CodingKey { + case name + case is_custom_model + case custom_model_training_date + case total_engaged_users + case languages + } + } + /// List of model metrics for custom models and the default model. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_accepted`. - public var lines_accepted: Swift.Int? - /// The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/models`. + public typealias modelsPayload = [Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayloadPayload] + /// List of model metrics for custom models and the default model. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/active_users`. - public var active_users: Swift.Int? + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/models`. + public var models: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayload? /// A container of undocumented properties. public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `breakdownPayloadPayload`. + /// Creates a new `editorsPayloadPayload`. /// /// - Parameters: - /// - language: The language in which Copilot suggestions were shown to users in the specified editor. - /// - editor: The editor in which Copilot suggestions were shown to users for the specified language. - /// - suggestions_count: The number of Copilot suggestions shown to users in the editor specified during the day specified. - /// - acceptances_count: The number of Copilot suggestions accepted by users in the editor specified during the day specified. - /// - lines_suggested: The number of lines of code suggested by Copilot in the editor specified during the day specified. - /// - lines_accepted: The number of lines of code accepted by users in the editor specified during the day specified. - /// - active_users: The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. + /// - name: Name of the given editor. + /// - total_engaged_users: Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances. + /// - models: List of model metrics for custom models and the default model. /// - additionalProperties: A container of undocumented properties. public init( - language: Swift.String? = nil, - editor: Swift.String? = nil, - suggestions_count: Swift.Int? = nil, - acceptances_count: Swift.Int? = nil, - lines_suggested: Swift.Int? = nil, - lines_accepted: Swift.Int? = nil, - active_users: Swift.Int? = nil, + name: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil, + models: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayload? = nil, additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { - self.language = language - self.editor = editor - self.suggestions_count = suggestions_count - self.acceptances_count = acceptances_count - self.lines_suggested = lines_suggested - self.lines_accepted = lines_accepted - self.active_users = active_users + self.name = name + self.total_engaged_users = total_engaged_users + self.models = models self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case language - case editor - case suggestions_count - case acceptances_count - case lines_suggested - case lines_accepted - case active_users + case name + case total_engaged_users + case models } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - language = try container.decodeIfPresent( - Swift.String.self, - forKey: .language - ) - editor = try container.decodeIfPresent( + name = try container.decodeIfPresent( Swift.String.self, - forKey: .editor - ) - suggestions_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .suggestions_count - ) - acceptances_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .acceptances_count - ) - lines_suggested = try container.decodeIfPresent( - Swift.Int.self, - forKey: .lines_suggested + forKey: .name ) - lines_accepted = try container.decodeIfPresent( + total_engaged_users = try container.decodeIfPresent( Swift.Int.self, - forKey: .lines_accepted + forKey: .total_engaged_users ) - active_users = try container.decodeIfPresent( - Swift.Int.self, - forKey: .active_users + models = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayload.self, + forKey: .models ) additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "language", - "editor", - "suggestions_count", - "acceptances_count", - "lines_suggested", - "lines_accepted", - "active_users" + "name", + "total_engaged_users", + "models" ]) } public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - language, - forKey: .language + name, + forKey: .name ) try container.encodeIfPresent( - editor, - forKey: .editor - ) - try container.encodeIfPresent( - suggestions_count, - forKey: .suggestions_count - ) - try container.encodeIfPresent( - acceptances_count, - forKey: .acceptances_count - ) - try container.encodeIfPresent( - lines_suggested, - forKey: .lines_suggested - ) - try container.encodeIfPresent( - lines_accepted, - forKey: .lines_accepted + total_engaged_users, + forKey: .total_engaged_users ) try container.encodeIfPresent( - active_users, - forKey: .active_users + models, + forKey: .models ) try encoder.encodeAdditionalProperties(additionalProperties) } } - /// Breakdown of Copilot code completions usage by language and editor - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. - public typealias breakdownPayload = [Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayloadPayload] - /// Breakdown of Copilot code completions usage by language and editor - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. - public var breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? - /// Creates a new `copilot_hyphen_usage_hyphen_metrics`. + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editors`. + public typealias editorsPayload = [Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload] + /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editors`. + public var editors: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayload? + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `copilot_hyphen_ide_hyphen_code_hyphen_completions`. /// /// - Parameters: - /// - day: The date for which the usage metrics are reported, in `YYYY-MM-DD` format. - /// - total_suggestions_count: The total number of Copilot code completion suggestions shown to users. - /// - total_acceptances_count: The total number of Copilot code completion suggestions accepted by users. - /// - total_lines_suggested: The total number of lines of code completions suggested by Copilot. - /// - total_lines_accepted: The total number of lines of code completions accepted by users. - /// - total_active_users: The total number of users who were shown Copilot code completion suggestions during the day specified. - /// - total_chat_acceptances: The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). - /// - total_chat_turns: The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. - /// - total_active_chat_users: The total number of users who interacted with Copilot Chat in the IDE during the day specified. - /// - breakdown: Breakdown of Copilot code completions usage by language and editor + /// - total_engaged_users: Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances. + /// - languages: Code completion metrics for active languages. + /// - editors: + /// - additionalProperties: A container of undocumented properties. public init( - day: Swift.String, - total_suggestions_count: Swift.Int? = nil, - total_acceptances_count: Swift.Int? = nil, - total_lines_suggested: Swift.Int? = nil, - total_lines_accepted: Swift.Int? = nil, - total_active_users: Swift.Int? = nil, - total_chat_acceptances: Swift.Int? = nil, - total_chat_turns: Swift.Int? = nil, - total_active_chat_users: Swift.Int? = nil, - breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? = nil + total_engaged_users: Swift.Int? = nil, + languages: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.languagesPayload? = nil, + editors: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayload? = nil, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { - self.day = day - self.total_suggestions_count = total_suggestions_count - self.total_acceptances_count = total_acceptances_count - self.total_lines_suggested = total_lines_suggested - self.total_lines_accepted = total_lines_accepted - self.total_active_users = total_active_users - self.total_chat_acceptances = total_chat_acceptances - self.total_chat_turns = total_chat_turns - self.total_active_chat_users = total_active_chat_users - self.breakdown = breakdown + self.total_engaged_users = total_engaged_users + self.languages = languages + self.editors = editors + self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case day - case total_suggestions_count - case total_acceptances_count - case total_lines_suggested - case total_lines_accepted - case total_active_users - case total_chat_acceptances - case total_chat_turns - case total_active_chat_users - case breakdown + case total_engaged_users + case languages + case editors } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - day = try container.decode( - Swift.String.self, - forKey: .day - ) - total_suggestions_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_suggestions_count - ) - total_acceptances_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_acceptances_count - ) - total_lines_suggested = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_lines_suggested - ) - total_lines_accepted = try container.decodeIfPresent( + total_engaged_users = try container.decodeIfPresent( Swift.Int.self, - forKey: .total_lines_accepted + forKey: .total_engaged_users ) - total_active_users = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_active_users + languages = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.languagesPayload.self, + forKey: .languages ) - total_chat_acceptances = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_chat_acceptances + editors = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayload.self, + forKey: .editors ) - total_chat_turns = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_chat_turns + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "total_engaged_users", + "languages", + "editors" + ]) + } + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent( + total_engaged_users, + forKey: .total_engaged_users ) - total_active_chat_users = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_active_chat_users + try container.encodeIfPresent( + languages, + forKey: .languages ) - breakdown = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload.self, - forKey: .breakdown + try container.encodeIfPresent( + editors, + forKey: .editors ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "day", - "total_suggestions_count", - "total_acceptances_count", - "total_lines_suggested", - "total_lines_accepted", - "total_active_users", - "total_chat_acceptances", - "total_chat_turns", - "total_active_chat_users", - "breakdown" - ]) + try encoder.encodeAdditionalProperties(additionalProperties) } } - /// The breakdown of Copilot Business seats for the organization. + /// Usage metrics for Copilot Chat in the IDE. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown`. - public struct copilot_hyphen_seat_hyphen_breakdown: Codable, Hashable, Sendable { - /// The total number of seats being billed for the organization as of the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/total`. - public var total: Swift.Int? - /// Seats added during the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/added_this_cycle`. - public var added_this_cycle: Swift.Int? - /// The number of seats that are pending cancellation at the end of the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_cancellation`. - public var pending_cancellation: Swift.Int? - /// The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat`. + public struct copilot_hyphen_ide_hyphen_chat: Codable, Hashable, Sendable { + /// Total number of users who prompted Copilot Chat in the IDE. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_invitation`. - public var pending_invitation: Swift.Int? - /// The number of seats that have used Copilot during the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/active_this_cycle`. - public var active_this_cycle: Swift.Int? - /// The number of seats that have not used Copilot during the current billing cycle. + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// Copilot Chat metrics, for active editors. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/inactive_this_cycle`. - public var inactive_this_cycle: Swift.Int? - /// Creates a new `copilot_hyphen_seat_hyphen_breakdown`. + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload`. + public struct editorsPayloadPayload: Codable, Hashable, Sendable { + /// Name of the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/name`. + public var name: Swift.String? + /// The number of users who prompted Copilot Chat in the specified editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload`. + public struct modelsPayloadPayload: Codable, Hashable, Sendable { + /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/name`. + public var name: Swift.String? + /// Indicates whether a model is custom or default. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/is_custom_model`. + public var is_custom_model: Swift.Bool? + /// The training date for the custom model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/custom_model_training_date`. + public var custom_model_training_date: Swift.String? + /// The number of users who prompted Copilot Chat in the given editor and model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// The total number of chats initiated by users in the given editor and model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/total_chats`. + public var total_chats: Swift.Int? + /// The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/total_chat_insertion_events`. + public var total_chat_insertion_events: Swift.Int? + /// The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/total_chat_copy_events`. + public var total_chat_copy_events: Swift.Int? + /// Creates a new `modelsPayloadPayload`. + /// + /// - Parameters: + /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - is_custom_model: Indicates whether a model is custom or default. + /// - custom_model_training_date: The training date for the custom model. + /// - total_engaged_users: The number of users who prompted Copilot Chat in the given editor and model. + /// - total_chats: The total number of chats initiated by users in the given editor and model. + /// - total_chat_insertion_events: The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor. + /// - total_chat_copy_events: The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. + public init( + name: Swift.String? = nil, + is_custom_model: Swift.Bool? = nil, + custom_model_training_date: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil, + total_chats: Swift.Int? = nil, + total_chat_insertion_events: Swift.Int? = nil, + total_chat_copy_events: Swift.Int? = nil + ) { + self.name = name + self.is_custom_model = is_custom_model + self.custom_model_training_date = custom_model_training_date + self.total_engaged_users = total_engaged_users + self.total_chats = total_chats + self.total_chat_insertion_events = total_chat_insertion_events + self.total_chat_copy_events = total_chat_copy_events + } + public enum CodingKeys: String, CodingKey { + case name + case is_custom_model + case custom_model_training_date + case total_engaged_users + case total_chats + case total_chat_insertion_events + case total_chat_copy_events + } + } + /// List of model metrics for custom models and the default model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/models`. + public typealias modelsPayload = [Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayloadPayload.modelsPayloadPayload] + /// List of model metrics for custom models and the default model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/models`. + public var models: Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayloadPayload.modelsPayload? + /// Creates a new `editorsPayloadPayload`. + /// + /// - Parameters: + /// - name: Name of the given editor. + /// - total_engaged_users: The number of users who prompted Copilot Chat in the specified editor. + /// - models: List of model metrics for custom models and the default model. + public init( + name: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil, + models: Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayloadPayload.modelsPayload? = nil + ) { + self.name = name + self.total_engaged_users = total_engaged_users + self.models = models + } + public enum CodingKeys: String, CodingKey { + case name + case total_engaged_users + case models + } + } + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editors`. + public typealias editorsPayload = [Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayloadPayload] + /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editors`. + public var editors: Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayload? + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `copilot_hyphen_ide_hyphen_chat`. /// /// - Parameters: - /// - total: The total number of seats being billed for the organization as of the current billing cycle. - /// - added_this_cycle: Seats added during the current billing cycle. - /// - pending_cancellation: The number of seats that are pending cancellation at the end of the current billing cycle. - /// - pending_invitation: The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. - /// - active_this_cycle: The number of seats that have used Copilot during the current billing cycle. - /// - inactive_this_cycle: The number of seats that have not used Copilot during the current billing cycle. + /// - total_engaged_users: Total number of users who prompted Copilot Chat in the IDE. + /// - editors: + /// - additionalProperties: A container of undocumented properties. public init( - total: Swift.Int? = nil, - added_this_cycle: Swift.Int? = nil, - pending_cancellation: Swift.Int? = nil, - pending_invitation: Swift.Int? = nil, - active_this_cycle: Swift.Int? = nil, - inactive_this_cycle: Swift.Int? = nil + total_engaged_users: Swift.Int? = nil, + editors: Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayload? = nil, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { - self.total = total - self.added_this_cycle = added_this_cycle - self.pending_cancellation = pending_cancellation - self.pending_invitation = pending_invitation - self.active_this_cycle = active_this_cycle - self.inactive_this_cycle = inactive_this_cycle + self.total_engaged_users = total_engaged_users + self.editors = editors + self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case total - case added_this_cycle - case pending_cancellation - case pending_invitation - case active_this_cycle - case inactive_this_cycle + case total_engaged_users + case editors + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + total_engaged_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_engaged_users + ) + editors = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayload.self, + forKey: .editors + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "total_engaged_users", + "editors" + ]) + } + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent( + total_engaged_users, + forKey: .total_engaged_users + ) + try container.encodeIfPresent( + editors, + forKey: .editors + ) + try encoder.encodeAdditionalProperties(additionalProperties) } } - /// Information about the seat breakdown and policies set for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Usage metrics for Copilot Chat in github.com /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details`. - public struct copilot_hyphen_organization_hyphen_details: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_breakdown`. - public var seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown - /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. - @frozen public enum public_code_suggestionsPayload: String, Codable, Hashable, Sendable { - case allow = "allow" - case block = "block" - case unconfigured = "unconfigured" - case unknown = "unknown" + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat`. + public struct copilot_hyphen_dotcom_hyphen_chat: Codable, Hashable, Sendable { + /// Total number of users who prompted Copilot Chat on github.com at least once. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload`. + public struct modelsPayloadPayload: Codable, Hashable, Sendable { + /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload/name`. + public var name: Swift.String? + /// Indicates whether a model is custom or default. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload/is_custom_model`. + public var is_custom_model: Swift.Bool? + /// The training date for the custom model (if applicable). + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload/custom_model_training_date`. + public var custom_model_training_date: Swift.String? + /// Total number of users who prompted Copilot Chat on github.com at least once for each model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// Total number of chats initiated by users on github.com. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload/total_chats`. + public var total_chats: Swift.Int? + /// Creates a new `modelsPayloadPayload`. + /// + /// - Parameters: + /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - is_custom_model: Indicates whether a model is custom or default. + /// - custom_model_training_date: The training date for the custom model (if applicable). + /// - total_engaged_users: Total number of users who prompted Copilot Chat on github.com at least once for each model. + /// - total_chats: Total number of chats initiated by users on github.com. + public init( + name: Swift.String? = nil, + is_custom_model: Swift.Bool? = nil, + custom_model_training_date: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil, + total_chats: Swift.Int? = nil + ) { + self.name = name + self.is_custom_model = is_custom_model + self.custom_model_training_date = custom_model_training_date + self.total_engaged_users = total_engaged_users + self.total_chats = total_chats + } + public enum CodingKeys: String, CodingKey { + case name + case is_custom_model + case custom_model_training_date + case total_engaged_users + case total_chats + } } - /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + /// List of model metrics for a custom models and the default model. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. - public var public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload - /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/models`. + public typealias modelsPayload = [Components.Schemas.copilot_hyphen_dotcom_hyphen_chat.modelsPayloadPayload] + /// List of model metrics for a custom models and the default model. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. - @frozen public enum ide_chatPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - case unconfigured = "unconfigured" - } - /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. - public var ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? - /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/models`. + public var models: Components.Schemas.copilot_hyphen_dotcom_hyphen_chat.modelsPayload? + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `copilot_hyphen_dotcom_hyphen_chat`. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. - @frozen public enum platform_chatPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - case unconfigured = "unconfigured" + /// - Parameters: + /// - total_engaged_users: Total number of users who prompted Copilot Chat on github.com at least once. + /// - models: List of model metrics for a custom models and the default model. + /// - additionalProperties: A container of undocumented properties. + public init( + total_engaged_users: Swift.Int? = nil, + models: Components.Schemas.copilot_hyphen_dotcom_hyphen_chat.modelsPayload? = nil, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + ) { + self.total_engaged_users = total_engaged_users + self.models = models + self.additionalProperties = additionalProperties } - /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. - public var platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? - /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. - @frozen public enum cliPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - case unconfigured = "unconfigured" + public enum CodingKeys: String, CodingKey { + case total_engaged_users + case models } - /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. - public var cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? - /// The mode of assigning new seats. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. - @frozen public enum seat_management_settingPayload: String, Codable, Hashable, Sendable { - case assign_all = "assign_all" - case assign_selected = "assign_selected" - case disabled = "disabled" - case unconfigured = "unconfigured" + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + total_engaged_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_engaged_users + ) + models = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_dotcom_hyphen_chat.modelsPayload.self, + forKey: .models + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "total_engaged_users", + "models" + ]) } - /// The mode of assigning new seats. + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent( + total_engaged_users, + forKey: .total_engaged_users + ) + try container.encodeIfPresent( + models, + forKey: .models + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// Usage metrics for Copilot for pull requests. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests`. + public struct copilot_hyphen_dotcom_hyphen_pull_hyphen_requests: Codable, Hashable, Sendable { + /// The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload`. + public struct repositoriesPayloadPayload: Codable, Hashable, Sendable { + /// Repository name + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/name`. + public var name: Swift.String? + /// The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload`. + public struct modelsPayloadPayload: Codable, Hashable, Sendable { + /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload/name`. + public var name: Swift.String? + /// Indicates whether a model is custom or default. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload/is_custom_model`. + public var is_custom_model: Swift.Bool? + /// The training date for the custom model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload/custom_model_training_date`. + public var custom_model_training_date: Swift.String? + /// The number of pull request summaries generated using Copilot for Pull Requests in the given repository. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload/total_pr_summaries_created`. + public var total_pr_summaries_created: Swift.Int? + /// The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// Creates a new `modelsPayloadPayload`. + /// + /// - Parameters: + /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - is_custom_model: Indicates whether a model is custom or default. + /// - custom_model_training_date: The training date for the custom model. + /// - total_pr_summaries_created: The number of pull request summaries generated using Copilot for Pull Requests in the given repository. + /// - total_engaged_users: The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. + public init( + name: Swift.String? = nil, + is_custom_model: Swift.Bool? = nil, + custom_model_training_date: Swift.String? = nil, + total_pr_summaries_created: Swift.Int? = nil, + total_engaged_users: Swift.Int? = nil + ) { + self.name = name + self.is_custom_model = is_custom_model + self.custom_model_training_date = custom_model_training_date + self.total_pr_summaries_created = total_pr_summaries_created + self.total_engaged_users = total_engaged_users + } + public enum CodingKeys: String, CodingKey { + case name + case is_custom_model + case custom_model_training_date + case total_pr_summaries_created + case total_engaged_users + } + } + /// List of model metrics for custom models and the default model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/models`. + public typealias modelsPayload = [Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayloadPayload.modelsPayloadPayload] + /// List of model metrics for custom models and the default model. + /// + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/models`. + public var models: Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayloadPayload.modelsPayload? + /// Creates a new `repositoriesPayloadPayload`. + /// + /// - Parameters: + /// - name: Repository name + /// - total_engaged_users: The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository. + /// - models: List of model metrics for custom models and the default model. + public init( + name: Swift.String? = nil, + total_engaged_users: Swift.Int? = nil, + models: Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayloadPayload.modelsPayload? = nil + ) { + self.name = name + self.total_engaged_users = total_engaged_users + self.models = models + } + public enum CodingKeys: String, CodingKey { + case name + case total_engaged_users + case models + } + } + /// Repositories in which users used Copilot for Pull Requests to generate pull request summaries /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. - public var seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload - /// The Copilot plan of the organization, or the parent enterprise, when applicable. + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositories`. + public typealias repositoriesPayload = [Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayloadPayload] + /// Repositories in which users used Copilot for Pull Requests to generate pull request summaries /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/plan_type`. - @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable { - case business = "business" - case enterprise = "enterprise" - case unknown = "unknown" + /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositories`. + public var repositories: Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayload? + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `copilot_hyphen_dotcom_hyphen_pull_hyphen_requests`. + /// + /// - Parameters: + /// - total_engaged_users: The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once. + /// - repositories: Repositories in which users used Copilot for Pull Requests to generate pull request summaries + /// - additionalProperties: A container of undocumented properties. + public init( + total_engaged_users: Swift.Int? = nil, + repositories: Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayload? = nil, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + ) { + self.total_engaged_users = total_engaged_users + self.repositories = repositories + self.additionalProperties = additionalProperties } - /// The Copilot plan of the organization, or the parent enterprise, when applicable. + public enum CodingKeys: String, CodingKey { + case total_engaged_users + case repositories + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + total_engaged_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_engaged_users + ) + repositories = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayload.self, + forKey: .repositories + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "total_engaged_users", + "repositories" + ]) + } + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent( + total_engaged_users, + forKey: .total_engaged_users + ) + try container.encodeIfPresent( + repositories, + forKey: .repositories + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// Copilot usage metrics for a given day. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day`. + public struct copilot_hyphen_usage_hyphen_metrics_hyphen_day: Codable, Hashable, Sendable { + /// The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/plan_type`. - public var plan_type: Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload? + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day/date`. + public var date: Swift.String + /// The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day/total_active_users`. + public var total_active_users: Swift.Int? + /// The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day/total_engaged_users`. + public var total_engaged_users: Swift.Int? + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day/copilot_ide_code_completions`. + public var copilot_ide_code_completions: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions? + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day/copilot_ide_chat`. + public var copilot_ide_chat: Components.Schemas.copilot_hyphen_ide_hyphen_chat? + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day/copilot_dotcom_chat`. + public var copilot_dotcom_chat: Components.Schemas.copilot_hyphen_dotcom_hyphen_chat? + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics-day/copilot_dotcom_pull_requests`. + public var copilot_dotcom_pull_requests: Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests? /// A container of undocumented properties. public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `copilot_hyphen_organization_hyphen_details`. + /// Creates a new `copilot_hyphen_usage_hyphen_metrics_hyphen_day`. /// /// - Parameters: - /// - seat_breakdown: - /// - public_code_suggestions: The organization policy for allowing or disallowing Copilot to make suggestions that match public code. - /// - ide_chat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. - /// - platform_chat: The organization policy for allowing or disallowing organization members to use Copilot features within github.com. - /// - cli: The organization policy for allowing or disallowing organization members to use Copilot within their CLI. - /// - seat_management_setting: The mode of assigning new seats. - /// - plan_type: The Copilot plan of the organization, or the parent enterprise, when applicable. + /// - date: The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format. + /// - total_active_users: The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + /// - total_engaged_users: The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + /// - copilot_ide_code_completions: + /// - copilot_ide_chat: + /// - copilot_dotcom_chat: + /// - copilot_dotcom_pull_requests: /// - additionalProperties: A container of undocumented properties. public init( - seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown, - public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload, - ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? = nil, - platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? = nil, - cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? = nil, - seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload, - plan_type: Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload? = nil, + date: Swift.String, + total_active_users: Swift.Int? = nil, + total_engaged_users: Swift.Int? = nil, + copilot_ide_code_completions: Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions? = nil, + copilot_ide_chat: Components.Schemas.copilot_hyphen_ide_hyphen_chat? = nil, + copilot_dotcom_chat: Components.Schemas.copilot_hyphen_dotcom_hyphen_chat? = nil, + copilot_dotcom_pull_requests: Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests? = nil, additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { - self.seat_breakdown = seat_breakdown - self.public_code_suggestions = public_code_suggestions - self.ide_chat = ide_chat - self.platform_chat = platform_chat - self.cli = cli - self.seat_management_setting = seat_management_setting - self.plan_type = plan_type + self.date = date + self.total_active_users = total_active_users + self.total_engaged_users = total_engaged_users + self.copilot_ide_code_completions = copilot_ide_code_completions + self.copilot_ide_chat = copilot_ide_chat + self.copilot_dotcom_chat = copilot_dotcom_chat + self.copilot_dotcom_pull_requests = copilot_dotcom_pull_requests self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case seat_breakdown - case public_code_suggestions - case ide_chat - case platform_chat - case cli - case seat_management_setting - case plan_type + case date + case total_active_users + case total_engaged_users + case copilot_ide_code_completions + case copilot_ide_chat + case copilot_dotcom_chat + case copilot_dotcom_pull_requests } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - seat_breakdown = try container.decode( - Components.Schemas.copilot_hyphen_seat_hyphen_breakdown.self, - forKey: .seat_breakdown + date = try container.decode( + Swift.String.self, + forKey: .date ) - public_code_suggestions = try container.decode( - Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload.self, - forKey: .public_code_suggestions + total_active_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_active_users ) - ide_chat = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload.self, - forKey: .ide_chat + total_engaged_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_engaged_users ) - platform_chat = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload.self, - forKey: .platform_chat + copilot_ide_code_completions = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.self, + forKey: .copilot_ide_code_completions ) - cli = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload.self, - forKey: .cli + copilot_ide_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_ide_hyphen_chat.self, + forKey: .copilot_ide_chat ) - seat_management_setting = try container.decode( - Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self, - forKey: .seat_management_setting + copilot_dotcom_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_dotcom_hyphen_chat.self, + forKey: .copilot_dotcom_chat ) - plan_type = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload.self, - forKey: .plan_type + copilot_dotcom_pull_requests = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.self, + forKey: .copilot_dotcom_pull_requests ) additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "seat_breakdown", - "public_code_suggestions", - "ide_chat", - "platform_chat", - "cli", - "seat_management_setting", - "plan_type" + "date", + "total_active_users", + "total_engaged_users", + "copilot_ide_code_completions", + "copilot_ide_chat", + "copilot_dotcom_chat", + "copilot_dotcom_pull_requests" ]) } public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode( - seat_breakdown, - forKey: .seat_breakdown + date, + forKey: .date ) - try container.encode( - public_code_suggestions, - forKey: .public_code_suggestions + try container.encodeIfPresent( + total_active_users, + forKey: .total_active_users ) try container.encodeIfPresent( - ide_chat, - forKey: .ide_chat + total_engaged_users, + forKey: .total_engaged_users ) try container.encodeIfPresent( - platform_chat, - forKey: .platform_chat + copilot_ide_code_completions, + forKey: .copilot_ide_code_completions ) try container.encodeIfPresent( - cli, - forKey: .cli + copilot_ide_chat, + forKey: .copilot_ide_chat ) - try container.encode( - seat_management_setting, - forKey: .seat_management_setting + try container.encodeIfPresent( + copilot_dotcom_chat, + forKey: .copilot_dotcom_chat ) try container.encodeIfPresent( - plan_type, - forKey: .plan_type + copilot_dotcom_pull_requests, + forKey: .copilot_dotcom_pull_requests ) try encoder.encodeAdditionalProperties(additionalProperties) } } - } - /// Types generated from the `#/components/parameters` section of the OpenAPI document. - public enum Parameters { - /// The page number of the results to fetch. 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 `#/components/parameters/page`. - public typealias page = Swift.Int - /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. - /// - /// - Remark: Generated from `#/components/parameters/enterprise`. - public typealias enterprise = Swift.String - /// The slug of the team name. - /// - /// - Remark: Generated from `#/components/parameters/team-slug`. - public typealias team_hyphen_slug = Swift.String - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/components/parameters/org`. - public typealias org = Swift.String - /// The handle for the GitHub user account. + /// Summary of Copilot usage. /// - /// - Remark: Generated from `#/components/parameters/username`. - public typealias username = Swift.String - } - /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. - public enum RequestBodies {} - /// Types generated from the `#/components/responses` section of the OpenAPI document. - public enum Responses { - public struct not_found: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/not_found/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/not_found/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics`. + public struct copilot_hyphen_usage_hyphen_metrics: Codable, Hashable, Sendable { + /// The date for which the usage metrics are reported, in `YYYY-MM-DD` format. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/day`. + public var day: Swift.String + /// The total number of Copilot code completion suggestions shown to users. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_suggestions_count`. + public var total_suggestions_count: Swift.Int? + /// The total number of Copilot code completion suggestions accepted by users. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_acceptances_count`. + public var total_acceptances_count: Swift.Int? + /// The total number of lines of code completions suggested by Copilot. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_suggested`. + public var total_lines_suggested: Swift.Int? + /// The total number of lines of code completions accepted by users. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_accepted`. + public var total_lines_accepted: Swift.Int? + /// The total number of users who were shown Copilot code completion suggestions during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_users`. + public var total_active_users: Swift.Int? + /// The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_acceptances`. + public var total_chat_acceptances: Swift.Int? + /// The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_turns`. + public var total_chat_turns: Swift.Int? + /// The total number of users who interacted with Copilot Chat in the IDE during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_chat_users`. + public var total_active_chat_users: Swift.Int? + /// Breakdown of Copilot usage by editor for this language + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload`. + public struct breakdownPayloadPayload: Codable, Hashable, Sendable { + /// The language in which Copilot suggestions were shown to users in the specified editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/language`. + public var language: Swift.String? + /// The editor in which Copilot suggestions were shown to users for the specified language. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/editor`. + public var editor: Swift.String? + /// The number of Copilot suggestions shown to users in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/suggestions_count`. + public var suggestions_count: Swift.Int? + /// The number of Copilot suggestions accepted by users in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/acceptances_count`. + public var acceptances_count: Swift.Int? + /// The number of lines of code suggested by Copilot in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_suggested`. + public var lines_suggested: Swift.Int? + /// The number of lines of code accepted by users in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_accepted`. + public var lines_accepted: Swift.Int? + /// The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/active_users`. + public var active_users: Swift.Int? + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `breakdownPayloadPayload`. + /// + /// - Parameters: + /// - language: The language in which Copilot suggestions were shown to users in the specified editor. + /// - editor: The editor in which Copilot suggestions were shown to users for the specified language. + /// - suggestions_count: The number of Copilot suggestions shown to users in the editor specified during the day specified. + /// - acceptances_count: The number of Copilot suggestions accepted by users in the editor specified during the day specified. + /// - lines_suggested: The number of lines of code suggested by Copilot in the editor specified during the day specified. + /// - lines_accepted: The number of lines of code accepted by users in the editor specified during the day specified. + /// - active_users: The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. + /// - additionalProperties: A container of undocumented properties. + public init( + language: Swift.String? = nil, + editor: Swift.String? = nil, + suggestions_count: Swift.Int? = nil, + acceptances_count: Swift.Int? = nil, + lines_suggested: Swift.Int? = nil, + lines_accepted: Swift.Int? = nil, + active_users: Swift.Int? = nil, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + ) { + self.language = language + self.editor = editor + self.suggestions_count = suggestions_count + self.acceptances_count = acceptances_count + self.lines_suggested = lines_suggested + self.lines_accepted = lines_accepted + self.active_users = active_users + self.additionalProperties = additionalProperties + } + public enum CodingKeys: String, CodingKey { + case language + case editor + case suggestions_count + case acceptances_count + case lines_suggested + case lines_accepted + case active_users + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + language = try container.decodeIfPresent( + Swift.String.self, + forKey: .language + ) + editor = try container.decodeIfPresent( + Swift.String.self, + forKey: .editor + ) + suggestions_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .suggestions_count + ) + acceptances_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .acceptances_count + ) + lines_suggested = try container.decodeIfPresent( + Swift.Int.self, + forKey: .lines_suggested + ) + lines_accepted = try container.decodeIfPresent( + Swift.Int.self, + forKey: .lines_accepted + ) + active_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .active_users + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "language", + "editor", + "suggestions_count", + "acceptances_count", + "lines_suggested", + "lines_accepted", + "active_users" + ]) + } + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent( + language, + forKey: .language + ) + try container.encodeIfPresent( + editor, + forKey: .editor + ) + try container.encodeIfPresent( + suggestions_count, + forKey: .suggestions_count + ) + try container.encodeIfPresent( + acceptances_count, + forKey: .acceptances_count + ) + try container.encodeIfPresent( + lines_suggested, + forKey: .lines_suggested + ) + try container.encodeIfPresent( + lines_accepted, + forKey: .lines_accepted + ) + try container.encodeIfPresent( + active_users, + forKey: .active_users + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// Breakdown of Copilot code completions usage by language and editor + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. + public typealias breakdownPayload = [Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayloadPayload] + /// Breakdown of Copilot code completions usage by language and editor + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. + public var breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? + /// Creates a new `copilot_hyphen_usage_hyphen_metrics`. + /// + /// - Parameters: + /// - day: The date for which the usage metrics are reported, in `YYYY-MM-DD` format. + /// - total_suggestions_count: The total number of Copilot code completion suggestions shown to users. + /// - total_acceptances_count: The total number of Copilot code completion suggestions accepted by users. + /// - total_lines_suggested: The total number of lines of code completions suggested by Copilot. + /// - total_lines_accepted: The total number of lines of code completions accepted by users. + /// - total_active_users: The total number of users who were shown Copilot code completion suggestions during the day specified. + /// - total_chat_acceptances: The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). + /// - total_chat_turns: The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. + /// - total_active_chat_users: The total number of users who interacted with Copilot Chat in the IDE during the day specified. + /// - breakdown: Breakdown of Copilot code completions usage by language and editor + public init( + day: Swift.String, + total_suggestions_count: Swift.Int? = nil, + total_acceptances_count: Swift.Int? = nil, + total_lines_suggested: Swift.Int? = nil, + total_lines_accepted: Swift.Int? = nil, + total_active_users: Swift.Int? = nil, + total_chat_acceptances: Swift.Int? = nil, + total_chat_turns: Swift.Int? = nil, + total_active_chat_users: Swift.Int? = nil, + breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? = nil + ) { + self.day = day + self.total_suggestions_count = total_suggestions_count + self.total_acceptances_count = total_acceptances_count + self.total_lines_suggested = total_lines_suggested + self.total_lines_accepted = total_lines_accepted + self.total_active_users = total_active_users + self.total_chat_acceptances = total_chat_acceptances + self.total_chat_turns = total_chat_turns + self.total_active_chat_users = total_active_chat_users + self.breakdown = breakdown + } + public enum CodingKeys: String, CodingKey { + case day + case total_suggestions_count + case total_acceptances_count + case total_lines_suggested + case total_lines_accepted + case total_active_users + case total_chat_acceptances + case total_chat_turns + case total_active_chat_users + case breakdown + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + day = try container.decode( + Swift.String.self, + forKey: .day + ) + total_suggestions_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_suggestions_count + ) + total_acceptances_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_acceptances_count + ) + total_lines_suggested = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_lines_suggested + ) + total_lines_accepted = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_lines_accepted + ) + total_active_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_active_users + ) + total_chat_acceptances = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_chat_acceptances + ) + total_chat_turns = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_chat_turns + ) + total_active_chat_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_active_chat_users + ) + breakdown = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload.self, + forKey: .breakdown + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "day", + "total_suggestions_count", + "total_acceptances_count", + "total_lines_suggested", + "total_lines_accepted", + "total_active_users", + "total_chat_acceptances", + "total_chat_turns", + "total_active_chat_users", + "breakdown" + ]) + } + } + /// The breakdown of Copilot Business seats for the organization. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown`. + public struct copilot_hyphen_seat_hyphen_breakdown: Codable, Hashable, Sendable { + /// The total number of seats being billed for the organization as of the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/total`. + public var total: Swift.Int? + /// Seats added during the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/added_this_cycle`. + public var added_this_cycle: Swift.Int? + /// The number of seats that are pending cancellation at the end of the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_cancellation`. + public var pending_cancellation: Swift.Int? + /// The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_invitation`. + public var pending_invitation: Swift.Int? + /// The number of seats that have used Copilot during the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/active_this_cycle`. + public var active_this_cycle: Swift.Int? + /// The number of seats that have not used Copilot during the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/inactive_this_cycle`. + public var inactive_this_cycle: Swift.Int? + /// Creates a new `copilot_hyphen_seat_hyphen_breakdown`. + /// + /// - Parameters: + /// - total: The total number of seats being billed for the organization as of the current billing cycle. + /// - added_this_cycle: Seats added during the current billing cycle. + /// - pending_cancellation: The number of seats that are pending cancellation at the end of the current billing cycle. + /// - pending_invitation: The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + /// - active_this_cycle: The number of seats that have used Copilot during the current billing cycle. + /// - inactive_this_cycle: The number of seats that have not used Copilot during the current billing cycle. + public init( + total: Swift.Int? = nil, + added_this_cycle: Swift.Int? = nil, + pending_cancellation: Swift.Int? = nil, + pending_invitation: Swift.Int? = nil, + active_this_cycle: Swift.Int? = nil, + inactive_this_cycle: Swift.Int? = nil + ) { + self.total = total + self.added_this_cycle = added_this_cycle + self.pending_cancellation = pending_cancellation + self.pending_invitation = pending_invitation + self.active_this_cycle = active_this_cycle + self.inactive_this_cycle = inactive_this_cycle + } + public enum CodingKeys: String, CodingKey { + case total + case added_this_cycle + case pending_cancellation + case pending_invitation + case active_this_cycle + case inactive_this_cycle + } + } + /// Information about the seat breakdown and policies set for an organization with a Copilot Business or Copilot Enterprise subscription. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details`. + public struct copilot_hyphen_organization_hyphen_details: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_breakdown`. + public var seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown + /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. + @frozen public enum public_code_suggestionsPayload: String, Codable, Hashable, Sendable { + case allow = "allow" + case block = "block" + case unconfigured = "unconfigured" + case unknown = "unknown" + } + /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. + public var public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload + /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. + @frozen public enum ide_chatPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case unconfigured = "unconfigured" + } + /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. + public var ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? + /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. + @frozen public enum platform_chatPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case unconfigured = "unconfigured" + } + /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. + public var platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? + /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. + @frozen public enum cliPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case unconfigured = "unconfigured" + } + /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. + public var cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? + /// The mode of assigning new seats. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. + @frozen public enum seat_management_settingPayload: String, Codable, Hashable, Sendable { + case assign_all = "assign_all" + case assign_selected = "assign_selected" + case disabled = "disabled" + case unconfigured = "unconfigured" + } + /// The mode of assigning new seats. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. + public var seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/plan_type`. + @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable { + case business = "business" + case enterprise = "enterprise" + case unknown = "unknown" + } + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/plan_type`. + public var plan_type: Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload? + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `copilot_hyphen_organization_hyphen_details`. + /// + /// - Parameters: + /// - seat_breakdown: + /// - public_code_suggestions: The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + /// - ide_chat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + /// - platform_chat: The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + /// - cli: The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + /// - seat_management_setting: The mode of assigning new seats. + /// - plan_type: The Copilot plan of the organization, or the parent enterprise, when applicable. + /// - additionalProperties: A container of undocumented properties. + public init( + seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown, + public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload, + ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? = nil, + platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? = nil, + cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? = nil, + seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload, + plan_type: Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload? = nil, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + ) { + self.seat_breakdown = seat_breakdown + self.public_code_suggestions = public_code_suggestions + self.ide_chat = ide_chat + self.platform_chat = platform_chat + self.cli = cli + self.seat_management_setting = seat_management_setting + self.plan_type = plan_type + self.additionalProperties = additionalProperties + } + public enum CodingKeys: String, CodingKey { + case seat_breakdown + case public_code_suggestions + case ide_chat + case platform_chat + case cli + case seat_management_setting + case plan_type + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + seat_breakdown = try container.decode( + Components.Schemas.copilot_hyphen_seat_hyphen_breakdown.self, + forKey: .seat_breakdown + ) + public_code_suggestions = try container.decode( + Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload.self, + forKey: .public_code_suggestions + ) + ide_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload.self, + forKey: .ide_chat + ) + platform_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload.self, + forKey: .platform_chat + ) + cli = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload.self, + forKey: .cli + ) + seat_management_setting = try container.decode( + Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self, + forKey: .seat_management_setting + ) + plan_type = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload.self, + forKey: .plan_type + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "seat_breakdown", + "public_code_suggestions", + "ide_chat", + "platform_chat", + "cli", + "seat_management_setting", + "plan_type" + ]) + } + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode( + seat_breakdown, + forKey: .seat_breakdown + ) + try container.encode( + public_code_suggestions, + forKey: .public_code_suggestions + ) + try container.encodeIfPresent( + ide_chat, + forKey: .ide_chat + ) + try container.encodeIfPresent( + platform_chat, + forKey: .platform_chat + ) + try container.encodeIfPresent( + cli, + forKey: .cli + ) + try container.encode( + seat_management_setting, + forKey: .seat_management_setting + ) + try container.encodeIfPresent( + plan_type, + forKey: .plan_type + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + } + /// Types generated from the `#/components/parameters` section of the OpenAPI document. + public enum Parameters { + /// The page number of the results to fetch. 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 `#/components/parameters/page`. + public typealias page = Swift.Int + /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. + /// + /// - Remark: Generated from `#/components/parameters/enterprise`. + public typealias enterprise = Swift.String + /// The slug of the enterprise team name. + /// + /// - Remark: Generated from `#/components/parameters/enterprise-team-slug`. + public typealias enterprise_hyphen_team_hyphen_slug = Swift.String + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias org = Swift.String + /// The handle for the GitHub user account. + /// + /// - Remark: Generated from `#/components/parameters/username`. + public typealias username = Swift.String + } + /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. + public enum RequestBodies {} + /// Types generated from the `#/components/responses` section of the OpenAPI document. + public enum Responses { + public struct not_found: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/not_found/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/not_found/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.not_found.Body + /// Creates a new `not_found`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.not_found.Body) { + self.body = body + } + } + public struct requires_authentication: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/requires_authentication/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/requires_authentication/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.requires_authentication.Body + /// Creates a new `requires_authentication`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.requires_authentication.Body) { + self.body = body + } + } + public struct forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.forbidden.Body + /// Creates a new `forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.forbidden.Body) { + self.body = body + } + } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } + public struct usage_metrics_api_disabled: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/usage_metrics_api_disabled/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/usage_metrics_api_disabled/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.usage_metrics_api_disabled.Body + /// Creates a new `usage_metrics_api_disabled`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.usage_metrics_api_disabled.Body) { + self.body = body + } + } + } + /// Types generated from the `#/components/headers` section of the OpenAPI document. + public enum Headers { + /// - Remark: Generated from `#/components/headers/link`. + public typealias link = Swift.String + } +} + +/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. +public enum Operations { + /// List all Copilot seat assignments for an enterprise + /// + /// > [!NOTE] + /// > This endpoint is in public preview and is subject to change. + /// + /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// + /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. + /// + /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// + /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. + /// + /// Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/billing/seats`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)`. + public enum copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise { + public static let id: Swift.String = "copilot/list-copilot-seats-for-enterprise" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/path/enterprise`. + public var enterprise: Components.Parameters.enterprise + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. You can also substitute this value with the enterprise id. + public init(enterprise: Components.Parameters.enterprise) { + self.enterprise = enterprise + } + } + public var path: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/query`. + public struct Query: Sendable, Hashable { + /// The page number of the results to fetch. 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/enterprises/{enterprise}/copilot/billing/seats/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of results per page (max 100). 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/enterprises/{enterprise}/copilot/billing/seats/GET/query/per_page`. + public var per_page: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of results per page (max 100). 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)." + public init( + page: Components.Parameters.page? = nil, + per_page: Swift.Int? = nil + ) { + self.page = page + self.per_page = per_page + } + } + public var query: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Path, + query: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Query = .init(), + headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/headers/Link`. + public var Link: Components.Headers.link? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - Link: + public init(Link: Components.Headers.link? = nil) { + self.Link = Link + } + } + /// Received HTTP response headers + public var headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Headers + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json/total_seats`. + public var total_seats: Swift.Int? + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json/seats`. + public var seats: [Components.Schemas.copilot_hyphen_seat_hyphen_details]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - total_seats: The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. + /// - seats: + public init( + total_seats: Swift.Int? = nil, + seats: [Components.Schemas.copilot_hyphen_seat_hyphen_details]? = nil + ) { + self.total_seats = total_seats + self.seats = seats + } + public enum CodingKeys: String, CodingKey { + case total_seats + case seats + } + } + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/application\/json`. + case json(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Headers = .init(), + body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body + ) { + self.headers = headers + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + /// Requires authentication + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Components.Responses.requires_authentication) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Components.Responses.requires_authentication { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) } } } - /// Received HTTP response body - public var body: Components.Responses.not_found.Body - /// Creates a new `not_found`. + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get Copilot metrics for an enterprise + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only enterprise owners and billing managers can view Copilot metrics for the enterprise. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)`. + public enum copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise { + public static let id: Swift.String = "copilot/copilot-metrics-for-enterprise" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/path/enterprise`. + public var enterprise: Components.Parameters.enterprise + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. You can also substitute this value with the enterprise id. + public init(enterprise: Components.Parameters.enterprise) { + self.enterprise = enterprise + } + } + public var path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/query`. + public struct Query: Sendable, Hashable { + /// Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/query/since`. + public var since: Swift.String? + /// Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/query/until`. + public var until: Swift.String? + /// The page number of the results to fetch. 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/enterprises/{enterprise}/copilot/metrics/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of days of metrics to display per page (max 28). 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/enterprises/{enterprise}/copilot/metrics/GET/query/per_page`. + public var per_page: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - since: Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// - until: Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of days of metrics to display per page (max 28). 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)." + public init( + since: Swift.String? = nil, + until: Swift.String? = nil, + page: Components.Parameters.page? = nil, + per_page: Swift.Int? = nil + ) { + self.since = since + self.until = until + self.page = page + self.per_page = per_page + } + } + public var query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Headers + /// Creates a new `Input`. /// /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.not_found.Body) { - self.body = body + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers } } - public struct requires_authentication: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/requires_authentication/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/requires_authentication/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/metrics/GET/responses/200/content/application\/json`. + case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day] { + get throws { + switch self { + case let .json(body): + return body + } } } } + /// Received HTTP response body + public var body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body) { + self.body = body + } } - /// Received HTTP response body - public var body: Components.Responses.requires_authentication.Body - /// Creates a new `requires_authentication`. + /// Response /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.requires_authentication.Body) { - self.body = body + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } } - } - public struct forbidden: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/forbidden/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/forbidden/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) } } } - /// Received HTTP response body - public var body: Components.Responses.forbidden.Body - /// Creates a new `forbidden`. + /// Forbidden /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.forbidden.Body) { - self.body = body + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } } - } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Copilot Usage Merics API setting is disabled at the organization or enterprise level. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.usage_metrics_api_disabled) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.usage_metrics_api_disabled { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) } } } - /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { - self.body = body + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] } } } - /// Types generated from the `#/components/headers` section of the OpenAPI document. - public enum Headers { - /// - Remark: Generated from `#/components/headers/link`. - public typealias link = Swift.String - } -} - -/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. -public enum Operations { - /// List all Copilot seat assignments for an enterprise + /// Get a summary of Copilot usage for enterprise members /// /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. - /// - /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, + /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. /// - /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. /// - /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. + /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// - /// Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/billing/seats`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)`. - public enum copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise { - public static let id: Swift.String = "copilot/list-copilot-seats-for-enterprise" + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. + public enum copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise { + public static let id: Swift.String = "copilot/usage-metrics-for-enterprise" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/path`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/path`. public struct Path: Sendable, Hashable { /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/path/enterprise`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/path/enterprise`. public var enterprise: Components.Parameters.enterprise /// Creates a new `Path`. /// @@ -2099,43 +3786,57 @@ public enum Operations { self.enterprise = enterprise } } - public var path: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Path - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/query`. + public var path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query`. public struct Query: Sendable, Hashable { + /// Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query/since`. + public var since: Swift.String? + /// Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query/until`. + public var until: Swift.String? /// The page number of the results to fetch. 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/enterprises/{enterprise}/copilot/billing/seats/GET/query/page`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query/page`. public var page: Components.Parameters.page? - /// The number of results per page (max 100). 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)." + /// The number of days of metrics to display per page (max 28). 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/enterprises/{enterprise}/copilot/billing/seats/GET/query/per_page`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query/per_page`. public var per_page: Swift.Int? /// Creates a new `Query`. /// /// - Parameters: + /// - since: Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// - until: Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. /// - page: The page number of the results to fetch. 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)." - /// - per_page: The number of results per page (max 100). 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)." + /// - per_page: The number of days of metrics to display per page (max 28). 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)." public init( + since: Swift.String? = nil, + until: Swift.String? = nil, page: Components.Parameters.page? = nil, per_page: Swift.Int? = nil ) { + self.since = since + self.until = until self.page = page self.per_page = per_page } } - public var query: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Query - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/header`. + public var query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Headers + public var headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -2143,9 +3844,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Path, - query: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Query = .init(), - headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Headers = .init() + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Headers = .init() ) { self.path = path self.query = query @@ -2154,54 +3855,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/headers`. - public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/headers/Link`. - public var Link: Components.Headers.link? - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - Link: - public init(Link: Components.Headers.link? = nil) { - self.Link = Link - } - } - /// Received HTTP response headers - public var headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Headers - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json/total_seats`. - public var total_seats: Swift.Int? - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json/seats`. - public var seats: [Components.Schemas.copilot_hyphen_seat_hyphen_details]? - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - total_seats: The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. - /// - seats: - public init( - total_seats: Swift.Int? = nil, - seats: [Components.Schemas.copilot_hyphen_seat_hyphen_details]? = nil - ) { - self.total_seats = total_seats - self.seats = seats - } - public enum CodingKeys: String, CodingKey { - case total_seats - case seats - } - } - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/application\/json`. - case json(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body.jsonPayload) + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/responses/200/content/application\/json`. + case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body.jsonPayload { + public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics] { get throws { switch self { case let .json(body): @@ -2211,31 +3873,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body + public var body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: - /// - headers: Received HTTP response headers /// - body: Received HTTP response body - public init( - headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Headers = .init(), - body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body - ) { - self.headers = headers + public init(body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/200`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok) + case ok(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok { + public var ok: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok { get throws { switch self { case let .ok(response): @@ -2250,7 +3907,7 @@ public enum Operations { } /// Internal Error /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/500`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/500`. /// /// HTTP response code: `500 internalServerError`. case internalServerError(Components.Responses.internal_error) @@ -2273,7 +3930,7 @@ public enum Operations { } /// Requires authentication /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/401`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/401`. /// /// HTTP response code: `401 unauthorized`. case unauthorized(Components.Responses.requires_authentication) @@ -2296,7 +3953,7 @@ public enum Operations { } /// Forbidden /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/403`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/403`. /// /// HTTP response code: `403 forbidden`. case forbidden(Components.Responses.forbidden) @@ -2319,7 +3976,7 @@ public enum Operations { } /// Resource not found /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/404`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Components.Responses.not_found) @@ -2371,60 +4028,68 @@ public enum Operations { } } } - /// Get a summary of Copilot usage for enterprise members + /// Get Copilot metrics for an enterprise team /// - /// > [!NOTE] - /// > This endpoint is in public preview and is subject to change. - /// - /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE - /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, - /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// - /// Only owners and billing managers can view Copilot usage metrics for the enterprise. + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings. + /// Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. - public enum copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise { - public static let id: Swift.String = "copilot/usage-metrics-for-enterprise" + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)`. + public enum copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team { + public static let id: Swift.String = "copilot/copilot-metrics-for-enterprise-team" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/path`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/path`. public struct Path: Sendable, Hashable { /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/path/enterprise`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/path/enterprise`. public var enterprise: Components.Parameters.enterprise + /// The slug of the enterprise team name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/path/team_slug`. + public var team_slug: Components.Parameters.enterprise_hyphen_team_hyphen_slug /// Creates a new `Path`. /// /// - Parameters: /// - enterprise: The slug version of the enterprise name. You can also substitute this value with the enterprise id. - public init(enterprise: Components.Parameters.enterprise) { + /// - team_slug: The slug of the enterprise team name. + public init( + enterprise: Components.Parameters.enterprise, + team_slug: Components.Parameters.enterprise_hyphen_team_hyphen_slug + ) { self.enterprise = enterprise + self.team_slug = team_slug } } - public var path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Path - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query`. + public var path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/query`. public struct Query: Sendable, Hashable { /// Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query/since`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/query/since`. public var since: Swift.String? /// Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/query/until`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/query/until`. public var until: Swift.String? /// The page number of the results to fetch. 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/enterprises/{enterprise}/copilot/usage/GET/query/page`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/query/page`. public var page: Components.Parameters.page? /// The number of days of metrics to display per page (max 28). 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/enterprises/{enterprise}/copilot/usage/GET/query/per_page`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/query/per_page`. public var per_page: Swift.Int? /// Creates a new `Query`. /// @@ -2445,19 +4110,19 @@ public enum Operations { self.per_page = per_page } } - public var query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Query - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/header`. + public var query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Headers + public var headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -2465,9 +4130,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Path, - query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Query = .init(), - headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input.Headers = .init() + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers = .init() ) { self.path = path self.query = query @@ -2476,15 +4141,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/usage/GET/responses/200/content/application\/json`. - case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics]) + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/metrics/GET/responses/200/content/application\/json`. + case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics] { + public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day] { get throws { switch self { case let .json(body): @@ -2494,26 +4159,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body + public var body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body) { + public init(body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/200`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok) + case ok(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok { + public var ok: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok { get throws { switch self { case let .ok(response): @@ -2528,7 +4193,7 @@ public enum Operations { } /// Internal Error /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/500`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)/responses/500`. /// /// HTTP response code: `500 internalServerError`. case internalServerError(Components.Responses.internal_error) @@ -2549,32 +4214,9 @@ public enum Operations { } } } - /// Requires authentication - /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.requires_authentication) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.requires_authentication { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } /// Forbidden /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/403`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)/responses/403`. /// /// HTTP response code: `403 forbidden`. case forbidden(Components.Responses.forbidden) @@ -2597,22 +4239,45 @@ public enum Operations { } /// Resource not found /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/404`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Components.Responses.not_found) /// The associated value of the enum case if `self` is `.notFound`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Copilot Usage Merics API setting is disabled at the organization or enterprise level. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-enterprise-team)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.usage_metrics_api_disabled) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.usage_metrics_api_disabled { get throws { switch self { - case let .notFound(response): + case let .unprocessableContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "unprocessableContent", response: self ) } @@ -4618,7 +6283,288 @@ public enum Operations { return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", + expectedStatus: "unauthorized", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct UnprocessableContent: Sendable, Hashable { + /// Creates a new `UnprocessableContent`. + public init() {} + } + /// Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user's seat cannot be cancelled because it was assigned to them via a team. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.UnprocessableContent) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.UnprocessableContent { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get Copilot metrics for an organization + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization. + /// Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)`. + public enum copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization { + public static let id: Swift.String = "copilot/copilot-metrics-for-organization" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/query`. + public struct Query: Sendable, Hashable { + /// Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/query/since`. + public var since: Swift.String? + /// Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/query/until`. + public var until: Swift.String? + /// The page number of the results to fetch. 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/orgs/{org}/copilot/metrics/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of days of metrics to display per page (max 28). 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/orgs/{org}/copilot/metrics/GET/query/per_page`. + public var per_page: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - since: Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// - until: Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of days of metrics to display per page (max 28). 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)." + public init( + since: Swift.String? = nil, + until: Swift.String? = nil, + page: Components.Parameters.page? = nil, + per_page: Swift.Int? = nil + ) { + self.since = since + self.until = until + self.page = page + self.per_page = per_page + } + } + public var query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/copilot/metrics/GET/responses/200/content/application\/json`. + case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_organization.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", response: self ) } @@ -4626,7 +6572,7 @@ public enum Operations { } /// Forbidden /// - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)/responses/403`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)/responses/403`. /// /// HTTP response code: `403 forbidden`. case forbidden(Components.Responses.forbidden) @@ -4649,7 +6595,7 @@ public enum Operations { } /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Components.Responses.not_found) @@ -4670,21 +6616,17 @@ public enum Operations { } } } - public struct UnprocessableContent: Sendable, Hashable { - /// Creates a new `UnprocessableContent`. - public init() {} - } - /// Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user's seat cannot be cancelled because it was assigned to them via a team. + /// Copilot Usage Merics API setting is disabled at the organization or enterprise level. /// - /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/metrics/get(copilot/copilot-metrics-for-organization)/responses/422`. /// /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.UnprocessableContent) + case unprocessableContent(Components.Responses.usage_metrics_api_disabled) /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.UnprocessableContent { + public var unprocessableContent: Components.Responses.usage_metrics_api_disabled { get throws { switch self { case let .unprocessableContent(response): @@ -5273,6 +7215,292 @@ public enum Operations { } } } + /// Get Copilot metrics for a team + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day. + /// + /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings. + /// Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/metrics`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)`. + public enum copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team { + public static let id: Swift.String = "copilot/copilot-metrics-for-team" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/path/org`. + public var org: Components.Parameters.org + /// The slug of the team name. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/path/team_slug`. + public var team_slug: Components.Parameters.team_hyphen_slug + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - team_slug: The slug of the team name. + public init( + org: Components.Parameters.org, + team_slug: Components.Parameters.team_hyphen_slug + ) { + self.org = org + self.team_slug = team_slug + } + } + public var path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/query`. + public struct Query: Sendable, Hashable { + /// Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/query/since`. + public var since: Swift.String? + /// Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/query/until`. + public var until: Swift.String? + /// The page number of the results to fetch. 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/orgs/{org}/team/{team_slug}/copilot/metrics/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of days of metrics to display per page (max 28). 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/orgs/{org}/team/{team_slug}/copilot/metrics/GET/query/per_page`. + public var per_page: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - since: Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// - until: Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// - page: The page number of the results to fetch. 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)." + /// - per_page: The number of days of metrics to display per page (max 28). 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)." + public init( + since: Swift.String? = nil, + until: Swift.String? = nil, + page: Components.Parameters.page? = nil, + per_page: Swift.Int? = nil + ) { + self.since = since + self.until = until + self.page = page + self.per_page = per_page + } + } + public var query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Path, + query: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/metrics/GET/responses/200/content/application\/json`. + case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics_hyphen_day] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.copilot_sol_copilot_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Copilot Usage Merics API setting is disabled at the organization or enterprise level. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/metrics/get(copilot/copilot-metrics-for-team)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.usage_metrics_api_disabled) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.usage_metrics_api_disabled { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// Get a summary of Copilot usage for a team /// /// > [!NOTE] From e5323b91885548cf737fdd19b224fe3e356f0391 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:14:24 +0000 Subject: [PATCH 088/129] Bump Submodule/github/rest-api-description from `10e2f15` to `4162f99` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `10e2f15` to `4162f99`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/10e2f151b45a960f135417e71bd6f0ac5ce0aa97...4162f99dbe229d95e848fd1832a797e58e8c7857) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 10e2f151b45..4162f99dbe2 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 10e2f151b45a960f135417e71bd6f0ac5ce0aa97 +Subproject commit 4162f99dbe229d95e848fd1832a797e58e8c7857 From 84a404e07bb2ddbffbce606ced185010c6907f5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 11 Nov 2024 21:36:15 +0000 Subject: [PATCH 089/129] Commit via running ake Sources/dependency-graph --- Sources/dependency-graph/Types.swift | 61 ++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/Sources/dependency-graph/Types.swift b/Sources/dependency-graph/Types.swift index 8cb6940a2cb..f122c1d51fb 100644 --- a/Sources/dependency-graph/Types.swift +++ b/Sources/dependency-graph/Types.swift @@ -287,6 +287,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/spdxVersion`. public var spdxVersion: Swift.String + /// An optional comment about the SPDX document. + /// + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/comment`. + public var comment: Swift.String? /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/creationInfo`. public struct creationInfoPayload: Codable, Hashable, Sendable { /// The date and time the SPDX document was created. @@ -324,10 +328,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/dataLicense`. public var dataLicense: Swift.String - /// The name of the repository that the SPDX document describes. - /// - /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/documentDescribes`. - public var documentDescribes: [Swift.String] /// The namespace for the SPDX document. /// /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/documentNamespace`. @@ -466,45 +466,88 @@ public enum Components { public typealias packagesPayload = [Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.packagesPayloadPayload] /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/packages`. public var packages: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.packagesPayload + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/relationshipsPayload`. + public struct relationshipsPayloadPayload: Codable, Hashable, Sendable { + /// The type of relationship between the two SPDX elements. + /// + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/relationshipsPayload/relationshipType`. + public var relationshipType: Swift.String? + /// The SPDX identifier of the package that is the source of the relationship. + /// + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/relationshipsPayload/spdxElementId`. + public var spdxElementId: Swift.String? + /// The SPDX identifier of the package that is the target of the relationship. + /// + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/relationshipsPayload/relatedSpdxElement`. + public var relatedSpdxElement: Swift.String? + /// Creates a new `relationshipsPayloadPayload`. + /// + /// - Parameters: + /// - relationshipType: The type of relationship between the two SPDX elements. + /// - spdxElementId: The SPDX identifier of the package that is the source of the relationship. + /// - relatedSpdxElement: The SPDX identifier of the package that is the target of the relationship. + public init( + relationshipType: Swift.String? = nil, + spdxElementId: Swift.String? = nil, + relatedSpdxElement: Swift.String? = nil + ) { + self.relationshipType = relationshipType + self.spdxElementId = spdxElementId + self.relatedSpdxElement = relatedSpdxElement + } + public enum CodingKeys: String, CodingKey { + case relationshipType + case spdxElementId + case relatedSpdxElement + } + } + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/relationships`. + public typealias relationshipsPayload = [Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.relationshipsPayloadPayload] + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/relationships`. + public var relationships: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.relationshipsPayload? /// Creates a new `sbomPayload`. /// /// - Parameters: /// - SPDXID: The SPDX identifier for the SPDX document. /// - spdxVersion: The version of the SPDX specification that this document conforms to. + /// - comment: An optional comment about the SPDX document. /// - creationInfo: /// - name: The name of the SPDX document. /// - dataLicense: The license under which the SPDX document is licensed. - /// - documentDescribes: The name of the repository that the SPDX document describes. /// - documentNamespace: The namespace for the SPDX document. /// - packages: + /// - relationships: public init( SPDXID: Swift.String, spdxVersion: Swift.String, + comment: Swift.String? = nil, creationInfo: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.creationInfoPayload, name: Swift.String, dataLicense: Swift.String, - documentDescribes: [Swift.String], documentNamespace: Swift.String, - packages: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.packagesPayload + packages: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.packagesPayload, + relationships: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.relationshipsPayload? = nil ) { self.SPDXID = SPDXID self.spdxVersion = spdxVersion + self.comment = comment self.creationInfo = creationInfo self.name = name self.dataLicense = dataLicense - self.documentDescribes = documentDescribes self.documentNamespace = documentNamespace self.packages = packages + self.relationships = relationships } public enum CodingKeys: String, CodingKey { case SPDXID case spdxVersion + case comment case creationInfo case name case dataLicense - case documentDescribes case documentNamespace case packages + case relationships } } /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom`. From ce56cc9bea0adf348bff5b34835d87702794c9a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 11 Nov 2024 21:36:37 +0000 Subject: [PATCH 090/129] Commit via running ake Sources/gists --- Sources/gists/Types.swift | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index b1c5539cb04..8a02d7d31ea 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -1072,6 +1072,10 @@ public enum Components { public var raw_url: Swift.String? /// - Remark: Generated from `#/components/schemas/base-gist/files/additionalProperties/size`. public var size: Swift.Int? + /// The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + /// + /// - Remark: Generated from `#/components/schemas/base-gist/files/additionalProperties/encoding`. + public var encoding: Swift.String? /// Creates a new `additionalPropertiesPayload`. /// /// - Parameters: @@ -1080,18 +1084,21 @@ public enum Components { /// - language: /// - raw_url: /// - size: + /// - encoding: The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. public init( filename: Swift.String? = nil, _type: Swift.String? = nil, language: Swift.String? = nil, raw_url: Swift.String? = nil, - size: Swift.Int? = nil + size: Swift.Int? = nil, + encoding: Swift.String? = nil ) { self.filename = filename self._type = _type self.language = language self.raw_url = raw_url self.size = size + self.encoding = encoding } public enum CodingKeys: String, CodingKey { case filename @@ -1099,6 +1106,7 @@ public enum Components { case language case raw_url case size + case encoding } } /// A container of undocumented properties. @@ -2078,6 +2086,10 @@ public enum Components { public var truncated: Swift.Bool? /// - Remark: Generated from `#/components/schemas/gist-simple/files/additionalProperties/content`. public var content: Swift.String? + /// The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + /// + /// - Remark: Generated from `#/components/schemas/gist-simple/files/additionalProperties/encoding`. + public var encoding: Swift.String? /// Creates a new `additionalPropertiesPayload`. /// /// - Parameters: @@ -2088,6 +2100,7 @@ public enum Components { /// - size: /// - truncated: /// - content: + /// - encoding: The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. public init( filename: Swift.String? = nil, _type: Swift.String? = nil, @@ -2095,7 +2108,8 @@ public enum Components { raw_url: Swift.String? = nil, size: Swift.Int? = nil, truncated: Swift.Bool? = nil, - content: Swift.String? = nil + content: Swift.String? = nil, + encoding: Swift.String? = nil ) { self.filename = filename self._type = _type @@ -2104,6 +2118,7 @@ public enum Components { self.size = size self.truncated = truncated self.content = content + self.encoding = encoding } public enum CodingKeys: String, CodingKey { case filename @@ -2113,6 +2128,7 @@ public enum Components { case size case truncated case content + case encoding } } /// A container of undocumented properties. From 46e4a2546a6a2fdfdb64c415bc9e2e62df3a0403 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 11 Nov 2024 21:40:06 +0000 Subject: [PATCH 091/129] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index ec2df9e14aa..42e99fa3fc3 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -5652,6 +5652,10 @@ public enum Components { public var updated_at: Foundation.Date /// - Remark: Generated from `#/components/schemas/organization-full/archived_at`. public var archived_at: Foundation.Date? + /// Controls whether or not deploy keys may be added and used for repositories in the organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/deploy_keys_enabled_for_repositories`. + public var deploy_keys_enabled_for_repositories: Swift.Bool? /// Creates a new `organization_hyphen_full`. /// /// - Parameters: @@ -5712,6 +5716,7 @@ public enum Components { /// - created_at: /// - updated_at: /// - archived_at: + /// - deploy_keys_enabled_for_repositories: Controls whether or not deploy keys may be added and used for repositories in the organization. public init( login: Swift.String, id: Swift.Int, @@ -5769,7 +5774,8 @@ public enum Components { secret_scanning_push_protection_custom_link: Swift.String? = nil, created_at: Foundation.Date, updated_at: Foundation.Date, - archived_at: Foundation.Date? = nil + archived_at: Foundation.Date? = nil, + deploy_keys_enabled_for_repositories: Swift.Bool? = nil ) { self.login = login self.id = id @@ -5828,6 +5834,7 @@ public enum Components { self.created_at = created_at self.updated_at = updated_at self.archived_at = archived_at + self.deploy_keys_enabled_for_repositories = deploy_keys_enabled_for_repositories } public enum CodingKeys: String, CodingKey { case login @@ -5887,6 +5894,7 @@ public enum Components { case created_at case updated_at case archived_at + case deploy_keys_enabled_for_repositories } } /// Organization Invitation @@ -7008,6 +7016,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request/token_id`. public var token_id: Swift.Int + /// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. + /// + /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request/token_name`. + public var token_name: Swift.String /// Whether the associated fine-grained personal access token has expired. /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request/token_expired`. @@ -7031,6 +7043,7 @@ public enum Components { /// - permissions: Permissions requested, categorized by type of permission. /// - created_at: Date and time when the request for access was created. /// - token_id: Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + /// - token_name: The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. /// - token_expired: Whether the associated fine-grained personal access token has expired. /// - token_expires_at: Date and time when the associated fine-grained personal access token expires. /// - token_last_used_at: Date and time when the associated fine-grained personal access token was last used for authentication. @@ -7043,6 +7056,7 @@ public enum Components { permissions: Components.Schemas.organization_hyphen_programmatic_hyphen_access_hyphen_grant_hyphen_request.permissionsPayload, created_at: Swift.String, token_id: Swift.Int, + token_name: Swift.String, token_expired: Swift.Bool, token_expires_at: Swift.String? = nil, token_last_used_at: Swift.String? = nil @@ -7055,6 +7069,7 @@ public enum Components { self.permissions = permissions self.created_at = created_at self.token_id = token_id + self.token_name = token_name self.token_expired = token_expired self.token_expires_at = token_expires_at self.token_last_used_at = token_last_used_at @@ -7068,6 +7083,7 @@ public enum Components { case permissions case created_at case token_id + case token_name case token_expired case token_expires_at case token_last_used_at @@ -7196,6 +7212,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/token_id`. public var token_id: Swift.Int + /// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. + /// + /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/token_name`. + public var token_name: Swift.String /// Whether the associated fine-grained personal access token has expired. /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/token_expired`. @@ -7218,6 +7238,7 @@ public enum Components { /// - permissions: Permissions requested, categorized by type of permission. /// - access_granted_at: Date and time when the fine-grained personal access token was approved to access the organization. /// - token_id: Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + /// - token_name: The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. /// - token_expired: Whether the associated fine-grained personal access token has expired. /// - token_expires_at: Date and time when the associated fine-grained personal access token expires. /// - token_last_used_at: Date and time when the associated fine-grained personal access token was last used for authentication. @@ -7229,6 +7250,7 @@ public enum Components { permissions: Components.Schemas.organization_hyphen_programmatic_hyphen_access_hyphen_grant.permissionsPayload, access_granted_at: Swift.String, token_id: Swift.Int, + token_name: Swift.String, token_expired: Swift.Bool, token_expires_at: Swift.String? = nil, token_last_used_at: Swift.String? = nil @@ -7240,6 +7262,7 @@ public enum Components { self.permissions = permissions self.access_granted_at = access_granted_at self.token_id = token_id + self.token_name = token_name self.token_expired = token_expired self.token_expires_at = token_expires_at self.token_last_used_at = token_last_used_at @@ -7252,6 +7275,7 @@ public enum Components { case permissions case access_granted_at case token_id + case token_name case token_expired case token_expires_at case token_last_used_at @@ -8509,6 +8533,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/secret_scanning_push_protection_custom_link`. public var secret_scanning_push_protection_custom_link: Swift.String? + /// Controls whether or not deploy keys may be added and used for repositories in the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/deploy_keys_enabled_for_repositories`. + public var deploy_keys_enabled_for_repositories: Swift.Bool? /// Creates a new `jsonPayload`. /// /// - Parameters: @@ -8541,6 +8569,7 @@ public enum Operations { /// - secret_scanning_push_protection_enabled_for_new_repositories: **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// - secret_scanning_push_protection_custom_link: If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. + /// - deploy_keys_enabled_for_repositories: Controls whether or not deploy keys may be added and used for repositories in the organization. public init( billing_email: Swift.String? = nil, company: Swift.String? = nil, @@ -8570,7 +8599,8 @@ public enum Operations { secret_scanning_enabled_for_new_repositories: Swift.Bool? = nil, secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? = nil, secret_scanning_push_protection_custom_link_enabled: Swift.Bool? = nil, - secret_scanning_push_protection_custom_link: Swift.String? = nil + secret_scanning_push_protection_custom_link: Swift.String? = nil, + deploy_keys_enabled_for_repositories: Swift.Bool? = nil ) { self.billing_email = billing_email self.company = company @@ -8601,6 +8631,7 @@ public enum Operations { self.secret_scanning_push_protection_enabled_for_new_repositories = secret_scanning_push_protection_enabled_for_new_repositories self.secret_scanning_push_protection_custom_link_enabled = secret_scanning_push_protection_custom_link_enabled self.secret_scanning_push_protection_custom_link = secret_scanning_push_protection_custom_link + self.deploy_keys_enabled_for_repositories = deploy_keys_enabled_for_repositories } public enum CodingKeys: String, CodingKey { case billing_email @@ -8632,6 +8663,7 @@ public enum Operations { case secret_scanning_push_protection_enabled_for_new_repositories case secret_scanning_push_protection_custom_link_enabled case secret_scanning_push_protection_custom_link + case deploy_keys_enabled_for_repositories } } /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/content/application\/json`. From f71587db22261dfbc9839e0fa38941a1cceb0b30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 11 Nov 2024 21:42:14 +0000 Subject: [PATCH 092/129] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index c63ec4e96bc..de7ef389530 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -19824,6 +19824,8 @@ public enum Components { public var added_by: Swift.String? /// - Remark: Generated from `#/components/schemas/deploy-key/last_used`. public var last_used: Swift.String? + /// - Remark: Generated from `#/components/schemas/deploy-key/enabled`. + public var enabled: Swift.Bool? /// Creates a new `deploy_hyphen_key`. /// /// - Parameters: @@ -19836,6 +19838,7 @@ public enum Components { /// - read_only: /// - added_by: /// - last_used: + /// - enabled: public init( id: Swift.Int, key: Swift.String, @@ -19845,7 +19848,8 @@ public enum Components { created_at: Swift.String, read_only: Swift.Bool, added_by: Swift.String? = nil, - last_used: Swift.String? = nil + last_used: Swift.String? = nil, + enabled: Swift.Bool? = nil ) { self.id = id self.key = key @@ -19856,6 +19860,7 @@ public enum Components { self.read_only = read_only self.added_by = added_by self.last_used = last_used + self.enabled = enabled } public enum CodingKeys: String, CodingKey { case id @@ -19867,6 +19872,7 @@ public enum Components { case read_only case added_by case last_used + case enabled } } /// Language From ef2a9dd1187a6dee8af5cfb794a95772f315ef83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 11 Nov 2024 21:44:20 +0000 Subject: [PATCH 093/129] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 51 +++++++---- Sources/copilot/Types.swift | 165 ++++++++++++++++++++++------------- 2 files changed, 138 insertions(+), 78 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 4d43edfcdb4..bbde87f6ae3 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -43,11 +43,14 @@ public struct Client: APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. /// /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have + /// telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data, + /// see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. /// @@ -425,6 +428,8 @@ public struct Client: APIProtocol { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// + /// The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time. + /// /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. @@ -1002,7 +1007,7 @@ public struct Client: APIProtocol { /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. - /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". + /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)." /// /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// @@ -1163,9 +1168,12 @@ public struct Client: APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed. /// Only organization owners can view assigned seats. /// + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. @@ -1344,13 +1352,13 @@ public struct Client: APIProtocol { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -1520,15 +1528,17 @@ public struct Client: APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for all members of each team specified. - /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all members of each team specified to "pending cancellation". + /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. @@ -1696,13 +1706,13 @@ public struct Client: APIProtocol { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -1872,15 +1882,17 @@ public struct Client: APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for each user specified. - /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all users specified to "pending cancellation". + /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. @@ -2432,7 +2444,10 @@ public struct Client: APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + /// Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot. + /// + /// The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only organization owners can view Copilot seat assignment details for members of their organization. /// diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 884622db1f0..89c00e39ebf 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -16,11 +16,14 @@ public protocol APIProtocol: Sendable { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. /// /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have + /// telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data, + /// see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. /// @@ -58,6 +61,8 @@ public protocol APIProtocol: Sendable { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// + /// The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time. + /// /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. @@ -114,7 +119,7 @@ public protocol APIProtocol: Sendable { /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. - /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". + /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)." /// /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// @@ -128,9 +133,12 @@ public protocol APIProtocol: Sendable { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed. /// Only organization owners can view assigned seats. /// + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. @@ -142,13 +150,13 @@ public protocol APIProtocol: Sendable { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -162,15 +170,17 @@ public protocol APIProtocol: Sendable { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for all members of each team specified. - /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all members of each team specified to "pending cancellation". + /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. @@ -182,13 +192,13 @@ public protocol APIProtocol: Sendable { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -202,15 +212,17 @@ public protocol APIProtocol: Sendable { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for each user specified. - /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all users specified to "pending cancellation". + /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. @@ -260,7 +272,10 @@ public protocol APIProtocol: Sendable { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + /// Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot. + /// + /// The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only organization owners can view Copilot seat assignment details for members of their organization. /// @@ -320,11 +335,14 @@ extension APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. /// /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have + /// telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data, + /// see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. /// @@ -382,6 +400,8 @@ extension APIProtocol { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// + /// The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time. + /// /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. @@ -468,7 +488,7 @@ extension APIProtocol { /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. - /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". + /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)." /// /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// @@ -490,9 +510,12 @@ extension APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed. /// Only organization owners can view assigned seats. /// + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. @@ -514,13 +537,13 @@ extension APIProtocol { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -544,15 +567,17 @@ extension APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for all members of each team specified. - /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all members of each team specified to "pending cancellation". + /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. @@ -574,13 +599,13 @@ extension APIProtocol { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -604,15 +629,17 @@ extension APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for each user specified. - /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all users specified to "pending cancellation". + /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. @@ -692,7 +719,10 @@ extension APIProtocol { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + /// Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot. + /// + /// The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only organization owners can view Copilot seat assignment details for members of their organization. /// @@ -1314,7 +1344,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/enterprise-team/sync_to_organizations`. public var sync_to_organizations: Swift.String /// - Remark: Generated from `#/components/schemas/enterprise-team/group_id`. - public var group_id: Swift.Int? + public var group_id: Swift.String? /// - Remark: Generated from `#/components/schemas/enterprise-team/html_url`. public var html_url: Swift.String /// - Remark: Generated from `#/components/schemas/enterprise-team/members_url`. @@ -1342,7 +1372,7 @@ public enum Components { slug: Swift.String, url: Swift.String, sync_to_organizations: Swift.String, - group_id: Swift.Int? = nil, + group_id: Swift.String? = nil, html_url: Swift.String, members_url: Swift.String, created_at: Foundation.Date, @@ -3175,11 +3205,14 @@ public enum Operations { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. /// /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have + /// telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data, + /// see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. /// @@ -3763,6 +3796,8 @@ public enum Operations { /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// + /// The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time. + /// /// Only owners and billing managers can view Copilot usage metrics for the enterprise. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. @@ -4611,7 +4646,7 @@ public enum Operations { /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. - /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". + /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)." /// /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// @@ -4869,9 +4904,12 @@ public enum Operations { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed. /// Only organization owners can view assigned seats. /// + /// Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. @@ -5171,13 +5209,13 @@ public enum Operations { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -5258,7 +5296,7 @@ public enum Operations { public struct Created: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_teams/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// The total number of seat assignments created. + /// The total number of seats created for members of the specified team(s). /// /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_teams/POST/responses/201/content/json`. public struct jsonPayload: Codable, Hashable, Sendable { @@ -5478,15 +5516,17 @@ public enum Operations { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for all members of each team specified. - /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all members of each team specified to "pending cancellation". + /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. @@ -5564,7 +5604,7 @@ public enum Operations { public struct Ok: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_teams/DELETE/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// The total number of seat assignments cancelled. + /// The total number of seats set to "pending cancellation" for members of the specified team(s). /// /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_teams/DELETE/responses/200/content/json`. public struct jsonPayload: Codable, Hashable, Sendable { @@ -5785,13 +5825,13 @@ public enum Operations { /// > This endpoint is in public preview and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. - /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. - /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". - /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." + /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// /// The response will contain the total number of new seats that were created and existing seats that were refreshed. /// @@ -5872,7 +5912,7 @@ public enum Operations { public struct Created: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_users/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// The total number of seat assignments created. + /// The total number of seats created for the specified user(s). /// /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_users/POST/responses/201/content/json`. public struct jsonPayload: Codable, Hashable, Sendable { @@ -6092,15 +6132,17 @@ public enum Operations { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Cancels the Copilot seat assignment for each user specified. - /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. + /// Sets seats for all users specified to "pending cancellation". + /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. /// - /// For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". + /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// + /// The response will contain the total number of seats set to "pending cancellation". + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. @@ -6178,7 +6220,7 @@ public enum Operations { public struct Ok: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_users/DELETE/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// The total number of seat assignments cancelled. + /// The total number of seats set to "pending cancellation" for the specified users. /// /// - Remark: Generated from `#/paths/orgs/{org}/copilot/billing/selected_users/DELETE/responses/200/content/json`. public struct jsonPayload: Codable, Hashable, Sendable { @@ -6953,7 +6995,10 @@ public enum Operations { /// > [!NOTE] /// > This endpoint is in public preview and is subject to change. /// - /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + /// Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot. + /// + /// The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. + /// For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)." /// /// Only organization owners can view Copilot seat assignment details for members of their organization. /// From 0e6e74d8d8ce00549b9c91f59eacd7497c028e53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 22:00:06 +0000 Subject: [PATCH 094/129] Bump Submodule/github/rest-api-description from `4162f99` to `a0508ce` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `4162f99` to `a0508ce`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/4162f99dbe229d95e848fd1832a797e58e8c7857...a0508cecd18ab26b525527e4ba35bd9c6d725c4f) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 4162f99dbe2..a0508cecd18 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 4162f99dbe229d95e848fd1832a797e58e8c7857 +Subproject commit a0508cecd18ab26b525527e4ba35bd9c6d725c4f From 0e2db357f8799791453f535c458c0f2902979189 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 18 Nov 2024 22:20:07 +0000 Subject: [PATCH 095/129] Commit via running ake Sources/apps --- Sources/apps/Client.swift | 2 -- Sources/apps/Types.swift | 6 ------ 2 files changed, 8 deletions(-) diff --git a/Sources/apps/Client.swift b/Sources/apps/Client.swift index 5022336e307..e464bebe456 100644 --- a/Sources/apps/Client.swift +++ b/Sources/apps/Client.swift @@ -1080,8 +1080,6 @@ public struct Client: APIProtocol { /// /// Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted. /// - /// When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported. - /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// /// - Remark: HTTP `POST /app/installations/{installation_id}/access_tokens`. diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index 5b43918dddd..e91faf1ea61 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -114,8 +114,6 @@ public protocol APIProtocol: Sendable { /// /// Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted. /// - /// When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported. - /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// /// - Remark: HTTP `POST /app/installations/{installation_id}/access_tokens`. @@ -521,8 +519,6 @@ extension APIProtocol { /// /// Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted. /// - /// When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported. - /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// /// - Remark: HTTP `POST /app/installations/{installation_id}/access_tokens`. @@ -6901,8 +6897,6 @@ public enum Operations { /// /// Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted. /// - /// When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported. - /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// /// - Remark: HTTP `POST /app/installations/{installation_id}/access_tokens`. From b2073df6fb8ef26ebfb6e00930ac141407c02fc7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 18 Nov 2024 22:26:27 +0000 Subject: [PATCH 096/129] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 89 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 42e99fa3fc3..b08c0168328 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -6448,6 +6448,32 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-role/description`. public var description: Swift.String? + /// The system role from which this role inherits permissions. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/base_role`. + @frozen public enum base_rolePayload: String, Codable, Hashable, Sendable { + case read = "read" + case triage = "triage" + case write = "write" + case maintain = "maintain" + case admin = "admin" + } + /// The system role from which this role inherits permissions. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/base_role`. + public var base_role: Components.Schemas.organization_hyphen_role.base_rolePayload? + /// Source answers the question, "where did this role come from?" + /// + /// - Remark: Generated from `#/components/schemas/organization-role/source`. + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + case Organization = "Organization" + case Enterprise = "Enterprise" + case Predefined = "Predefined" + } + /// Source answers the question, "where did this role come from?" + /// + /// - Remark: Generated from `#/components/schemas/organization-role/source`. + public var source: Components.Schemas.organization_hyphen_role.sourcePayload? /// A list of permissions included in this role. /// /// - Remark: Generated from `#/components/schemas/organization-role/permissions`. @@ -6468,6 +6494,8 @@ public enum Components { /// - id: The unique identifier of the role. /// - name: The name of the role. /// - description: A short description about who this role is for or what permissions it grants. + /// - base_role: The system role from which this role inherits permissions. + /// - source: Source answers the question, "where did this role come from?" /// - permissions: A list of permissions included in this role. /// - organization: /// - created_at: The date and time the role was created. @@ -6476,6 +6504,8 @@ public enum Components { id: Swift.Int64, name: Swift.String, description: Swift.String? = nil, + base_role: Components.Schemas.organization_hyphen_role.base_rolePayload? = nil, + source: Components.Schemas.organization_hyphen_role.sourcePayload? = nil, permissions: [Swift.String], organization: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, created_at: Foundation.Date, @@ -6484,6 +6514,8 @@ public enum Components { self.id = id self.name = name self.description = description + self.base_role = base_role + self.source = source self.permissions = permissions self.organization = organization self.created_at = created_at @@ -6493,6 +6525,8 @@ public enum Components { case id case name case description + case base_role + case source case permissions case organization case created_at @@ -6503,6 +6537,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team-role-assignment`. public struct team_hyphen_role_hyphen_assignment: Codable, Hashable, Sendable { + /// Determines if the team has a direct, indirect, or mixed relationship to a role + /// + /// - Remark: Generated from `#/components/schemas/team-role-assignment/assignment`. + @frozen public enum assignmentPayload: String, Codable, Hashable, Sendable { + case direct = "direct" + case indirect = "indirect" + case mixed = "mixed" + } + /// Determines if the team has a direct, indirect, or mixed relationship to a role + /// + /// - Remark: Generated from `#/components/schemas/team-role-assignment/assignment`. + public var assignment: Components.Schemas.team_hyphen_role_hyphen_assignment.assignmentPayload? /// - Remark: Generated from `#/components/schemas/team-role-assignment/id`. public var id: Swift.Int /// - Remark: Generated from `#/components/schemas/team-role-assignment/node_id`. @@ -6575,6 +6621,7 @@ public enum Components { /// Creates a new `team_hyphen_role_hyphen_assignment`. /// /// - Parameters: + /// - assignment: Determines if the team has a direct, indirect, or mixed relationship to a role /// - id: /// - node_id: /// - name: @@ -6590,6 +6637,7 @@ public enum Components { /// - repositories_url: /// - parent: public init( + assignment: Components.Schemas.team_hyphen_role_hyphen_assignment.assignmentPayload? = nil, id: Swift.Int, node_id: Swift.String, name: Swift.String, @@ -6605,6 +6653,7 @@ public enum Components { repositories_url: Swift.String, parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil ) { + self.assignment = assignment self.id = id self.node_id = node_id self.name = name @@ -6621,6 +6670,7 @@ public enum Components { self.parent = parent } public enum CodingKeys: String, CodingKey { + case assignment case id case node_id case name @@ -6748,6 +6798,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/user-role-assignment`. public struct user_hyphen_role_hyphen_assignment: Codable, Hashable, Sendable { + /// Determines if the user has a direct, indirect, or mixed relationship to a role + /// + /// - Remark: Generated from `#/components/schemas/user-role-assignment/assignment`. + @frozen public enum assignmentPayload: String, Codable, Hashable, Sendable { + case direct = "direct" + case indirect = "indirect" + case mixed = "mixed" + } + /// Determines if the user has a direct, indirect, or mixed relationship to a role + /// + /// - Remark: Generated from `#/components/schemas/user-role-assignment/assignment`. + public var assignment: Components.Schemas.user_hyphen_role_hyphen_assignment.assignmentPayload? + /// Team the user has gotten the role through + /// + /// - Remark: Generated from `#/components/schemas/user-role-assignment/inherited_from`. + public var inherited_from: [Components.Schemas.team_hyphen_simple]? /// - Remark: Generated from `#/components/schemas/user-role-assignment/name`. public var name: Swift.String? /// - Remark: Generated from `#/components/schemas/user-role-assignment/email`. @@ -6795,6 +6861,8 @@ public enum Components { /// Creates a new `user_hyphen_role_hyphen_assignment`. /// /// - Parameters: + /// - assignment: Determines if the user has a direct, indirect, or mixed relationship to a role + /// - inherited_from: Team the user has gotten the role through /// - name: /// - email: /// - login: @@ -6818,6 +6886,8 @@ public enum Components { /// - starred_at: /// - user_view_type: public init( + assignment: Components.Schemas.user_hyphen_role_hyphen_assignment.assignmentPayload? = nil, + inherited_from: [Components.Schemas.team_hyphen_simple]? = nil, name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, @@ -6841,6 +6911,8 @@ public enum Components { starred_at: Swift.String? = nil, user_view_type: Swift.String? = nil ) { + self.assignment = assignment + self.inherited_from = inherited_from self.name = name self.email = email self.login = login @@ -6865,6 +6937,8 @@ public enum Components { self.user_view_type = user_view_type } public enum CodingKeys: String, CodingKey { + case assignment + case inherited_from case name case email case login @@ -7293,6 +7367,17 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/custom-property/url`. public var url: Swift.String? + /// The source type of the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property/source_type`. + @frozen public enum source_typePayload: String, Codable, Hashable, Sendable { + case organization = "organization" + case enterprise = "enterprise" + } + /// The source type of the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property/source_type`. + public var source_type: Components.Schemas.custom_hyphen_property.source_typePayload? /// The type of the value for the property /// /// - Remark: Generated from `#/components/schemas/custom-property/value_type`. @@ -7376,6 +7461,7 @@ public enum Components { /// - Parameters: /// - property_name: The name of the property /// - url: The URL that can be used to fetch, update, or delete info about this property via the API. + /// - source_type: The source type of the property /// - value_type: The type of the value for the property /// - required: Whether the property is required. /// - default_value: Default value of the property @@ -7385,6 +7471,7 @@ public enum Components { public init( property_name: Swift.String, url: Swift.String? = nil, + source_type: Components.Schemas.custom_hyphen_property.source_typePayload? = nil, value_type: Components.Schemas.custom_hyphen_property.value_typePayload, required: Swift.Bool? = nil, default_value: Components.Schemas.custom_hyphen_property.default_valuePayload? = nil, @@ -7394,6 +7481,7 @@ public enum Components { ) { self.property_name = property_name self.url = url + self.source_type = source_type self.value_type = value_type self.required = required self.default_value = default_value @@ -7404,6 +7492,7 @@ public enum Components { public enum CodingKeys: String, CodingKey { case property_name case url + case source_type case value_type case required case default_value From 0417d5d3587a3daf4e4ae8fe31fb1cff529666cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 18 Nov 2024 22:28:34 +0000 Subject: [PATCH 097/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 8 +++++++- Sources/repos/Types.swift | 24 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 5dfc5c51512..b0d5dd01110 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -15145,7 +15145,13 @@ public struct Client: APIProtocol { } /// Get a release asset /// - /// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + /// To download the asset's binary content: + /// + /// - If within a browser, fetch the location specified in the `browser_download_url` key provided in the response. + /// - Alternatively, set the `Accept` header of the request to + /// [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// The API will either redirect the client to the location, or stream it directly if possible. + /// API clients should handle both a `200` or `302` response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/assets/{asset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/assets/{asset_id}/get(repos/get-release-asset)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index de7ef389530..58542d30b33 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -1634,7 +1634,13 @@ public protocol APIProtocol: Sendable { func repos_sol_create_hyphen_release(_ input: Operations.repos_sol_create_hyphen_release.Input) async throws -> Operations.repos_sol_create_hyphen_release.Output /// Get a release asset /// - /// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + /// To download the asset's binary content: + /// + /// - If within a browser, fetch the location specified in the `browser_download_url` key provided in the response. + /// - Alternatively, set the `Accept` header of the request to + /// [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// The API will either redirect the client to the location, or stream it directly if possible. + /// API clients should handle both a `200` or `302` response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/assets/{asset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/assets/{asset_id}/get(repos/get-release-asset)`. @@ -4996,7 +5002,13 @@ extension APIProtocol { } /// Get a release asset /// - /// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + /// To download the asset's binary content: + /// + /// - If within a browser, fetch the location specified in the `browser_download_url` key provided in the response. + /// - Alternatively, set the `Accept` header of the request to + /// [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// The API will either redirect the client to the location, or stream it directly if possible. + /// API clients should handle both a `200` or `302` response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/assets/{asset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/assets/{asset_id}/get(repos/get-release-asset)`. @@ -54477,7 +54489,13 @@ public enum Operations { } /// Get a release asset /// - /// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + /// To download the asset's binary content: + /// + /// - If within a browser, fetch the location specified in the `browser_download_url` key provided in the response. + /// - Alternatively, set the `Accept` header of the request to + /// [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// The API will either redirect the client to the location, or stream it directly if possible. + /// API clients should handle both a `200` or `302` response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/assets/{asset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/assets/{asset_id}/get(repos/get-release-asset)`. From 502d88349050b36cdfceba10b2242d83ca29a194 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 18 Nov 2024 22:29:16 +0000 Subject: [PATCH 098/129] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Types.swift | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 87ebbd97553..01039b04b1f 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -1050,6 +1050,16 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/push_protection_bypassed_at`. public var push_protection_bypassed_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/push_protection_bypass_request_reviewer`. + public var push_protection_bypass_request_reviewer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + /// An optional comment when requesting a push protection bypass. + /// + /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/push_protection_bypass_request_comment`. + public var push_protection_bypass_request_comment: Swift.String? + /// The URL to a push protection bypass request. + /// + /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/push_protection_bypass_request_html_url`. + public var push_protection_bypass_request_html_url: Swift.String? /// The comment that was optionally added when this alert was closed /// /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/resolution_comment`. @@ -1094,6 +1104,9 @@ public enum Components { /// - push_protection_bypassed: Whether push protection was bypassed for the detected secret. /// - push_protection_bypassed_by: /// - push_protection_bypassed_at: The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - push_protection_bypass_request_reviewer: + /// - push_protection_bypass_request_comment: An optional comment when requesting a push protection bypass. + /// - push_protection_bypass_request_html_url: The URL to a push protection bypass request. /// - resolution_comment: The comment that was optionally added when this alert was closed /// - validity: The token status as of the latest validity check. /// - publicly_leaked: Whether the secret was publicly leaked. @@ -1116,6 +1129,9 @@ public enum Components { push_protection_bypassed: Swift.Bool? = nil, push_protection_bypassed_by: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, push_protection_bypassed_at: Foundation.Date? = nil, + push_protection_bypass_request_reviewer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + push_protection_bypass_request_comment: Swift.String? = nil, + push_protection_bypass_request_html_url: Swift.String? = nil, resolution_comment: Swift.String? = nil, validity: Components.Schemas.organization_hyphen_secret_hyphen_scanning_hyphen_alert.validityPayload? = nil, publicly_leaked: Swift.Bool? = nil, @@ -1138,6 +1154,9 @@ public enum Components { self.push_protection_bypassed = push_protection_bypassed self.push_protection_bypassed_by = push_protection_bypassed_by self.push_protection_bypassed_at = push_protection_bypassed_at + self.push_protection_bypass_request_reviewer = push_protection_bypass_request_reviewer + self.push_protection_bypass_request_comment = push_protection_bypass_request_comment + self.push_protection_bypass_request_html_url = push_protection_bypass_request_html_url self.resolution_comment = resolution_comment self.validity = validity self.publicly_leaked = publicly_leaked @@ -1161,6 +1180,9 @@ public enum Components { case push_protection_bypassed case push_protection_bypassed_by case push_protection_bypassed_at + case push_protection_bypass_request_reviewer + case push_protection_bypass_request_comment + case push_protection_bypass_request_html_url case resolution_comment case validity case publicly_leaked @@ -1224,6 +1246,16 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/push_protection_bypassed_at`. public var push_protection_bypassed_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/push_protection_bypass_request_reviewer`. + public var push_protection_bypass_request_reviewer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + /// An optional comment when requesting a push protection bypass. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/push_protection_bypass_request_comment`. + public var push_protection_bypass_request_comment: Swift.String? + /// The URL to a push protection bypass request. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/push_protection_bypass_request_html_url`. + public var push_protection_bypass_request_html_url: Swift.String? /// The token status as of the latest validity check. /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/validity`. @@ -1264,6 +1296,9 @@ public enum Components { /// - push_protection_bypassed: Whether push protection was bypassed for the detected secret. /// - push_protection_bypassed_by: /// - push_protection_bypassed_at: The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - push_protection_bypass_request_reviewer: + /// - push_protection_bypass_request_comment: An optional comment when requesting a push protection bypass. + /// - push_protection_bypass_request_html_url: The URL to a push protection bypass request. /// - validity: The token status as of the latest validity check. /// - publicly_leaked: Whether the detected secret was publicly leaked. /// - multi_repo: Whether the detected secret was found in multiple repositories under the same organization or enterprise. @@ -1285,6 +1320,9 @@ public enum Components { push_protection_bypassed: Swift.Bool? = nil, push_protection_bypassed_by: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, push_protection_bypassed_at: Foundation.Date? = nil, + push_protection_bypass_request_reviewer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + push_protection_bypass_request_comment: Swift.String? = nil, + push_protection_bypass_request_html_url: Swift.String? = nil, validity: Components.Schemas.secret_hyphen_scanning_hyphen_alert.validityPayload? = nil, publicly_leaked: Swift.Bool? = nil, multi_repo: Swift.Bool? = nil @@ -1306,6 +1344,9 @@ public enum Components { self.push_protection_bypassed = push_protection_bypassed self.push_protection_bypassed_by = push_protection_bypassed_by self.push_protection_bypassed_at = push_protection_bypassed_at + self.push_protection_bypass_request_reviewer = push_protection_bypass_request_reviewer + self.push_protection_bypass_request_comment = push_protection_bypass_request_comment + self.push_protection_bypass_request_html_url = push_protection_bypass_request_html_url self.validity = validity self.publicly_leaked = publicly_leaked self.multi_repo = multi_repo @@ -1328,6 +1369,9 @@ public enum Components { case push_protection_bypassed case push_protection_bypassed_by case push_protection_bypassed_at + case push_protection_bypass_request_reviewer + case push_protection_bypass_request_comment + case push_protection_bypass_request_html_url case validity case publicly_leaked case multi_repo From e7bad65dfd15876ea6d46df3605ab117ff5d8ea1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:22:14 +0000 Subject: [PATCH 099/129] Bump Submodule/github/rest-api-description from `a0508ce` to `b2ff88e` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `a0508ce` to `b2ff88e`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/a0508cecd18ab26b525527e4ba35bd9c6d725c4f...b2ff88e4eaa64e465b9b210369bfd701e48edd9a) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index a0508cecd18..b2ff88e4eaa 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit a0508cecd18ab26b525527e4ba35bd9c6d725c4f +Subproject commit b2ff88e4eaa64e465b9b210369bfd701e48edd9a From b4af49df12948e95f968204bd88573b506470288 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 25 Nov 2024 21:43:00 +0000 Subject: [PATCH 100/129] Commit via running ake Sources/billing --- Sources/billing/Client.swift | 191 ++++++++++ Sources/billing/Types.swift | 687 ++++++++++++++++++++++++++++++++++- 2 files changed, 877 insertions(+), 1 deletion(-) diff --git a/Sources/billing/Client.swift b/Sources/billing/Client.swift index 73aa1fdf2c1..ca1a2b7197c 100644 --- a/Sources/billing/Client.swift +++ b/Sources/billing/Client.swift @@ -38,6 +38,197 @@ public struct Client: APIProtocol { private var converter: Converter { client.converter } + /// Get billing usage report for an organization + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. + /// + /// **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." + /// + /// - Remark: HTTP `GET /organizations/{org}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)`. + public func billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org(_ input: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input) async throws -> Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/organizations/{}/settings/billing/usage", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "year", + value: input.query.year + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "month", + value: input.query.month + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "day", + value: input.query.day + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "hour", + value: input.query.hour + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.billing_usage_report_org.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.billing_hyphen_usage_hyphen_report.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.bad_request.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json", + "application/scim+json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + case "application/scim+json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.scim_hyphen_error.self, + from: responseBody, + transforming: { value in + .application_scim_plus_json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.service_unavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Responses.service_unavailable.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Get GitHub Actions billing for an organization /// /// Gets the summary of the free and paid GitHub Actions minutes used. diff --git a/Sources/billing/Types.swift b/Sources/billing/Types.swift index 9d26a792521..6ad744b92e7 100644 --- a/Sources/billing/Types.swift +++ b/Sources/billing/Types.swift @@ -11,6 +11,15 @@ import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. public protocol APIProtocol: Sendable { + /// Get billing usage report for an organization + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. + /// + /// **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." + /// + /// - Remark: HTTP `GET /organizations/{org}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)`. + func billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org(_ input: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input) async throws -> Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Output /// Get GitHub Actions billing for an organization /// /// Gets the summary of the free and paid GitHub Actions minutes used. @@ -81,6 +90,25 @@ public protocol APIProtocol: Sendable { /// Convenience overloads for operation inputs. extension APIProtocol { + /// Get billing usage report for an organization + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. + /// + /// **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." + /// + /// - Remark: HTTP `GET /organizations/{org}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)`. + public func billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org( + path: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Path, + query: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Query = .init(), + headers: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Headers = .init() + ) async throws -> Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Output { + try await billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org(Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input( + path: path, + query: query, + headers: headers + )) + } /// Get GitHub Actions billing for an organization /// /// Gets the summary of the free and paid GitHub Actions minutes used. @@ -211,6 +239,208 @@ public enum Servers { public enum Components { /// Types generated from the `#/components/schemas` section of the OpenAPI document. public enum Schemas { + /// Basic Error + /// + /// - Remark: Generated from `#/components/schemas/basic-error`. + public struct basic_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/basic-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/url`. + public var url: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/status`. + public var status: Swift.String? + /// Creates a new `basic_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - url: + /// - status: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + url: Swift.String? = nil, + status: Swift.String? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.url = url + self.status = status + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case url + case status + } + } + /// Scim Error + /// + /// - Remark: Generated from `#/components/schemas/scim-error`. + public struct scim_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/scim-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/detail`. + public var detail: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/status`. + public var status: Swift.Int? + /// - Remark: Generated from `#/components/schemas/scim-error/scimType`. + public var scimType: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/schemas`. + public var schemas: [Swift.String]? + /// Creates a new `scim_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - detail: + /// - status: + /// - scimType: + /// - schemas: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + detail: Swift.String? = nil, + status: Swift.Int? = nil, + scimType: Swift.String? = nil, + schemas: [Swift.String]? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.detail = detail + self.status = status + self.scimType = scimType + self.schemas = schemas + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case detail + case status + case scimType + case schemas + } + } + /// - Remark: Generated from `#/components/schemas/billing-usage-report`. + public struct billing_hyphen_usage_hyphen_report: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload`. + public struct usageItemsPayloadPayload: Codable, Hashable, Sendable { + /// Date of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/date`. + public var date: Swift.String + /// Product name. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/product`. + public var product: Swift.String + /// SKU name. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/sku`. + public var sku: Swift.String + /// Quantity of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/quantity`. + public var quantity: Swift.Int + /// Unit type of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/unitType`. + public var unitType: Swift.String + /// Price per unit of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/pricePerUnit`. + public var pricePerUnit: Swift.Double + /// Gross amount of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/grossAmount`. + public var grossAmount: Swift.Double + /// Discount amount of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/discountAmount`. + public var discountAmount: Swift.Double + /// Net amount of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/netAmount`. + public var netAmount: Swift.Double + /// Name of the organization. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/organizationName`. + public var organizationName: Swift.String + /// Name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItemsPayload/repositoryName`. + public var repositoryName: Swift.String? + /// Creates a new `usageItemsPayloadPayload`. + /// + /// - Parameters: + /// - date: Date of the usage line item. + /// - product: Product name. + /// - sku: SKU name. + /// - quantity: Quantity of the usage line item. + /// - unitType: Unit type of the usage line item. + /// - pricePerUnit: Price per unit of the usage line item. + /// - grossAmount: Gross amount of the usage line item. + /// - discountAmount: Discount amount of the usage line item. + /// - netAmount: Net amount of the usage line item. + /// - organizationName: Name of the organization. + /// - repositoryName: Name of the repository. + public init( + date: Swift.String, + product: Swift.String, + sku: Swift.String, + quantity: Swift.Int, + unitType: Swift.String, + pricePerUnit: Swift.Double, + grossAmount: Swift.Double, + discountAmount: Swift.Double, + netAmount: Swift.Double, + organizationName: Swift.String, + repositoryName: Swift.String? = nil + ) { + self.date = date + self.product = product + self.sku = sku + self.quantity = quantity + self.unitType = unitType + self.pricePerUnit = pricePerUnit + self.grossAmount = grossAmount + self.discountAmount = discountAmount + self.netAmount = netAmount + self.organizationName = organizationName + self.repositoryName = repositoryName + } + public enum CodingKeys: String, CodingKey { + case date + case product + case sku + case quantity + case unitType + case pricePerUnit + case grossAmount + case discountAmount + case netAmount + case organizationName + case repositoryName + } + } + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItems`. + public typealias usageItemsPayload = [Components.Schemas.billing_hyphen_usage_hyphen_report.usageItemsPayloadPayload] + /// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItems`. + public var usageItems: Components.Schemas.billing_hyphen_usage_hyphen_report.usageItemsPayload? + /// Creates a new `billing_hyphen_usage_hyphen_report`. + /// + /// - Parameters: + /// - usageItems: + public init(usageItems: Components.Schemas.billing_hyphen_usage_hyphen_report.usageItemsPayload? = nil) { + self.usageItems = usageItems + } + public enum CodingKeys: String, CodingKey { + case usageItems + } + } /// - Remark: Generated from `#/components/schemas/actions-billing-usage`. public struct actions_hyphen_billing_hyphen_usage: Codable, Hashable, Sendable { /// The sum of the free and paid GitHub Actions minutes used. @@ -460,6 +690,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/org`. public typealias org = Swift.String + /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2024`. Default value is the current year. + /// + /// - Remark: Generated from `#/components/parameters/billing-usage-report-year`. + public typealias billing_hyphen_usage_hyphen_report_hyphen_year = Swift.Int + /// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. + /// + /// - Remark: Generated from `#/components/parameters/billing-usage-report-month`. + public typealias billing_hyphen_usage_hyphen_report_hyphen_month = Swift.Int + /// If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. + /// + /// - Remark: Generated from `#/components/parameters/billing-usage-report-day`. + public typealias billing_hyphen_usage_hyphen_report_hyphen_day = Swift.Int + /// If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. + /// + /// - Remark: Generated from `#/components/parameters/billing-usage-report-hour`. + public typealias billing_hyphen_usage_hyphen_report_hyphen_hour = Swift.Int /// The handle for the GitHub user account. /// /// - Remark: Generated from `#/components/parameters/username`. @@ -468,13 +714,452 @@ public enum Components { /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. public enum RequestBodies {} /// Types generated from the `#/components/responses` section of the OpenAPI document. - public enum Responses {} + public enum Responses { + public struct bad_request: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/bad_request/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/bad_request/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + default: + try throwUnexpectedResponseBody( + expectedContent: "application/json", + body: self + ) + } + } + } + /// - Remark: Generated from `#/components/responses/bad_request/content/application\/scim+json`. + case application_scim_plus_json(Components.Schemas.scim_hyphen_error) + /// The associated value of the enum case if `self` is `.application_scim_plus_json`. + /// + /// - Throws: An error if `self` is not `.application_scim_plus_json`. + /// - SeeAlso: `.application_scim_plus_json`. + public var application_scim_plus_json: Components.Schemas.scim_hyphen_error { + get throws { + switch self { + case let .application_scim_plus_json(body): + return body + default: + try throwUnexpectedResponseBody( + expectedContent: "application/scim+json", + body: self + ) + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.bad_request.Body + /// Creates a new `bad_request`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.bad_request.Body) { + self.body = body + } + } + public struct forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.forbidden.Body + /// Creates a new `forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.forbidden.Body) { + self.body = body + } + } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } + public struct service_unavailable: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/service_unavailable/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/service_unavailable/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/responses/service_unavailable/content/json/code`. + public var code: Swift.String? + /// - Remark: Generated from `#/components/responses/service_unavailable/content/json/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/responses/service_unavailable/content/json/documentation_url`. + public var documentation_url: Swift.String? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - code: + /// - message: + /// - documentation_url: + public init( + code: Swift.String? = nil, + message: Swift.String? = nil, + documentation_url: Swift.String? = nil + ) { + self.code = code + self.message = message + self.documentation_url = documentation_url + } + public enum CodingKeys: String, CodingKey { + case code + case message + case documentation_url + } + } + /// - Remark: Generated from `#/components/responses/service_unavailable/content/application\/json`. + case json(Components.Responses.service_unavailable.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Responses.service_unavailable.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.service_unavailable.Body + /// Creates a new `service_unavailable`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.service_unavailable.Body) { + self.body = body + } + } + public struct billing_usage_report_org: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/billing_usage_report_org/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/billing_usage_report_org/content/application\/json`. + case json(Components.Schemas.billing_hyphen_usage_hyphen_report) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.billing_hyphen_usage_hyphen_report { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.billing_usage_report_org.Body + /// Creates a new `billing_usage_report_org`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.billing_usage_report_org.Body) { + self.body = body + } + } + } /// Types generated from the `#/components/headers` section of the OpenAPI document. public enum Headers {} } /// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. public enum Operations { + /// Get billing usage report for an organization + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. + /// + /// **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." + /// + /// - Remark: HTTP `GET /organizations/{org}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)`. + public enum billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org { + public static let id: Swift.String = "billing/get-github-billing-usage-report-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/query`. + public struct Query: Sendable, Hashable { + /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2024`. Default value is the current year. + /// + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/query/year`. + public var year: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_year? + /// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. + /// + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/query/month`. + public var month: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_month? + /// If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. + /// + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/query/day`. + public var day: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_day? + /// If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. + /// + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/query/hour`. + public var hour: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_hour? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - year: If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2024`. Default value is the current year. + /// - month: If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. + /// - day: If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. + /// - hour: If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. + public init( + year: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_year? = nil, + month: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_month? = nil, + day: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_day? = nil, + hour: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_hour? = nil + ) { + self.year = year + self.month = month + self.day = day + self.hour = hour + } + } + public var query: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Query + /// - Remark: Generated from `#/paths/organizations/{org}/settings/billing/usage/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Path, + query: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Query = .init(), + headers: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_org.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + /// Billing usage report response for an organization + /// + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Components.Responses.billing_usage_report_org) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Components.Responses.billing_usage_report_org { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Components.Responses.bad_request) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Components.Responses.bad_request { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Components.Responses.service_unavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Components.Responses.service_unavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case application_scim_plus_json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "application/scim+json": + self = .application_scim_plus_json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .application_scim_plus_json: + return "application/scim+json" + } + } + public static var allCases: [Self] { + [ + .json, + .application_scim_plus_json + ] + } + } + } /// Get GitHub Actions billing for an organization /// /// Gets the summary of the free and paid GitHub Actions minutes used. From 78d46a53435e839668cb5af9bec95eb5a57f069c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 25 Nov 2024 21:49:01 +0000 Subject: [PATCH 101/129] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 112 +++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index b08c0168328..155bfea1c20 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -7672,11 +7672,11 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/api-insights-actor-id`. public typealias api_hyphen_insights_hyphen_actor_hyphen_id = Swift.Int - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/components/parameters/api-insights-min-timestamp`. public typealias api_hyphen_insights_hyphen_min_hyphen_timestamp = Swift.String - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/components/parameters/api-insights-max-timestamp`. public typealias api_hyphen_insights_hyphen_max_hyphen_timestamp = Swift.String @@ -12394,14 +12394,14 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// The page number of the results to fetch. 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/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/page`. @@ -12437,15 +12437,15 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// - page: The page number of the results to fetch. 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)." /// - per_page: The number of results per page (max 100). 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. /// - sort: The property to sort the results by. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, direction: Components.Parameters.direction? = nil, @@ -12597,14 +12597,14 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// The page number of the results to fetch. 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/orgs/{org}/insights/api/subject-stats/GET/query/page`. @@ -12639,15 +12639,15 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// - page: The page number of the results to fetch. 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)." /// - per_page: The number of results per page (max 100). 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. /// - sort: The property to sort the results by. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, direction: Components.Parameters.direction? = nil, @@ -12799,22 +12799,22 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil ) { self.min_timestamp = min_timestamp self.max_timestamp = max_timestamp @@ -12967,22 +12967,22 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_user.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/users/{user_id}/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil ) { self.min_timestamp = min_timestamp self.max_timestamp = max_timestamp @@ -13150,22 +13150,22 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_summary_hyphen_stats_hyphen_by_hyphen_actor.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil ) { self.min_timestamp = min_timestamp self.max_timestamp = max_timestamp @@ -13309,14 +13309,14 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/GET/query/timestamp_increment`. @@ -13324,12 +13324,12 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// - timestamp_increment: The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment ) { self.min_timestamp = min_timestamp @@ -13484,14 +13484,14 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_user.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/users/{user_id}/GET/query/timestamp_increment`. @@ -13499,12 +13499,12 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// - timestamp_increment: The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment ) { self.min_timestamp = min_timestamp @@ -13674,14 +13674,14 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_time_hyphen_stats_hyphen_by_hyphen_actor.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/query/timestamp_increment`. @@ -13689,12 +13689,12 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// - timestamp_increment: The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, timestamp_increment: Components.Parameters.api_hyphen_insights_hyphen_timestamp_hyphen_increment ) { self.min_timestamp = min_timestamp @@ -13849,14 +13849,14 @@ public enum Operations { public var path: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query`. public struct Query: Sendable, Hashable { - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/min_timestamp`. public var min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/max_timestamp`. - public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp + public var max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? /// The page number of the results to fetch. 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/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/page`. @@ -13891,15 +13891,15 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - min_timestamp: The minimum timestamp to query for stats - /// - max_timestamp: The maximum timestamp to query for stats + /// - min_timestamp: The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - max_timestamp: The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. /// - page: The page number of the results to fetch. 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)." /// - per_page: The number of results per page (max 100). 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. /// - sort: The property to sort the results by. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, - max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp, + max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, direction: Components.Parameters.direction? = nil, From c14fd6710f96c4c75394857908ac80ab01d30e2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 25 Nov 2024 21:53:18 +0000 Subject: [PATCH 102/129] Commit via running ake Sources/copilot --- Sources/copilot/Types.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 89c00e39ebf..772b9ff8fea 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -1637,7 +1637,7 @@ public enum Components { public var total_engaged_users: Swift.Int? /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload`. public struct modelsPayloadPayload: Codable, Hashable, Sendable { - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// /// - Remark: Generated from `#/components/schemas/copilot-ide-code-completions/editorsPayload/modelsPayload/name`. public var name: Swift.String? @@ -1725,7 +1725,7 @@ public enum Components { /// Creates a new `modelsPayloadPayload`. /// /// - Parameters: - /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - name: Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// - is_custom_model: Indicates whether a model is custom or default. /// - custom_model_training_date: The training date for the custom model. /// - total_engaged_users: Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. @@ -1909,7 +1909,7 @@ public enum Components { public var total_engaged_users: Swift.Int? /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload`. public struct modelsPayloadPayload: Codable, Hashable, Sendable { - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// /// - Remark: Generated from `#/components/schemas/copilot-ide-chat/editorsPayload/modelsPayload/name`. public var name: Swift.String? @@ -1940,7 +1940,7 @@ public enum Components { /// Creates a new `modelsPayloadPayload`. /// /// - Parameters: - /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - name: Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// - is_custom_model: Indicates whether a model is custom or default. /// - custom_model_training_date: The training date for the custom model. /// - total_engaged_users: The number of users who prompted Copilot Chat in the given editor and model. @@ -2066,7 +2066,7 @@ public enum Components { public var total_engaged_users: Swift.Int? /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload`. public struct modelsPayloadPayload: Codable, Hashable, Sendable { - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// /// - Remark: Generated from `#/components/schemas/copilot-dotcom-chat/modelsPayload/name`. public var name: Swift.String? @@ -2089,7 +2089,7 @@ public enum Components { /// Creates a new `modelsPayloadPayload`. /// /// - Parameters: - /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - name: Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// - is_custom_model: Indicates whether a model is custom or default. /// - custom_model_training_date: The training date for the custom model (if applicable). /// - total_engaged_users: Total number of users who prompted Copilot Chat on github.com at least once for each model. @@ -2192,7 +2192,7 @@ public enum Components { public var total_engaged_users: Swift.Int? /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload`. public struct modelsPayloadPayload: Codable, Hashable, Sendable { - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// /// - Remark: Generated from `#/components/schemas/copilot-dotcom-pull-requests/repositoriesPayload/modelsPayload/name`. public var name: Swift.String? @@ -2215,7 +2215,7 @@ public enum Components { /// Creates a new `modelsPayloadPayload`. /// /// - Parameters: - /// - name: Name of the language used for Copilot code completion suggestions, for the given editor. + /// - name: Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. /// - is_custom_model: Indicates whether a model is custom or default. /// - custom_model_training_date: The training date for the custom model. /// - total_pr_summaries_created: The number of pull request summaries generated using Copilot for Pull Requests in the given repository. From efcb3d116d69fa453011266a30ab90aadc91a7c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:22:52 +0000 Subject: [PATCH 103/129] Bump Submodule/github/rest-api-description from `b2ff88e` to `7fad85e` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `b2ff88e` to `7fad85e`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/b2ff88e4eaa64e465b9b210369bfd701e48edd9a...7fad85efbb1da5a0f026a9d53e4e10d862de30fd) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index b2ff88e4eaa..7fad85efbb1 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit b2ff88e4eaa64e465b9b210369bfd701e48edd9a +Subproject commit 7fad85efbb1da5a0f026a9d53e4e10d862de30fd From 2f90a5190e511dfcfdfe89fb8c997f24b04a16ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:41:29 +0000 Subject: [PATCH 104/129] Commit via running ake Sources/actions --- Sources/actions/Client.swift | 4 +++- Sources/actions/Types.swift | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Sources/actions/Client.swift b/Sources/actions/Client.swift index 904b4653304..de84842651e 100644 --- a/Sources/actions/Client.swift +++ b/Sources/actions/Client.swift @@ -6723,7 +6723,7 @@ public struct Client: APIProtocol { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// - /// This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runs/get(actions/list-workflow-runs-for-repo)`. @@ -9384,6 +9384,8 @@ public struct Client: APIProtocol { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs/get(actions/list-workflow-runs)`. public func actions_sol_list_hyphen_workflow_hyphen_runs(_ input: Operations.actions_sol_list_hyphen_workflow_hyphen_runs.Input) async throws -> Operations.actions_sol_list_hyphen_workflow_hyphen_runs.Output { diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 220613fe563..f07fda0212c 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -997,7 +997,7 @@ public protocol APIProtocol: Sendable { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// - /// This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runs/get(actions/list-workflow-runs-for-repo)`. @@ -1376,6 +1376,8 @@ public protocol APIProtocol: Sendable { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs/get(actions/list-workflow-runs)`. func actions_sol_list_hyphen_workflow_hyphen_runs(_ input: Operations.actions_sol_list_hyphen_workflow_hyphen_runs.Input) async throws -> Operations.actions_sol_list_hyphen_workflow_hyphen_runs.Output @@ -3163,7 +3165,7 @@ extension APIProtocol { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// - /// This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runs/get(actions/list-workflow-runs-for-repo)`. @@ -3808,6 +3810,8 @@ extension APIProtocol { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs/get(actions/list-workflow-runs)`. public func actions_sol_list_hyphen_workflow_hyphen_runs( @@ -23442,7 +23446,7 @@ public enum Operations { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// - /// This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runs/get(actions/list-workflow-runs-for-repo)`. @@ -29355,6 +29359,8 @@ public enum Operations { /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// + /// This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs/get(actions/list-workflow-runs)`. public enum actions_sol_list_hyphen_workflow_hyphen_runs { From fa19b87dc46d1ac606cb6a440453103bc1b45a22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:41:50 +0000 Subject: [PATCH 105/129] Commit via running ake Sources/activity --- Sources/activity/Types.swift | 37 +++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 2b16781dd87..1452bab8ffc 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -2611,6 +2611,35 @@ public enum Components { case rocket } } + /// - Remark: Generated from `#/components/schemas/sub-issues-summary`. + public struct sub_hyphen_issues_hyphen_summary: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/total`. + public var total: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/completed`. + public var completed: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/percent_completed`. + public var percent_completed: Swift.Int + /// Creates a new `sub_hyphen_issues_hyphen_summary`. + /// + /// - Parameters: + /// - total: + /// - completed: + /// - percent_completed: + public init( + total: Swift.Int, + completed: Swift.Int, + percent_completed: Swift.Int + ) { + self.total = total + self.completed = completed + self.percent_completed = percent_completed + } + public enum CodingKeys: String, CodingKey { + case total + case completed + case percent_completed + } + } /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. /// /// - Remark: Generated from `#/components/schemas/issue`. @@ -2838,6 +2867,8 @@ public enum Components { public var author_association: Components.Schemas.author_hyphen_association /// - Remark: Generated from `#/components/schemas/issue/reactions`. public var reactions: Components.Schemas.reaction_hyphen_rollup? + /// - Remark: Generated from `#/components/schemas/issue/sub_issues_summary`. + public var sub_issues_summary: Components.Schemas.sub_hyphen_issues_hyphen_summary? /// Creates a new `issue`. /// /// - Parameters: @@ -2875,6 +2906,7 @@ public enum Components { /// - performed_via_github_app: /// - author_association: /// - reactions: + /// - sub_issues_summary: public init( id: Swift.Int64, node_id: Swift.String, @@ -2909,7 +2941,8 @@ public enum Components { repository: Components.Schemas.repository? = nil, performed_via_github_app: Components.Schemas.nullable_hyphen_integration? = nil, author_association: Components.Schemas.author_hyphen_association, - reactions: Components.Schemas.reaction_hyphen_rollup? = nil + reactions: Components.Schemas.reaction_hyphen_rollup? = nil, + sub_issues_summary: Components.Schemas.sub_hyphen_issues_hyphen_summary? = nil ) { self.id = id self.node_id = node_id @@ -2945,6 +2978,7 @@ public enum Components { self.performed_via_github_app = performed_via_github_app self.author_association = author_association self.reactions = reactions + self.sub_issues_summary = sub_issues_summary } public enum CodingKeys: String, CodingKey { case id @@ -2981,6 +3015,7 @@ public enum Components { case performed_via_github_app case author_association case reactions + case sub_issues_summary } } /// Comments provide a way for people to collaborate on an issue. From 4191f5c5f2ca3fcfefcafb80c252ad45f60e31c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:45:22 +0000 Subject: [PATCH 106/129] Commit via running ake Sources/git --- Sources/git/Types.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Sources/git/Types.swift b/Sources/git/Types.swift index 384a2f3264b..c207282632c 100644 --- a/Sources/git/Types.swift +++ b/Sources/git/Types.swift @@ -787,6 +787,8 @@ public enum Components { public var payload: Swift.String? /// - Remark: Generated from `#/components/schemas/verification/signature`. public var signature: Swift.String? + /// - Remark: Generated from `#/components/schemas/verification/verified_at`. + public var verified_at: Swift.String? /// Creates a new `verification`. /// /// - Parameters: @@ -794,22 +796,26 @@ public enum Components { /// - reason: /// - payload: /// - signature: + /// - verified_at: public init( verified: Swift.Bool, reason: Swift.String, payload: Swift.String? = nil, - signature: Swift.String? = nil + signature: Swift.String? = nil, + verified_at: Swift.String? = nil ) { self.verified = verified self.reason = reason self.payload = payload self.signature = signature + self.verified_at = verified_at } public enum CodingKeys: String, CodingKey { case verified case reason case payload case signature + case verified_at } } /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. @@ -1158,6 +1164,8 @@ public enum Components { public var signature: Swift.String? /// - Remark: Generated from `#/components/schemas/git-commit/verification/payload`. public var payload: Swift.String? + /// - Remark: Generated from `#/components/schemas/git-commit/verification/verified_at`. + public var verified_at: Swift.String? /// Creates a new `verificationPayload`. /// /// - Parameters: @@ -1165,22 +1173,26 @@ public enum Components { /// - reason: /// - signature: /// - payload: + /// - verified_at: public init( verified: Swift.Bool, reason: Swift.String, signature: Swift.String? = nil, - payload: Swift.String? = nil + payload: Swift.String? = nil, + verified_at: Swift.String? = nil ) { self.verified = verified self.reason = reason self.signature = signature self.payload = payload + self.verified_at = verified_at } public enum CodingKeys: String, CodingKey { case verified case reason case signature case payload + case verified_at } } /// - Remark: Generated from `#/components/schemas/git-commit/verification`. From 202ad53293b1a8f36b79123e25a20df0c7dd1452 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:46:04 +0000 Subject: [PATCH 107/129] Commit via running ake Sources/issues --- Sources/issues/Client.swift | 628 ++++++++++++++++ Sources/issues/Types.swift | 1350 ++++++++++++++++++++++++++++++++++- 2 files changed, 1975 insertions(+), 3 deletions(-) diff --git a/Sources/issues/Client.swift b/Sources/issues/Client.swift index 9b6e5a7eb50..a23c6c803f2 100644 --- a/Sources/issues/Client.swift +++ b/Sources/issues/Client.swift @@ -3692,6 +3692,634 @@ public struct Client: APIProtocol { } ) } + /// Remove sub-issue + /// + /// You can use the REST API to remove a sub-issue from an issue. + /// Removing content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issue/delete(issues/remove-sub-issue)`. + public func issues_sol_remove_hyphen_sub_hyphen_issue(_ input: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input) async throws -> Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output { + try await client.send( + input: input, + forOperation: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/issues/{}/sub_issue", + parameters: [ + input.path.owner, + input.path.repo, + input.path.issue_number + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let headers: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok.Headers = .init(Location: try converter.getOptionalHeaderFieldAsURI( + in: response.headerFields, + name: "Location", + as: Swift.String.self + )) + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.issue.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init( + headers: headers, + body: body + )) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.bad_request.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json", + "application/scim+json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + case "application/scim+json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.scim_hyphen_error.self, + from: responseBody, + transforming: { value in + .application_scim_plus_json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// List sub-issues + /// + /// You can use the REST API to list the sub-issues on an issue. + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/get(issues/list-sub-issues)`. + public func issues_sol_list_hyphen_sub_hyphen_issues(_ input: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input) async throws -> Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output { + try await client.send( + input: input, + forOperation: Operations.issues_sol_list_hyphen_sub_hyphen_issues.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/issues/{}/sub_issues", + parameters: [ + input.path.owner, + input.path.repo, + input.path.issue_number + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let headers: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok.Headers = .init(Link: try converter.getOptionalHeaderFieldAsURI( + in: response.headerFields, + name: "Link", + as: Components.Headers.link.self + )) + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.issue].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init( + headers: headers, + body: body + )) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 410: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.gone.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .gone(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Add sub-issue + /// + /// You can use the REST API to add sub-issues to issues. + /// + /// Creating content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)`. + public func issues_sol_add_hyphen_sub_hyphen_issue(_ input: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input) async throws -> Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output { + try await client.send( + input: input, + forOperation: Operations.issues_sol_add_hyphen_sub_hyphen_issue.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/issues/{}/sub_issues", + parameters: [ + input.path.owner, + input.path.repo, + input.path.issue_number + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let headers: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created.Headers = .init(Location: try converter.getOptionalHeaderFieldAsURI( + in: response.headerFields, + name: "Location", + as: Swift.String.self + )) + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.issue.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init( + headers: headers, + body: body + )) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 410: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.gone.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .gone(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.validation_failed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.validation_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Reprioritize sub-issue + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// + /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)`. + public func issues_sol_reprioritize_hyphen_sub_hyphen_issue(_ input: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input) async throws -> Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output { + try await client.send( + input: input, + forOperation: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/issues/{}/sub_issues/priority", + parameters: [ + input.path.owner, + input.path.repo, + input.path.issue_number + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .patch + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.issue.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.validation_failed_simple.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.validation_hyphen_error_hyphen_simple.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.service_unavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Responses.service_unavailable.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// List timeline events for an issue /// /// List all timeline events for an issue. diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index e109cb7ae36..d3005309ce4 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -318,6 +318,60 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/lock/delete(issues/unlock)`. func issues_sol_unlock(_ input: Operations.issues_sol_unlock.Input) async throws -> Operations.issues_sol_unlock.Output + /// Remove sub-issue + /// + /// You can use the REST API to remove a sub-issue from an issue. + /// Removing content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issue/delete(issues/remove-sub-issue)`. + func issues_sol_remove_hyphen_sub_hyphen_issue(_ input: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input) async throws -> Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output + /// List sub-issues + /// + /// You can use the REST API to list the sub-issues on an issue. + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/get(issues/list-sub-issues)`. + func issues_sol_list_hyphen_sub_hyphen_issues(_ input: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input) async throws -> Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output + /// Add sub-issue + /// + /// You can use the REST API to add sub-issues to issues. + /// + /// Creating content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)`. + func issues_sol_add_hyphen_sub_hyphen_issue(_ input: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input) async throws -> Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output + /// Reprioritize sub-issue + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// + /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)`. + func issues_sol_reprioritize_hyphen_sub_hyphen_issue(_ input: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input) async throws -> Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output /// List timeline events for an issue /// /// List all timeline events for an issue. @@ -974,6 +1028,100 @@ extension APIProtocol { headers: headers )) } + /// Remove sub-issue + /// + /// You can use the REST API to remove a sub-issue from an issue. + /// Removing content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issue/delete(issues/remove-sub-issue)`. + public func issues_sol_remove_hyphen_sub_hyphen_issue( + path: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Path, + headers: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Headers = .init(), + body: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Body + ) async throws -> Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output { + try await issues_sol_remove_hyphen_sub_hyphen_issue(Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input( + path: path, + headers: headers, + body: body + )) + } + /// List sub-issues + /// + /// You can use the REST API to list the sub-issues on an issue. + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/get(issues/list-sub-issues)`. + public func issues_sol_list_hyphen_sub_hyphen_issues( + path: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Path, + query: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Query = .init(), + headers: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Headers = .init() + ) async throws -> Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output { + try await issues_sol_list_hyphen_sub_hyphen_issues(Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input( + path: path, + query: query, + headers: headers + )) + } + /// Add sub-issue + /// + /// You can use the REST API to add sub-issues to issues. + /// + /// Creating content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)`. + public func issues_sol_add_hyphen_sub_hyphen_issue( + path: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Path, + headers: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Headers = .init(), + body: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Body + ) async throws -> Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output { + try await issues_sol_add_hyphen_sub_hyphen_issue(Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input( + path: path, + headers: headers, + body: body + )) + } + /// Reprioritize sub-issue + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// + /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)`. + public func issues_sol_reprioritize_hyphen_sub_hyphen_issue( + path: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Path, + headers: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Headers = .init(), + body: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Body + ) async throws -> Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output { + try await issues_sol_reprioritize_hyphen_sub_hyphen_issue(Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input( + path: path, + headers: headers, + body: body + )) + } /// List timeline events for an issue /// /// List all timeline events for an issue. @@ -1387,6 +1535,37 @@ public enum Components { case status } } + /// Validation Error Simple + /// + /// - Remark: Generated from `#/components/schemas/validation-error-simple`. + public struct validation_hyphen_error_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/validation-error-simple/message`. + public var message: Swift.String + /// - Remark: Generated from `#/components/schemas/validation-error-simple/documentation_url`. + public var documentation_url: Swift.String + /// - Remark: Generated from `#/components/schemas/validation-error-simple/errors`. + public var errors: [Swift.String]? + /// Creates a new `validation_hyphen_error_hyphen_simple`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - errors: + public init( + message: Swift.String, + documentation_url: Swift.String, + errors: [Swift.String]? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.errors = errors + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case errors + } + } /// A GitHub user. /// /// - Remark: Generated from `#/components/schemas/nullable-simple-user`. @@ -3404,6 +3583,35 @@ public enum Components { case rocket } } + /// - Remark: Generated from `#/components/schemas/sub-issues-summary`. + public struct sub_hyphen_issues_hyphen_summary: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/total`. + public var total: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/completed`. + public var completed: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/percent_completed`. + public var percent_completed: Swift.Int + /// Creates a new `sub_hyphen_issues_hyphen_summary`. + /// + /// - Parameters: + /// - total: + /// - completed: + /// - percent_completed: + public init( + total: Swift.Int, + completed: Swift.Int, + percent_completed: Swift.Int + ) { + self.total = total + self.completed = completed + self.percent_completed = percent_completed + } + public enum CodingKeys: String, CodingKey { + case total + case completed + case percent_completed + } + } /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. /// /// - Remark: Generated from `#/components/schemas/issue`. @@ -3631,6 +3839,8 @@ public enum Components { public var author_association: Components.Schemas.author_hyphen_association /// - Remark: Generated from `#/components/schemas/issue/reactions`. public var reactions: Components.Schemas.reaction_hyphen_rollup? + /// - Remark: Generated from `#/components/schemas/issue/sub_issues_summary`. + public var sub_issues_summary: Components.Schemas.sub_hyphen_issues_hyphen_summary? /// Creates a new `issue`. /// /// - Parameters: @@ -3668,6 +3878,7 @@ public enum Components { /// - performed_via_github_app: /// - author_association: /// - reactions: + /// - sub_issues_summary: public init( id: Swift.Int64, node_id: Swift.String, @@ -3702,7 +3913,8 @@ public enum Components { repository: Components.Schemas.repository? = nil, performed_via_github_app: Components.Schemas.nullable_hyphen_integration? = nil, author_association: Components.Schemas.author_hyphen_association, - reactions: Components.Schemas.reaction_hyphen_rollup? = nil + reactions: Components.Schemas.reaction_hyphen_rollup? = nil, + sub_issues_summary: Components.Schemas.sub_hyphen_issues_hyphen_summary? = nil ) { self.id = id self.node_id = node_id @@ -3738,6 +3950,7 @@ public enum Components { self.performed_via_github_app = performed_via_github_app self.author_association = author_association self.reactions = reactions + self.sub_issues_summary = sub_issues_summary } public enum CodingKeys: String, CodingKey { case id @@ -3774,6 +3987,7 @@ public enum Components { case performed_via_github_app case author_association case reactions + case sub_issues_summary } } /// Comments provide a way for people to collaborate on an issue. @@ -4203,6 +4417,8 @@ public enum Components { public var author_association: Components.Schemas.author_hyphen_association /// - Remark: Generated from `#/components/schemas/nullable-issue/reactions`. public var reactions: Components.Schemas.reaction_hyphen_rollup? + /// - Remark: Generated from `#/components/schemas/nullable-issue/sub_issues_summary`. + public var sub_issues_summary: Components.Schemas.sub_hyphen_issues_hyphen_summary? /// Creates a new `nullable_hyphen_issue`. /// /// - Parameters: @@ -4240,6 +4456,7 @@ public enum Components { /// - performed_via_github_app: /// - author_association: /// - reactions: + /// - sub_issues_summary: public init( id: Swift.Int64, node_id: Swift.String, @@ -4274,7 +4491,8 @@ public enum Components { repository: Components.Schemas.repository? = nil, performed_via_github_app: Components.Schemas.nullable_hyphen_integration? = nil, author_association: Components.Schemas.author_hyphen_association, - reactions: Components.Schemas.reaction_hyphen_rollup? = nil + reactions: Components.Schemas.reaction_hyphen_rollup? = nil, + sub_issues_summary: Components.Schemas.sub_hyphen_issues_hyphen_summary? = nil ) { self.id = id self.node_id = node_id @@ -4310,6 +4528,7 @@ public enum Components { self.performed_via_github_app = performed_via_github_app self.author_association = author_association self.reactions = reactions + self.sub_issues_summary = sub_issues_summary } public enum CodingKeys: String, CodingKey { case id @@ -4346,6 +4565,7 @@ public enum Components { case performed_via_github_app case author_association case reactions + case sub_issues_summary } } /// Issue Event Label @@ -6720,6 +6940,8 @@ public enum Components { public var signature: Swift.String? /// - Remark: Generated from `#/components/schemas/timeline-committed-event/verification/payload`. public var payload: Swift.String? + /// - Remark: Generated from `#/components/schemas/timeline-committed-event/verification/verified_at`. + public var verified_at: Swift.String? /// Creates a new `verificationPayload`. /// /// - Parameters: @@ -6727,22 +6949,26 @@ public enum Components { /// - reason: /// - signature: /// - payload: + /// - verified_at: public init( verified: Swift.Bool, reason: Swift.String, signature: Swift.String? = nil, - payload: Swift.String? = nil + payload: Swift.String? = nil, + verified_at: Swift.String? = nil ) { self.verified = verified self.reason = reason self.signature = signature self.payload = payload + self.verified_at = verified_at } public enum CodingKeys: String, CodingKey { case verified case reason case signature case payload + case verified_at } } /// - Remark: Generated from `#/components/schemas/timeline-committed-event/verification`. @@ -8040,6 +8266,34 @@ public enum Components { public enum RequestBodies {} /// Types generated from the `#/components/responses` section of the OpenAPI document. public enum Responses { + public struct validation_failed_simple: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/validation_failed_simple/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/validation_failed_simple/content/application\/json`. + case json(Components.Schemas.validation_hyphen_error_hyphen_simple) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.validation_hyphen_error_hyphen_simple { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.validation_failed_simple.Body + /// Creates a new `validation_failed_simple`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.validation_failed_simple.Body) { + self.body = body + } + } public struct not_found: Sendable, Hashable { /// - Remark: Generated from `#/components/responses/not_found/content`. @frozen public enum Body: Sendable, Hashable { @@ -15298,6 +15552,1096 @@ public enum Operations { } } } + /// Remove sub-issue + /// + /// You can use the REST API to remove a sub-issue from an issue. + /// Removing content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issue/delete(issues/remove-sub-issue)`. + public enum issues_sol_remove_hyphen_sub_hyphen_issue { + public static let id: Swift.String = "issues/remove-sub-issue" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/path/repo`. + public var repo: Components.Parameters.repo + /// The number that identifies the issue. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/path/issue_number`. + public var issue_number: Components.Parameters.issue_hyphen_number + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + /// - issue_number: The number that identifies the issue. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo, + issue_number: Components.Parameters.issue_hyphen_number + ) { + self.owner = owner + self.repo = repo + self.issue_number = issue_number + } + } + public var path: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The sub-issue to remove + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/requestBody/json/sub_issue_id`. + public var sub_issue_id: Swift.Int + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - sub_issue_id: The sub-issue to remove + public init(sub_issue_id: Swift.Int) { + self.sub_issue_id = sub_issue_id + } + public enum CodingKeys: String, CodingKey { + case sub_issue_id + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/requestBody/content/application\/json`. + case json(Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Body.jsonPayload) + } + public var body: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Path, + headers: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Headers = .init(), + body: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/responses/200/headers/Location`. + public var Location: Swift.String? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - Location: + public init(Location: Swift.String? = nil) { + self.Location = Location + } + } + /// Received HTTP response headers + public var headers: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issue/DELETE/responses/200/content/application\/json`. + case json(Components.Schemas.issue) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.issue { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok.Headers = .init(), + body: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok.Body + ) { + self.headers = headers + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issue/delete(issues/remove-sub-issue)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.issues_sol_remove_hyphen_sub_hyphen_issue.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issue/delete(issues/remove-sub-issue)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Components.Responses.bad_request) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Components.Responses.bad_request { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issue/delete(issues/remove-sub-issue)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case application_scim_plus_json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "application/scim+json": + self = .application_scim_plus_json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .application_scim_plus_json: + return "application/scim+json" + } + } + public static var allCases: [Self] { + [ + .json, + .application_scim_plus_json + ] + } + } + } + /// List sub-issues + /// + /// You can use the REST API to list the sub-issues on an issue. + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/get(issues/list-sub-issues)`. + public enum issues_sol_list_hyphen_sub_hyphen_issues { + public static let id: Swift.String = "issues/list-sub-issues" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/path/repo`. + public var repo: Components.Parameters.repo + /// The number that identifies the issue. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/path/issue_number`. + public var issue_number: Components.Parameters.issue_hyphen_number + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + /// - issue_number: The number that identifies the issue. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo, + issue_number: Components.Parameters.issue_hyphen_number + ) { + self.owner = owner + self.repo = repo + self.issue_number = issue_number + } + } + public var path: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/query`. + public struct Query: Sendable, Hashable { + /// The number of results per page (max 100). 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/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// The page number of the results to fetch. 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/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/query/page`. + public var page: Components.Parameters.page? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - per_page: The number of results per page (max 100). 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)." + /// - page: The page number of the results to fetch. 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)." + public init( + per_page: Components.Parameters.per_hyphen_page? = nil, + page: Components.Parameters.page? = nil + ) { + self.per_page = per_page + self.page = page + } + } + public var query: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Query + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Path, + query: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Query = .init(), + headers: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/responses/200/headers/Link`. + public var Link: Components.Headers.link? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - Link: + public init(Link: Components.Headers.link? = nil) { + self.Link = Link + } + } + /// Received HTTP response headers + public var headers: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/GET/responses/200/content/application\/json`. + case json([Components.Schemas.issue]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.issue] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok.Headers = .init(), + body: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok.Body + ) { + self.headers = headers + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/get(issues/list-sub-issues)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.issues_sol_list_hyphen_sub_hyphen_issues.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/get(issues/list-sub-issues)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Gone + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/get(issues/list-sub-issues)/responses/410`. + /// + /// HTTP response code: `410 gone`. + case gone(Components.Responses.gone) + /// The associated value of the enum case if `self` is `.gone`. + /// + /// - Throws: An error if `self` is not `.gone`. + /// - SeeAlso: `.gone`. + public var gone: Components.Responses.gone { + get throws { + switch self { + case let .gone(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "gone", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Add sub-issue + /// + /// You can use the REST API to add sub-issues to issues. + /// + /// Creating content too quickly using this endpoint may result in secondary rate limiting. + /// For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + /// and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)`. + public enum issues_sol_add_hyphen_sub_hyphen_issue { + public static let id: Swift.String = "issues/add-sub-issue" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/path/repo`. + public var repo: Components.Parameters.repo + /// The number that identifies the issue. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/path/issue_number`. + public var issue_number: Components.Parameters.issue_hyphen_number + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + /// - issue_number: The number that identifies the issue. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo, + issue_number: Components.Parameters.issue_hyphen_number + ) { + self.owner = owner + self.repo = repo + self.issue_number = issue_number + } + } + public var path: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The sub-issue to add + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/requestBody/json/sub_issue_id`. + public var sub_issue_id: Swift.Int + /// Option that, when true, instructs the operation to replace the sub-issues current parent issue + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/requestBody/json/replace_parent`. + public var replace_parent: Swift.Bool? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - sub_issue_id: The sub-issue to add + /// - replace_parent: Option that, when true, instructs the operation to replace the sub-issues current parent issue + public init( + sub_issue_id: Swift.Int, + replace_parent: Swift.Bool? = nil + ) { + self.sub_issue_id = sub_issue_id + self.replace_parent = replace_parent + } + public enum CodingKeys: String, CodingKey { + case sub_issue_id + case replace_parent + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/requestBody/content/application\/json`. + case json(Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Body.jsonPayload) + } + public var body: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Path, + headers: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Headers = .init(), + body: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/responses/201/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/responses/201/headers/Location`. + public var Location: Swift.String? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - Location: + public init(Location: Swift.String? = nil) { + self.Location = Location + } + } + /// Received HTTP response headers + public var headers: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/POST/responses/201/content/application\/json`. + case json(Components.Schemas.issue) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.issue { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created.Headers = .init(), + body: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created.Body + ) { + self.headers = headers + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.issues_sol_add_hyphen_sub_hyphen_issue.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Gone + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)/responses/410`. + /// + /// HTTP response code: `410 gone`. + case gone(Components.Responses.gone) + /// The associated value of the enum case if `self` is `.gone`. + /// + /// - Throws: An error if `self` is not `.gone`. + /// - SeeAlso: `.gone`. + public var gone: Components.Responses.gone { + get throws { + switch self { + case let .gone(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "gone", + response: self + ) + } + } + } + /// Validation failed, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.validation_failed) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/post(issues/add-sub-issue)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Reprioritize sub-issue + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// + /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)`. + public enum issues_sol_reprioritize_hyphen_sub_hyphen_issue { + public static let id: Swift.String = "issues/reprioritize-sub-issue" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/path/repo`. + public var repo: Components.Parameters.repo + /// The number that identifies the issue. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/path/issue_number`. + public var issue_number: Components.Parameters.issue_hyphen_number + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + /// - issue_number: The number that identifies the issue. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo, + issue_number: Components.Parameters.issue_hyphen_number + ) { + self.owner = owner + self.repo = repo + self.issue_number = issue_number + } + } + public var path: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The id of the sub-issue to reprioritize + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/requestBody/json/sub_issue_id`. + public var sub_issue_id: Swift.Int + /// The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified). + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/requestBody/json/after_id`. + public var after_id: Swift.Int? + /// The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified). + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/requestBody/json/before_id`. + public var before_id: Swift.Int? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - sub_issue_id: The id of the sub-issue to reprioritize + /// - after_id: The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified). + /// - before_id: The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified). + public init( + sub_issue_id: Swift.Int, + after_id: Swift.Int? = nil, + before_id: Swift.Int? = nil + ) { + self.sub_issue_id = sub_issue_id + self.after_id = after_id + self.before_id = before_id + } + public enum CodingKeys: String, CodingKey { + case sub_issue_id + case after_id + case before_id + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/requestBody/content/application\/json`. + case json(Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Body.jsonPayload) + } + public var body: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Path, + headers: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Headers = .init(), + body: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.issue) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.issue { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.issues_sol_reprioritize_hyphen_sub_hyphen_issue.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Validation failed, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.validation_failed_simple) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed_simple { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority/patch(issues/reprioritize-sub-issue)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Components.Responses.service_unavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Components.Responses.service_unavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// List timeline events for an issue /// /// List all timeline events for an issue. From b1bb078cad7303c9d12b92690121541f18f2bc24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:48:33 +0000 Subject: [PATCH 108/129] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 8 ++++++-- Sources/orgs/Types.swift | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index fa05bb49a73..cf3359910fc 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -917,7 +917,9 @@ public struct Client: APIProtocol { } /// List organization webhooks /// - /// You must be an organization owner to use this endpoint. + /// List webhooks for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. @@ -1380,7 +1382,9 @@ public struct Client: APIProtocol { } /// Delete an organization webhook /// - /// You must be an organization owner to use this endpoint. + /// Delete a webhook for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 155bfea1c20..4e729d20cba 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -114,7 +114,9 @@ public protocol APIProtocol: Sendable { func orgs_sol_list_hyphen_failed_hyphen_invitations(_ input: Operations.orgs_sol_list_hyphen_failed_hyphen_invitations.Input) async throws -> Operations.orgs_sol_list_hyphen_failed_hyphen_invitations.Output /// List organization webhooks /// - /// You must be an organization owner to use this endpoint. + /// List webhooks for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. @@ -165,7 +167,9 @@ public protocol APIProtocol: Sendable { func orgs_sol_update_hyphen_webhook(_ input: Operations.orgs_sol_update_hyphen_webhook.Input) async throws -> Operations.orgs_sol_update_hyphen_webhook.Output /// Delete an organization webhook /// - /// You must be an organization owner to use this endpoint. + /// Delete a webhook for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. @@ -1000,7 +1004,9 @@ extension APIProtocol { } /// List organization webhooks /// - /// You must be an organization owner to use this endpoint. + /// List webhooks for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. @@ -1089,7 +1095,9 @@ extension APIProtocol { } /// Delete an organization webhook /// - /// You must be an organization owner to use this endpoint. + /// Delete a webhook for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. @@ -10158,7 +10166,9 @@ public enum Operations { } /// List organization webhooks /// - /// You must be an organization owner to use this endpoint. + /// List webhooks for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. @@ -11118,7 +11128,9 @@ public enum Operations { } /// Delete an organization webhook /// - /// You must be an organization owner to use this endpoint. + /// Delete a webhook for an organization. + /// + /// The authenticated user must be an organization owner to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit /// webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. From 22a3afb29206805c4c05bc2b1136a7851b8629b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:49:36 +0000 Subject: [PATCH 109/129] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index e5378774f36..76cf8e000c0 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -2938,6 +2938,8 @@ public enum Components { public var payload: Swift.String? /// - Remark: Generated from `#/components/schemas/verification/signature`. public var signature: Swift.String? + /// - Remark: Generated from `#/components/schemas/verification/verified_at`. + public var verified_at: Swift.String? /// Creates a new `verification`. /// /// - Parameters: @@ -2945,22 +2947,26 @@ public enum Components { /// - reason: /// - payload: /// - signature: + /// - verified_at: public init( verified: Swift.Bool, reason: Swift.String, payload: Swift.String? = nil, - signature: Swift.String? = nil + signature: Swift.String? = nil, + verified_at: Swift.String? = nil ) { self.verified = verified self.reason = reason self.payload = payload self.signature = signature + self.verified_at = verified_at } public enum CodingKeys: String, CodingKey { case verified case reason case payload case signature + case verified_at } } /// Diff Entry From aada6ee4860b943928a259146b877f120744635b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:50:41 +0000 Subject: [PATCH 110/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 2 ++ Sources/repos/Types.swift | 30 ++++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index b0d5dd01110..0d89f08a289 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -11479,7 +11479,9 @@ public struct Client: APIProtocol { } /// Delete a repository webhook /// + /// Delete a webhook for an organization. /// + /// The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/hooks/{hook_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/delete(repos/delete-webhook)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 58542d30b33..5f3c8b8070f 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -1302,7 +1302,9 @@ public protocol APIProtocol: Sendable { func repos_sol_update_hyphen_webhook(_ input: Operations.repos_sol_update_hyphen_webhook.Input) async throws -> Operations.repos_sol_update_hyphen_webhook.Output /// Delete a repository webhook /// + /// Delete a webhook for an organization. /// + /// The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/hooks/{hook_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/delete(repos/delete-webhook)`. @@ -4336,7 +4338,9 @@ extension APIProtocol { } /// Delete a repository webhook /// + /// Delete a webhook for an organization. /// + /// The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/hooks/{hook_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/delete(repos/delete-webhook)`. @@ -15011,6 +15015,8 @@ public enum Components { public var payload: Swift.String? /// - Remark: Generated from `#/components/schemas/verification/signature`. public var signature: Swift.String? + /// - Remark: Generated from `#/components/schemas/verification/verified_at`. + public var verified_at: Swift.String? /// Creates a new `verification`. /// /// - Parameters: @@ -15018,22 +15024,26 @@ public enum Components { /// - reason: /// - payload: /// - signature: + /// - verified_at: public init( verified: Swift.Bool, reason: Swift.String, payload: Swift.String? = nil, - signature: Swift.String? = nil + signature: Swift.String? = nil, + verified_at: Swift.String? = nil ) { self.verified = verified self.reason = reason self.payload = payload self.signature = signature + self.verified_at = verified_at } public enum CodingKeys: String, CodingKey { case verified case reason case payload case signature + case verified_at } } /// Diff Entry @@ -18672,6 +18682,8 @@ public enum Components { public var signature: Swift.String? /// - Remark: Generated from `#/components/schemas/file-commit/commit/verification/payload`. public var payload: Swift.String? + /// - Remark: Generated from `#/components/schemas/file-commit/commit/verification/verified_at`. + public var verified_at: Swift.String? /// Creates a new `verificationPayload`. /// /// - Parameters: @@ -18679,22 +18691,26 @@ public enum Components { /// - reason: /// - signature: /// - payload: + /// - verified_at: public init( verified: Swift.Bool? = nil, reason: Swift.String? = nil, signature: Swift.String? = nil, - payload: Swift.String? = nil + payload: Swift.String? = nil, + verified_at: Swift.String? = nil ) { self.verified = verified self.reason = reason self.signature = signature self.payload = payload + self.verified_at = verified_at } public enum CodingKeys: String, CodingKey { case verified case reason case signature case payload + case verified_at } } /// - Remark: Generated from `#/components/schemas/file-commit/commit/verification`. @@ -22210,10 +22226,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/ref-in-query`. public typealias ref_hyphen_in_hyphen_query = Swift.String - /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. + /// The name of the repository to filter on. /// /// - Remark: Generated from `#/components/parameters/repository-name-in-query`. - public typealias repository_hyphen_name_hyphen_in_hyphen_query = Swift.Int + public typealias repository_hyphen_name_hyphen_in_hyphen_query = Swift.String /// The time period to filter by. /// /// For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). @@ -23997,7 +24013,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/ref`. public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? - /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. + /// The name of the repository to filter on. /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/repository_name`. public var repository_name: Components.Parameters.repository_hyphen_name_hyphen_in_hyphen_query? @@ -24041,7 +24057,7 @@ public enum Operations { /// /// - Parameters: /// - ref: The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. - /// - repository_name: The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. + /// - repository_name: The name of the repository to filter on. /// - time_period: The time period to filter by. /// - actor_name: The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. /// - rule_suite_result: The rule results to filter on. When specified, only suites with this result will be returned. @@ -46909,7 +46925,9 @@ public enum Operations { } /// Delete a repository webhook /// + /// Delete a webhook for an organization. /// + /// The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/hooks/{hook_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/delete(repos/delete-webhook)`. From d3b0a6920223ae0259e2d0413c0cdca3a915e0d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:51:02 +0000 Subject: [PATCH 111/129] Commit via running ake Sources/search --- Sources/search/Types.swift | 43 +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 682f5a19352..e1ec4a43051 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -2883,6 +2883,8 @@ public enum Components { public var payload: Swift.String? /// - Remark: Generated from `#/components/schemas/verification/signature`. public var signature: Swift.String? + /// - Remark: Generated from `#/components/schemas/verification/verified_at`. + public var verified_at: Swift.String? /// Creates a new `verification`. /// /// - Parameters: @@ -2890,22 +2892,26 @@ public enum Components { /// - reason: /// - payload: /// - signature: + /// - verified_at: public init( verified: Swift.Bool, reason: Swift.String, payload: Swift.String? = nil, - signature: Swift.String? = nil + signature: Swift.String? = nil, + verified_at: Swift.String? = nil ) { self.verified = verified self.reason = reason self.payload = payload self.signature = signature + self.verified_at = verified_at } public enum CodingKeys: String, CodingKey { case verified case reason case payload case signature + case verified_at } } /// - Remark: Generated from `#/components/schemas/search_hyphen_result_hyphen_text_hyphen_matches`. @@ -3377,6 +3383,37 @@ public enum Components { public typealias labelsPayload = [Components.Schemas.issue_hyphen_search_hyphen_result_hyphen_item.labelsPayloadPayload] /// - Remark: Generated from `#/components/schemas/issue-search-result-item/labels`. public var labels: Components.Schemas.issue_hyphen_search_hyphen_result_hyphen_item.labelsPayload + /// - Remark: Generated from `#/components/schemas/issue-search-result-item/sub_issues_summary`. + public struct sub_issues_summaryPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue-search-result-item/sub_issues_summary/total`. + public var total: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-search-result-item/sub_issues_summary/completed`. + public var completed: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-search-result-item/sub_issues_summary/percent_completed`. + public var percent_completed: Swift.Int + /// Creates a new `sub_issues_summaryPayload`. + /// + /// - Parameters: + /// - total: + /// - completed: + /// - percent_completed: + public init( + total: Swift.Int, + completed: Swift.Int, + percent_completed: Swift.Int + ) { + self.total = total + self.completed = completed + self.percent_completed = percent_completed + } + public enum CodingKeys: String, CodingKey { + case total + case completed + case percent_completed + } + } + /// - Remark: Generated from `#/components/schemas/issue-search-result-item/sub_issues_summary`. + public var sub_issues_summary: Components.Schemas.issue_hyphen_search_hyphen_result_hyphen_item.sub_issues_summaryPayload? /// - Remark: Generated from `#/components/schemas/issue-search-result-item/state`. public var state: Swift.String /// - Remark: Generated from `#/components/schemas/issue-search-result-item/state_reason`. @@ -3476,6 +3513,7 @@ public enum Components { /// - assignees: /// - user: /// - labels: + /// - sub_issues_summary: /// - state: /// - state_reason: /// - assignee: @@ -3512,6 +3550,7 @@ public enum Components { assignees: [Components.Schemas.simple_hyphen_user]? = nil, user: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, labels: Components.Schemas.issue_hyphen_search_hyphen_result_hyphen_item.labelsPayload, + sub_issues_summary: Components.Schemas.issue_hyphen_search_hyphen_result_hyphen_item.sub_issues_summaryPayload? = nil, state: Swift.String, state_reason: Swift.String? = nil, assignee: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, @@ -3548,6 +3587,7 @@ public enum Components { self.assignees = assignees self.user = user self.labels = labels + self.sub_issues_summary = sub_issues_summary self.state = state self.state_reason = state_reason self.assignee = assignee @@ -3585,6 +3625,7 @@ public enum Components { case assignees case user case labels + case sub_issues_summary case state case state_reason case assignee From fbc2a62f39a9607e2c7e908d61415b9d65a978f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Dec 2024 22:51:23 +0000 Subject: [PATCH 112/129] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Client.swift | 91 +++++++ Sources/secret-scanning/Types.swift | 355 +++++++++++++++++++++++++++ 2 files changed, 446 insertions(+) diff --git a/Sources/secret-scanning/Client.swift b/Sources/secret-scanning/Client.swift index e64a11ba3b0..ae7642feced 100644 --- a/Sources/secret-scanning/Client.swift +++ b/Sources/secret-scanning/Client.swift @@ -1043,4 +1043,95 @@ public struct Client: APIProtocol { } ) } + /// Get secret scanning scan history for a repository + /// + /// Lists the latest incremental and backfill scans by type for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)`. + public func secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history(_ input: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input) async throws -> Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output { + try await client.send( + input: input, + forOperation: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/secret-scanning/scan-history", + parameters: [ + input.path.owner, + input.path.repo + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 404: + return .notFound(.init()) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.service_unavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Responses.service_unavailable.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } } diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 01039b04b1f..6080ccbb556 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -90,6 +90,15 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)`. func secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass(_ input: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input) async throws -> Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output + /// Get secret scanning scan history for a repository + /// + /// Lists the latest incremental and backfill scans by type for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)`. + func secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history(_ input: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input) async throws -> Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output } /// Convenience overloads for operation inputs. @@ -241,6 +250,23 @@ extension APIProtocol { body: body )) } + /// Get secret scanning scan history for a repository + /// + /// Lists the latest incremental and backfill scans by type for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)`. + public func secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history( + path: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input.Path, + headers: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input.Headers = .init() + ) async throws -> Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output { + try await secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history(Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input( + path: path, + headers: headers + )) + } } /// Server URLs defined in the OpenAPI document. @@ -1989,6 +2015,142 @@ public enum Components { case token_type } } + /// Information on a single scan performed by secret scanning on the repository + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan`. + public struct secret_hyphen_scanning_hyphen_scan: Codable, Hashable, Sendable { + /// The type of scan + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/type`. + public var _type: Swift.String? + /// The state of the scan. Either "completed" or "running" + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/status`. + public var status: Swift.String? + /// The time that the scan was completed. Empty if the scan is active + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/completed_at`. + public var completed_at: Foundation.Date? + /// The time that the scan was started + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/started_at`. + public var started_at: Foundation.Date? + /// Creates a new `secret_hyphen_scanning_hyphen_scan`. + /// + /// - Parameters: + /// - _type: The type of scan + /// - status: The state of the scan. Either "completed" or "running" + /// - completed_at: The time that the scan was completed. Empty if the scan is active + /// - started_at: The time that the scan was started + public init( + _type: Swift.String? = nil, + status: Swift.String? = nil, + completed_at: Foundation.Date? = nil, + started_at: Foundation.Date? = nil + ) { + self._type = _type + self.status = status + self.completed_at = completed_at + self.started_at = started_at + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case status + case completed_at + case started_at + } + } + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history`. + public struct secret_hyphen_scanning_hyphen_scan_hyphen_history: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/incremental_scans`. + public var incremental_scans: [Components.Schemas.secret_hyphen_scanning_hyphen_scan]? + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/pattern_update_scans`. + public var pattern_update_scans: [Components.Schemas.secret_hyphen_scanning_hyphen_scan]? + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/backfill_scans`. + public var backfill_scans: [Components.Schemas.secret_hyphen_scanning_hyphen_scan]? + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scansPayload`. + public struct custom_pattern_backfill_scansPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scansPayload/value1`. + public var value1: Components.Schemas.secret_hyphen_scanning_hyphen_scan + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scansPayload/value2`. + public struct Value2Payload: Codable, Hashable, Sendable { + /// Name of the custom pattern for custom pattern scans + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scansPayload/value2/pattern_name`. + public var pattern_name: Swift.String? + /// Level at which the custom pattern is defined, one of "repository", "organization", or "enterprise" + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scansPayload/value2/pattern_scope`. + public var pattern_scope: Swift.String? + /// Creates a new `Value2Payload`. + /// + /// - Parameters: + /// - pattern_name: Name of the custom pattern for custom pattern scans + /// - pattern_scope: Level at which the custom pattern is defined, one of "repository", "organization", or "enterprise" + public init( + pattern_name: Swift.String? = nil, + pattern_scope: Swift.String? = nil + ) { + self.pattern_name = pattern_name + self.pattern_scope = pattern_scope + } + public enum CodingKeys: String, CodingKey { + case pattern_name + case pattern_scope + } + } + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scansPayload/value2`. + public var value2: Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history.custom_pattern_backfill_scansPayloadPayload.Value2Payload + /// Creates a new `custom_pattern_backfill_scansPayloadPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.secret_hyphen_scanning_hyphen_scan, + value2: Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history.custom_pattern_backfill_scansPayloadPayload.Value2Payload + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + value1 = try .init(from: decoder) + value2 = try .init(from: decoder) + } + public func encode(to encoder: any Encoder) throws { + try value1.encode(to: encoder) + try value2.encode(to: encoder) + } + } + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scans`. + public typealias custom_pattern_backfill_scansPayload = [Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history.custom_pattern_backfill_scansPayloadPayload] + /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scans`. + public var custom_pattern_backfill_scans: Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history.custom_pattern_backfill_scansPayload? + /// Creates a new `secret_hyphen_scanning_hyphen_scan_hyphen_history`. + /// + /// - Parameters: + /// - incremental_scans: + /// - pattern_update_scans: + /// - backfill_scans: + /// - custom_pattern_backfill_scans: + public init( + incremental_scans: [Components.Schemas.secret_hyphen_scanning_hyphen_scan]? = nil, + pattern_update_scans: [Components.Schemas.secret_hyphen_scanning_hyphen_scan]? = nil, + backfill_scans: [Components.Schemas.secret_hyphen_scanning_hyphen_scan]? = nil, + custom_pattern_backfill_scans: Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history.custom_pattern_backfill_scansPayload? = nil + ) { + self.incremental_scans = incremental_scans + self.pattern_update_scans = pattern_update_scans + self.backfill_scans = backfill_scans + self.custom_pattern_backfill_scans = custom_pattern_backfill_scans + } + public enum CodingKeys: String, CodingKey { + case incremental_scans + case pattern_update_scans + case backfill_scans + case custom_pattern_backfill_scans + } + } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { @@ -4165,4 +4327,197 @@ public enum Operations { } } } + /// Get secret scanning scan history for a repository + /// + /// Lists the latest incremental and backfill scans by type for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)`. + public enum secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history { + public static let id: Swift.String = "secret-scanning/get-scan-history" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/scan-history/GET/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/scan-history/GET/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/scan-history/GET/path/repo`. + public var repo: Components.Parameters.repo + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo + ) { + self.owner = owner + self.repo = repo + } + } + public var path: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/scan-history/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input.Path, + headers: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NotFound: Sendable, Hashable { + /// Creates a new `NotFound`. + public init() {} + } + /// Repository does not have GitHub Advanced Security or secret scanning enabled + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Components.Responses.service_unavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Components.Responses.service_unavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/scan-history/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/scan-history/GET/responses/200/content/application\/json`. + case json(Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.secret_hyphen_scanning_hyphen_scan_hyphen_history { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } } From 1e74b7c43633384d4f87803b96648e97418e6475 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:38:29 +0000 Subject: [PATCH 113/129] Bump Submodule/github/rest-api-description from `7fad85e` to `4ab8513` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `7fad85e` to `4ab8513`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/7fad85efbb1da5a0f026a9d53e4e10d862de30fd...4ab8513682637010cd3bb5d8ee3227cc5ce739d1) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 7fad85efbb1..4ab85136826 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 7fad85efbb1da5a0f026a9d53e4e10d862de30fd +Subproject commit 4ab8513682637010cd3bb5d8ee3227cc5ce739d1 From cc17fa207131353fe13bb15009fa605e287423de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 9 Dec 2024 21:59:12 +0000 Subject: [PATCH 114/129] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Types.swift | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index ee84b6fa5d8..f1a2bfceab7 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -3106,6 +3106,21 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/state`. public var state: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.statePayload? + /// Runner type to be used. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/runner_type`. + @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable { + case standard = "standard" + case labeled = "labeled" + } + /// Runner type to be used. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/runner_type`. + public var runner_type: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.runner_typePayload? + /// Runner label to be used if the runner type is labeled. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/runner_label`. + public var runner_label: Swift.String? /// CodeQL query suite to be used. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/query_suite`. @@ -3140,19 +3155,27 @@ public enum Components { /// /// - Parameters: /// - state: The desired state of code scanning default setup. + /// - runner_type: Runner type to be used. + /// - runner_label: Runner label to be used if the runner type is labeled. /// - query_suite: CodeQL query suite to be used. /// - languages: CodeQL languages to be analyzed. public init( state: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.statePayload? = nil, + runner_type: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.runner_typePayload? = nil, + runner_label: Swift.String? = nil, query_suite: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.query_suitePayload? = nil, languages: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.languagesPayload? = nil ) { self.state = state + self.runner_type = runner_type + self.runner_label = runner_label self.query_suite = query_suite self.languages = languages } public enum CodingKeys: String, CodingKey { case state + case runner_type + case runner_label case query_suite case languages } @@ -3162,6 +3185,14 @@ public enum Components { Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.statePayload.self, forKey: .state ) + runner_type = try container.decodeIfPresent( + Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.runner_typePayload.self, + forKey: .runner_type + ) + runner_label = try container.decodeIfPresent( + Swift.String.self, + forKey: .runner_label + ) query_suite = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.query_suitePayload.self, forKey: .query_suite @@ -3172,6 +3203,8 @@ public enum Components { ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "state", + "runner_type", + "runner_label", "query_suite", "languages" ]) From 017a800090bba000f34576514faa2672d4ef1e58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 9 Dec 2024 22:01:20 +0000 Subject: [PATCH 115/129] Commit via running ake Sources/git --- Sources/git/Client.swift | 4 ++++ Sources/git/Types.swift | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Sources/git/Client.swift b/Sources/git/Client.swift index b2452d34134..2582d086ed0 100644 --- a/Sources/git/Client.swift +++ b/Sources/git/Client.swift @@ -383,6 +383,7 @@ public struct Client: APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -562,6 +563,7 @@ public struct Client: APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -1252,6 +1254,7 @@ public struct Client: APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -1405,6 +1408,7 @@ public struct Client: APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// diff --git a/Sources/git/Types.swift b/Sources/git/Types.swift index c207282632c..0b965a2d425 100644 --- a/Sources/git/Types.swift +++ b/Sources/git/Types.swift @@ -46,6 +46,7 @@ public protocol APIProtocol: Sendable { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -84,6 +85,7 @@ public protocol APIProtocol: Sendable { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -165,6 +167,7 @@ public protocol APIProtocol: Sendable { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -199,6 +202,7 @@ public protocol APIProtocol: Sendable { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -301,6 +305,7 @@ extension APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -349,6 +354,7 @@ extension APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -482,6 +488,7 @@ extension APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -526,6 +533,7 @@ extension APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -2287,6 +2295,7 @@ public enum Operations { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -2689,6 +2698,7 @@ public enum Operations { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -3948,6 +3958,7 @@ public enum Operations { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -4286,6 +4297,7 @@ public enum Operations { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// From f4d81c6dd67b0479fef6e91290b62f2dc2dc8e17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 9 Dec 2024 22:04:34 +0000 Subject: [PATCH 116/129] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 21 +++++++++++ Sources/orgs/Types.swift | 79 +++++++++++++++++++++++++++------------ 2 files changed, 77 insertions(+), 23 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index cf3359910fc..1d3f06e543d 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -2127,6 +2127,13 @@ public struct Client: APIProtocol { name: "sort", value: input.query.sort ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "api_route_substring", + value: input.query.api_route_substring + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -2233,6 +2240,13 @@ public struct Client: APIProtocol { name: "sort", value: input.query.sort ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "subject_name_substring", + value: input.query.subject_name_substring + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept @@ -2835,6 +2849,13 @@ public struct Client: APIProtocol { name: "sort", value: input.query.sort ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "actor_name_substring", + value: input.query.actor_name_substring + ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 4e729d20cba..d93cd0f981b 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -7670,11 +7670,11 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { - case installations = "installations" - case classic_pats = "classic_pats" - case fine_grained_pats = "fine_grained_pats" - case oauth_apps = "oauth_apps" - case github_apps_user_to_server = "github_apps_user_to_server" + case installation = "installation" + case classic_pat = "classic_pat" + case fine_grained_pat = "fine_grained_pat" + case oauth_app = "oauth_app" + case github_app_user_to_server = "github_app_user_to_server" } /// The ID of the actor /// @@ -7701,6 +7701,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/api-insights-route-stats-sort`. public typealias api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort = [Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload] + /// Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. + /// + /// - Remark: Generated from `#/components/parameters/api-insights-api-route-substring`. + public typealias api_hyphen_insights_hyphen_api_hyphen_route_hyphen_substring = Swift.String /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_sort`. @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable { case last_rate_limited_timestamp = "last_rate_limited_timestamp" @@ -7713,6 +7717,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/api-insights-sort`. public typealias api_hyphen_insights_hyphen_sort = [Components.Parameters.api_hyphen_insights_hyphen_sortPayload] + /// Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. + /// + /// - Remark: Generated from `#/components/parameters/api-insights-subject-name-substring`. + public typealias api_hyphen_insights_hyphen_subject_hyphen_name_hyphen_substring = Swift.String /// The ID of the user to query for stats /// /// - Remark: Generated from `#/components/parameters/api-insights-user-id`. @@ -7721,6 +7729,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/api-insights-timestamp-increment`. public typealias api_hyphen_insights_hyphen_timestamp_hyphen_increment = Swift.String + /// Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. + /// + /// - Remark: Generated from `#/components/parameters/api-insights-actor-name-substring`. + public typealias api_hyphen_insights_hyphen_actor_hyphen_name_hyphen_substring = Swift.String /// The unique identifier of the invitation. /// /// - Remark: Generated from `#/components/parameters/invitation-id`. @@ -12373,11 +12385,11 @@ public enum Operations { public var org: Components.Parameters.org /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { - case installations = "installations" - case classic_pats = "classic_pats" - case fine_grained_pats = "fine_grained_pats" - case oauth_apps = "oauth_apps" - case github_apps_user_to_server = "github_apps_user_to_server" + case installation = "installation" + case classic_pat = "classic_pat" + case fine_grained_pat = "fine_grained_pat" + case oauth_app = "oauth_app" + case github_app_user_to_server = "github_app_user_to_server" } /// The type of the actor /// @@ -12446,6 +12458,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/sort`. public var sort: Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort? + /// Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/api_route_substring`. + public var api_route_substring: Components.Parameters.api_hyphen_insights_hyphen_api_hyphen_route_hyphen_substring? /// Creates a new `Query`. /// /// - Parameters: @@ -12455,13 +12471,15 @@ public enum Operations { /// - per_page: The number of results per page (max 100). 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. /// - sort: The property to sort the results by. + /// - api_route_substring: Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, direction: Components.Parameters.direction? = nil, - sort: Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort? = nil + sort: Components.Parameters.api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort? = nil, + api_route_substring: Components.Parameters.api_hyphen_insights_hyphen_api_hyphen_route_hyphen_substring? = nil ) { self.min_timestamp = min_timestamp self.max_timestamp = max_timestamp @@ -12469,6 +12487,7 @@ public enum Operations { self.per_page = per_page self.direction = direction self.sort = sort + self.api_route_substring = api_route_substring } } public var query: Operations.api_hyphen_insights_sol_get_hyphen_route_hyphen_stats_hyphen_by_hyphen_actor.Input.Query @@ -12648,6 +12667,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/sort`. public var sort: Components.Parameters.api_hyphen_insights_hyphen_sort? + /// Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/subject_name_substring`. + public var subject_name_substring: Components.Parameters.api_hyphen_insights_hyphen_subject_hyphen_name_hyphen_substring? /// Creates a new `Query`. /// /// - Parameters: @@ -12657,13 +12680,15 @@ public enum Operations { /// - per_page: The number of results per page (max 100). 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. /// - sort: The property to sort the results by. + /// - subject_name_substring: Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, direction: Components.Parameters.direction? = nil, - sort: Components.Parameters.api_hyphen_insights_hyphen_sort? = nil + sort: Components.Parameters.api_hyphen_insights_hyphen_sort? = nil, + subject_name_substring: Components.Parameters.api_hyphen_insights_hyphen_subject_hyphen_name_hyphen_substring? = nil ) { self.min_timestamp = min_timestamp self.max_timestamp = max_timestamp @@ -12671,6 +12696,7 @@ public enum Operations { self.per_page = per_page self.direction = direction self.sort = sort + self.subject_name_substring = subject_name_substring } } public var query: Operations.api_hyphen_insights_sol_get_hyphen_subject_hyphen_stats.Input.Query @@ -13129,11 +13155,11 @@ public enum Operations { public var org: Components.Parameters.org /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { - case installations = "installations" - case classic_pats = "classic_pats" - case fine_grained_pats = "fine_grained_pats" - case oauth_apps = "oauth_apps" - case github_apps_user_to_server = "github_apps_user_to_server" + case installation = "installation" + case classic_pat = "classic_pat" + case fine_grained_pat = "fine_grained_pat" + case oauth_app = "oauth_app" + case github_app_user_to_server = "github_app_user_to_server" } /// The type of the actor /// @@ -13653,11 +13679,11 @@ public enum Operations { public var org: Components.Parameters.org /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { - case installations = "installations" - case classic_pats = "classic_pats" - case fine_grained_pats = "fine_grained_pats" - case oauth_apps = "oauth_apps" - case github_apps_user_to_server = "github_apps_user_to_server" + case installation = "installation" + case classic_pat = "classic_pat" + case fine_grained_pat = "fine_grained_pat" + case oauth_app = "oauth_app" + case github_app_user_to_server = "github_app_user_to_server" } /// The type of the actor /// @@ -13900,6 +13926,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/sort`. public var sort: Components.Parameters.api_hyphen_insights_hyphen_sort? + /// Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/actor_name_substring`. + public var actor_name_substring: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_name_hyphen_substring? /// Creates a new `Query`. /// /// - Parameters: @@ -13909,13 +13939,15 @@ public enum Operations { /// - per_page: The number of results per page (max 100). 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. /// - sort: The property to sort the results by. + /// - actor_name_substring: Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. public init( min_timestamp: Components.Parameters.api_hyphen_insights_hyphen_min_hyphen_timestamp, max_timestamp: Components.Parameters.api_hyphen_insights_hyphen_max_hyphen_timestamp? = nil, page: Components.Parameters.page? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, direction: Components.Parameters.direction? = nil, - sort: Components.Parameters.api_hyphen_insights_hyphen_sort? = nil + sort: Components.Parameters.api_hyphen_insights_hyphen_sort? = nil, + actor_name_substring: Components.Parameters.api_hyphen_insights_hyphen_actor_hyphen_name_hyphen_substring? = nil ) { self.min_timestamp = min_timestamp self.max_timestamp = max_timestamp @@ -13923,6 +13955,7 @@ public enum Operations { self.per_page = per_page self.direction = direction self.sort = sort + self.actor_name_substring = actor_name_substring } } public var query: Operations.api_hyphen_insights_sol_get_hyphen_user_hyphen_stats.Input.Query From 2a1d6e4dade8415a44f089e167790d65d252f1af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 9 Dec 2024 22:06:44 +0000 Subject: [PATCH 117/129] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 3 +++ Sources/repos/Types.swift | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 0d89f08a289..77534a44a02 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -6766,6 +6766,7 @@ public struct Client: APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -7485,6 +7486,7 @@ public struct Client: APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -8020,6 +8022,7 @@ public struct Client: APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 5f3c8b8070f..b47cd7033f0 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -697,6 +697,7 @@ public protocol APIProtocol: Sendable { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -790,6 +791,7 @@ public protocol APIProtocol: Sendable { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -886,6 +888,7 @@ public protocol APIProtocol: Sendable { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -3357,6 +3360,7 @@ extension APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -3498,6 +3502,7 @@ extension APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -3632,6 +3637,7 @@ extension APIProtocol { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -37297,6 +37303,7 @@ public enum Operations { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -38552,6 +38559,7 @@ public enum Operations { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// @@ -39466,6 +39474,7 @@ public enum Operations { /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | /// | `signature` | `string` | The signature that was extracted from the commit. | /// | `payload` | `string` | The value that was signed. | + /// | `verified_at` | `string` | The date the signature was verified by GitHub. | /// /// These are the possible values for `reason` in the `verification` object: /// From f805e9578fd3ff06bceb178f5a8793795a3e27b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 9 Dec 2024 22:07:27 +0000 Subject: [PATCH 118/129] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 6080ccbb556..1e9ebd83238 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -2023,15 +2023,15 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/type`. public var _type: Swift.String? - /// The state of the scan. Either "completed" or "running" + /// The state of the scan. Either "completed", "running", or "pending" /// /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/status`. public var status: Swift.String? - /// The time that the scan was completed. Empty if the scan is active + /// The time that the scan was completed. Empty if the scan is running /// /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/completed_at`. public var completed_at: Foundation.Date? - /// The time that the scan was started + /// The time that the scan was started. Empty if the scan is pending /// /// - Remark: Generated from `#/components/schemas/secret-scanning-scan/started_at`. public var started_at: Foundation.Date? @@ -2039,9 +2039,9 @@ public enum Components { /// /// - Parameters: /// - _type: The type of scan - /// - status: The state of the scan. Either "completed" or "running" - /// - completed_at: The time that the scan was completed. Empty if the scan is active - /// - started_at: The time that the scan was started + /// - status: The state of the scan. Either "completed", "running", or "pending" + /// - completed_at: The time that the scan was completed. Empty if the scan is running + /// - started_at: The time that the scan was started. Empty if the scan is pending public init( _type: Swift.String? = nil, status: Swift.String? = nil, From b509c25388efc8ca731268165bcda1483ae2bbf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 9 Dec 2024 22:08:54 +0000 Subject: [PATCH 119/129] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 31 +++++------- Sources/copilot/Types.swift | 98 ++++++++++++++---------------------- 2 files changed, 51 insertions(+), 78 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index bbde87f6ae3..b073e9c7ae0 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -612,6 +612,9 @@ public struct Client: APIProtocol { } /// Get Copilot metrics for an enterprise team /// + /// > [!NOTE] + /// > This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." + /// /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. /// /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, @@ -806,7 +809,7 @@ public struct Client: APIProtocol { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in public preview and is subject to change. + /// > This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -1354,13 +1357,11 @@ public struct Client: APIProtocol { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -1530,14 +1531,11 @@ public struct Client: APIProtocol { /// /// Sets seats for all members of each team specified to "pending cancellation". /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -1708,13 +1706,11 @@ public struct Client: APIProtocol { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -1884,14 +1880,11 @@ public struct Client: APIProtocol { /// /// Sets seats for all users specified to "pending cancellation". /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 772b9ff8fea..80d78fc5a62 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -72,6 +72,9 @@ public protocol APIProtocol: Sendable { func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output /// Get Copilot metrics for an enterprise team /// + /// > [!NOTE] + /// > This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." + /// /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. /// /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, @@ -92,7 +95,7 @@ public protocol APIProtocol: Sendable { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in public preview and is subject to change. + /// > This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -152,13 +155,11 @@ public protocol APIProtocol: Sendable { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -172,14 +173,11 @@ public protocol APIProtocol: Sendable { /// /// Sets seats for all members of each team specified to "pending cancellation". /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -194,13 +192,11 @@ public protocol APIProtocol: Sendable { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -214,14 +210,11 @@ public protocol APIProtocol: Sendable { /// /// Sets seats for all users specified to "pending cancellation". /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -421,6 +414,9 @@ extension APIProtocol { } /// Get Copilot metrics for an enterprise team /// + /// > [!NOTE] + /// > This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." + /// /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. /// /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, @@ -451,7 +447,7 @@ extension APIProtocol { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in public preview and is subject to change. + /// > This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -539,13 +535,11 @@ extension APIProtocol { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -569,14 +563,11 @@ extension APIProtocol { /// /// Sets seats for all members of each team specified to "pending cancellation". /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -601,13 +592,11 @@ extension APIProtocol { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -631,14 +620,11 @@ extension APIProtocol { /// /// Sets seats for all users specified to "pending cancellation". /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -1467,9 +1453,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/created_at`. public var created_at: Foundation.Date - /// Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + /// **Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/updated_at`. + @available(*, deprecated) public var updated_at: Foundation.Date? /// The Copilot plan of the organization, or the parent enterprise, when applicable. /// @@ -1493,7 +1480,7 @@ public enum Components { /// - last_activity_at: Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. /// - last_activity_editor: Last editor that was used by the user for a GitHub Copilot completion. /// - created_at: Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. - /// - updated_at: Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + /// - updated_at: **Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. /// - plan_type: The Copilot plan of the organization, or the parent enterprise, when applicable. public init( assignee: Components.Schemas.simple_hyphen_user, @@ -4065,6 +4052,9 @@ public enum Operations { } /// Get Copilot metrics for an enterprise team /// + /// > [!NOTE] + /// > This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." + /// /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. /// /// The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, @@ -4352,7 +4342,7 @@ public enum Operations { /// Get a summary of Copilot usage for an enterprise team /// /// > [!NOTE] - /// > This endpoint is in public preview and is subject to change. + /// > This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -5211,13 +5201,11 @@ public enum Operations { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -5518,14 +5506,11 @@ public enum Operations { /// /// Sets seats for all members of each team specified to "pending cancellation". /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -5827,13 +5812,11 @@ public enum Operations { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." /// - /// Only organization owners can add Copilot seats for their organization members. - /// - /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + /// Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." /// For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." /// - /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// The response contains the total number of new seats that were created and existing seats that were refreshed. /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// @@ -6134,14 +6117,11 @@ public enum Operations { /// /// Sets seats for all users specified to "pending cancellation". /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. - /// - /// For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - /// - /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + /// For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." /// /// Only organization owners can cancel Copilot seats for their organization members. /// - /// The response will contain the total number of seats set to "pending cancellation". + /// The response contains the total number of seats set to "pending cancellation". /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// From 89d2287651eee68ec913045f4a758b6676c192b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 9 Dec 2024 22:11:02 +0000 Subject: [PATCH 120/129] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 104 ++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 488a692044a..f895f094728 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -1121,6 +1121,47 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup`. public var code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? + /// Feature options for code scanning default setup + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup_options`. + public struct code_scanning_default_setup_optionsPayload: Codable, Hashable, Sendable { + /// Whether to use labeled runners or standard GitHub runners. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup_options/runner_type`. + @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable { + case standard = "standard" + case labeled = "labeled" + case not_set = "not_set" + } + /// Whether to use labeled runners or standard GitHub runners. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup_options/runner_type`. + public var runner_type: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setup_optionsPayload.runner_typePayload? + /// The label of the runner to use for code scanning when runner_type is 'labeled'. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup_options/runner_label`. + public var runner_label: Swift.String? + /// Creates a new `code_scanning_default_setup_optionsPayload`. + /// + /// - Parameters: + /// - runner_type: Whether to use labeled runners or standard GitHub runners. + /// - runner_label: The label of the runner to use for code scanning when runner_type is 'labeled'. + public init( + runner_type: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setup_optionsPayload.runner_typePayload? = nil, + runner_label: Swift.String? = nil + ) { + self.runner_type = runner_type + self.runner_label = runner_label + } + public enum CodingKeys: String, CodingKey { + case runner_type + case runner_label + } + } + /// Feature options for code scanning default setup + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup_options`. + public var code_scanning_default_setup_options: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setup_optionsPayload? /// The enablement status of secret scanning /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning`. @@ -1291,6 +1332,7 @@ public enum Components { /// - dependabot_alerts: The enablement status of Dependabot alerts /// - dependabot_security_updates: The enablement status of Dependabot security updates /// - code_scanning_default_setup: The enablement status of code scanning default setup + /// - code_scanning_default_setup_options: Feature options for code scanning default setup /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_delegated_bypass: The enablement status of secret scanning delegated bypass @@ -1315,6 +1357,7 @@ public enum Components { dependabot_alerts: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_alertsPayload? = nil, dependabot_security_updates: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_security_updatesPayload? = nil, code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? = nil, + code_scanning_default_setup_options: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setup_optionsPayload? = nil, secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? = nil, secret_scanning_delegated_bypass: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_delegated_bypassPayload? = nil, @@ -1339,6 +1382,7 @@ public enum Components { self.dependabot_alerts = dependabot_alerts self.dependabot_security_updates = dependabot_security_updates self.code_scanning_default_setup = code_scanning_default_setup + self.code_scanning_default_setup_options = code_scanning_default_setup_options self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_delegated_bypass = secret_scanning_delegated_bypass @@ -1364,6 +1408,7 @@ public enum Components { case dependabot_alerts case dependabot_security_updates case code_scanning_default_setup + case code_scanning_default_setup_options case secret_scanning case secret_scanning_push_protection case secret_scanning_delegated_bypass @@ -1378,6 +1423,43 @@ public enum Components { case updated_at } } + /// Feature options for code scanning default setup + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-options`. + public struct code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options: Codable, Hashable, Sendable { + /// Whether to use labeled runners or standard GitHub runners. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-options/runner_type`. + @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable { + case standard = "standard" + case labeled = "labeled" + case not_set = "not_set" + } + /// Whether to use labeled runners or standard GitHub runners. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-options/runner_type`. + public var runner_type: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.runner_typePayload? + /// The label of the runner to use for code scanning default setup when runner_type is 'labeled'. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-options/runner_label`. + public var runner_label: Swift.String? + /// Creates a new `code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options`. + /// + /// - Parameters: + /// - runner_type: Whether to use labeled runners or standard GitHub runners. + /// - runner_label: The label of the runner to use for code scanning default setup when runner_type is 'labeled'. + public init( + runner_type: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.runner_typePayload? = nil, + runner_label: Swift.String? = nil + ) { + self.runner_type = runner_type + self.runner_label = runner_label + } + public enum CodingKeys: String, CodingKey { + case runner_type + case runner_label + } + } /// - Remark: Generated from `#/components/schemas/code_hyphen_security_hyphen_default_hyphen_configurations`. public struct code_hyphen_security_hyphen_default_hyphen_configurationsPayload: Codable, Hashable, Sendable { /// The visibility of newly created repositories for which the code security configuration will be applied to by default @@ -2072,6 +2154,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/code_scanning_default_setup`. public var code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/code_scanning_default_setup_options`. + public var code_scanning_default_setup_options: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options? /// The enablement status of secret scanning /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning`. @@ -2228,6 +2312,7 @@ public enum Operations { /// - dependabot_alerts: The enablement status of Dependabot alerts /// - dependabot_security_updates: The enablement status of Dependabot security updates /// - code_scanning_default_setup: The enablement status of code scanning default setup + /// - code_scanning_default_setup_options: /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_delegated_bypass: The enablement status of secret scanning delegated bypass @@ -2246,6 +2331,7 @@ public enum Operations { dependabot_alerts: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? = nil, dependabot_security_updates: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? = nil, code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, + code_scanning_default_setup_options: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options? = nil, secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, secret_scanning_delegated_bypass: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload? = nil, @@ -2264,6 +2350,7 @@ public enum Operations { self.dependabot_alerts = dependabot_alerts self.dependabot_security_updates = dependabot_security_updates self.code_scanning_default_setup = code_scanning_default_setup + self.code_scanning_default_setup_options = code_scanning_default_setup_options self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_delegated_bypass = secret_scanning_delegated_bypass @@ -2283,6 +2370,7 @@ public enum Operations { case dependabot_alerts case dependabot_security_updates case code_scanning_default_setup + case code_scanning_default_setup_options case secret_scanning case secret_scanning_push_protection case secret_scanning_delegated_bypass @@ -2330,6 +2418,10 @@ public enum Operations { Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, forKey: .code_scanning_default_setup ) + code_scanning_default_setup_options = try container.decodeIfPresent( + Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.self, + forKey: .code_scanning_default_setup_options + ) secret_scanning = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, forKey: .secret_scanning @@ -2372,6 +2464,7 @@ public enum Operations { "dependabot_alerts", "dependabot_security_updates", "code_scanning_default_setup", + "code_scanning_default_setup_options", "secret_scanning", "secret_scanning_push_protection", "secret_scanning_delegated_bypass", @@ -3303,6 +3396,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_default_setup`. public var code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_default_setup_options`. + public var code_scanning_default_setup_options: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options? /// The enablement status of secret scanning /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning`. @@ -3459,6 +3554,7 @@ public enum Operations { /// - dependabot_alerts: The enablement status of Dependabot alerts /// - dependabot_security_updates: The enablement status of Dependabot security updates /// - code_scanning_default_setup: The enablement status of code scanning default setup + /// - code_scanning_default_setup_options: /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_delegated_bypass: The enablement status of secret scanning delegated bypass @@ -3477,6 +3573,7 @@ public enum Operations { dependabot_alerts: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? = nil, dependabot_security_updates: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? = nil, code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, + code_scanning_default_setup_options: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options? = nil, secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, secret_scanning_delegated_bypass: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload? = nil, @@ -3495,6 +3592,7 @@ public enum Operations { self.dependabot_alerts = dependabot_alerts self.dependabot_security_updates = dependabot_security_updates self.code_scanning_default_setup = code_scanning_default_setup + self.code_scanning_default_setup_options = code_scanning_default_setup_options self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection self.secret_scanning_delegated_bypass = secret_scanning_delegated_bypass @@ -3514,6 +3612,7 @@ public enum Operations { case dependabot_alerts case dependabot_security_updates case code_scanning_default_setup + case code_scanning_default_setup_options case secret_scanning case secret_scanning_push_protection case secret_scanning_delegated_bypass @@ -3561,6 +3660,10 @@ public enum Operations { Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, forKey: .code_scanning_default_setup ) + code_scanning_default_setup_options = try container.decodeIfPresent( + Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.self, + forKey: .code_scanning_default_setup_options + ) secret_scanning = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, forKey: .secret_scanning @@ -3603,6 +3706,7 @@ public enum Operations { "dependabot_alerts", "dependabot_security_updates", "code_scanning_default_setup", + "code_scanning_default_setup_options", "secret_scanning", "secret_scanning_push_protection", "secret_scanning_delegated_bypass", From a310ebce322a6495ecfeb7a9ff1bca62011b175d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 21:51:15 +0000 Subject: [PATCH 121/129] Bump github.com/apple/swift-openapi-runtime from 1.5.0 to 1.8.0 Bumps [github.com/apple/swift-openapi-runtime](https://github.com/apple/swift-openapi-runtime) from 1.5.0 to 1.8.0. - [Release notes](https://github.com/apple/swift-openapi-runtime/releases) - [Commits](https://github.com/apple/swift-openapi-runtime/compare/1.5.0...1.8.0) --- updated-dependencies: - dependency-name: github.com/apple/swift-openapi-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index ce4c18f2b2a..3cde30f939b 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-openapi-runtime", "state" : { - "revision" : "26e8ae3515d1ff3607e924ac96fc0094775f55e8", - "version" : "1.5.0" + "revision" : "23146bc8710ac5e57abb693113f02dc274cf39b6", + "version" : "1.8.0" } }, { From 0d10baf13058e2397728503f02385882cfebaa9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:22:56 +0000 Subject: [PATCH 122/129] Bump github.com/apple/swift-openapi-runtime from 1.8.0 to 1.8.2 Bumps [github.com/apple/swift-openapi-runtime](https://github.com/apple/swift-openapi-runtime) from 1.8.0 to 1.8.2. - [Release notes](https://github.com/apple/swift-openapi-runtime/releases) - [Commits](https://github.com/apple/swift-openapi-runtime/compare/1.8.0...1.8.2) --- updated-dependencies: - dependency-name: github.com/apple/swift-openapi-runtime dependency-version: 1.8.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index 3cde30f939b..ac9f059e951 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-openapi-runtime", "state" : { - "revision" : "23146bc8710ac5e57abb693113f02dc274cf39b6", - "version" : "1.8.0" + "revision" : "8f33cc5dfe81169fb167da73584b9c72c3e8bc23", + "version" : "1.8.2" } }, { From d1ba45d40f93055e2aa0980afa9a202f99054e6d Mon Sep 17 00:00:00 2001 From: Wei <11254896+Wei18@users.noreply.github.com> Date: Sun, 13 Apr 2025 11:49:50 +0800 Subject: [PATCH 123/129] Update CI-Dependabot.yml --- .github/workflows/CI-Dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI-Dependabot.yml b/.github/workflows/CI-Dependabot.yml index df8e19bae5d..01a52ae33cb 100644 --- a/.github/workflows/CI-Dependabot.yml +++ b/.github/workflows/CI-Dependabot.yml @@ -18,7 +18,7 @@ jobs: - ubuntu-latest # - macos-latest #Fix: The macos-latest workflow label currently uses the macOS 12 runner image. # - macos-13 - swift: ["5.9"] + swift: [5, 6] runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: From 0424214efa93ebfd60c40a10b250b11bb858936d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:49:45 +0000 Subject: [PATCH 124/129] Bump Submodule/github/rest-api-description from `4ab8513` to `1cd73ab` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `4ab8513` to `1cd73ab`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/4ab8513682637010cd3bb5d8ee3227cc5ce739d1...1cd73ab20b4ba8355d380bd1f422ddf49c47a7af) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-version: 1cd73ab20b4ba8355d380bd1f422ddf49c47a7af dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 4ab85136826..1cd73ab20b4 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 4ab8513682637010cd3bb5d8ee3227cc5ce739d1 +Subproject commit 1cd73ab20b4ba8355d380bd1f422ddf49c47a7af From 5682d1636cabfb9a0b1b11bc200191a000139c5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 22:01:02 +0000 Subject: [PATCH 125/129] Bump github.com/apple/swift-openapi-urlsession from 1.0.2 to 1.1.0 Bumps [github.com/apple/swift-openapi-urlsession](https://github.com/apple/swift-openapi-urlsession) from 1.0.2 to 1.1.0. - [Release notes](https://github.com/apple/swift-openapi-urlsession/releases) - [Commits](https://github.com/apple/swift-openapi-urlsession/compare/1.0.2...1.1.0) --- updated-dependencies: - dependency-name: github.com/apple/swift-openapi-urlsession dependency-version: 1.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index ac9f059e951..8c6bb3a0658 100644 --- a/Package.resolved +++ b/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-openapi-urlsession", "state" : { - "revision" : "9bf4c712ad7989d6a91dbe68748b8829a50837e4", - "version" : "1.0.2" + "revision" : "6fac6f7c428d5feea2639b5f5c8b06ddfb79434b", + "version" : "1.1.0" } } ], From 8e069fac9dea1add0dbbd20380ea79e87fcc3a61 Mon Sep 17 00:00:00 2001 From: Wei <11254896+Wei18@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:13:41 +0800 Subject: [PATCH 126/129] Update dependabot.yml --- .github/dependabot.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d92c5ad8035..dc976043056 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,7 @@ version: 2 updates: - package-ecosystem: "github-actions" - directories: - - "/.github/*" + directory: "/" schedule: interval: "weekly" From 9b059e7a95a36836b834d56305a54776ace3eb6b Mon Sep 17 00:00:00 2001 From: Wei <11254896+Wei18@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:29:01 +0800 Subject: [PATCH 127/129] Update Release.yml --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 1fdf097face..1fb5c386a28 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,7 +49,7 @@ jobs: permissions: contents: write steps: - - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.3 + - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.5 with: owner: ${{ github.repository_owner }} repo: ${{ github.event.repository.name }} From 28d3dfd89dbc28f16f26fcf14aaec39e8a1ac8e6 Mon Sep 17 00:00:00 2001 From: Wei <11254896+Wei18@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:40:17 +0800 Subject: [PATCH 128/129] Update Release.yml --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 1fb5c386a28..f843ff7065c 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,7 +49,7 @@ jobs: permissions: contents: write steps: - - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.5 + - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.7 with: owner: ${{ github.repository_owner }} repo: ${{ github.event.repository.name }} From 92f0c546b1b4f7aa5b2ff021b998b0fead73a794 Mon Sep 17 00:00:00 2001 From: Wei18 Date: Sat, 19 Apr 2025 16:40:35 +0000 Subject: [PATCH 129/129] Remove submodule --- .gitmodules | 4 ---- Submodule/github/rest-api-description | 1 - 2 files changed, 5 deletions(-) delete mode 160000 Submodule/github/rest-api-description diff --git a/.gitmodules b/.gitmodules index cfdc733eb75..e69de29bb2d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +0,0 @@ -[submodule "Submodule/github/rest-api-description"] - path = Submodule/github/rest-api-description - url = https://github.com/github/rest-api-description.git - shallow = true diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description deleted file mode 160000 index 1cd73ab20b4..00000000000 --- a/Submodule/github/rest-api-description +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1cd73ab20b4ba8355d380bd1f422ddf49c47a7af