diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 795912164e1..26a285de274 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,8 @@ version: 2 updates: - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "github-actions" - directory: "/.github/workflows/actions/setup" + directories: + - "/.github/*" schedule: interval: "weekly" @@ -15,7 +11,8 @@ updates: schedule: interval: "weekly" - - package-ecosystem: "gitsubmodule" - directory: "/" - schedule: - interval: "weekly" +# FIXME: Need other way to update OAS. + # - package-ecosystem: "gitsubmodule" + # directory: "/" + # schedule: + # interval: "weekly" diff --git a/.github/workflows/actions/setup/action.yml b/.github/workflows/actions/setup/action.yml index bddae8f8599..284e9c0df27 100644 --- a/.github/workflows/actions/setup/action.yml +++ b/.github/workflows/actions/setup/action.yml @@ -11,42 +11,44 @@ inputs: runs: using: 'composite' steps: - - uses: swift-actions/setup-swift@v2 - with: - swift-version: ${{ inputs.swift }} - - uses: irgaly/setup-mint@v1 - - uses: dcarbone/install-yq-action@v1.1.1 - - - name: "Xcode Cache" - if: contains(inputs.os, 'macos') - uses: irgaly/xcode-cache@v1 - with: - key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }} - restore-keys: xcode-cache-deriveddata-${{ github.workflow }}- - - # - name: "Set IgnoreFileSystemDeviceInodeChanges flag" - # if: contains(inputs.os, 'macos') - # shell: bash - # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - uses: swift-actions/setup-swift@v2 + with: + swift-version: ${{ inputs.swift }} + - uses: irgaly/setup-mint@v1 + with: + mint-executable-directory: $HOME/.mint/bin + - uses: dcarbone/install-yq-action@v1.1.1 - - name: "Swift Package Manager Cache" - uses: actions/cache@v4 - with: - path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} - restore-keys: | - ${{ runner.os }}-spm- - - - name: "Compiling Cache" - uses: actions/cache@v4 - with: - path: ~/Library/Caches/org.swift.swiftpm/ - key: ${{ runner.os }}-swift-build-${{ github.ref_name }} - restore-keys: | - ${{ runner.os }}-swift-build- - -# Hint: Use Composite Actions -# - https://stackoverflow.com/a/75735736/9801139 -# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-public-action-in-a-subdirectory -# - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action -# - https://dev.to/n3wt0n/composite-actions-vs-reusable-workflows-what-is-the-difference-github-actions-11kd + - name: "Xcode Cache" + if: contains(inputs.os, 'macos') + uses: irgaly/xcode-cache@v1 + with: + key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }} + restore-keys: xcode-cache-deriveddata-${{ github.workflow }}- + + # - name: "Set IgnoreFileSystemDeviceInodeChanges flag" + # if: contains(inputs.os, 'macos') + # shell: bash + # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + + - name: "Swift Package Manager Cache" + uses: actions/cache@v4 + with: + path: .build + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- + + - name: "Compiling Cache" + uses: actions/cache@v4 + with: + path: ~/Library/Caches/org.swift.swiftpm/ + key: ${{ runner.os }}-swift-build-${{ github.ref_name }} + restore-keys: | + ${{ runner.os }}-swift-build- + + # Hint: Use Composite Actions + # - https://stackoverflow.com/a/75735736/9801139 + # - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-public-action-in-a-subdirectory + # - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action + # - https://dev.to/n3wt0n/composite-actions-vs-reusable-workflows-what-is-the-difference-github-actions-11kd diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 447dc5dcab2..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "Submodule/github/rest-api-description"] - path = Submodule/github/rest-api-description - url = ../../github/rest-api-description.git - shallow = true diff --git a/Makefile b/Makefile index 02a70fc2c3e..f608a353573 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ OPENAPI_PATH := Submodule/github/rest-api-description/descriptions/api.github. FILTERED_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH)) SOURCE_DIRS := $(addprefix Sources/, $(FILTERED_NAMES)) PACKAGE_PATHS := Package.swift +# Fix: https://github.com/irgaly/setup-mint/pull/25 +MINT_BIN := $(HOME)/.mint/bin/mint # Helper .SILENT: commit @@ -28,7 +30,7 @@ commit: %/Client.swift %/Types.swift: $(OPENAPI_PATH) @echo "\n\nFolder $(@D) running" @$(MAKE) "$(@D)/openapi-generator-config.yml" - mint run apple/swift-openapi-generator generate \ + $(MINT_BIN) run apple/swift-openapi-generator generate \ "$(OPENAPI_PATH)" \ --config "$(@D)/openapi-generator-config.yml" \ --output-directory "$(@D)"; diff --git a/Mintfile b/Mintfile index 57f276d6da2..2f3aaf0b8b9 100644 --- a/Mintfile +++ b/Mintfile @@ -1 +1,2 @@ -apple/swift-openapi-generator@1.1.0 \ No newline at end of file +yonaskolb/Mint@0.17.5 +apple/swift-openapi-generator@1.2.1 diff --git a/Package.resolved b/Package.resolved index 4b2c225a81f..ce4c18f2b2a 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-openapi-runtime", "state" : { - "revision" : "9a8291fa2f90cc7296f2393a99bb4824ee34f869", - "version" : "1.4.0" + "revision" : "26e8ae3515d1ff3607e924ac96fc0094775f55e8", + "version" : "1.5.0" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-openapi-urlsession", "state" : { - "revision" : "6efbfda5276bbbc8b4fec5d744f0ecd8c784eb47", - "version" : "1.0.1" + "revision" : "9bf4c712ad7989d6a91dbe68748b8829a50837e4", + "version" : "1.0.2" } } ], diff --git a/Sources/actions/Client.swift b/Sources/actions/Client.swift index 27f77f31e77..add941952b2 100644 --- a/Sources/actions/Client.swift +++ b/Sources/actions/Client.swift @@ -6809,8 +6809,8 @@ public struct Client: APIProtocol { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index be94db61de4..b81f0496849 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -984,8 +984,8 @@ public protocol APIProtocol: Sendable { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// @@ -3027,8 +3027,8 @@ extension APIProtocol { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// @@ -3740,7 +3740,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -3803,7 +3803,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -3947,7 +3947,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -4010,7 +4010,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -4180,7 +4180,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -4623,7 +4623,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -4956,6 +4956,251 @@ public enum Components { case html_url } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// 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. /// /// - Remark: Generated from `#/components/schemas/nullable-integration`. @@ -4970,6 +5215,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -5100,8 +5347,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -5114,6 +5359,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -5124,7 +5370,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -5132,6 +5377,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -5142,7 +5388,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -5150,6 +5395,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -5160,7 +5406,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -5169,6 +5414,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -5179,7 +5425,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -5274,15 +5519,37 @@ public enum Components { /// /// - Parameters: /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { self.status = status } public enum CodingKeys: String, CodingKey { case status } } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -5290,22 +5557,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -5313,7 +5584,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -5661,7 +5932,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -6070,7 +6341,8 @@ public enum Components { public var verified_allowed: Swift.Bool? /// Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`. /// - /// **Note**: The `patterns_allowed` setting only applies to public repositories. + /// > [!NOTE] + /// > The `patterns_allowed` setting only applies to public repositories. /// /// - Remark: Generated from `#/components/schemas/selected-actions/patterns_allowed`. public var patterns_allowed: [Swift.String]? @@ -6551,251 +6823,6 @@ public enum Components { case selected_repositories_url } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } /// An artifact /// /// - Remark: Generated from `#/components/schemas/artifact`. @@ -7490,7 +7517,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. public struct pull_hyphen_request_hyphen_minimal: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/number`. public var number: Swift.Int /// - Remark: Generated from `#/components/schemas/pull-request-minimal/url`. @@ -7504,7 +7531,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/name`. @@ -7516,7 +7543,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -7564,7 +7591,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/name`. @@ -7576,7 +7603,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -7624,7 +7651,7 @@ public enum Components { /// - head: /// - base: public init( - id: Swift.Int, + id: Swift.Int64, number: Swift.Int, url: Swift.String, head: Components.Schemas.pull_hyphen_request_hyphen_minimal.headPayload, @@ -8235,7 +8262,7 @@ public enum Components { /// The id of the environment. /// /// - Remark: Generated from `#/components/schemas/pending-deployment/environment/id`. - public var id: Swift.Int? + public var id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/pending-deployment/environment/node_id`. public var node_id: Swift.String? /// The name of the environment. @@ -8255,7 +8282,7 @@ public enum Components { /// - url: /// - html_url: public init( - id: Swift.Int? = nil, + id: Swift.Int64? = nil, node_id: Swift.String? = nil, name: Swift.String? = nil, url: Swift.String? = nil, @@ -8403,7 +8430,7 @@ public enum Components { /// Unique identifier of the deployment /// /// - Remark: Generated from `#/components/schemas/deployment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/deployment/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/deployment/sha`. @@ -8522,7 +8549,7 @@ public enum Components { /// - performed_via_github_app: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, sha: Swift.String, ref: Swift.String, @@ -22993,8 +23020,8 @@ public enum Operations { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// diff --git a/Sources/activity/Client.swift b/Sources/activity/Client.swift index 0210a5d032b..b052b53df12 100644 --- a/Sources/activity/Client.swift +++ b/Sources/activity/Client.swift @@ -40,7 +40,8 @@ public struct Client: APIProtocol { } /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!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. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -174,7 +175,8 @@ public struct Client: APIProtocol { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. @@ -236,7 +238,8 @@ public struct Client: APIProtocol { } /// List public events for a network of repositories /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -1229,7 +1232,8 @@ public struct Client: APIProtocol { } /// List public organization events /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. @@ -1307,8 +1311,8 @@ public struct Client: APIProtocol { } /// List repository events /// - /// **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. - /// + /// > [!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. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. @@ -2614,6 +2618,9 @@ public struct Client: APIProtocol { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. public func activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output { @@ -2692,6 +2699,9 @@ public struct Client: APIProtocol { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. public func activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output { @@ -2769,7 +2779,8 @@ public struct Client: APIProtocol { } /// List public events for a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. @@ -2847,7 +2858,11 @@ public struct Client: APIProtocol { } /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. @@ -2925,7 +2940,8 @@ public struct Client: APIProtocol { } /// List public events received by a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 687bb8f2231..e764875c002 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -13,7 +13,8 @@ import struct Foundation.Date public protocol APIProtocol: Sendable { /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!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. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -32,14 +33,16 @@ public protocol APIProtocol: Sendable { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. func activity_sol_get_hyphen_feeds(_ input: Operations.activity_sol_get_hyphen_feeds.Input) async throws -> Operations.activity_sol_get_hyphen_feeds.Output /// List public events for a network of repositories /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -108,15 +111,16 @@ public protocol APIProtocol: Sendable { func activity_sol_delete_hyphen_thread_hyphen_subscription(_ input: Operations.activity_sol_delete_hyphen_thread_hyphen_subscription.Input) async throws -> Operations.activity_sol_delete_hyphen_thread_hyphen_subscription.Output /// List public organization events /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. func activity_sol_list_hyphen_public_hyphen_org_hyphen_events(_ input: Operations.activity_sol_list_hyphen_public_hyphen_org_hyphen_events.Input) async throws -> Operations.activity_sol_list_hyphen_public_hyphen_org_hyphen_events.Output /// List repository events /// - /// **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. - /// + /// > [!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. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. @@ -217,6 +221,9 @@ public protocol APIProtocol: Sendable { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. func activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output @@ -224,26 +231,35 @@ public protocol APIProtocol: Sendable { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. func activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output /// List public events for a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. func activity_sol_list_hyphen_public_hyphen_events_hyphen_for_hyphen_user(_ input: Operations.activity_sol_list_hyphen_public_hyphen_events_hyphen_for_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_public_hyphen_events_hyphen_for_hyphen_user.Output /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. func activity_sol_list_hyphen_received_hyphen_events_hyphen_for_hyphen_user(_ input: Operations.activity_sol_list_hyphen_received_hyphen_events_hyphen_for_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_received_hyphen_events_hyphen_for_hyphen_user.Output /// List public events received by a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. @@ -272,7 +288,8 @@ public protocol APIProtocol: Sendable { extension APIProtocol { /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!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. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -299,7 +316,8 @@ extension APIProtocol { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. @@ -308,7 +326,8 @@ extension APIProtocol { } /// List public events for a network of repositories /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -447,7 +466,8 @@ extension APIProtocol { } /// List public organization events /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. @@ -464,8 +484,8 @@ extension APIProtocol { } /// List repository events /// - /// **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. - /// + /// > [!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. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. @@ -676,6 +696,9 @@ extension APIProtocol { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. public func activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user( @@ -693,6 +716,9 @@ extension APIProtocol { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. public func activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user( @@ -708,7 +734,8 @@ extension APIProtocol { } /// List public events for a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. @@ -725,7 +752,11 @@ extension APIProtocol { } /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. @@ -742,7 +773,8 @@ extension APIProtocol { } /// List public events received by a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. @@ -822,7 +854,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -885,7 +917,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -998,7 +1030,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1061,7 +1093,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1307,7 +1339,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1750,7 +1782,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2268,6 +2300,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -2398,8 +2432,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -2412,6 +2444,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -2422,7 +2455,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -2430,6 +2462,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -2440,7 +2473,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -2448,6 +2480,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -2458,7 +2491,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -2467,6 +2499,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -2477,7 +2510,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -3493,6 +3525,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -3500,22 +3554,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -3523,7 +3581,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -3871,7 +3929,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -4676,7 +4734,8 @@ public enum Components { public enum Operations { /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!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. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -4898,7 +4957,8 @@ public enum Operations { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. @@ -5010,7 +5070,8 @@ public enum Operations { } /// List public events for a network of repositories /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -6843,7 +6904,8 @@ public enum Operations { } /// List public organization events /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. @@ -7002,8 +7064,8 @@ public enum Operations { } /// List repository events /// - /// **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. - /// + /// > [!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. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. @@ -9667,6 +9729,9 @@ public enum Operations { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. public enum activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user { @@ -9826,6 +9891,9 @@ public enum Operations { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!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. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. public enum activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user { @@ -9992,7 +10060,8 @@ public enum Operations { } /// List public events for a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. @@ -10151,7 +10220,11 @@ public enum Operations { } /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. @@ -10310,7 +10383,8 @@ public enum Operations { } /// List public events received by a user /// - /// + /// > [!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. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. diff --git a/Sources/apps/Client.swift b/Sources/apps/Client.swift index de332360634..dfae4f8f131 100644 --- a/Sources/apps/Client.swift +++ b/Sources/apps/Client.swift @@ -1388,7 +1388,7 @@ public struct Client: APIProtocol { } /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -1464,7 +1464,7 @@ public struct Client: APIProtocol { } /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. @@ -1581,7 +1581,7 @@ public struct Client: APIProtocol { } /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. @@ -1676,7 +1676,7 @@ public struct Client: APIProtocol { } /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -1757,10 +1757,6 @@ public struct Client: APIProtocol { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. public func apps_sol_scope_hyphen_token(_ input: Operations.apps_sol_scope_hyphen_token.Input) async throws -> Operations.apps_sol_scope_hyphen_token.Output { @@ -1920,7 +1916,8 @@ public struct Client: APIProtocol { } /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. @@ -3375,7 +3372,9 @@ public struct Client: APIProtocol { } /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. @@ -3466,7 +3465,9 @@ public struct Client: APIProtocol { } /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index 3cf04b1188e..cf1b9cc4451 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -141,7 +141,7 @@ public protocol APIProtocol: Sendable { func apps_sol_unsuspend_hyphen_installation(_ input: Operations.apps_sol_unsuspend_hyphen_installation.Input) async throws -> Operations.apps_sol_unsuspend_hyphen_installation.Output /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -149,21 +149,21 @@ public protocol APIProtocol: Sendable { func apps_sol_delete_hyphen_authorization(_ input: Operations.apps_sol_delete_hyphen_authorization.Input) async throws -> Operations.apps_sol_delete_hyphen_authorization.Output /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. func apps_sol_check_hyphen_token(_ input: Operations.apps_sol_check_hyphen_token.Input) async throws -> Operations.apps_sol_check_hyphen_token.Output /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. func apps_sol_reset_hyphen_token(_ input: Operations.apps_sol_reset_hyphen_token.Input) async throws -> Operations.apps_sol_reset_hyphen_token.Output /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -176,16 +176,13 @@ public protocol APIProtocol: Sendable { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. func apps_sol_scope_hyphen_token(_ input: Operations.apps_sol_scope_hyphen_token.Input) async throws -> Operations.apps_sol_scope_hyphen_token.Output /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. @@ -302,14 +299,18 @@ public protocol APIProtocol: Sendable { func apps_sol_list_hyphen_installation_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.apps_sol_list_hyphen_installation_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.apps_sol_list_hyphen_installation_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user.Output /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. func apps_sol_add_hyphen_repo_hyphen_to_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.apps_sol_add_hyphen_repo_hyphen_to_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.apps_sol_add_hyphen_repo_hyphen_to_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user.Output /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. @@ -573,7 +574,7 @@ extension APIProtocol { } /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -591,7 +592,7 @@ extension APIProtocol { } /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. @@ -608,7 +609,7 @@ extension APIProtocol { } /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. @@ -625,7 +626,7 @@ extension APIProtocol { } /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -648,10 +649,6 @@ extension APIProtocol { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. public func apps_sol_scope_hyphen_token( @@ -667,7 +664,8 @@ extension APIProtocol { } /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. @@ -888,7 +886,9 @@ extension APIProtocol { } /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. @@ -903,7 +903,9 @@ extension APIProtocol { } /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. @@ -990,7 +992,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1053,7 +1055,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1197,7 +1199,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1260,7 +1262,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1339,6 +1341,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -1469,8 +1473,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/webhook_secret`. @@ -1483,6 +1485,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -1493,7 +1496,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -1501,6 +1503,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -1511,7 +1514,6 @@ public enum Components { permissions: Components.Schemas.integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -1519,6 +1521,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -1529,7 +1532,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -1538,6 +1540,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -1548,7 +1551,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -3317,7 +3319,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -3760,7 +3762,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -4183,7 +4185,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/authorization`. public struct authorization: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/authorization/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/authorization/url`. public var url: Swift.String /// A list of scopes that this authorization is in. @@ -4262,7 +4264,7 @@ public enum Components { /// - installation: /// - expires_at: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, scopes: [Swift.String]? = nil, token: Swift.String, @@ -7426,7 +7428,7 @@ public enum Operations { } /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -7584,7 +7586,7 @@ public enum Operations { } /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. @@ -7788,7 +7790,7 @@ public enum Operations { } /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. @@ -7969,7 +7971,7 @@ public enum Operations { } /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -8132,10 +8134,6 @@ public enum Operations { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. public enum apps_sol_scope_hyphen_token { @@ -8424,7 +8422,8 @@ public enum Operations { } /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. @@ -11050,7 +11049,9 @@ public enum Operations { } /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. @@ -11236,7 +11237,9 @@ public enum Operations { } /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. diff --git a/Sources/checks/Client.swift b/Sources/checks/Client.swift index 74a2ce03de2..c5b2d196a42 100644 --- a/Sources/checks/Client.swift +++ b/Sources/checks/Client.swift @@ -46,7 +46,8 @@ public struct Client: APIProtocol { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -122,7 +123,8 @@ public struct Client: APIProtocol { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -192,7 +194,8 @@ public struct Client: APIProtocol { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -497,7 +500,8 @@ public struct Client: APIProtocol { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -672,7 +676,8 @@ public struct Client: APIProtocol { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -742,7 +747,8 @@ public struct Client: APIProtocol { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -923,7 +929,8 @@ public struct Client: APIProtocol { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -1045,7 +1052,8 @@ public struct Client: APIProtocol { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 7562aa0772a..ab0d2c93dc3 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -19,7 +19,8 @@ public protocol APIProtocol: Sendable { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -28,7 +29,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -39,7 +41,8 @@ public protocol APIProtocol: Sendable { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -70,7 +73,8 @@ public protocol APIProtocol: Sendable { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -89,7 +93,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -100,7 +105,8 @@ public protocol APIProtocol: Sendable { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -120,7 +126,8 @@ public protocol APIProtocol: Sendable { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -133,7 +140,8 @@ public protocol APIProtocol: Sendable { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -152,7 +160,8 @@ extension APIProtocol { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -171,7 +180,8 @@ extension APIProtocol { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -190,7 +200,8 @@ extension APIProtocol { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -249,7 +260,8 @@ extension APIProtocol { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -288,7 +300,8 @@ extension APIProtocol { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -307,7 +320,8 @@ extension APIProtocol { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -345,7 +359,8 @@ extension APIProtocol { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -368,7 +383,8 @@ extension APIProtocol { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -412,7 +428,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -475,7 +491,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -588,7 +604,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -651,7 +667,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -773,6 +789,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -903,8 +921,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -917,6 +933,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -927,7 +944,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -935,6 +951,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -945,7 +962,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -953,6 +969,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -963,7 +980,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -972,6 +988,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -982,7 +999,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -1086,6 +1102,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1093,22 +1131,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -1116,7 +1158,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -1464,7 +1506,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -1743,7 +1785,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. public struct pull_hyphen_request_hyphen_minimal: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/number`. public var number: Swift.Int /// - Remark: Generated from `#/components/schemas/pull-request-minimal/url`. @@ -1757,7 +1799,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/name`. @@ -1769,7 +1811,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -1817,7 +1859,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/name`. @@ -1829,7 +1871,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -1877,7 +1919,7 @@ public enum Components { /// - head: /// - base: public init( - id: Swift.Int, + id: Swift.Int64, number: Swift.Int, url: Swift.String, head: Components.Schemas.pull_hyphen_request_hyphen_minimal.headPayload, @@ -2011,7 +2053,7 @@ public enum Components { /// The id of the check. /// /// - Remark: Generated from `#/components/schemas/check-run/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The SHA of the commit that is being checked. /// /// - Remark: Generated from `#/components/schemas/check-run/head_sha`. @@ -2150,7 +2192,7 @@ public enum Components { /// - pull_requests: Pull requests that are open with a `head_sha` or `head_branch` that matches the check. The returned pull requests do not necessarily indicate pull requests that triggered the check. /// - deployment: public init( - id: Swift.Int, + id: Swift.Int64, head_sha: Swift.String, node_id: Swift.String, external_id: Swift.String? = nil, @@ -2712,7 +2754,8 @@ public enum Operations { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -2979,7 +3022,8 @@ public enum Operations { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -3131,7 +3175,8 @@ public enum Operations { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -3890,7 +3935,8 @@ public enum Operations { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -4311,7 +4357,8 @@ public enum Operations { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -4463,7 +4510,8 @@ public enum Operations { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -4866,7 +4914,8 @@ public enum Operations { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -5126,7 +5175,8 @@ public enum Operations { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index d4e6d8808e2..4f1ba064bfe 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -876,8 +876,8 @@ public struct Client: APIProtocol { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **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. + /// > [!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. /// /// 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 f0bcdcdb404..098effdac07 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -74,8 +74,8 @@ public protocol APIProtocol: Sendable { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **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. + /// > [!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. /// /// 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. /// @@ -412,8 +412,8 @@ extension APIProtocol { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **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. + /// > [!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. /// /// 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. /// @@ -768,7 +768,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -831,7 +831,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -944,7 +944,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1007,7 +1007,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1156,7 +1156,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -1385,7 +1385,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -1583,7 +1583,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-dismissed-reason`. @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_dismissed_hyphen_reason: String, Codable, Hashable, Sendable { - case _empty = "" case false_space_positive = "false positive" case won_apos_t_space_fix = "won't fix" case used_space_in_space_tests = "used in tests" @@ -1602,10 +1601,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/name`. public var name: 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]? /// The severity of the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/severity`. @@ -1636,37 +1631,41 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/description`. public var 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]? /// Creates a new `code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary`. /// /// - Parameters: /// - id: A unique identifier for the rule used to detect the alert. /// - name: The name of the rule used to detect the alert. - /// - tags: A set of tags applicable for the rule. /// - 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. + /// - tags: A set of tags applicable for the rule. public init( id: Swift.String? = nil, name: Swift.String? = nil, - tags: [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 + description: Swift.String? = nil, + tags: [Swift.String]? = nil ) { self.id = id self.name = name - self.tags = tags self.severity = severity self.security_severity_level = security_severity_level self.description = description + self.tags = tags } public enum CodingKeys: String, CodingKey { case id case name - case tags case severity case security_severity_level case description + case tags } } /// The version of the tool used to generate the code scanning analysis. @@ -4904,8 +4903,8 @@ public enum Operations { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **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. + /// > [!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. /// /// 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-security/Client.swift b/Sources/code-security/Client.swift index 87202523ac7..a6275de7d16 100644 --- a/Sources/code-security/Client.swift +++ b/Sources/code-security/Client.swift @@ -38,4 +38,1295 @@ public struct Client: APIProtocol { private var converter: Converter { client.converter } + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + public func code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org(_ input: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations", + 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: "target_type", + value: input.query.target_type + ) + 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: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + 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.code_hyphen_security_sol_get_hyphen_configurations_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.code_hyphen_security_hyphen_configuration].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)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + public func code_hyphen_security_sol_create_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_create_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_create_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations", + 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.code_hyphen_security_sol_create_hyphen_configuration.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.code_hyphen_security_hyphen_configuration.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 default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + public func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(_ input: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/defaults", + parameters: [ + input.path.org + ] + ) + 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.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.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.code_hyphen_security_hyphen_default_hyphen_configurations.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 304: + return .notModified(.init()) + 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 + ) + ) + } + } + ) + } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public func code_hyphen_security_sol_detach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_detach_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/detach", + parameters: [ + input.path.org + ] + ) + 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 204: + return .noContent(.init()) + 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 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 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.conflict.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 .conflict(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + public func code_hyphen_security_sol_get_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}", + parameters: [ + input.path.org, + input.path.configuration_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.code_hyphen_security_sol_get_hyphen_configuration.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.code_hyphen_security_hyphen_configuration.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 304: + return .notModified(.init()) + 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 + ) + ) + } + } + ) + } + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + public func code_hyphen_security_sol_update_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_update_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_update_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}", + parameters: [ + input.path.org, + input.path.configuration_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.code_hyphen_security_sol_update_hyphen_configuration.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.code_hyphen_security_hyphen_configuration.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Delete a code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + public func code_hyphen_security_sol_delete_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_delete_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_delete_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + 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 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 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 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.conflict.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 .conflict(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + public func code_hyphen_security_sol_attach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_attach_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_attach_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}/attach", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + 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 202: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.accepted.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + OpenAPIRuntime.OpenAPIObjectContainer.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .accepted(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Set a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + public func code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default(_ input: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input) async throws -> Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}/defaults", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + 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.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.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)) + 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 repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + public func code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}/repositories", + parameters: [ + input.path.org, + input.path.configuration_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: "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, + explode: true, + name: "status", + value: input.query.status + ) + 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.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.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.code_hyphen_security_hyphen_configuration_hyphen_repositories].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)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + public func code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/code-security-configuration", + 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 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.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.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 204: + return .noContent(.init()) + case 304: + return .notModified(.init()) + 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 + ) + ) + } + } + ) + } } diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 2a210decbff..76d78c0936f 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -10,10 +10,369 @@ import struct Foundation.Data import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. -public protocol APIProtocol: Sendable {} +public protocol APIProtocol: Sendable { + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + func code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org(_ input: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + func code_hyphen_security_sol_create_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_create_hyphen_configuration.Output + /// Get default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(_ input: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + func code_hyphen_security_sol_detach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output + /// Get a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + func code_hyphen_security_sol_get_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration.Output + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + func code_hyphen_security_sol_update_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_update_hyphen_configuration.Output + /// Delete a code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + func code_hyphen_security_sol_delete_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_delete_hyphen_configuration.Output + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + func code_hyphen_security_sol_attach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_attach_hyphen_configuration.Output + /// Set a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + func code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default(_ input: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input) async throws -> Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output + /// Get repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + func code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + func code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output +} /// Convenience overloads for operation inputs. extension APIProtocol { + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + public func code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org( + path: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output { + try await code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org(Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input( + path: path, + query: query, + headers: headers + )) + } + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + public func code_hyphen_security_sol_create_hyphen_configuration( + path: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_create_hyphen_configuration.Output { + try await code_hyphen_security_sol_create_hyphen_configuration(Operations.code_hyphen_security_sol_create_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } + /// Get default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + public func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations( + path: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output { + try await code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input( + path: path, + headers: headers + )) + } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public func code_hyphen_security_sol_detach_hyphen_configuration( + path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output { + try await code_hyphen_security_sol_detach_hyphen_configuration(Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } + /// Get a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + public func code_hyphen_security_sol_get_hyphen_configuration( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration.Output { + try await code_hyphen_security_sol_get_hyphen_configuration(Operations.code_hyphen_security_sol_get_hyphen_configuration.Input( + path: path, + headers: headers + )) + } + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + public func code_hyphen_security_sol_update_hyphen_configuration( + path: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_update_hyphen_configuration.Output { + try await code_hyphen_security_sol_update_hyphen_configuration(Operations.code_hyphen_security_sol_update_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } + /// Delete a code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + public func code_hyphen_security_sol_delete_hyphen_configuration( + path: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_delete_hyphen_configuration.Output { + try await code_hyphen_security_sol_delete_hyphen_configuration(Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input( + path: path, + headers: headers + )) + } + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + public func code_hyphen_security_sol_attach_hyphen_configuration( + path: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_attach_hyphen_configuration.Output { + try await code_hyphen_security_sol_attach_hyphen_configuration(Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } + /// Set a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + public func code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default( + path: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Path, + headers: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output { + try await code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input( + path: path, + headers: headers, + body: body + )) + } + /// Get repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + public func code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration( + path: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output { + try await code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration(Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + public func code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output { + try await code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository(Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input( + path: path, + headers: headers + )) + } } /// Server URLs defined in the OpenAPI document. @@ -29,16 +388,4161 @@ public enum Servers { /// 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 {} + public enum Schemas { + /// A GitHub user. + /// + /// - Remark: Generated from `#/components/schemas/simple-user`. + public struct simple_hyphen_user: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/simple-user/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/email`. + public var email: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/id`. + public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/gravatar_id`. + public var gravatar_id: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/followers_url`. + public var followers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/following_url`. + public var following_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/gists_url`. + public var gists_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/starred_url`. + public var starred_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/subscriptions_url`. + public var subscriptions_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/organizations_url`. + public var organizations_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/received_events_url`. + public var received_events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/type`. + public var _type: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/site_admin`. + public var site_admin: Swift.Bool + /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. + public var starred_at: Swift.String? + /// Creates a new `simple_hyphen_user`. + /// + /// - Parameters: + /// - name: + /// - email: + /// - login: + /// - id: + /// - node_id: + /// - avatar_url: + /// - gravatar_id: + /// - url: + /// - html_url: + /// - followers_url: + /// - following_url: + /// - gists_url: + /// - starred_url: + /// - subscriptions_url: + /// - organizations_url: + /// - repos_url: + /// - events_url: + /// - received_events_url: + /// - _type: + /// - site_admin: + /// - starred_at: + public init( + name: Swift.String? = nil, + email: Swift.String? = nil, + login: Swift.String, + id: Swift.Int64, + node_id: Swift.String, + avatar_url: Swift.String, + gravatar_id: Swift.String? = nil, + url: Swift.String, + html_url: Swift.String, + followers_url: Swift.String, + following_url: Swift.String, + gists_url: Swift.String, + starred_url: Swift.String, + subscriptions_url: Swift.String, + organizations_url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + received_events_url: Swift.String, + _type: Swift.String, + site_admin: Swift.Bool, + starred_at: Swift.String? = nil + ) { + self.name = name + self.email = email + self.login = login + self.id = id + self.node_id = node_id + self.avatar_url = avatar_url + self.gravatar_id = gravatar_id + self.url = url + self.html_url = html_url + self.followers_url = followers_url + self.following_url = following_url + self.gists_url = gists_url + self.starred_url = starred_url + self.subscriptions_url = subscriptions_url + self.organizations_url = organizations_url + self.repos_url = repos_url + self.events_url = events_url + self.received_events_url = received_events_url + self._type = _type + self.site_admin = site_admin + self.starred_at = starred_at + } + public enum CodingKeys: String, CodingKey { + case name + case email + case login + case id + case node_id + case avatar_url + case gravatar_id + case url + case html_url + case followers_url + case following_url + case gists_url + case starred_url + case subscriptions_url + case organizations_url + case repos_url + case events_url + case received_events_url + case _type = "type" + case site_admin + case starred_at + } + } + /// 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 + } + } + /// A GitHub repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository`. + public struct simple_hyphen_repository: Codable, Hashable, Sendable { + /// A unique identifier of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/id`. + public var id: Swift.Int64 + /// The GraphQL identifier of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. + public var node_id: Swift.String + /// The name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/name`. + public var name: Swift.String + /// The full, globally unique, name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/full_name`. + public var full_name: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-repository/owner`. + public var owner: Components.Schemas.simple_hyphen_user + /// Whether the repository is private. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/private`. + public var _private: Swift.Bool + /// The URL to view the repository on GitHub.com. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/html_url`. + public var html_url: Swift.String + /// The repository description. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/description`. + public var description: Swift.String? + /// Whether the repository is a fork. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/fork`. + public var fork: Swift.Bool + /// The URL to get more information about the repository from the GitHub API. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/url`. + public var url: Swift.String + /// A template for the API URL to download the repository as an archive. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/archive_url`. + public var archive_url: Swift.String + /// A template for the API URL to list the available assignees for issues in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/assignees_url`. + public var assignees_url: Swift.String + /// A template for the API URL to create or retrieve a raw Git blob in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/blobs_url`. + public var blobs_url: Swift.String + /// A template for the API URL to get information about branches in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/branches_url`. + public var branches_url: Swift.String + /// A template for the API URL to get information about collaborators of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/collaborators_url`. + public var collaborators_url: Swift.String + /// A template for the API URL to get information about comments on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/comments_url`. + public var comments_url: Swift.String + /// A template for the API URL to get information about commits on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/commits_url`. + public var commits_url: Swift.String + /// A template for the API URL to compare two commits or refs. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/compare_url`. + public var compare_url: Swift.String + /// A template for the API URL to get the contents of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/contents_url`. + public var contents_url: Swift.String + /// A template for the API URL to list the contributors to the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/contributors_url`. + public var contributors_url: Swift.String + /// The API URL to list the deployments of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/deployments_url`. + public var deployments_url: Swift.String + /// The API URL to list the downloads on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/downloads_url`. + public var downloads_url: Swift.String + /// The API URL to list the events of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/events_url`. + public var events_url: Swift.String + /// The API URL to list the forks of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/forks_url`. + public var forks_url: Swift.String + /// A template for the API URL to get information about Git commits of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_commits_url`. + public var git_commits_url: Swift.String + /// A template for the API URL to get information about Git refs of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_refs_url`. + public var git_refs_url: Swift.String + /// A template for the API URL to get information about Git tags of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_tags_url`. + public var git_tags_url: Swift.String + /// A template for the API URL to get information about issue comments on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issue_comment_url`. + public var issue_comment_url: Swift.String + /// A template for the API URL to get information about issue events on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issue_events_url`. + public var issue_events_url: Swift.String + /// A template for the API URL to get information about issues on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issues_url`. + public var issues_url: Swift.String + /// A template for the API URL to get information about deploy keys on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/keys_url`. + public var keys_url: Swift.String + /// A template for the API URL to get information about labels of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/labels_url`. + public var labels_url: Swift.String + /// The API URL to get information about the languages of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/languages_url`. + public var languages_url: Swift.String + /// The API URL to merge branches in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/merges_url`. + public var merges_url: Swift.String + /// A template for the API URL to get information about milestones of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/milestones_url`. + public var milestones_url: Swift.String + /// A template for the API URL to get information about notifications on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/notifications_url`. + public var notifications_url: Swift.String + /// A template for the API URL to get information about pull requests on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/pulls_url`. + public var pulls_url: Swift.String + /// A template for the API URL to get information about releases on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/releases_url`. + public var releases_url: Swift.String + /// The API URL to list the stargazers on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/stargazers_url`. + public var stargazers_url: Swift.String + /// A template for the API URL to get information about statuses of a commit. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/statuses_url`. + public var statuses_url: Swift.String + /// The API URL to list the subscribers on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/subscribers_url`. + public var subscribers_url: Swift.String + /// The API URL to subscribe to notifications for this repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/subscription_url`. + public var subscription_url: Swift.String + /// The API URL to get information about tags on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/tags_url`. + public var tags_url: Swift.String + /// The API URL to list the teams on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/teams_url`. + public var teams_url: Swift.String + /// A template for the API URL to create or retrieve a raw Git tree of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/trees_url`. + public var trees_url: Swift.String + /// The API URL to list the hooks on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/hooks_url`. + public var hooks_url: Swift.String + /// Creates a new `simple_hyphen_repository`. + /// + /// - Parameters: + /// - id: A unique identifier of the repository. + /// - node_id: The GraphQL identifier of the repository. + /// - name: The name of the repository. + /// - full_name: The full, globally unique, name of the repository. + /// - owner: + /// - _private: Whether the repository is private. + /// - html_url: The URL to view the repository on GitHub.com. + /// - description: The repository description. + /// - fork: Whether the repository is a fork. + /// - url: The URL to get more information about the repository from the GitHub API. + /// - archive_url: A template for the API URL to download the repository as an archive. + /// - assignees_url: A template for the API URL to list the available assignees for issues in the repository. + /// - blobs_url: A template for the API URL to create or retrieve a raw Git blob in the repository. + /// - branches_url: A template for the API URL to get information about branches in the repository. + /// - collaborators_url: A template for the API URL to get information about collaborators of the repository. + /// - comments_url: A template for the API URL to get information about comments on the repository. + /// - commits_url: A template for the API URL to get information about commits on the repository. + /// - compare_url: A template for the API URL to compare two commits or refs. + /// - contents_url: A template for the API URL to get the contents of the repository. + /// - contributors_url: A template for the API URL to list the contributors to the repository. + /// - deployments_url: The API URL to list the deployments of the repository. + /// - downloads_url: The API URL to list the downloads on the repository. + /// - events_url: The API URL to list the events of the repository. + /// - forks_url: The API URL to list the forks of the repository. + /// - git_commits_url: A template for the API URL to get information about Git commits of the repository. + /// - git_refs_url: A template for the API URL to get information about Git refs of the repository. + /// - git_tags_url: A template for the API URL to get information about Git tags of the repository. + /// - issue_comment_url: A template for the API URL to get information about issue comments on the repository. + /// - issue_events_url: A template for the API URL to get information about issue events on the repository. + /// - issues_url: A template for the API URL to get information about issues on the repository. + /// - keys_url: A template for the API URL to get information about deploy keys on the repository. + /// - labels_url: A template for the API URL to get information about labels of the repository. + /// - languages_url: The API URL to get information about the languages of the repository. + /// - merges_url: The API URL to merge branches in the repository. + /// - milestones_url: A template for the API URL to get information about milestones of the repository. + /// - notifications_url: A template for the API URL to get information about notifications on the repository. + /// - pulls_url: A template for the API URL to get information about pull requests on the repository. + /// - releases_url: A template for the API URL to get information about releases on the repository. + /// - stargazers_url: The API URL to list the stargazers on the repository. + /// - statuses_url: A template for the API URL to get information about statuses of a commit. + /// - subscribers_url: The API URL to list the subscribers on the repository. + /// - subscription_url: The API URL to subscribe to notifications for this repository. + /// - tags_url: The API URL to get information about tags on the repository. + /// - teams_url: The API URL to list the teams on the repository. + /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. + /// - hooks_url: The API URL to list the hooks on the repository. + public init( + id: Swift.Int64, + node_id: Swift.String, + name: Swift.String, + full_name: Swift.String, + owner: Components.Schemas.simple_hyphen_user, + _private: Swift.Bool, + html_url: Swift.String, + description: Swift.String? = nil, + fork: Swift.Bool, + url: Swift.String, + 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, + downloads_url: Swift.String, + events_url: Swift.String, + forks_url: Swift.String, + git_commits_url: Swift.String, + git_refs_url: Swift.String, + git_tags_url: 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, + notifications_url: Swift.String, + 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, + hooks_url: Swift.String + ) { + self.id = id + self.node_id = node_id + self.name = name + self.full_name = full_name + self.owner = owner + self._private = _private + self.html_url = html_url + self.description = description + self.fork = fork + self.url = url + 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.downloads_url = downloads_url + self.events_url = events_url + self.forks_url = forks_url + self.git_commits_url = git_commits_url + self.git_refs_url = git_refs_url + self.git_tags_url = git_tags_url + 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.notifications_url = notifications_url + 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.hooks_url = hooks_url + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case full_name + case owner + case _private = "private" + case html_url + case description + case fork + case url + 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 downloads_url + case events_url + case forks_url + case git_commits_url + case git_refs_url + case git_tags_url + 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 notifications_url + 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 hooks_url + } + } + /// A code security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration`. + public struct code_hyphen_security_hyphen_configuration: Codable, Hashable, Sendable { + /// The ID of the code security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/id`. + public var id: Swift.Int? + /// The name of the code security configuration. Must be unique within the organization. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/name`. + public var name: Swift.String? + /// The type of the code security configuration. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/target_type`. + @frozen public enum target_typePayload: String, Codable, Hashable, Sendable { + case global = "global" + case organization = "organization" + } + /// The type of the code security configuration. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/target_type`. + public var target_type: Components.Schemas.code_hyphen_security_hyphen_configuration.target_typePayload? + /// A description of the code security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/description`. + public var description: Swift.String? + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/advanced_security`. + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/advanced_security`. + public var advanced_security: Components.Schemas.code_hyphen_security_hyphen_configuration.advanced_securityPayload? + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph`. + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph`. + public var dependency_graph: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graphPayload? + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action`. + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action`. + public var dependency_graph_autosubmit_action: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_actionPayload? + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action_options`. + public struct dependency_graph_autosubmit_action_optionsPayload: Codable, Hashable, Sendable { + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action_options/labeled_runners`. + public var labeled_runners: Swift.Bool? + /// Creates a new `dependency_graph_autosubmit_action_optionsPayload`. + /// + /// - Parameters: + /// - labeled_runners: Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public init(labeled_runners: Swift.Bool? = nil) { + self.labeled_runners = labeled_runners + } + public enum CodingKeys: String, CodingKey { + case labeled_runners + } + } + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action_options`. + public var dependency_graph_autosubmit_action_options: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_action_optionsPayload? + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_alerts`. + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_alerts`. + public var dependabot_alerts: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_alertsPayload? + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_security_updates`. + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_security_updates`. + public var dependabot_security_updates: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_security_updatesPayload? + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup`. + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of code scanning default setup + /// + /// - 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? + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning`. + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning`. + public var secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_push_protection`. + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning push protection + /// + /// - 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 validity checks + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - 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 private vulnerability reporting + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. + public var private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/enforcement`. + public var enforcement: Components.Schemas.code_hyphen_security_hyphen_configuration.enforcementPayload? + /// The URL of the configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/url`. + public var url: Swift.String? + /// The URL of the configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/html_url`. + public var html_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/code-security-configuration/created_at`. + public var created_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/code-security-configuration/updated_at`. + public var updated_at: Foundation.Date? + /// Creates a new `code_hyphen_security_hyphen_configuration`. + /// + /// - Parameters: + /// - id: The ID of the code security configuration + /// - name: The name of the code security configuration. Must be unique within the organization. + /// - target_type: The type of the code security configuration. + /// - description: A description of the code security configuration + /// - advanced_security: The enablement status of GitHub Advanced Security + /// - dependency_graph: The enablement status of Dependency Graph + /// - dependency_graph_autosubmit_action: The enablement status of Automatic dependency submission + /// - dependency_graph_autosubmit_action_options: Feature options for Automatic dependency submission + /// - 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 + /// - 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 + /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The enforcement status for a security configuration + /// - url: The URL of the configuration + /// - html_url: The URL of the configuration + /// - created_at: + /// - updated_at: + public init( + id: Swift.Int? = nil, + name: Swift.String? = nil, + target_type: Components.Schemas.code_hyphen_security_hyphen_configuration.target_typePayload? = nil, + description: Swift.String? = nil, + advanced_security: Components.Schemas.code_hyphen_security_hyphen_configuration.advanced_securityPayload? = nil, + dependency_graph: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graphPayload? = nil, + dependency_graph_autosubmit_action: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_actionPayload? = nil, + dependency_graph_autosubmit_action_options: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_action_optionsPayload? = nil, + 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, + 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, + 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, + html_url: Swift.String? = nil, + created_at: Foundation.Date? = nil, + updated_at: Foundation.Date? = nil + ) { + self.id = id + self.name = name + self.target_type = target_type + self.description = description + self.advanced_security = advanced_security + self.dependency_graph = dependency_graph + self.dependency_graph_autosubmit_action = dependency_graph_autosubmit_action + self.dependency_graph_autosubmit_action_options = dependency_graph_autosubmit_action_options + self.dependabot_alerts = dependabot_alerts + self.dependabot_security_updates = dependabot_security_updates + 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_validity_checks = secret_scanning_validity_checks + self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement + self.url = url + self.html_url = html_url + self.created_at = created_at + self.updated_at = updated_at + } + public enum CodingKeys: String, CodingKey { + case id + case name + case target_type + case description + case advanced_security + case dependency_graph + case dependency_graph_autosubmit_action + case dependency_graph_autosubmit_action_options + case dependabot_alerts + case dependabot_security_updates + case code_scanning_default_setup + case secret_scanning + case secret_scanning_push_protection + case secret_scanning_validity_checks + case private_vulnerability_reporting + case enforcement + case url + case html_url + case created_at + case updated_at + } + } + /// - 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 + /// + /// - Remark: Generated from `#/components/schemas/code_hyphen_security_hyphen_default_hyphen_configurations/default_for_new_repos`. + public var default_for_new_repos: OpenAPIRuntime.OpenAPIValueContainer? + /// - Remark: Generated from `#/components/schemas/code_hyphen_security_hyphen_default_hyphen_configurations/configuration`. + public var configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? + /// Creates a new `code_hyphen_security_hyphen_default_hyphen_configurationsPayload`. + /// + /// - Parameters: + /// - default_for_new_repos: The visibility of newly created repositories for which the code security configuration will be applied to by default + /// - configuration: + public init( + default_for_new_repos: OpenAPIRuntime.OpenAPIValueContainer? = nil, + configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? = nil + ) { + self.default_for_new_repos = default_for_new_repos + self.configuration = configuration + } + public enum CodingKeys: String, CodingKey { + case default_for_new_repos + case configuration + } + } + /// A list of default code security configurations + /// + /// - Remark: Generated from `#/components/schemas/code-security-default-configurations`. + public typealias code_hyphen_security_hyphen_default_hyphen_configurations = [Components.Schemas.code_hyphen_security_hyphen_default_hyphen_configurationsPayload] + /// Repositories associated with a code security configuration and attachment status + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories`. + public struct code_hyphen_security_hyphen_configuration_hyphen_repositories: Codable, Hashable, Sendable { + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case attached = "attached" + case attaching = "attaching" + case detached = "detached" + case removed = "removed" + case enforced = "enforced" + case failed = "failed" + case updating = "updating" + case removed_by_enterprise = "removed_by_enterprise" + } + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories/status`. + public var status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories.statusPayload? + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories/repository`. + public var repository: Components.Schemas.simple_hyphen_repository? + /// Creates a new `code_hyphen_security_hyphen_configuration_hyphen_repositories`. + /// + /// - Parameters: + /// - status: The attachment status of the code security configuration on the repository. + /// - repository: + public init( + status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories.statusPayload? = nil, + repository: Components.Schemas.simple_hyphen_repository? = nil + ) { + self.status = status + self.repository = repository + } + public enum CodingKeys: String, CodingKey { + case status + case repository + } + } + /// Code security configuration associated with a repository and attachment status + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository`. + public struct code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository: Codable, Hashable, Sendable { + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case attached = "attached" + case attaching = "attaching" + case detached = "detached" + case removed = "removed" + case enforced = "enforced" + case failed = "failed" + case updating = "updating" + case removed_by_enterprise = "removed_by_enterprise" + } + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository/status`. + public var status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository.statusPayload? + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository/configuration`. + public var configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? + /// Creates a new `code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository`. + /// + /// - Parameters: + /// - status: The attachment status of the code security configuration on the repository. + /// - configuration: + public init( + status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository.statusPayload? = nil, + configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? = nil + ) { + self.status = status + self.configuration = configuration + } + public enum CodingKeys: String, CodingKey { + case status + case configuration + } + } + } /// Types generated from the `#/components/parameters` section of the OpenAPI document. - public enum Parameters {} + public enum Parameters { + /// 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 `#/components/parameters/pagination-before`. + public typealias pagination_hyphen_before = Swift.String + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results 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 `#/components/parameters/pagination-after`. + public typealias pagination_hyphen_after = Swift.String + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/owner`. + public typealias owner = Swift.String + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/repo`. + public typealias repo = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias org = Swift.String + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/components/parameters/configuration-id`. + public typealias configuration_hyphen_id = Swift.Int + } /// 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 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 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 accepted: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/accepted/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/accepted/content/application\/json`. + case json(OpenAPIRuntime.OpenAPIObjectContainer) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: OpenAPIRuntime.OpenAPIObjectContainer { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.accepted.Body + /// Creates a new `accepted`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.accepted.Body) { + self.body = body + } + } + public struct not_modified: Sendable, Hashable { + /// Creates a new `not_modified`. + public init() {} + } + 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 conflict: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/conflict/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/conflict/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.conflict.Body + /// Creates a new `conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.conflict.Body) { + self.body = body + } + } + public struct no_content: Sendable, Hashable { + /// Creates a new `no_content`. + public init() {} + } + } /// 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 {} +public enum Operations { + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + public enum code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org { + public static let id: Swift.String = "code-security/get-configurations-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/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.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/target_type`. + @frozen public enum target_typePayload: String, Codable, Hashable, Sendable { + case global = "global" + case all = "all" + } + /// The target type of the code security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/target_type`. + public var target_type: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query.target_typePayload? + /// 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}/code-security/configurations/GET/query/per_page`. + public var per_page: Swift.Int? + /// 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/orgs/{org}/code-security/configurations/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/orgs/{org}/code-security/configurations/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - target_type: The target type of the code security configuration + /// - 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)." + public init( + target_type: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query.target_typePayload? = nil, + per_page: Swift.Int? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil + ) { + self.target_type = target_type + self.per_page = per_page + self.before = before + self.after = after + } + } + public var query: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/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.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_configurations_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}/code-security/configurations/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/responses/200/content/application\/json`. + case json([Components.Schemas.code_hyphen_security_hyphen_configuration]) + /// 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.code_hyphen_security_hyphen_configuration] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_configurations_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.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-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 + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)/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 + ] + } + } + } + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + public enum code_hyphen_security_sol_create_hyphen_configuration { + public static let id: Swift.String = "code-security/create-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/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.code_hyphen_security_sol_create_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/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.code_hyphen_security_sol_create_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The name of the code security configuration. Must be unique within the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/name`. + public var name: Swift.String + /// A description of the code security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/description`. + public var description: Swift.String + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/advanced_security`. + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/advanced_security`. + public var advanced_security: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph`. + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph`. + public var dependency_graph: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action`. + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action`. + public var dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action_options`. + public struct dependency_graph_autosubmit_action_optionsPayload: Codable, Hashable, Sendable { + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action_options/labeled_runners`. + public var labeled_runners: Swift.Bool? + /// Creates a new `dependency_graph_autosubmit_action_optionsPayload`. + /// + /// - Parameters: + /// - labeled_runners: Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public init(labeled_runners: Swift.Bool? = nil) { + self.labeled_runners = labeled_runners + } + public enum CodingKeys: String, CodingKey { + case labeled_runners + } + } + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action_options`. + public var dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_alerts`. + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_alerts`. + public var dependabot_alerts: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_security_updates`. + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_security_updates`. + public var dependabot_security_updates: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/code_scanning_default_setup`. + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of code scanning default setup + /// + /// - 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? + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning`. + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning`. + public var secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning push protection + /// + /// - 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 validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - 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 private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. + public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. + public var enforcement: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - name: The name of the code security configuration. Must be unique within the organization. + /// - description: A description of the code security configuration + /// - advanced_security: The enablement status of GitHub Advanced Security + /// - dependency_graph: The enablement status of Dependency Graph + /// - dependency_graph_autosubmit_action: The enablement status of Automatic dependency submission + /// - dependency_graph_autosubmit_action_options: Feature options for Automatic dependency submission + /// - 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 + /// - 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 + /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The enforcement status for a security configuration + public init( + name: Swift.String, + description: Swift.String, + advanced_security: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? = nil, + dependency_graph: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? = nil, + dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? = nil, + dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? = nil, + 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, + 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, + 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 + ) { + self.name = name + self.description = description + self.advanced_security = advanced_security + self.dependency_graph = dependency_graph + self.dependency_graph_autosubmit_action = dependency_graph_autosubmit_action + self.dependency_graph_autosubmit_action_options = dependency_graph_autosubmit_action_options + self.dependabot_alerts = dependabot_alerts + self.dependabot_security_updates = dependabot_security_updates + 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_validity_checks = secret_scanning_validity_checks + self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement + } + public enum CodingKeys: String, CodingKey { + case name + case description + case advanced_security + case dependency_graph + case dependency_graph_autosubmit_action + case dependency_graph_autosubmit_action_options + case dependabot_alerts + case dependabot_security_updates + case code_scanning_default_setup + case secret_scanning + case secret_scanning_push_protection + case secret_scanning_validity_checks + case private_vulnerability_reporting + case enforcement + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode( + Swift.String.self, + forKey: .name + ) + description = try container.decode( + Swift.String.self, + forKey: .description + ) + advanced_security = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload.self, + forKey: .advanced_security + ) + dependency_graph = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, + forKey: .dependency_graph + ) + dependency_graph_autosubmit_action = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, + forKey: .dependency_graph_autosubmit_action + ) + dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, + forKey: .dependency_graph_autosubmit_action_options + ) + dependabot_alerts = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, + forKey: .dependabot_alerts + ) + dependabot_security_updates = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, + forKey: .dependabot_security_updates + ) + code_scanning_default_setup = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, + forKey: .code_scanning_default_setup + ) + secret_scanning = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, + forKey: .secret_scanning + ) + secret_scanning_push_protection = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, + forKey: .secret_scanning_push_protection + ) + 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 + ) + 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 + ) + enforcement = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, + forKey: .enforcement + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "name", + "description", + "advanced_security", + "dependency_graph", + "dependency_graph_autosubmit_action", + "dependency_graph_autosubmit_action_options", + "dependabot_alerts", + "dependabot_security_updates", + "code_scanning_default_setup", + "secret_scanning", + "secret_scanning_push_protection", + "secret_scanning_validity_checks", + "private_vulnerability_reporting", + "enforcement" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_create_hyphen_configuration.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}/code-security/configurations/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/responses/201/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration) + /// 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.code_hyphen_security_hyphen_configuration { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Output.Created.Body) { + self.body = body + } + } + /// Successfully created code security configuration + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.code_hyphen_security_sol_create_hyphen_configuration.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.code_hyphen_security_sol_create_hyphen_configuration.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 default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + public enum code_hyphen_security_sol_get_hyphen_default_hyphen_configurations { + public static let id: Swift.String = "code-security/get-default-configurations" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/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.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/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.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.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}/code-security/configurations/defaults/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/GET/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_default_hyphen_configurations) + /// 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.code_hyphen_security_hyphen_default_hyphen_configurations { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.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.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/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}/code-security/configurations/defaults/get(code-security/get-default-configurations)/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 + ] + } + } + } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public enum code_hyphen_security_sol_detach_hyphen_configuration { + public static let id: Swift.String = "code-security/detach-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/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.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/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_security_sol_detach_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// An array of repository IDs to detach from configurations. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json/selected_repository_ids`. + public var selected_repository_ids: [Swift.Int]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - selected_repository_ids: An array of repository IDs to detach from configurations. + public init(selected_repository_ids: [Swift.Int]? = nil) { + self.selected_repository_ids = selected_repository_ids + } + public enum CodingKeys: String, CodingKey { + case selected_repository_ids + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + selected_repository_ids = try container.decodeIfPresent( + [Swift.Int].self, + forKey: .selected_repository_ids + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "selected_repository_ids" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Components.Responses.no_content) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Components.Responses.no_content { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/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//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/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}/code-security/configurations/detach/delete(code-security/detach-configuration)/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 + ) + } + } + } + /// Conflict + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Components.Responses.conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Components.Responses.conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + 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 a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + public enum code_hyphen_security_sol_get_hyphen_configuration { + public static let id: Swift.String = "code-security/get-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_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.code_hyphen_security_sol_get_hyphen_configuration.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration.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}/code-security/configurations/{configuration_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration) + /// 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.code_hyphen_security_hyphen_configuration { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_configuration.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.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/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}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/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 + ] + } + } + } + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + public enum code_hyphen_security_sol_update_hyphen_configuration { + public static let id: Swift.String = "code-security/update-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_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.code_hyphen_security_sol_update_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The name of the code security configuration. Must be unique within the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/name`. + public var name: Swift.String? + /// A description of the code security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/description`. + public var description: Swift.String? + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/advanced_security`. + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/advanced_security`. + public var advanced_security: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph`. + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph`. + public var dependency_graph: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action`. + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action`. + public var dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action_options`. + public struct dependency_graph_autosubmit_action_optionsPayload: Codable, Hashable, Sendable { + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action_options/labeled_runners`. + public var labeled_runners: Swift.Bool? + /// Creates a new `dependency_graph_autosubmit_action_optionsPayload`. + /// + /// - Parameters: + /// - labeled_runners: Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public init(labeled_runners: Swift.Bool? = nil) { + self.labeled_runners = labeled_runners + } + public enum CodingKeys: String, CodingKey { + case labeled_runners + } + } + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action_options`. + public var dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_alerts`. + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_alerts`. + public var dependabot_alerts: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_security_updates`. + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_security_updates`. + public var dependabot_security_updates: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_default_setup`. + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of code scanning default setup + /// + /// - 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? + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning`. + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning`. + public var secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning push protection + /// + /// - 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 validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// 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`. + 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 private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. + public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. + public var enforcement: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - name: The name of the code security configuration. Must be unique within the organization. + /// - description: A description of the code security configuration + /// - advanced_security: The enablement status of GitHub Advanced Security + /// - dependency_graph: The enablement status of Dependency Graph + /// - dependency_graph_autosubmit_action: The enablement status of Automatic dependency submission + /// - dependency_graph_autosubmit_action_options: Feature options for Automatic dependency submission + /// - 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 + /// - 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 + /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The enforcement status for a security configuration + public init( + name: Swift.String? = nil, + description: Swift.String? = nil, + advanced_security: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? = nil, + dependency_graph: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? = nil, + dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? = nil, + dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? = nil, + 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, + 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, + 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 + ) { + self.name = name + self.description = description + self.advanced_security = advanced_security + self.dependency_graph = dependency_graph + self.dependency_graph_autosubmit_action = dependency_graph_autosubmit_action + self.dependency_graph_autosubmit_action_options = dependency_graph_autosubmit_action_options + self.dependabot_alerts = dependabot_alerts + self.dependabot_security_updates = dependabot_security_updates + 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_validity_checks = secret_scanning_validity_checks + self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement + } + public enum CodingKeys: String, CodingKey { + case name + case description + case advanced_security + case dependency_graph + case dependency_graph_autosubmit_action + case dependency_graph_autosubmit_action_options + case dependabot_alerts + case dependabot_security_updates + case code_scanning_default_setup + case secret_scanning + case secret_scanning_push_protection + case secret_scanning_validity_checks + case private_vulnerability_reporting + case enforcement + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent( + Swift.String.self, + forKey: .name + ) + description = try container.decodeIfPresent( + Swift.String.self, + forKey: .description + ) + advanced_security = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload.self, + forKey: .advanced_security + ) + dependency_graph = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, + forKey: .dependency_graph + ) + dependency_graph_autosubmit_action = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, + forKey: .dependency_graph_autosubmit_action + ) + dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, + forKey: .dependency_graph_autosubmit_action_options + ) + dependabot_alerts = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, + forKey: .dependabot_alerts + ) + dependabot_security_updates = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, + forKey: .dependabot_security_updates + ) + code_scanning_default_setup = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, + forKey: .code_scanning_default_setup + ) + secret_scanning = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, + forKey: .secret_scanning + ) + secret_scanning_push_protection = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, + forKey: .secret_scanning_push_protection + ) + 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 + ) + 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 + ) + enforcement = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, + forKey: .enforcement + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "name", + "description", + "advanced_security", + "dependency_graph", + "dependency_graph_autosubmit_action", + "dependency_graph_autosubmit_action_options", + "dependabot_alerts", + "dependabot_security_updates", + "code_scanning_default_setup", + "secret_scanning", + "secret_scanning_push_protection", + "secret_scanning_validity_checks", + "private_vulnerability_reporting", + "enforcement" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_update_hyphen_configuration.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}/code-security/configurations/{configuration_id}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration) + /// 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.code_hyphen_security_hyphen_configuration { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok.Body) { + self.body = body + } + } + /// Response when a configuration is updated + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_update_hyphen_configuration.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.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response when no new updates are made + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.code_hyphen_security_sol_update_hyphen_configuration.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_security_sol_update_hyphen_configuration.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) + } + @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 code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + public enum code_hyphen_security_sol_delete_hyphen_configuration { + public static let id: Swift.String = "code-security/delete-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/DELETE/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/DELETE/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/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_security_sol_delete_hyphen_configuration.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Components.Responses.no_content) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Components.Responses.no_content { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/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//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/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}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/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 + ) + } + } + } + /// Conflict + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Components.Responses.conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Components.Responses.conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + 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 + ] + } + } + } + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + public enum code_hyphen_security_sol_attach_hyphen_configuration { + public static let id: Swift.String = "code-security/attach-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/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.code_hyphen_security_sol_attach_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + /// + /// - 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 _public = "public" + case private_or_internal = "private_or_internal" + case selected = "selected" + } + /// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/scope`. + public var scope: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload.scopePayload + /// An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/selected_repository_ids`. + public var selected_repository_ids: [Swift.Int]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - scope: The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + /// - selected_repository_ids: An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`. + public init( + scope: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload.scopePayload, + selected_repository_ids: [Swift.Int]? = nil + ) { + self.scope = scope + self.selected_repository_ids = selected_repository_ids + } + public enum CodingKeys: String, CodingKey { + case scope + case selected_repository_ids + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + scope = try container.decode( + Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload.scopePayload.self, + forKey: .scope + ) + selected_repository_ids = try container.decodeIfPresent( + [Swift.Int].self, + forKey: .selected_repository_ids + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "scope", + "selected_repository_ids" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + /// Accepted + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)/responses/202`. + /// + /// HTTP response code: `202 accepted`. + case accepted(Components.Responses.accepted) + /// The associated value of the enum case if `self` is `.accepted`. + /// + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Components.Responses.accepted { + get throws { + switch self { + case let .accepted(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "accepted", + 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 a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + public enum code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default { + public static let id: Swift.String = "code-security/set-configuration-as-default" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/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_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// Specify which types of repository this security configuration should be applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json/default_for_new_repos`. + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + case all = "all" + case none = "none" + case private_and_internal = "private_and_internal" + case _public = "public" + } + /// Specify which types of repository this security configuration should be applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json/default_for_new_repos`. + public var default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body.jsonPayload.default_for_new_reposPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - default_for_new_repos: Specify which types of repository this security configuration should be applied to by default. + public init(default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body.jsonPayload.default_for_new_reposPayload? = nil) { + self.default_for_new_repos = default_for_new_repos + } + public enum CodingKeys: String, CodingKey { + case default_for_new_repos + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Path, + headers: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.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}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// Specifies which types of repository this security configuration is applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/default_for_new_repos`. + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + case all = "all" + case none = "none" + case private_and_internal = "private_and_internal" + case _public = "public" + } + /// Specifies which types of repository this security configuration is applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/default_for_new_repos`. + public var default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload.default_for_new_reposPayload? + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/configuration`. + public var configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - default_for_new_repos: Specifies which types of repository this security configuration is applied to by default. + /// - configuration: + public init( + default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload.default_for_new_reposPayload? = nil, + configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? = nil + ) { + self.default_for_new_repos = default_for_new_repos + self.configuration = configuration + } + public enum CodingKeys: String, CodingKey { + case default_for_new_repos + case configuration + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/application\/json`. + case json(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.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.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body) { + self.body = body + } + } + /// Default successfully changed. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.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.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)/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}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)/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 + ] + } + } + } + /// Get repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + public enum code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration { + public static let id: Swift.String = "code-security/get-repositories-for-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/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}/code-security/configurations/{configuration_id}/repositories/GET/query/per_page`. + public var per_page: Swift.Int? + /// 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/orgs/{org}/code-security/configurations/{configuration_id}/repositories/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/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned. + /// + /// Can be: `all`, `attached`, `attaching`, `detached`, `removed`, `enforced`, `failed`, `updating`, `removed_by_enterprise` + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query/status`. + public var status: Swift.String? + /// 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)." + /// - 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)." + /// - status: A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned. + public init( + per_page: Swift.Int? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil, + status: Swift.String? = nil + ) { + self.per_page = per_page + self.before = before + self.after = after + self.status = status + } + } + public var query: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_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.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.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}/code-security/configurations/{configuration_id}/repositories/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/responses/200/content/application\/json`. + case json([Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories]) + /// 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.code_hyphen_security_hyphen_configuration_hyphen_repositories] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.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.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)/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}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)/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 + ] + } + } + } + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + public enum code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository { + public static let id: Swift.String = "code-security/get-configuration-for-repository" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/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}/code-security-configuration/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}/code-security-configuration/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.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/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.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository) + /// 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.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.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.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Components.Responses.no_content) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Components.Responses.no_content { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/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}/code-security-configuration/get(code-security/get-configuration-for-repository)/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 + ] + } + } + } +} diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index 9e390e2322e..1ecce119c17 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -1414,7 +1414,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1477,7 +1477,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1590,7 +1590,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1653,7 +1653,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1948,7 +1948,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -2391,7 +2391,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2822,6 +2822,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2829,22 +2851,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -2852,7 +2878,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -3200,7 +3226,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -3558,7 +3584,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/codespace`. public struct codespace: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/codespace/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// Automatically generated name of this codespace. /// /// - Remark: Generated from `#/components/schemas/codespace/name`. @@ -3804,7 +3830,7 @@ public enum Components { /// - retention_expires_at: When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" /// - last_known_stop_notice: The text to display to a user when a codespace has been stopped for a potentially actionable reason. public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String, display_name: Swift.String? = nil, environment_id: Swift.String? = nil, @@ -4026,7 +4052,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/nullable-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -4469,7 +4495,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -4801,7 +4827,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/full-repository`. public struct full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/full-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/full-repository/name`. @@ -5250,7 +5276,7 @@ public enum Components { /// - security_and_analysis: /// - custom_properties: The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -5857,7 +5883,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository`. public struct codespace_hyphen_with_hyphen_full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// Automatically generated name of this codespace. /// /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository/name`. @@ -6098,7 +6124,7 @@ public enum Components { /// - retention_period_minutes: Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). /// - retention_expires_at: When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String, display_name: Swift.String? = nil, environment_id: Swift.String? = nil, diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 11537e99660..601629eab90 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -38,33 +38,416 @@ public struct Client: APIProtocol { private var converter: Converter { client.converter } + /// List all Copilot seat assignments for an enterprise + /// + /// > [!NOTE] + /// > This endpoint is in beta 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 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 { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/copilot/billing/seats", + parameters: [ + input.path.enterprise + ] + ) + 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 headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.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_hyphen_for_hyphen_enterprise.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.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 + )) + 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 a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// + /// 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 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}/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.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/copilot/usage", + parameters: [ + input.path.enterprise + ] + ) + 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_enterprise.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 a summary of Copilot usage for an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// 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. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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 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, 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}/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}/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_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.id, + forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.id, serializer: { input in let path = try converter.renderedPath( - template: "/enterprises/{}/copilot/usage", + template: "/enterprises/{}/team/{}/copilot/usage", parameters: [ - input.path.enterprise + input.path.enterprise, + input.path.team_slug ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -110,7 +493,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_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -232,15 +615,16 @@ public struct Client: APIProtocol { } /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// 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)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// 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 the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. @@ -394,13 +778,13 @@ public struct Client: APIProtocol { } /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. - /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. + /// 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 the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. @@ -574,18 +958,21 @@ public struct Client: APIProtocol { } /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. @@ -748,7 +1135,8 @@ public struct Client: APIProtocol { } /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -757,9 +1145,9 @@ public struct Client: APIProtocol { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. @@ -922,18 +1310,21 @@ public struct Client: APIProtocol { } /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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)". /// - /// Only organization owners can configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. @@ -1096,7 +1487,8 @@ public struct Client: APIProtocol { } /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -1105,9 +1497,9 @@ public struct Client: APIProtocol { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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)`. @@ -1270,13 +1662,14 @@ public struct Client: APIProtocol { } /// Get a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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. /// @@ -1462,13 +1855,14 @@ public struct Client: APIProtocol { } /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope 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 `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. @@ -1621,4 +2015,201 @@ public struct Client: APIProtocol { } ) } + /// Get a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// 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 team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage 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/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/team/{}/copilot/usage", + 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_usage_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].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 + ) + ) + } + } + ) + } } diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index d8c6b23c057..1b9fd1199b9 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -11,15 +11,34 @@ import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. public protocol APIProtocol: Sendable { + /// List all Copilot seat assignments for an enterprise + /// + /// > [!NOTE] + /// > This endpoint is in beta 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)`. + 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 a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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. /// @@ -30,55 +49,83 @@ 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 a summary of Copilot usage for an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// + /// 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. + /// + /// 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)`. + 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 /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// 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)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// 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 the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. 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 /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. - /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. + /// 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 the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. 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 /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. 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 /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -87,34 +134,38 @@ public protocol APIProtocol: Sendable { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. 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 /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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)". /// - /// Only organization owners can configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. 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 /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -123,22 +174,23 @@ public protocol APIProtocol: Sendable { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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)`. 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 a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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. /// @@ -151,30 +203,83 @@ public protocol APIProtocol: Sendable { 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 /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope 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 `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 a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// 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 team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage 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/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output } /// Convenience overloads for operation inputs. extension APIProtocol { + /// List all Copilot seat assignments for an enterprise + /// + /// > [!NOTE] + /// > This endpoint is in beta 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 func copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise( + 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() + ) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output { + try await copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input( + path: path, + query: query, + headers: headers + )) + } /// Get a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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. /// @@ -195,17 +300,51 @@ extension APIProtocol { headers: headers )) } + /// Get a summary of Copilot usage for an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// + /// 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. + /// + /// 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( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output { + try await copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input( + path: path, + query: query, + headers: headers + )) + } /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// 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)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// 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 the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. @@ -220,13 +359,13 @@ extension APIProtocol { } /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. - /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. + /// 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 the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. @@ -243,18 +382,21 @@ extension APIProtocol { } /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. @@ -271,7 +413,8 @@ extension APIProtocol { } /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -280,9 +423,9 @@ extension APIProtocol { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. @@ -299,18 +442,21 @@ extension APIProtocol { } /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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)". /// - /// Only organization owners can configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. @@ -327,7 +473,8 @@ extension APIProtocol { } /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -336,9 +483,9 @@ extension APIProtocol { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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)`. @@ -355,13 +502,14 @@ extension APIProtocol { } /// Get a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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. /// @@ -384,13 +532,14 @@ extension APIProtocol { } /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope 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 `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. @@ -403,6 +552,39 @@ extension APIProtocol { headers: headers )) } + /// Get a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// 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 team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage 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/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output { + try await copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input( + path: path, + query: query, + headers: headers + )) + } } /// Server URLs defined in the OpenAPI document. @@ -430,7 +612,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -493,7 +675,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -595,1207 +777,1149 @@ public enum Components { case status } } - /// Summary of Copilot usage. + /// A GitHub organization. /// - /// - 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/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`. /// - /// - 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. + /// - 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`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team /// - /// - 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/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team /// - /// - 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/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team /// - /// - 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/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team /// - /// - 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/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories /// - /// - 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/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have /// - /// - 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/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set /// - /// - 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/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment /// - /// - 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 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 - /// A container of undocumented properties. - public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `copilot_hyphen_organization_hyphen_details`. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. /// /// - 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. - /// - additionalProperties: A container of undocumented properties. + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment 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, - additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil ) { - 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.additionalProperties = additionalProperties + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn } public enum CodingKeys: String, CodingKey { - case seat_breakdown - case public_code_suggestions - case ide_chat - case platform_chat - case cli - case seat_management_setting - } - 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 - ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "seat_breakdown", - "public_code_suggestions", - "ide_chat", - "platform_chat", - "cli", - "seat_management_setting" - ]) - } - 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 encoder.encodeAdditionalProperties(additionalProperties) + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn } } /// Groups of organization members that gives permissions on specified repositories. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + /// - Remark: Generated from `#/components/schemas/team/node_id`. public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + /// - Remark: Generated from `#/components/schemas/team/name`. public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + /// - Remark: Generated from `#/components/schemas/team/privacy`. public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. /// /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: /// - html_url: + /// - members_url: /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + /// - parent: public init( id: Swift.Int, node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, name: Swift.String, + slug: Swift.String, description: Swift.String? = nil, - permission: Swift.String, privacy: Swift.String? = nil, notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, html_url: Swift.String, + members_url: Swift.String, repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil ) { self.id = id self.node_id = node_id - self.url = url - self.members_url = members_url self.name = name + self.slug = slug self.description = description - self.permission = permission self.privacy = privacy self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url self.html_url = html_url + self.members_url = members_url self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn + self.parent = parent } public enum CodingKeys: String, CodingKey { case id case node_id - case url - case members_url case name + case slug case description - case permission case privacy case notification_setting + case permission + case permissions + case url case html_url + case members_url case repositories_url + case parent + } + } + /// Group of enterprise owners and/or members + /// + /// - Remark: Generated from `#/components/schemas/enterprise-team`. + public struct enterprise_hyphen_team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/enterprise-team/id`. + public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/enterprise-team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/url`. + public var url: Swift.String + /// - 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? + /// - Remark: Generated from `#/components/schemas/enterprise-team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/enterprise-team/updated_at`. + public var updated_at: Foundation.Date + /// Creates a new `enterprise_hyphen_team`. + /// + /// - Parameters: + /// - id: + /// - name: + /// - slug: + /// - url: + /// - sync_to_organizations: + /// - group_id: + /// - html_url: + /// - members_url: + /// - created_at: + /// - updated_at: + public init( + id: Swift.Int64, + name: Swift.String, + slug: Swift.String, + url: Swift.String, + sync_to_organizations: Swift.String, + group_id: Swift.Int? = nil, + html_url: Swift.String, + members_url: Swift.String, + created_at: Foundation.Date, + updated_at: Foundation.Date + ) { + self.id = id + self.name = name + self.slug = slug + self.url = url + self.sync_to_organizations = sync_to_organizations + self.group_id = group_id + self.html_url = html_url + self.members_url = members_url + self.created_at = created_at + self.updated_at = updated_at + } + public enum CodingKeys: String, CodingKey { + case id + case name case slug - case ldap_dn + case url + case sync_to_organizations + case group_id + case html_url + case members_url + case created_at + case updated_at + } + } + /// Information about a Copilot Business seat assignment for a user, team, or organization. + /// + /// - 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. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. + public var organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? + /// The team through which the assignee is granted access to GitHub Copilot, if applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. + @frozen public enum assigning_teamPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case1`. + case team(Components.Schemas.team) + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case2`. + case enterprise_hyphen_team(Components.Schemas.enterprise_hyphen_team) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .team(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .enterprise_hyphen_team(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 .team(value): + try value.encode(to: encoder) + case let .enterprise_hyphen_team(value): + try value.encode(to: encoder) + } + } + } + /// The team through which the assignee is granted access to GitHub Copilot, if applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. + public var assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? + /// 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. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/pending_cancellation_date`. + public var pending_cancellation_date: Swift.String? + /// Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/last_activity_at`. + public var last_activity_at: Foundation.Date? + /// Last editor that was used by the user for a GitHub Copilot completion. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/last_activity_editor`. + public var last_activity_editor: Swift.String? + /// Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + /// + /// - 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. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/updated_at`. + public var updated_at: Foundation.Date? + /// 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. + /// - 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. + /// - 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. + public init( + assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload, + organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? = 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, + last_activity_editor: Swift.String? = nil, + created_at: Foundation.Date, + updated_at: Foundation.Date? = nil + ) { + self.assignee = assignee + self.organization = organization + self.assigning_team = assigning_team + self.pending_cancellation_date = pending_cancellation_date + self.last_activity_at = last_activity_at + self.last_activity_editor = last_activity_editor + self.created_at = created_at + self.updated_at = updated_at + } + public enum CodingKeys: String, CodingKey { + case assignee + case organization + case assigning_team + case pending_cancellation_date + case last_activity_at + case last_activity_editor + case created_at + case updated_at + } + 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, + forKey: .assignee + ) + organization = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload.self, + forKey: .organization + ) + assigning_team = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload.self, + forKey: .assigning_team + ) + pending_cancellation_date = try container.decodeIfPresent( + Swift.String.self, + forKey: .pending_cancellation_date + ) + last_activity_at = try container.decodeIfPresent( + Foundation.Date.self, + forKey: .last_activity_at + ) + last_activity_editor = try container.decodeIfPresent( + Swift.String.self, + forKey: .last_activity_editor + ) + created_at = try container.decode( + Foundation.Date.self, + forKey: .created_at + ) + updated_at = try container.decodeIfPresent( + Foundation.Date.self, + forKey: .updated_at + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "assignee", + "organization", + "assigning_team", + "pending_cancellation_date", + "last_activity_at", + "last_activity_editor", + "created_at", + "updated_at" + ]) } } - /// Groups of organization members that gives permissions on specified repositories. + /// Summary of Copilot usage. /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. + /// - 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: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: + /// - 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( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool + 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.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin + 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 pull - case triage - case push - case maintain - case admin + case language + case editor + case suggestions_count + case acceptances_count + case lines_suggested + case lines_accepted + case active_users } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. + 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: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: + /// - 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( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + 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.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent + 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 id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent + 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" + ]) } } - /// GitHub account for managing multiple users, teams, and repositories + /// The breakdown of Copilot Business seats for the organization. /// - /// - Remark: Generated from `#/components/schemas/organization`. - public struct organization: Codable, Hashable, Sendable { - /// Unique login name of the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/login`. - public var login: Swift.String - /// URL 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/organization/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/description`. - public var description: Swift.String? - /// Display blog url for the organization + /// - 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/organization/blog`. - public var blog: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization/html_url`. - public var html_url: Swift.String - /// Display name for the organization + /// - 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/organization/name`. - public var name: Swift.String? - /// Display company name for the organization + /// - 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/organization/company`. - public var company: Swift.String? - /// Display location for the 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/organization/location`. - public var location: Swift.String? - /// Display email for the organization + /// - 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/organization/email`. - public var email: Swift.String? - /// Specifies if organization projects are enabled for this org - /// - /// - Remark: Generated from `#/components/schemas/organization/has_organization_projects`. - public var has_organization_projects: Swift.Bool - /// Specifies if repository projects are enabled for repositories that belong to this org - /// - /// - Remark: Generated from `#/components/schemas/organization/has_repository_projects`. - public var has_repository_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/organization/is_verified`. - public var is_verified: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization/public_repos`. - public var public_repos: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/public_gists`. - public var public_gists: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/followers`. - public var followers: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/following`. - public var following: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization/plan`. - public struct planPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization/plan/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization/plan/space`. - public var space: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/private_repos`. - public var private_repos: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/filled_seats`. - public var filled_seats: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/seats`. - public var seats: Swift.Int? - /// Creates a new `planPayload`. - /// - /// - Parameters: - /// - name: - /// - space: - /// - private_repos: - /// - filled_seats: - /// - seats: - public init( - name: Swift.String? = nil, - space: Swift.Int? = nil, - private_repos: Swift.Int? = nil, - filled_seats: Swift.Int? = nil, - seats: Swift.Int? = nil - ) { - self.name = name - self.space = space - self.private_repos = private_repos - self.filled_seats = filled_seats - self.seats = seats - } - public enum CodingKeys: String, CodingKey { - case name - case space - case private_repos - case filled_seats - case seats - } - } - /// - Remark: Generated from `#/components/schemas/organization/plan`. - public var plan: Components.Schemas.organization.planPayload? - /// Creates a new `organization`. + /// - 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: - /// - login: Unique login name of the organization - /// - url: URL for the organization - /// - id: - /// - node_id: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - /// - blog: Display blog url for the organization - /// - html_url: - /// - name: Display name for the organization - /// - company: Display company name for the organization - /// - location: Display location for the organization - /// - email: Display email for the organization - /// - has_organization_projects: Specifies if organization projects are enabled for this org - /// - has_repository_projects: Specifies if repository projects are enabled for repositories that belong to this org - /// - is_verified: - /// - public_repos: - /// - public_gists: - /// - followers: - /// - following: - /// - _type: - /// - created_at: - /// - updated_at: - /// - plan: - public init( - login: Swift.String, - url: Swift.String, - id: Swift.Int, - node_id: 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, - blog: Swift.String? = nil, - html_url: Swift.String, - name: Swift.String? = nil, - company: Swift.String? = nil, - location: Swift.String? = nil, - email: Swift.String? = nil, - has_organization_projects: Swift.Bool, - has_repository_projects: Swift.Bool, - is_verified: Swift.Bool? = nil, - public_repos: Swift.Int, - public_gists: Swift.Int, - followers: Swift.Int, - following: Swift.Int, - _type: Swift.String, - created_at: Foundation.Date, - updated_at: Foundation.Date, - plan: Components.Schemas.organization.planPayload? = nil + /// - 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.login = login - self.url = url - self.id = id - self.node_id = node_id - 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 - self.blog = blog - self.html_url = html_url - self.name = name - self.company = company - self.location = location - self.email = email - self.has_organization_projects = has_organization_projects - self.has_repository_projects = has_repository_projects - self.is_verified = is_verified - self.public_repos = public_repos - self.public_gists = public_gists - self.followers = followers - self.following = following - self._type = _type - self.created_at = created_at - self.updated_at = updated_at - self.plan = plan + 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 login - case url - case id - case node_id - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - case blog - case html_url - case name - case company - case location - case email - case has_organization_projects - case has_repository_projects - case is_verified - case public_repos - case public_gists - case followers - case following - case _type = "type" - case created_at - case updated_at - case plan + case total + case added_this_cycle + case pending_cancellation + case pending_invitation + case active_this_cycle + case inactive_this_cycle } } - /// Information about a Copilot Business seat assignment for a user, team, or organization. + /// Information about the seat breakdown and policies set for an organization with a Copilot Business subscription. /// - /// - 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-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-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) - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case2`. - case team(Components.Schemas.team) - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case3`. - case organization(Components.Schemas.organization) - 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) - } - do { - self = .team(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .organization(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) - case let .team(value): - try value.encode(to: encoder) - case let .organization(value): - try value.encode(to: encoder) - } - } + /// - 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 assignee that has been granted access to GitHub Copilot. + /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. - public var assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload - /// The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. + /// - 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-seat-details/assigning_team`. - @frozen public enum assigning_teamPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case1`. - case team(Components.Schemas.team) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .team(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 .team(value): - try value.encode(to: encoder) - } - } + /// - 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 team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. + /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. - public var assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? - /// 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. + /// - 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-seat-details/pending_cancellation_date`. - public var pending_cancellation_date: Swift.String? - /// Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + /// - 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-seat-details/last_activity_at`. - public var last_activity_at: Foundation.Date? - /// Last editor that was used by the user for a GitHub Copilot completion. + /// - 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-seat-details/last_activity_editor`. - public var last_activity_editor: Swift.String? - /// Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + /// - 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-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. + /// - 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-seat-details/updated_at`. - public var updated_at: Foundation.Date? - /// Creates a new `copilot_hyphen_seat_hyphen_details`. + /// - 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 + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `copilot_hyphen_organization_hyphen_details`. /// /// - Parameters: - /// - assignee: The assignee that has been granted access to GitHub Copilot. - /// - assigning_team: The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. - /// - 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. - /// - 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. + /// - 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. + /// - additionalProperties: A container of undocumented properties. public init( - assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload, - assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? = nil, - pending_cancellation_date: Swift.String? = nil, - last_activity_at: Foundation.Date? = nil, - last_activity_editor: Swift.String? = nil, - created_at: Foundation.Date, - updated_at: Foundation.Date? = nil + 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, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { - self.assignee = assignee - self.assigning_team = assigning_team - self.pending_cancellation_date = pending_cancellation_date - self.last_activity_at = last_activity_at - self.last_activity_editor = last_activity_editor - self.created_at = created_at - self.updated_at = updated_at + 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.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case assignee - case assigning_team - case pending_cancellation_date - case last_activity_at - case last_activity_editor - case created_at - case updated_at + case seat_breakdown + case public_code_suggestions + case ide_chat + case platform_chat + case cli + case seat_management_setting } 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, - forKey: .assignee - ) - assigning_team = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload.self, - forKey: .assigning_team + seat_breakdown = try container.decode( + Components.Schemas.copilot_hyphen_seat_hyphen_breakdown.self, + forKey: .seat_breakdown ) - pending_cancellation_date = try container.decodeIfPresent( - Swift.String.self, - forKey: .pending_cancellation_date + public_code_suggestions = try container.decode( + Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload.self, + forKey: .public_code_suggestions ) - last_activity_at = try container.decodeIfPresent( - Foundation.Date.self, - forKey: .last_activity_at + ide_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload.self, + forKey: .ide_chat ) - last_activity_editor = try container.decodeIfPresent( - Swift.String.self, - forKey: .last_activity_editor + platform_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload.self, + forKey: .platform_chat ) - created_at = try container.decode( - Foundation.Date.self, - forKey: .created_at + cli = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload.self, + forKey: .cli ) - updated_at = try container.decodeIfPresent( - Foundation.Date.self, - forKey: .updated_at + seat_management_setting = try container.decode( + Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self, + forKey: .seat_management_setting ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "assignee", - "assigning_team", - "pending_cancellation_date", - "last_activity_at", - "last_activity_editor", - "created_at", - "updated_at" + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "seat_breakdown", + "public_code_suggestions", + "ide_chat", + "platform_chat", + "cli", + "seat_management_setting" ]) } + 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 encoder.encodeAdditionalProperties(additionalProperties) + } } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. @@ -1808,6 +1932,10 @@ public enum Components { /// /// - 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`. @@ -1839,119 +1967,426 @@ public enum Components { } } } - /// Received HTTP response body - public var body: Components.Responses.not_found.Body - /// Creates a new `not_found`. + /// 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 + } + } + } + /// 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 beta 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 /// - /// - 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 - } + /// - 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 + ) } } } - /// Received HTTP response body - public var body: Components.Responses.requires_authentication.Body - /// Creates a new `requires_authentication`. + /// Internal Error /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.requires_authentication.Body) { - self.body = body + /// - 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 + ) + } + } } - } - 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 - } + /// 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 + ) } } } - /// 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/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 + ) + } + } } - } - 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/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.internal_error.Body - /// Creates a new `internal_error`. + /// Undocumented response. /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { - self.body = body + /// 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 { /// Get a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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. /// @@ -2070,21 +2505,311 @@ public enum Operations { /// /// - 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_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - 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_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_usage_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 + ) + } + } + } + /// Internal Error + /// + /// - 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) + /// 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/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`. + /// + /// 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/usage/get(copilot/usage-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 + ) + } + } + } + /// 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 an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// + /// 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. + /// + /// 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 enum copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team { + public static let id: Swift.String = "copilot/usage-metrics-for-enterprise-team" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/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}/team/{team_slug}/copilot/usage/GET/path/enterprise`. + public var enterprise: Components.Parameters.enterprise + /// The slug of the team name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/path/team_slug`. + public var team_slug: Components.Parameters.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. + /// - team_slug: The slug of the team name. + public init( + enterprise: Components.Parameters.enterprise, + team_slug: Components.Parameters.team_hyphen_slug + ) { + self.enterprise = enterprise + self.team_slug = team_slug + } + } + public var path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/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}/team/{team_slug}/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}/team/{team_slug}/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}/team/{team_slug}/copilot/usage/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}/team/{team_slug}/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 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_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/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.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_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/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/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: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_usage_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_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/usage/get(copilot/usage-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_usage_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_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok { get throws { switch self { case let .ok(response): @@ -2099,7 +2824,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/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/500`. /// /// HTTP response code: `500 internalServerError`. case internalServerError(Components.Responses.internal_error) @@ -2122,7 +2847,7 @@ public enum Operations { } /// Requires authentication /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)/responses/401`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/401`. /// /// HTTP response code: `401 unauthorized`. case unauthorized(Components.Responses.requires_authentication) @@ -2145,7 +2870,7 @@ public enum Operations { } /// 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/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/403`. /// /// HTTP response code: `403 forbidden`. case forbidden(Components.Responses.forbidden) @@ -2168,7 +2893,7 @@ 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/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Components.Responses.not_found) @@ -2222,15 +2947,16 @@ public enum Operations { } /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// 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)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// 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 the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. @@ -2481,13 +3207,13 @@ public enum Operations { } /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Only organization owners can view assigned seats. /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. - /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope 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 `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. @@ -2782,18 +3508,21 @@ public enum Operations { } /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. @@ -3087,7 +3816,8 @@ public enum Operations { } /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -3096,9 +3826,9 @@ public enum Operations { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. @@ -3392,18 +4122,21 @@ public enum Operations { } /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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)". /// - /// Only organization owners can configure GitHub Copilot in their 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)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// The response will contain 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. /// /// - 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)`. @@ -3697,7 +4430,8 @@ public enum Operations { } /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. @@ -3706,9 +4440,9 @@ public enum Operations { /// /// 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 configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// 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)`. @@ -4002,13 +4736,14 @@ public enum Operations { } /// Get a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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 the prior 28 days. Usage metrics are processed once per day for the previous day, + /// 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. /// @@ -4279,13 +5014,14 @@ public enum Operations { } /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta 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. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope 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 `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. @@ -4543,4 +5279,294 @@ public enum Operations { } } } + /// Get a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta 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. + /// 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 team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage 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/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + public enum copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team { + public static let id: Swift.String = "copilot/usage-metrics-for-team" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/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/usage/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/usage/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_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/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/orgs/{org}/team/{team_slug}/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/orgs/{org}/team/{team_slug}/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/orgs/{org}/team/{team_slug}/copilot/usage/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/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 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_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/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.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_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/usage/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/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: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_usage_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_usage_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_usage_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_usage_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/usage/get(copilot/usage-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 + ) + } + } + } + /// Requires authentication + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)/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//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-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/usage/get(copilot/usage-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 + ) + } + } + } + /// 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 + ] + } + } + } } diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 11d0376e2e6..3e93aff0c8b 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -562,7 +562,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -625,7 +625,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -769,7 +769,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -832,7 +832,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1554,7 +1554,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -1783,7 +1783,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2287,6 +2287,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2294,22 +2316,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -2317,7 +2343,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -2665,7 +2691,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, diff --git a/Sources/dependency-graph/Types.swift b/Sources/dependency-graph/Types.swift index 2c08b9d356b..8cb6940a2cb 100644 --- a/Sources/dependency-graph/Types.swift +++ b/Sources/dependency-graph/Types.swift @@ -370,6 +370,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/packagesPayload/supplier`. public var supplier: Swift.String? + /// The copyright holders of the package, and any dates present with those notices, if available. + /// + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/packagesPayload/copyrightText`. + public var copyrightText: Swift.String? /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/packagesPayload/externalRefsPayload`. public struct externalRefsPayloadPayload: Codable, Hashable, Sendable { /// The category of reference to an external resource this reference refers to. @@ -420,6 +424,7 @@ public enum Components { /// - licenseConcluded: The license of the package as determined while creating the SPDX document. /// - licenseDeclared: The license of the package as declared by its author, or NOASSERTION if this information /// - supplier: The distribution source of this package, or NOASSERTION if this was not determined. + /// - copyrightText: The copyright holders of the package, and any dates present with those notices, if available. /// - externalRefs: public init( SPDXID: Swift.String? = nil, @@ -430,6 +435,7 @@ public enum Components { licenseConcluded: Swift.String? = nil, licenseDeclared: Swift.String? = nil, supplier: Swift.String? = nil, + copyrightText: Swift.String? = nil, externalRefs: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.packagesPayloadPayload.externalRefsPayload? = nil ) { self.SPDXID = SPDXID @@ -440,6 +446,7 @@ public enum Components { self.licenseConcluded = licenseConcluded self.licenseDeclared = licenseDeclared self.supplier = supplier + self.copyrightText = copyrightText self.externalRefs = externalRefs } public enum CodingKeys: String, CodingKey { @@ -451,6 +458,7 @@ public enum Components { case licenseConcluded case licenseDeclared case supplier + case copyrightText case externalRefs } } diff --git a/Sources/gists/Client.swift b/Sources/gists/Client.swift index 65a456f88e6..334f4dbd58d 100644 --- a/Sources/gists/Client.swift +++ b/Sources/gists/Client.swift @@ -157,7 +157,8 @@ public struct Client: APIProtocol { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index fac5344e483..1b538eb8d6d 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -22,7 +22,8 @@ public protocol APIProtocol: Sendable { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. @@ -217,7 +218,8 @@ extension APIProtocol { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. @@ -582,7 +584,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -645,7 +647,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -758,7 +760,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -821,7 +823,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1223,7 +1225,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/public-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/public-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/avatar_url`. @@ -1380,7 +1382,7 @@ public enum Components { /// - collaborators: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1510,7 +1512,7 @@ public enum Components { forKey: .login ) id = try container.decode( - Swift.Int.self, + Swift.Int64.self, forKey: .id ) node_id = try container.decode( @@ -2826,7 +2828,8 @@ public enum Operations { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. diff --git a/Sources/git/Client.swift b/Sources/git/Client.swift index 6a2eaeabbcc..b2452d34134 100644 --- a/Sources/git/Client.swift +++ b/Sources/git/Client.swift @@ -176,7 +176,7 @@ public struct Client: APIProtocol { return .forbidden(.init(body: body)) case 422: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.validation_failed.Body + let body: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -186,7 +186,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.validation_hyphen_error.self, + Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -693,7 +693,8 @@ public struct Client: APIProtocol { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -793,7 +794,8 @@ public struct Client: APIProtocol { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -1708,8 +1710,8 @@ public struct Client: APIProtocol { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. diff --git a/Sources/git/Types.swift b/Sources/git/Types.swift index ce0602433b8..384a2f3264b 100644 --- a/Sources/git/Types.swift +++ b/Sources/git/Types.swift @@ -112,7 +112,8 @@ public protocol APIProtocol: Sendable { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -123,7 +124,8 @@ public protocol APIProtocol: Sendable { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -236,8 +238,8 @@ public protocol APIProtocol: Sendable { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. @@ -383,7 +385,8 @@ extension APIProtocol { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -402,7 +405,8 @@ extension APIProtocol { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -579,8 +583,8 @@ extension APIProtocol { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. @@ -808,6 +812,102 @@ public enum Components { case signature } } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. + public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String + /// Repository rule violation was detected + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error`. + public struct repository_hyphen_rule_hyphen_violation_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/status`. + public var status: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public struct metadataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public struct secret_scanningPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload`. + public struct bypass_placeholdersPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/placeholder_id`. + public var placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/token_type`. + public var token_type: Swift.String? + /// Creates a new `bypass_placeholdersPayloadPayload`. + /// + /// - Parameters: + /// - placeholder_id: + /// - token_type: + public init( + placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? = nil, + token_type: Swift.String? = nil + ) { + self.placeholder_id = placeholder_id + self.token_type = token_type + } + public enum CodingKeys: String, CodingKey { + case placeholder_id + case token_type + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public typealias bypass_placeholdersPayload = [Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayloadPayload] + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public var bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? + /// Creates a new `secret_scanningPayload`. + /// + /// - Parameters: + /// - bypass_placeholders: + public init(bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? = nil) { + self.bypass_placeholders = bypass_placeholders + } + public enum CodingKeys: String, CodingKey { + case bypass_placeholders + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public var secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? + /// Creates a new `metadataPayload`. + /// + /// - Parameters: + /// - secret_scanning: + public init(secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? = nil) { + self.secret_scanning = secret_scanning + } + public enum CodingKeys: String, CodingKey { + case secret_scanning + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public var metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? + /// Creates a new `repository_hyphen_rule_hyphen_violation_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - status: + /// - metadata: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + status: Swift.String? = nil, + metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.status = status + self.metadata = metadata + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case status + case metadata + } + } /// Short Blob /// /// - Remark: Generated from `#/components/schemas/short-blob`. @@ -1799,17 +1899,80 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. + public struct UnprocessableContent: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/json`. + @frozen public enum jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/json/case1`. + case validation_hyphen_error(Components.Schemas.validation_hyphen_error) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/json/case2`. + case repository_hyphen_rule_hyphen_violation_hyphen_error(Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .validation_hyphen_error(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .repository_hyphen_rule_hyphen_violation_hyphen_error(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 .validation_hyphen_error(value): + try value.encode(to: encoder) + case let .repository_hyphen_rule_hyphen_violation_hyphen_error(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/application\/json`. + case json(Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.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.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body + /// Creates a new `UnprocessableContent`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body) { + self.body = body + } + } + /// Validation failed /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/blobs/post(git/create-blob)/responses/422`. /// /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) + case unprocessableContent(Operations.git_sol_create_hyphen_blob.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: Components.Responses.validation_failed { + public var unprocessableContent: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent { get throws { switch self { case let .unprocessableContent(response): @@ -2184,7 +2347,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/commits/POST/requestBody/json/tree`. public var tree: Swift.String - /// The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + /// The full SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/commits/POST/requestBody/json/parents`. public var parents: [Swift.String]? @@ -2279,7 +2442,7 @@ public enum Operations { /// - Parameters: /// - message: The commit message /// - tree: The SHA of the tree object this commit points to - /// - parents: The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + /// - parents: The full SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. /// - author: Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. /// - committer: Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. /// - signature: The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. @@ -2729,7 +2892,8 @@ public enum Operations { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -2923,7 +3087,8 @@ public enum Operations { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -4453,7 +4618,6 @@ public enum Operations { /// The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. /// If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/trees/POST/requestBody/json/base_tree`. public var base_tree: Swift.String? /// Creates a new `jsonPayload`. @@ -4693,8 +4857,8 @@ public enum Operations { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. diff --git a/Sources/issues/Client.swift b/Sources/issues/Client.swift index f5f8f543f24..8511215829f 100644 --- a/Sources/issues/Client.swift +++ b/Sources/issues/Client.swift @@ -44,10 +44,8 @@ public struct Client: APIProtocol { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -256,10 +254,8 @@ public struct Client: APIProtocol { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -599,10 +595,8 @@ public struct Client: APIProtocol { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -1708,10 +1702,8 @@ public struct Client: APIProtocol { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -4855,10 +4847,8 @@ public struct Client: APIProtocol { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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 2db3458272a..094041126fb 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -17,10 +17,8 @@ public protocol APIProtocol: Sendable { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -36,10 +34,8 @@ public protocol APIProtocol: Sendable { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -73,10 +69,8 @@ public protocol APIProtocol: Sendable { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -179,10 +173,8 @@ public protocol APIProtocol: Sendable { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -414,10 +406,8 @@ public protocol APIProtocol: Sendable { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -439,10 +429,8 @@ extension APIProtocol { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -466,10 +454,8 @@ extension APIProtocol { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -531,10 +517,8 @@ extension APIProtocol { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -705,10 +689,8 @@ extension APIProtocol { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -1186,10 +1168,8 @@ extension APIProtocol { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -1236,7 +1216,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1299,7 +1279,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1412,7 +1392,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1475,7 +1455,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1554,6 +1534,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -1684,8 +1666,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/webhook_secret`. @@ -1698,6 +1678,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -1708,7 +1689,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -1716,6 +1696,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -1726,7 +1707,6 @@ public enum Components { permissions: Components.Schemas.integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -1734,6 +1714,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -1744,7 +1725,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -1753,6 +1733,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -1763,7 +1744,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -1999,7 +1979,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -2442,7 +2422,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2732,6 +2712,251 @@ public enum Components { case anonymous_access_enabled } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// A collection of related issues and pull requests. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone`. @@ -2868,6 +3093,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -2998,8 +3225,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -3012,6 +3237,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -3022,7 +3248,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -3030,6 +3255,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -3040,7 +3266,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -3048,6 +3273,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -3058,7 +3284,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -3067,6 +3292,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -3077,7 +3303,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -3642,251 +3867,6 @@ public enum Components { case reactions } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } /// Commit Comment /// /// - Remark: Generated from `#/components/schemas/commit-comment`. @@ -6312,6 +6292,8 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/label`. public struct label: Codable, Hashable, Sendable { + /// Unique identifier for the label. + /// /// - Remark: Generated from `#/components/schemas/label/id`. public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/label/node_id`. @@ -6324,24 +6306,28 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/label/name`. public var name: Swift.String + /// Optional description of the label, such as its purpose. + /// /// - Remark: Generated from `#/components/schemas/label/description`. public var description: Swift.String? /// 6-character hex code, without the leading #, identifying the color /// /// - Remark: Generated from `#/components/schemas/label/color`. public var color: Swift.String + /// Whether this label comes by default in a new repository. + /// /// - Remark: Generated from `#/components/schemas/label/default`. public var _default: Swift.Bool /// Creates a new `label`. /// /// - Parameters: - /// - id: + /// - id: Unique identifier for the label. /// - node_id: /// - url: URL for the label /// - name: The name of the label. - /// - description: + /// - description: Optional description of the label, such as its purpose. /// - color: 6-character hex code, without the leading #, identifying the color - /// - _default: + /// - _default: Whether this label comes by default in a new repository. public init( id: Swift.Int64, node_id: Swift.String, @@ -6971,11 +6957,11 @@ public enum Components { /// The ID of the pull request review to which the comment belongs. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/pull_request_review_id`. - public var pull_request_review_id: Swift.Int? + public var pull_request_review_id: Swift.Int64? /// The ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The node ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/node_id`. @@ -7193,8 +7179,8 @@ public enum Components { /// - body_text: public init( url: Swift.String, - pull_request_review_id: Swift.Int? = nil, - id: Swift.Int, + pull_request_review_id: Swift.Int64? = nil, + id: Swift.Int64, node_id: Swift.String, diff_hunk: Swift.String, path: Swift.String, @@ -8311,10 +8297,8 @@ public enum Operations { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -8640,10 +8624,8 @@ public enum Operations { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -9308,10 +9290,8 @@ public enum Operations { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -11351,10 +11331,8 @@ public enum Operations { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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)." /// @@ -17682,10 +17660,8 @@ public enum Operations { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// 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/meta/Client.swift b/Sources/meta/Client.swift index a514f63de60..e09e79607db 100644 --- a/Sources/meta/Client.swift +++ b/Sources/meta/Client.swift @@ -108,7 +108,8 @@ public struct Client: APIProtocol { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. diff --git a/Sources/meta/Types.swift b/Sources/meta/Types.swift index 874d39c913a..3ada4926c35 100644 --- a/Sources/meta/Types.swift +++ b/Sources/meta/Types.swift @@ -26,7 +26,8 @@ public protocol APIProtocol: Sendable { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. @@ -73,7 +74,8 @@ extension APIProtocol { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. @@ -443,6 +445,8 @@ public enum Components { public var actions_macos: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/dependabot`. public var dependabot: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/api-overview/copilot`. + public var copilot: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/domains`. public struct domainsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/api-overview/domains/website`. @@ -455,6 +459,31 @@ public enum Components { public var packages: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/domains/actions`. public var actions: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations`. + public struct artifact_attestationsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations/trust_domain`. + public var trust_domain: Swift.String? + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations/services`. + public var services: [Swift.String]? + /// Creates a new `artifact_attestationsPayload`. + /// + /// - Parameters: + /// - trust_domain: + /// - services: + public init( + trust_domain: Swift.String? = nil, + services: [Swift.String]? = nil + ) { + self.trust_domain = trust_domain + self.services = services + } + public enum CodingKeys: String, CodingKey { + case trust_domain + case services + } + } + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations`. + public var artifact_attestations: Components.Schemas.api_hyphen_overview.domainsPayload.artifact_attestationsPayload? /// Creates a new `domainsPayload`. /// /// - Parameters: @@ -463,18 +492,21 @@ public enum Components { /// - copilot: /// - packages: /// - actions: + /// - artifact_attestations: public init( website: [Swift.String]? = nil, codespaces: [Swift.String]? = nil, copilot: [Swift.String]? = nil, packages: [Swift.String]? = nil, - actions: [Swift.String]? = nil + actions: [Swift.String]? = nil, + artifact_attestations: Components.Schemas.api_hyphen_overview.domainsPayload.artifact_attestationsPayload? = nil ) { self.website = website self.codespaces = codespaces self.copilot = copilot self.packages = packages self.actions = actions + self.artifact_attestations = artifact_attestations } public enum CodingKeys: String, CodingKey { case website @@ -482,6 +514,7 @@ public enum Components { case copilot case packages case actions + case artifact_attestations } } /// - Remark: Generated from `#/components/schemas/api-overview/domains`. @@ -503,6 +536,7 @@ public enum Components { /// - actions: /// - actions_macos: /// - dependabot: + /// - copilot: /// - domains: public init( verifiable_password_authentication: Swift.Bool, @@ -519,6 +553,7 @@ public enum Components { actions: [Swift.String]? = nil, actions_macos: [Swift.String]? = nil, dependabot: [Swift.String]? = nil, + copilot: [Swift.String]? = nil, domains: Components.Schemas.api_hyphen_overview.domainsPayload? = nil ) { self.verifiable_password_authentication = verifiable_password_authentication @@ -535,6 +570,7 @@ public enum Components { self.actions = actions self.actions_macos = actions_macos self.dependabot = dependabot + self.copilot = copilot self.domains = domains } public enum CodingKeys: String, CodingKey { @@ -552,6 +588,7 @@ public enum Components { case actions case actions_macos case dependabot + case copilot case domains } } @@ -721,7 +758,8 @@ public enum Operations { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. diff --git a/Sources/migrations/Client.swift b/Sources/migrations/Client.swift index dce7deab2e8..f0366d78270 100644 --- a/Sources/migrations/Client.swift +++ b/Sources/migrations/Client.swift @@ -666,7 +666,8 @@ public struct Client: APIProtocol { /// /// View the progress of an import. /// - /// **Warning:** 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). + /// > [!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). /// /// **Import status** /// @@ -816,7 +817,8 @@ public struct Client: APIProtocol { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** 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). + /// > [!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). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -919,8 +921,8 @@ public struct Client: APIProtocol { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -1071,8 +1073,8 @@ public struct Client: APIProtocol { /// /// Stop an import for a repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -1144,7 +1146,8 @@ 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:** 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). + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -1264,8 +1267,8 @@ public struct Client: APIProtocol { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - 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)`. @@ -1411,8 +1414,8 @@ public struct Client: APIProtocol { /// /// List files larger than 100MB found during the import /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -1506,8 +1509,8 @@ public struct Client: APIProtocol { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - 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 6be9ce93c19..186e2d975f7 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -73,7 +73,8 @@ public protocol APIProtocol: Sendable { /// /// View the progress of an import. /// - /// **Warning:** 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). + /// > [!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). /// /// **Import status** /// @@ -121,7 +122,8 @@ public protocol APIProtocol: Sendable { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** 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). + /// > [!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). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -133,8 +135,8 @@ public protocol APIProtocol: Sendable { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -144,8 +146,8 @@ public protocol APIProtocol: Sendable { /// /// Stop an import for a repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -157,7 +159,8 @@ 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:** 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). + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -168,8 +171,8 @@ public protocol APIProtocol: Sendable { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - 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)`. @@ -179,8 +182,8 @@ public protocol APIProtocol: Sendable { /// /// List files larger than 100MB found during the import /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -194,8 +197,8 @@ public protocol APIProtocol: Sendable { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. @@ -407,7 +410,8 @@ extension APIProtocol { /// /// View the progress of an import. /// - /// **Warning:** 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). + /// > [!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). /// /// **Import status** /// @@ -463,7 +467,8 @@ extension APIProtocol { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** 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). + /// > [!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). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -485,8 +490,8 @@ extension APIProtocol { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -506,8 +511,8 @@ extension APIProtocol { /// /// Stop an import for a repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -527,7 +532,8 @@ 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:** 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). + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -548,8 +554,8 @@ extension APIProtocol { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - 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)`. @@ -569,8 +575,8 @@ extension APIProtocol { /// /// List files larger than 100MB found during the import /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -592,8 +598,8 @@ extension APIProtocol { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. @@ -772,7 +778,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -835,7 +841,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -948,7 +954,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1011,7 +1017,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1257,7 +1263,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1700,7 +1706,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2131,6 +2137,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2138,22 +2166,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -2161,7 +2193,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -2509,7 +2541,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2780,7 +2812,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/migration`. public struct migration: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/migration/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/migration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// - Remark: Generated from `#/components/schemas/migration/guid`. @@ -2841,7 +2873,7 @@ public enum Components { /// - archive_url: /// - exclude: Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. public init( - id: Swift.Int, + id: Swift.Int64, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, guid: Swift.String, state: Swift.String, @@ -4703,7 +4735,8 @@ public enum Operations { /// /// View the progress of an import. /// - /// **Warning:** 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). + /// > [!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). /// /// **Import status** /// @@ -4930,7 +4963,8 @@ public enum Operations { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** 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). + /// > [!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). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -5159,8 +5193,8 @@ public enum Operations { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -5460,8 +5494,8 @@ public enum Operations { /// /// Stop an import for a repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -5605,7 +5639,8 @@ 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:** 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). + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -5813,8 +5848,8 @@ public enum Operations { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - 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)`. @@ -6082,8 +6117,8 @@ public enum Operations { /// /// List files larger than 100MB found during the import /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -6253,8 +6288,8 @@ public enum Operations { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** 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). - /// + /// > [!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). /// /// - 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/orgs/Client.swift b/Sources/orgs/Client.swift index ace3c8c9a66..3ab8bd3028e 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -42,7 +42,8 @@ public struct Client: APIProtocol { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -134,17 +135,6 @@ public struct Client: APIProtocol { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -233,20 +223,13 @@ public struct Client: APIProtocol { } /// Update an organization /// - /// **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). - /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// > [!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). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories + /// > [!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/). /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -481,6 +464,96 @@ public struct Client: APIProtocol { } ) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + public func orgs_sol_list_hyphen_attestations(_ input: Operations.orgs_sol_list_hyphen_attestations.Input) async throws -> Operations.orgs_sol_list_hyphen_attestations.Output { + try await client.send( + input: input, + forOperation: Operations.orgs_sol_list_hyphen_attestations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/attestations/{}", + parameters: [ + input.path.org, + input.path.subject_digest + ] + ) + 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: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + 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.orgs_sol_list_hyphen_attestations.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.orgs_sol_list_hyphen_attestations.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 + ) + ) + } + } + ) + } /// List users blocked by an organization /// /// List the users blocked by an organization. @@ -2887,7 +2960,7 @@ public struct Client: APIProtocol { /// /// **Rate limits** /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. @@ -3096,126 +3169,9 @@ public struct Client: APIProtocol { } ) } - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - public func orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions(_ input: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input) async throws -> Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-fine-grained-permissions", - parameters: [ - input.path.org - ] - ) - 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.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.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.organization_hyphen_fine_hyphen_grained_hyphen_permission].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.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.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, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } /// Get all organization roles for an organization /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -3328,155 +3284,9 @@ public struct Client: APIProtocol { } ) } - /// Create a custom organization role - /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - public func orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-roles", - 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.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.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.organization_hyphen_role.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .created(.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)) - case 409: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.conflict.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 .conflict(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } /// Remove all organization roles for a team /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3521,7 +3331,7 @@ public struct Client: APIProtocol { } /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3571,7 +3381,7 @@ public struct Client: APIProtocol { } /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3617,7 +3427,7 @@ public struct Client: APIProtocol { } /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3662,7 +3472,7 @@ public struct Client: APIProtocol { } /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3712,7 +3522,7 @@ public struct Client: APIProtocol { } /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3758,7 +3568,7 @@ public struct Client: APIProtocol { } /// Get an organization role /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -3872,205 +3682,9 @@ public struct Client: APIProtocol { } ) } - /// Update a custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - public func orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-roles/{}", - parameters: [ - input.path.org, - input.path.role_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.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.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.organization_hyphen_role.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.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 409: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.conflict.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 .conflict(.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 - ) - ) - } - } - ) - } - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - public func orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-roles/{}", - parameters: [ - input.path.org, - input.path.role_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 teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -4134,7 +3748,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.team].self, + [Components.Schemas.team_hyphen_role_hyphen_assignment].self, from: responseBody, transforming: { value in .json(value) @@ -4165,7 +3779,7 @@ public struct Client: APIProtocol { } /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -4229,7 +3843,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.simple_hyphen_user].self, + [Components.Schemas.user_hyphen_role_hyphen_assignment].self, from: responseBody, transforming: { value in .json(value) @@ -5937,7 +5551,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.org_hyphen_custom_hyphen_property].self, + [Components.Schemas.custom_hyphen_property].self, from: responseBody, transforming: { value in .json(value) @@ -6058,7 +5672,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.org_hyphen_custom_hyphen_property].self, + [Components.Schemas.custom_hyphen_property].self, from: responseBody, transforming: { value in .json(value) @@ -6168,7 +5782,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.org_hyphen_custom_hyphen_property.self, + Components.Schemas.custom_hyphen_property.self, from: responseBody, transforming: { value in .json(value) @@ -6290,7 +5904,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.org_hyphen_custom_hyphen_property.self, + Components.Schemas.custom_hyphen_property.self, from: responseBody, transforming: { value in .json(value) @@ -7055,8 +6669,6 @@ public struct Client: APIProtocol { switch response.status.code { case 204: return .noContent(.init()) - case 409: - return .conflict(.init()) default: return .undocumented( statusCode: response.status.code, @@ -7116,6 +6728,9 @@ 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/). + /// /// 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)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. @@ -7124,6 +6739,7 @@ public struct Client: APIProtocol { /// /// - 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)`. + @available(*, deprecated) public func orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos(_ input: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input) async throws -> Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Output { try await client.send( input: input, diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 81ae2addf46..4c8aef3c32c 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -15,7 +15,8 @@ public protocol APIProtocol: Sendable { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -28,17 +29,6 @@ public protocol APIProtocol: Sendable { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -48,20 +38,13 @@ public protocol APIProtocol: Sendable { func orgs_sol_get(_ input: Operations.orgs_sol_get.Input) async throws -> Operations.orgs_sol_get.Output /// Update an organization /// - /// **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). - /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// > [!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). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories + /// > [!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/). /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -83,6 +66,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /orgs/{org}`. /// - Remark: Generated from `#/paths//orgs/{org}/delete(orgs/delete)`. func orgs_sol_delete(_ input: Operations.orgs_sol_delete.Input) async throws -> Operations.orgs_sol_delete.Output + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + func orgs_sol_list_hyphen_attestations(_ input: Operations.orgs_sol_list_hyphen_attestations.Input) async throws -> Operations.orgs_sol_list_hyphen_attestations.Output /// List users blocked by an organization /// /// List the users blocked by an organization. @@ -338,7 +332,7 @@ public protocol APIProtocol: Sendable { /// /// **Rate limits** /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. @@ -352,25 +346,9 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. func orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user(_ input: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input) async throws -> Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Output - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - func orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions(_ input: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input) async throws -> Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output /// Get all organization roles for an organization /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -382,23 +360,9 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/organization-roles`. /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)`. func orgs_sol_list_hyphen_org_hyphen_roles(_ input: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input) async throws -> Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output - /// Create a custom organization role - /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - func orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output /// Remove all organization roles for a team /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -409,7 +373,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team(_ input: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Input) async throws -> Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Output /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -420,7 +384,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role(_ input: Operations.orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role.Input) async throws -> Operations.orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role.Output /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -431,7 +395,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_team(_ input: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_team.Input) async throws -> Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_team.Output /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -442,7 +406,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_user(_ input: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_user.Input) async throws -> Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_user.Output /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -453,7 +417,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role(_ input: Operations.orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role.Input) async throws -> Operations.orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role.Output /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -464,7 +428,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user(_ input: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Input) async throws -> Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output /// Get an organization role /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -476,38 +440,9 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/organization-roles/{role_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)`. func orgs_sol_get_hyphen_org_hyphen_role(_ input: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input) async throws -> Operations.orgs_sol_get_hyphen_org_hyphen_role.Output - /// Update a custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - func orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - func orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output /// List teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -518,7 +453,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams(_ input: Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams.Input) async throws -> Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams.Output /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -758,6 +693,9 @@ public protocol APIProtocol: Sendable { func orgs_sol_remove_hyphen_security_hyphen_manager_hyphen_team(_ input: Operations.orgs_sol_remove_hyphen_security_hyphen_manager_hyphen_team.Input) async throws -> Operations.orgs_sol_remove_hyphen_security_hyphen_manager_hyphen_team.Output /// 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/). + /// /// 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)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. @@ -766,6 +704,7 @@ public protocol APIProtocol: Sendable { /// /// - 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)`. + @available(*, deprecated) func orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos(_ input: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input) async throws -> Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Output /// List organization memberships for the authenticated user /// @@ -814,7 +753,8 @@ extension APIProtocol { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -835,17 +775,6 @@ extension APIProtocol { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -863,20 +792,13 @@ extension APIProtocol { } /// Update an organization /// - /// **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). - /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// > [!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). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories + /// > [!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/). /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -916,6 +838,27 @@ extension APIProtocol { headers: headers )) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + public func orgs_sol_list_hyphen_attestations( + path: Operations.orgs_sol_list_hyphen_attestations.Input.Path, + query: Operations.orgs_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.orgs_sol_list_hyphen_attestations.Input.Headers = .init() + ) async throws -> Operations.orgs_sol_list_hyphen_attestations.Output { + try await orgs_sol_list_hyphen_attestations(Operations.orgs_sol_list_hyphen_attestations.Input( + path: path, + query: query, + headers: headers + )) + } /// List users blocked by an organization /// /// List the users blocked by an organization. @@ -1383,7 +1326,7 @@ extension APIProtocol { /// /// **Rate limits** /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. @@ -1415,33 +1358,9 @@ extension APIProtocol { headers: headers )) } - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - public func orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions( - path: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Path, - headers: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Headers = .init() - ) async throws -> Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output { - try await orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions(Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input( - path: path, - headers: headers - )) - } /// Get all organization roles for an organization /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -1461,33 +1380,9 @@ extension APIProtocol { headers: headers )) } - /// Create a custom organization role - /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - public func orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role( - path: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body - ) async throws -> Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role(Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input( - path: path, - headers: headers, - body: body - )) - } /// Remove all organization roles for a team /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1500,7 +1395,7 @@ extension APIProtocol { } /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1513,7 +1408,7 @@ extension APIProtocol { } /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1526,7 +1421,7 @@ extension APIProtocol { } /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1539,7 +1434,7 @@ extension APIProtocol { } /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1552,7 +1447,7 @@ extension APIProtocol { } /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1565,7 +1460,7 @@ extension APIProtocol { } /// Get an organization role /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -1585,50 +1480,9 @@ extension APIProtocol { headers: headers )) } - /// Update a custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - public func orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role( - path: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body - ) async throws -> Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role(Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input( - path: path, - headers: headers, - body: body - )) - } - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - public func orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(path: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input.Path) async throws -> Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input(path: path)) - } /// List teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -1649,7 +1503,7 @@ extension APIProtocol { } /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -2105,6 +1959,9 @@ 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/). + /// /// 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)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. @@ -2113,6 +1970,7 @@ extension APIProtocol { /// /// - 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)`. + @available(*, deprecated) public func orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos( path: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input.Path, body: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input.Body? = nil @@ -2232,7 +2090,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -2295,7 +2153,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2439,7 +2297,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -2502,7 +2360,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -4227,1505 +4085,1544 @@ public enum Components { case html_url } } - /// - Remark: Generated from `#/components/schemas/security-and-analysis`. - public struct security_hyphen_and_hyphen_analysis: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. - public struct advanced_securityPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? - /// Creates a new `advanced_securityPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. - public var advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? - /// Enable or disable Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. - public struct dependabot_security_updatesPayload: Codable, Hashable, Sendable { - /// The enablement status of Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// The enablement status of Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? - /// Creates a new `dependabot_security_updatesPayload`. - /// - /// - Parameters: - /// - status: The enablement status of Dependabot security updates for the repository. - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// Enable or disable Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. - public var dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. - public struct secret_scanningPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/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/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? - /// Creates a new `secret_scanningPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. - public var secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/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_push_protection/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? - /// Creates a new `secret_scanning_push_protectionPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? - /// Creates a new `security_hyphen_and_hyphen_analysis`. - /// - /// - Parameters: - /// - advanced_security: - /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. - /// - secret_scanning: - /// - secret_scanning_push_protection: - 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 - ) { - 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 - } - public enum CodingKeys: String, CodingKey { - case advanced_security - case dependabot_security_updates - case secret_scanning - case secret_scanning_push_protection - } - } - /// Minimal Repository + /// A GitHub organization. /// - /// - Remark: Generated from `#/components/schemas/minimal-repository`. - public struct minimal_hyphen_repository: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. + /// - 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/minimal-repository/node_id`. + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/full_name`. - public var full_name: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/owner`. - public var owner: Components.Schemas.simple_hyphen_user - /// - Remark: Generated from `#/components/schemas/minimal-repository/private`. - public var _private: Swift.Bool - /// - Remark: Generated from `#/components/schemas/minimal-repository/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/fork`. - public var fork: Swift.Bool - /// - Remark: Generated from `#/components/schemas/minimal-repository/url`. + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/archive_url`. - public var archive_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/assignees_url`. - public var assignees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/blobs_url`. - public var blobs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/branches_url`. - public var branches_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/collaborators_url`. - public var collaborators_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/comments_url`. - public var comments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/commits_url`. - public var commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/compare_url`. - public var compare_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/contents_url`. - public var contents_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/contributors_url`. - public var contributors_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/deployments_url`. - public var deployments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/downloads_url`. - public var downloads_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/events_url`. + /// - 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/minimal-repository/forks_url`. - public var forks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_commits_url`. - public var git_commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_refs_url`. - public var git_refs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_tags_url`. - public var git_tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_url`. - public var git_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_comment_url`. - public var issue_comment_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_events_url`. - public var issue_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/keys_url`. - public var keys_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/labels_url`. - public var labels_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/languages_url`. - public var languages_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/merges_url`. - public var merges_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/milestones_url`. - public var milestones_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/notifications_url`. - public var notifications_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/pulls_url`. - public var pulls_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/releases_url`. - public var releases_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/ssh_url`. - public var ssh_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_url`. - public var stargazers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/statuses_url`. - public var statuses_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_url`. - public var subscribers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/subscription_url`. - public var subscription_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/tags_url`. - public var tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/teams_url`. - public var teams_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/trees_url`. - public var trees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/clone_url`. - public var clone_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/mirror_url`. - public var mirror_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/hooks_url`. + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/svn_url`. - public var svn_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/homepage`. - public var homepage: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/language`. - public var language: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/forks_count`. - public var forks_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_count`. - public var stargazers_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers_count`. - public var watchers_count: Swift.Int? - /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + /// - 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`. /// - /// - Remark: Generated from `#/components/schemas/minimal-repository/size`. - public var size: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/default_branch`. - public var default_branch: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues_count`. - public var open_issues_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/is_template`. - public var is_template: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/topics`. - public var topics: [Swift.String]? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_issues`. - public var has_issues: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_projects`. - public var has_projects: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_wiki`. - public var has_wiki: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_pages`. - public var has_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_downloads`. - public var has_downloads: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_discussions`. - public var has_discussions: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/archived`. - public var archived: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/disabled`. - public var disabled: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/visibility`. - public var visibility: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/pushed_at`. - public var pushed_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/minimal-repository/created_at`. - public var created_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/minimal-repository/updated_at`. - public var updated_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/admin`. - public var admin: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/maintain`. - public var maintain: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/push`. - public var push: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/triage`. - public var triage: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/pull`. - public var pull: Swift.Bool? - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - admin: - /// - maintain: - /// - push: - /// - triage: - /// - pull: - public init( - admin: Swift.Bool? = nil, - maintain: Swift.Bool? = nil, - push: Swift.Bool? = nil, - triage: Swift.Bool? = nil, - pull: Swift.Bool? = nil - ) { - 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 - } + /// - 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 } - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. - public var permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/minimal-repository/role_name`. - public var role_name: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/temp_clone_token`. - public var temp_clone_token: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/delete_branch_on_merge`. - public var delete_branch_on_merge: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_count`. - public var subscribers_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/network_count`. - public var network_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/code_of_conduct`. - public var code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. - public struct licensePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/key`. - public var key: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/spdx_id`. - public var spdx_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/url`. - public var url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/node_id`. - public var node_id: Swift.String? - /// Creates a new `licensePayload`. + 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`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. /// /// - Parameters: - /// - key: - /// - name: - /// - spdx_id: - /// - url: - /// - node_id: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: public init( - key: Swift.String? = nil, - name: Swift.String? = nil, - spdx_id: Swift.String? = nil, - url: Swift.String? = nil, - node_id: Swift.String? = nil + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool ) { - self.key = key - self.name = name - self.spdx_id = spdx_id - self.url = url - self.node_id = node_id + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin } public enum CodingKeys: String, CodingKey { - case key - case name - case spdx_id - case url - case node_id + case pull + case triage + case push + case maintain + case admin } } - /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. - public var license: Components.Schemas.minimal_hyphen_repository.licensePayload? - /// - Remark: Generated from `#/components/schemas/minimal-repository/forks`. - public var forks: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues`. - public var open_issues: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers`. - public var watchers: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/allow_forking`. - public var allow_forking: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/web_commit_signoff_required`. - public var web_commit_signoff_required: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/security_and_analysis`. - public var security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? - /// Creates a new `minimal_hyphen_repository`. + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. /// /// - Parameters: /// - id: /// - node_id: /// - name: - /// - full_name: - /// - owner: - /// - _private: - /// - html_url: + /// - slug: /// - description: - /// - fork: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: /// - url: - /// - archive_url: - /// - assignees_url: - /// - blobs_url: - /// - branches_url: - /// - collaborators_url: - /// - comments_url: - /// - commits_url: - /// - compare_url: - /// - contents_url: - /// - contributors_url: - /// - deployments_url: - /// - downloads_url: - /// - events_url: - /// - forks_url: - /// - git_commits_url: - /// - git_refs_url: - /// - git_tags_url: - /// - git_url: - /// - issue_comment_url: - /// - issue_events_url: - /// - issues_url: - /// - keys_url: - /// - labels_url: - /// - languages_url: - /// - merges_url: - /// - milestones_url: - /// - notifications_url: - /// - pulls_url: - /// - releases_url: - /// - ssh_url: - /// - stargazers_url: - /// - statuses_url: - /// - subscribers_url: - /// - subscription_url: - /// - tags_url: - /// - teams_url: - /// - trees_url: - /// - clone_url: - /// - mirror_url: - /// - hooks_url: - /// - svn_url: - /// - homepage: - /// - language: - /// - forks_count: - /// - stargazers_count: - /// - watchers_count: - /// - size: The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. - /// - default_branch: - /// - open_issues_count: - /// - is_template: - /// - topics: - /// - has_issues: - /// - has_projects: - /// - has_wiki: - /// - has_pages: - /// - has_downloads: - /// - has_discussions: - /// - archived: - /// - disabled: - /// - visibility: - /// - pushed_at: - /// - created_at: - /// - updated_at: - /// - permissions: - /// - role_name: - /// - temp_clone_token: - /// - delete_branch_on_merge: - /// - subscribers_count: - /// - network_count: - /// - code_of_conduct: - /// - license: - /// - forks: - /// - open_issues: - /// - watchers: - /// - allow_forking: - /// - web_commit_signoff_required: - /// - security_and_analysis: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: public init( id: Swift.Int, node_id: Swift.String, name: Swift.String, - full_name: Swift.String, - owner: Components.Schemas.simple_hyphen_user, - _private: Swift.Bool, - html_url: Swift.String, + slug: Swift.String, description: Swift.String? = nil, - fork: Swift.Bool, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, url: Swift.String, - 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, - downloads_url: Swift.String, - events_url: Swift.String, - forks_url: Swift.String, - git_commits_url: Swift.String, - git_refs_url: Swift.String, - git_tags_url: Swift.String, - git_url: Swift.String? = nil, - 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, - notifications_url: Swift.String, - pulls_url: Swift.String, - releases_url: Swift.String, - ssh_url: Swift.String? = nil, - 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, - clone_url: Swift.String? = nil, - mirror_url: Swift.String? = nil, - hooks_url: Swift.String, - svn_url: Swift.String? = nil, - homepage: Swift.String? = nil, - language: Swift.String? = nil, - forks_count: Swift.Int? = nil, - stargazers_count: Swift.Int? = nil, - watchers_count: Swift.Int? = nil, - size: Swift.Int? = nil, - default_branch: Swift.String? = nil, - open_issues_count: Swift.Int? = nil, - is_template: Swift.Bool? = nil, - topics: [Swift.String]? = nil, - has_issues: Swift.Bool? = nil, - has_projects: Swift.Bool? = nil, - has_wiki: Swift.Bool? = nil, - has_pages: Swift.Bool? = nil, - has_downloads: Swift.Bool? = nil, - has_discussions: Swift.Bool? = nil, - archived: Swift.Bool? = nil, - disabled: Swift.Bool? = nil, - visibility: Swift.String? = nil, - pushed_at: Foundation.Date? = nil, - created_at: Foundation.Date? = nil, - updated_at: Foundation.Date? = nil, - permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? = nil, - role_name: Swift.String? = nil, - temp_clone_token: Swift.String? = nil, - delete_branch_on_merge: Swift.Bool? = nil, - subscribers_count: Swift.Int? = nil, - network_count: Swift.Int? = nil, - code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? = nil, - license: Components.Schemas.minimal_hyphen_repository.licensePayload? = nil, - forks: Swift.Int? = nil, - open_issues: Swift.Int? = nil, - watchers: Swift.Int? = nil, - allow_forking: Swift.Bool? = nil, - web_commit_signoff_required: Swift.Bool? = nil, - security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? = nil + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil ) { self.id = id self.node_id = node_id self.name = name - self.full_name = full_name - self.owner = owner - self._private = _private - self.html_url = html_url + self.slug = slug self.description = description - self.fork = fork - self.url = url - 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.downloads_url = downloads_url - self.events_url = events_url - self.forks_url = forks_url - self.git_commits_url = git_commits_url - self.git_refs_url = git_refs_url - self.git_tags_url = git_tags_url - self.git_url = git_url - 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.notifications_url = notifications_url - self.pulls_url = pulls_url - self.releases_url = releases_url - self.ssh_url = ssh_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.clone_url = clone_url - self.mirror_url = mirror_url - self.hooks_url = hooks_url - self.svn_url = svn_url - self.homepage = homepage - self.language = language - self.forks_count = forks_count - self.stargazers_count = stargazers_count - self.watchers_count = watchers_count - self.size = size - self.default_branch = default_branch - self.open_issues_count = open_issues_count - self.is_template = is_template - self.topics = topics - self.has_issues = has_issues - self.has_projects = has_projects - self.has_wiki = has_wiki - self.has_pages = has_pages - self.has_downloads = has_downloads - self.has_discussions = has_discussions - self.archived = archived - self.disabled = disabled - self.visibility = visibility - self.pushed_at = pushed_at - self.created_at = created_at - self.updated_at = updated_at + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission self.permissions = permissions - self.role_name = role_name - self.temp_clone_token = temp_clone_token - self.delete_branch_on_merge = delete_branch_on_merge - self.subscribers_count = subscribers_count - self.network_count = network_count - self.code_of_conduct = code_of_conduct - self.license = license - self.forks = forks - self.open_issues = open_issues - self.watchers = watchers - self.allow_forking = allow_forking - self.web_commit_signoff_required = web_commit_signoff_required - self.security_and_analysis = security_and_analysis + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent } public enum CodingKeys: String, CodingKey { case id case node_id case name - case full_name - case owner - case _private = "private" - case html_url + case slug case description - case fork + case privacy + case notification_setting + case permission + case permissions case url - 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 downloads_url - case events_url - case forks_url - case git_commits_url - case git_refs_url - case git_tags_url - case git_url - 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 notifications_url - case pulls_url - case releases_url - case ssh_url - case stargazers_url - case statuses_url - case subscribers_url - case subscription_url - case tags_url - case teams_url - case trees_url - case clone_url - case mirror_url - case hooks_url - case svn_url - case homepage - case language - case forks_count - case stargazers_count - case watchers_count - case size - case default_branch - case open_issues_count - case is_template - case topics - case has_issues - case has_projects - case has_wiki - case has_pages - case has_downloads - case has_discussions - case archived - case disabled - case visibility - case pushed_at - case created_at - case updated_at - case permissions - case role_name - case temp_clone_token - case delete_branch_on_merge - case subscribers_count - case network_count - case code_of_conduct - case license - case forks - case open_issues - case watchers - case allow_forking - case web_commit_signoff_required - case security_and_analysis + case html_url + case members_url + case repositories_url + case parent } } - /// 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`. + /// - Remark: Generated from `#/components/schemas/security-and-analysis`. + public struct security_hyphen_and_hyphen_analysis: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. + public struct advanced_securityPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? + /// Creates a new `advanced_securityPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. + public var advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? + /// Enable or disable Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. + public struct dependabot_security_updatesPayload: Codable, Hashable, Sendable { + /// The enablement status of Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? + /// Creates a new `dependabot_security_updatesPayload`. + /// + /// - Parameters: + /// - status: The enablement status of Dependabot security updates for the repository. + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// Enable or disable Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. + public var dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. + public struct secret_scanningPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/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/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? + /// Creates a new `secret_scanningPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. + public var secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/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_push_protection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? + /// Creates a new `secret_scanning_push_protectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? + /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: - /// - login: - /// - id: - /// - node_id: - /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: + /// - advanced_security: + /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. + /// - secret_scanning: + /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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 + 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 ) { - 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 + 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 } 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 + case advanced_security + case dependabot_security_updates + case secret_scanning + case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } - /// Organization Full + /// Minimal Repository /// - /// - Remark: Generated from `#/components/schemas/organization-full`. - public struct organization_hyphen_full: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-full/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/node_id`. + /// - Remark: Generated from `#/components/schemas/minimal-repository`. + public struct minimal_hyphen_repository: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. + public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/url`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/full_name`. + public var full_name: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/owner`. + public var owner: Components.Schemas.simple_hyphen_user + /// - Remark: Generated from `#/components/schemas/minimal-repository/private`. + public var _private: Swift.Bool + /// - Remark: Generated from `#/components/schemas/minimal-repository/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/fork`. + public var fork: Swift.Bool + /// - Remark: Generated from `#/components/schemas/minimal-repository/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/events_url`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/archive_url`. + public var archive_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/assignees_url`. + public var assignees_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/blobs_url`. + public var blobs_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/branches_url`. + public var branches_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/collaborators_url`. + public var collaborators_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/comments_url`. + public var comments_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/commits_url`. + public var commits_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/compare_url`. + public var compare_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/contents_url`. + public var contents_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/contributors_url`. + public var contributors_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/deployments_url`. + public var deployments_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/downloads_url`. + public var downloads_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/events_url`. public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/issues_url`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/forks_url`. + public var forks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_commits_url`. + public var git_commits_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_refs_url`. + public var git_refs_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_tags_url`. + public var git_tags_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_url`. + public var git_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_comment_url`. + public var issue_comment_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_events_url`. + public var issue_events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/issues_url`. public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/company`. - public var company: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/blog`. - public var blog: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/location`. - public var location: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/email`. - public var email: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/twitter_username`. - public var twitter_username: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/is_verified`. - public var is_verified: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/has_organization_projects`. - public var has_organization_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/organization-full/has_repository_projects`. - public var has_repository_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/organization-full/public_repos`. - public var public_repos: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/public_gists`. - public var public_gists: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/followers`. - public var followers: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/following`. - public var following: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/total_private_repos`. - public var total_private_repos: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/owned_private_repos`. - public var owned_private_repos: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/private_gists`. - 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`. - public struct planPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-full/plan/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/plan/space`. - public var space: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/plan/private_repos`. - public var private_repos: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/plan/filled_seats`. - public var filled_seats: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/plan/seats`. - public var seats: Swift.Int? - /// Creates a new `planPayload`. - /// - /// - Parameters: - /// - name: - /// - space: - /// - private_repos: - /// - filled_seats: - /// - seats: - public init( - name: Swift.String, - space: Swift.Int, - private_repos: Swift.Int, - filled_seats: Swift.Int? = nil, - seats: Swift.Int? = nil - ) { - self.name = name - self.space = space - self.private_repos = private_repos - self.filled_seats = filled_seats - self.seats = seats - } - public enum CodingKeys: String, CodingKey { - case name - case space - case private_repos - case filled_seats - case seats - } - } - /// - Remark: Generated from `#/components/schemas/organization-full/plan`. - public var plan: Components.Schemas.organization_hyphen_full.planPayload? - /// - Remark: Generated from `#/components/schemas/organization-full/default_repository_permission`. - public var default_repository_permission: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_repositories`. - public var members_can_create_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/two_factor_requirement_enabled`. - public var two_factor_requirement_enabled: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_allowed_repository_creation_type`. - public var members_allowed_repository_creation_type: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_repositories`. - public var members_can_create_public_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_repositories`. - public var members_can_create_private_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_internal_repositories`. - public var members_can_create_internal_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_pages`. - public var members_can_create_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_pages`. - public var members_can_create_public_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_pages`. - public var members_can_create_private_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_fork_private_repositories`. - 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? - /// Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/advanced_security_enabled_for_new_repositories`. - public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_alerts_enabled_for_new_repositories`. - public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// to this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_security_updates_enabled_for_new_repositories`. - public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/dependency_graph_enabled_for_new_repositories`. - public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_enabled_for_new_repositories`. - public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning push protection is automatically enabled for new repositories and repositories - /// transferred to this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_enabled_for_new_repositories`. - public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? - /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link_enabled`. - public var secret_scanning_push_protection_custom_link_enabled: Swift.Bool? - /// An optional URL string to display to contributors who are blocked from pushing a secret. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link`. - public var secret_scanning_push_protection_custom_link: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization-full/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization-full/archived_at`. - public var archived_at: Foundation.Date? - /// Creates a new `organization_hyphen_full`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/keys_url`. + public var keys_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/labels_url`. + public var labels_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/languages_url`. + public var languages_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/merges_url`. + public var merges_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/milestones_url`. + public var milestones_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/notifications_url`. + public var notifications_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/pulls_url`. + public var pulls_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/releases_url`. + public var releases_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/ssh_url`. + public var ssh_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_url`. + public var stargazers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/statuses_url`. + public var statuses_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_url`. + public var subscribers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/subscription_url`. + public var subscription_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/tags_url`. + public var tags_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/teams_url`. + public var teams_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/trees_url`. + public var trees_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/clone_url`. + public var clone_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/mirror_url`. + public var mirror_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/svn_url`. + public var svn_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/homepage`. + public var homepage: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/language`. + public var language: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/forks_count`. + public var forks_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_count`. + public var stargazers_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers_count`. + public var watchers_count: Swift.Int? + /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. /// - /// - Parameters: - /// - login: - /// - id: - /// - node_id: - /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - /// - name: - /// - company: - /// - blog: - /// - location: - /// - email: - /// - twitter_username: - /// - is_verified: - /// - has_organization_projects: - /// - has_repository_projects: - /// - public_repos: - /// - public_gists: - /// - followers: - /// - following: - /// - html_url: - /// - _type: - /// - total_private_repos: - /// - owned_private_repos: - /// - private_gists: - /// - disk_usage: - /// - collaborators: - /// - billing_email: - /// - plan: - /// - default_repository_permission: - /// - members_can_create_repositories: - /// - two_factor_requirement_enabled: - /// - members_allowed_repository_creation_type: - /// - members_can_create_public_repositories: - /// - members_can_create_private_repositories: - /// - members_can_create_internal_repositories: - /// - members_can_create_pages: - /// - members_can_create_public_pages: - /// - members_can_create_private_pages: - /// - members_can_fork_private_repositories: - /// - web_commit_signoff_required: - /// - advanced_security_enabled_for_new_repositories: Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. - /// - dependabot_alerts_enabled_for_new_repositories: Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// - dependabot_security_updates_enabled_for_new_repositories: Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories and repositories - /// - 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: - /// - updated_at: - /// - archived_at: - 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, - name: Swift.String? = nil, - company: Swift.String? = nil, - blog: Swift.String? = nil, - location: Swift.String? = nil, - email: Swift.String? = nil, - twitter_username: Swift.String? = nil, - is_verified: Swift.Bool? = nil, - has_organization_projects: Swift.Bool, - has_repository_projects: Swift.Bool, - public_repos: Swift.Int, - public_gists: Swift.Int, - followers: Swift.Int, - following: Swift.Int, - html_url: Swift.String, - _type: Swift.String, - total_private_repos: Swift.Int? = nil, - 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, - members_can_create_repositories: Swift.Bool? = nil, - two_factor_requirement_enabled: Swift.Bool? = nil, - members_allowed_repository_creation_type: Swift.String? = nil, - members_can_create_public_repositories: Swift.Bool? = nil, - members_can_create_private_repositories: Swift.Bool? = nil, - members_can_create_internal_repositories: Swift.Bool? = nil, - members_can_create_pages: Swift.Bool? = nil, - members_can_create_public_pages: Swift.Bool? = nil, - members_can_create_private_pages: Swift.Bool? = nil, - members_can_fork_private_repositories: Swift.Bool? = nil, - web_commit_signoff_required: Swift.Bool? = nil, - advanced_security_enabled_for_new_repositories: Swift.Bool? = nil, - dependabot_alerts_enabled_for_new_repositories: Swift.Bool? = nil, - dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? = nil, - dependency_graph_enabled_for_new_repositories: Swift.Bool? = nil, - 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, - created_at: Foundation.Date, - updated_at: Foundation.Date, - archived_at: Foundation.Date? = 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 - self.name = name - self.company = company - self.blog = blog - self.location = location - self.email = email - self.twitter_username = twitter_username - self.is_verified = is_verified - self.has_organization_projects = has_organization_projects - self.has_repository_projects = has_repository_projects - self.public_repos = public_repos - self.public_gists = public_gists - self.followers = followers - self.following = following - self.html_url = html_url - self._type = _type - self.total_private_repos = total_private_repos - 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 - self.members_can_create_repositories = members_can_create_repositories - self.two_factor_requirement_enabled = two_factor_requirement_enabled - self.members_allowed_repository_creation_type = members_allowed_repository_creation_type - self.members_can_create_public_repositories = members_can_create_public_repositories - self.members_can_create_private_repositories = members_can_create_private_repositories - self.members_can_create_internal_repositories = members_can_create_internal_repositories - self.members_can_create_pages = members_can_create_pages - self.members_can_create_public_pages = members_can_create_public_pages - self.members_can_create_private_pages = members_can_create_private_pages - self.members_can_fork_private_repositories = members_can_fork_private_repositories - self.web_commit_signoff_required = web_commit_signoff_required - self.advanced_security_enabled_for_new_repositories = advanced_security_enabled_for_new_repositories - self.dependabot_alerts_enabled_for_new_repositories = dependabot_alerts_enabled_for_new_repositories - self.dependabot_security_updates_enabled_for_new_repositories = dependabot_security_updates_enabled_for_new_repositories - self.dependency_graph_enabled_for_new_repositories = dependency_graph_enabled_for_new_repositories - self.secret_scanning_enabled_for_new_repositories = secret_scanning_enabled_for_new_repositories - 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.created_at = created_at - self.updated_at = updated_at - self.archived_at = archived_at - } - 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 - case name - case company - case blog - case location - case email - case twitter_username - case is_verified - case has_organization_projects - case has_repository_projects - case public_repos - case public_gists - case followers - case following - case html_url - case _type = "type" - case total_private_repos - case owned_private_repos - case private_gists - case disk_usage - case collaborators - case billing_email - case plan - case default_repository_permission - case members_can_create_repositories - case two_factor_requirement_enabled - case members_allowed_repository_creation_type - case members_can_create_public_repositories - case members_can_create_private_repositories - case members_can_create_internal_repositories - case members_can_create_pages - case members_can_create_public_pages - case members_can_create_private_pages - case members_can_fork_private_repositories - case web_commit_signoff_required - case advanced_security_enabled_for_new_repositories - case dependabot_alerts_enabled_for_new_repositories - case dependabot_security_updates_enabled_for_new_repositories - case dependency_graph_enabled_for_new_repositories - case secret_scanning_enabled_for_new_repositories - 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 created_at - case updated_at - case archived_at + /// - Remark: Generated from `#/components/schemas/minimal-repository/size`. + public var size: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/default_branch`. + public var default_branch: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues_count`. + public var open_issues_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/is_template`. + public var is_template: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/topics`. + public var topics: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_issues`. + public var has_issues: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_projects`. + public var has_projects: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_wiki`. + public var has_wiki: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_pages`. + public var has_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_downloads`. + public var has_downloads: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_discussions`. + public var has_discussions: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/archived`. + public var archived: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/disabled`. + public var disabled: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/visibility`. + public var visibility: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/pushed_at`. + public var pushed_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/minimal-repository/created_at`. + public var created_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/minimal-repository/updated_at`. + public var updated_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/admin`. + public var admin: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/maintain`. + public var maintain: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/push`. + public var push: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/triage`. + public var triage: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/pull`. + public var pull: Swift.Bool? + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - admin: + /// - maintain: + /// - push: + /// - triage: + /// - pull: + public init( + admin: Swift.Bool? = nil, + maintain: Swift.Bool? = nil, + push: Swift.Bool? = nil, + triage: Swift.Bool? = nil, + pull: Swift.Bool? = nil + ) { + 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 + } } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. + public var permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/minimal-repository/role_name`. + public var role_name: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/temp_clone_token`. + public var temp_clone_token: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/delete_branch_on_merge`. + public var delete_branch_on_merge: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_count`. + public var subscribers_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/network_count`. + public var network_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/code_of_conduct`. + public var code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. + public struct licensePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/key`. + public var key: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/spdx_id`. + public var spdx_id: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/url`. + public var url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/node_id`. + public var node_id: Swift.String? + /// Creates a new `licensePayload`. + /// + /// - Parameters: + /// - key: + /// - name: + /// - spdx_id: + /// - url: + /// - node_id: + public init( + key: Swift.String? = nil, + name: Swift.String? = nil, + spdx_id: Swift.String? = nil, + url: Swift.String? = nil, + node_id: Swift.String? = nil + ) { + self.key = key + self.name = name + self.spdx_id = spdx_id + self.url = url + self.node_id = node_id + } + public enum CodingKeys: String, CodingKey { + case key + case name + case spdx_id + case url + case node_id + } + } + /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. + public var license: Components.Schemas.minimal_hyphen_repository.licensePayload? + /// - Remark: Generated from `#/components/schemas/minimal-repository/forks`. + public var forks: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues`. + public var open_issues: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers`. + public var watchers: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/allow_forking`. + public var allow_forking: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/web_commit_signoff_required`. + public var web_commit_signoff_required: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/security_and_analysis`. + public var security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? + /// Creates a new `minimal_hyphen_repository`. /// /// - Parameters: - /// - id: Unique identifier of the team + /// - id: /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set + /// - name: + /// - full_name: + /// - owner: + /// - _private: /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + /// - description: + /// - fork: + /// - url: + /// - archive_url: + /// - assignees_url: + /// - blobs_url: + /// - branches_url: + /// - collaborators_url: + /// - comments_url: + /// - commits_url: + /// - compare_url: + /// - contents_url: + /// - contributors_url: + /// - deployments_url: + /// - downloads_url: + /// - events_url: + /// - forks_url: + /// - git_commits_url: + /// - git_refs_url: + /// - git_tags_url: + /// - git_url: + /// - issue_comment_url: + /// - issue_events_url: + /// - issues_url: + /// - keys_url: + /// - labels_url: + /// - languages_url: + /// - merges_url: + /// - milestones_url: + /// - notifications_url: + /// - pulls_url: + /// - releases_url: + /// - ssh_url: + /// - stargazers_url: + /// - statuses_url: + /// - subscribers_url: + /// - subscription_url: + /// - tags_url: + /// - teams_url: + /// - trees_url: + /// - clone_url: + /// - mirror_url: + /// - hooks_url: + /// - svn_url: + /// - homepage: + /// - language: + /// - forks_count: + /// - stargazers_count: + /// - watchers_count: + /// - size: The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + /// - default_branch: + /// - open_issues_count: + /// - is_template: + /// - topics: + /// - has_issues: + /// - has_projects: + /// - has_wiki: + /// - has_pages: + /// - has_downloads: + /// - has_discussions: + /// - archived: + /// - disabled: + /// - visibility: + /// - pushed_at: + /// - created_at: + /// - updated_at: + /// - permissions: + /// - role_name: + /// - temp_clone_token: + /// - delete_branch_on_merge: + /// - subscribers_count: + /// - network_count: + /// - code_of_conduct: + /// - license: + /// - forks: + /// - open_issues: + /// - watchers: + /// - allow_forking: + /// - web_commit_signoff_required: + /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, + full_name: Swift.String, + owner: Components.Schemas.simple_hyphen_user, + _private: Swift.Bool, html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil + description: Swift.String? = nil, + fork: Swift.Bool, + url: Swift.String, + 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, + downloads_url: Swift.String, + events_url: Swift.String, + forks_url: Swift.String, + git_commits_url: Swift.String, + git_refs_url: Swift.String, + git_tags_url: Swift.String, + git_url: Swift.String? = nil, + 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, + notifications_url: Swift.String, + pulls_url: Swift.String, + releases_url: Swift.String, + ssh_url: Swift.String? = nil, + 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, + clone_url: Swift.String? = nil, + mirror_url: Swift.String? = nil, + hooks_url: Swift.String, + svn_url: Swift.String? = nil, + homepage: Swift.String? = nil, + language: Swift.String? = nil, + forks_count: Swift.Int? = nil, + stargazers_count: Swift.Int? = nil, + watchers_count: Swift.Int? = nil, + size: Swift.Int? = nil, + default_branch: Swift.String? = nil, + open_issues_count: Swift.Int? = nil, + is_template: Swift.Bool? = nil, + topics: [Swift.String]? = nil, + has_issues: Swift.Bool? = nil, + has_projects: Swift.Bool? = nil, + has_wiki: Swift.Bool? = nil, + has_pages: Swift.Bool? = nil, + has_downloads: Swift.Bool? = nil, + has_discussions: Swift.Bool? = nil, + archived: Swift.Bool? = nil, + disabled: Swift.Bool? = nil, + visibility: Swift.String? = nil, + pushed_at: Foundation.Date? = nil, + created_at: Foundation.Date? = nil, + updated_at: Foundation.Date? = nil, + permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? = nil, + role_name: Swift.String? = nil, + temp_clone_token: Swift.String? = nil, + delete_branch_on_merge: Swift.Bool? = nil, + subscribers_count: Swift.Int? = nil, + network_count: Swift.Int? = nil, + code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? = nil, + license: Components.Schemas.minimal_hyphen_repository.licensePayload? = nil, + forks: Swift.Int? = nil, + open_issues: Swift.Int? = nil, + watchers: Swift.Int? = nil, + allow_forking: Swift.Bool? = nil, + web_commit_signoff_required: Swift.Bool? = nil, + security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? = nil ) { self.id = id self.node_id = node_id - self.url = url - self.members_url = members_url self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting + self.full_name = full_name + self.owner = owner + self._private = _private self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn + self.description = description + self.fork = fork + self.url = url + 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.downloads_url = downloads_url + self.events_url = events_url + self.forks_url = forks_url + self.git_commits_url = git_commits_url + self.git_refs_url = git_refs_url + self.git_tags_url = git_tags_url + self.git_url = git_url + 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.notifications_url = notifications_url + self.pulls_url = pulls_url + self.releases_url = releases_url + self.ssh_url = ssh_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.clone_url = clone_url + self.mirror_url = mirror_url + self.hooks_url = hooks_url + self.svn_url = svn_url + self.homepage = homepage + self.language = language + self.forks_count = forks_count + self.stargazers_count = stargazers_count + self.watchers_count = watchers_count + self.size = size + self.default_branch = default_branch + self.open_issues_count = open_issues_count + self.is_template = is_template + self.topics = topics + self.has_issues = has_issues + self.has_projects = has_projects + self.has_wiki = has_wiki + self.has_pages = has_pages + self.has_downloads = has_downloads + self.has_discussions = has_discussions + self.archived = archived + self.disabled = disabled + self.visibility = visibility + self.pushed_at = pushed_at + self.created_at = created_at + self.updated_at = updated_at + self.permissions = permissions + self.role_name = role_name + self.temp_clone_token = temp_clone_token + self.delete_branch_on_merge = delete_branch_on_merge + self.subscribers_count = subscribers_count + self.network_count = network_count + self.code_of_conduct = code_of_conduct + self.license = license + self.forks = forks + self.open_issues = open_issues + self.watchers = watchers + self.allow_forking = allow_forking + self.web_commit_signoff_required = web_commit_signoff_required + self.security_and_analysis = security_and_analysis } public enum CodingKeys: String, CodingKey { case id case node_id - case url - case members_url case name - case description - case permission - case privacy - case notification_setting + case full_name + case owner + case _private = "private" case html_url - case repositories_url - case slug - case ldap_dn + case description + case fork + case url + 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 downloads_url + case events_url + case forks_url + case git_commits_url + case git_refs_url + case git_tags_url + case git_url + 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 notifications_url + case pulls_url + case releases_url + case ssh_url + case stargazers_url + case statuses_url + case subscribers_url + case subscription_url + case tags_url + case teams_url + case trees_url + case clone_url + case mirror_url + case hooks_url + case svn_url + case homepage + case language + case forks_count + case stargazers_count + case watchers_count + case size + case default_branch + case open_issues_count + case is_template + case topics + case has_issues + case has_projects + case has_wiki + case has_pages + case has_downloads + case has_discussions + case archived + case disabled + case visibility + case pushed_at + case created_at + case updated_at + case permissions + case role_name + case temp_clone_token + case delete_branch_on_merge + case subscribers_count + case network_count + case code_of_conduct + case license + case forks + case open_issues + case watchers + case allow_forking + case web_commit_signoff_required + case security_and_analysis } } - /// Groups of organization members that gives permissions on specified repositories. + /// Organization Full /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. + /// - Remark: Generated from `#/components/schemas/organization-full`. + public struct organization_hyphen_full: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-full/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. + /// - Remark: Generated from `#/components/schemas/organization-full/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. + /// - Remark: Generated from `#/components/schemas/organization-full/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/description`. public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: + /// - Remark: Generated from `#/components/schemas/organization-full/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/company`. + public var company: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/blog`. + public var blog: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/location`. + public var location: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/email`. + public var email: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/twitter_username`. + public var twitter_username: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/is_verified`. + public var is_verified: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/has_organization_projects`. + public var has_organization_projects: Swift.Bool + /// - Remark: Generated from `#/components/schemas/organization-full/has_repository_projects`. + public var has_repository_projects: Swift.Bool + /// - Remark: Generated from `#/components/schemas/organization-full/public_repos`. + public var public_repos: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/public_gists`. + public var public_gists: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/followers`. + public var followers: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/following`. + public var following: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/type`. + public var _type: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/total_private_repos`. + public var total_private_repos: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/owned_private_repos`. + public var owned_private_repos: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/private_gists`. + 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`. + public struct planPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-full/plan/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/plan/space`. + public var space: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/plan/private_repos`. + public var private_repos: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/plan/filled_seats`. + public var filled_seats: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/plan/seats`. + public var seats: Swift.Int? + /// Creates a new `planPayload`. + /// + /// - Parameters: + /// - name: + /// - space: + /// - private_repos: + /// - filled_seats: + /// - seats: public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool + name: Swift.String, + space: Swift.Int, + private_repos: Swift.Int, + filled_seats: Swift.Int? = nil, + seats: Swift.Int? = nil ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin + self.name = name + self.space = space + self.private_repos = private_repos + self.filled_seats = filled_seats + self.seats = seats } public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin + case name + case space + case private_repos + case filled_seats + case seats } } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. + /// - Remark: Generated from `#/components/schemas/organization-full/plan`. + public var plan: Components.Schemas.organization_hyphen_full.planPayload? + /// - Remark: Generated from `#/components/schemas/organization-full/default_repository_permission`. + public var default_repository_permission: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_repositories`. + public var members_can_create_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/two_factor_requirement_enabled`. + public var two_factor_requirement_enabled: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_allowed_repository_creation_type`. + public var members_allowed_repository_creation_type: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_repositories`. + public var members_can_create_public_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_repositories`. + public var members_can_create_private_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_internal_repositories`. + public var members_can_create_internal_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_pages`. + public var members_can_create_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_pages`. + public var members_can_create_public_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_pages`. + public var members_can_create_private_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_fork_private_repositories`. + 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. + /// + /// Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - 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. + /// + /// Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - 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. + /// + /// Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - 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. + /// + /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - 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. + /// + /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - 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. + /// + /// Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_enabled_for_new_repositories`. + @available(*, deprecated) + public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? + /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link_enabled`. + public var secret_scanning_push_protection_custom_link_enabled: Swift.Bool? + /// An optional URL string to display to contributors who are blocked from pushing a secret. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link`. + public var secret_scanning_push_protection_custom_link: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/organization-full/updated_at`. + public var updated_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/organization-full/archived_at`. + public var archived_at: Foundation.Date? + /// Creates a new `organization_hyphen_full`. /// /// - Parameters: + /// - login: /// - id: /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: /// - url: - /// - html_url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: /// - members_url: - /// - repositories_url: - /// - parent: + /// - public_members_url: + /// - avatar_url: + /// - description: + /// - name: + /// - company: + /// - blog: + /// - location: + /// - email: + /// - twitter_username: + /// - is_verified: + /// - has_organization_projects: + /// - has_repository_projects: + /// - public_repos: + /// - public_gists: + /// - followers: + /// - following: + /// - html_url: + /// - _type: + /// - total_private_repos: + /// - owned_private_repos: + /// - private_gists: + /// - disk_usage: + /// - collaborators: + /// - billing_email: + /// - plan: + /// - default_repository_permission: + /// - members_can_create_repositories: + /// - two_factor_requirement_enabled: + /// - members_allowed_repository_creation_type: + /// - members_can_create_public_repositories: + /// - members_can_create_private_repositories: + /// - members_can_create_internal_repositories: + /// - members_can_create_pages: + /// - members_can_create_public_pages: + /// - 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. + /// - 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: + /// - updated_at: + /// - archived_at: public init( + login: Swift.String, id: Swift.Int, node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, url: Swift.String, - html_url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil, + name: Swift.String? = nil, + company: Swift.String? = nil, + blog: Swift.String? = nil, + location: Swift.String? = nil, + email: Swift.String? = nil, + twitter_username: Swift.String? = nil, + is_verified: Swift.Bool? = nil, + has_organization_projects: Swift.Bool, + has_repository_projects: Swift.Bool, + public_repos: Swift.Int, + public_gists: Swift.Int, + followers: Swift.Int, + following: Swift.Int, + html_url: Swift.String, + _type: Swift.String, + total_private_repos: Swift.Int? = nil, + 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, + members_can_create_repositories: Swift.Bool? = nil, + two_factor_requirement_enabled: Swift.Bool? = nil, + members_allowed_repository_creation_type: Swift.String? = nil, + members_can_create_public_repositories: Swift.Bool? = nil, + members_can_create_private_repositories: Swift.Bool? = nil, + members_can_create_internal_repositories: Swift.Bool? = nil, + members_can_create_pages: Swift.Bool? = nil, + members_can_create_public_pages: Swift.Bool? = nil, + members_can_create_private_pages: Swift.Bool? = nil, + members_can_fork_private_repositories: Swift.Bool? = nil, + web_commit_signoff_required: Swift.Bool? = nil, + advanced_security_enabled_for_new_repositories: Swift.Bool? = nil, + dependabot_alerts_enabled_for_new_repositories: Swift.Bool? = nil, + dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? = nil, + dependency_graph_enabled_for_new_repositories: Swift.Bool? = nil, + 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, + created_at: Foundation.Date, + updated_at: Foundation.Date, + archived_at: Foundation.Date? = nil ) { + self.login = login self.id = id self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions self.url = url - self.html_url = html_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.repositories_url = repositories_url - self.parent = parent + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + self.name = name + self.company = company + self.blog = blog + self.location = location + self.email = email + self.twitter_username = twitter_username + self.is_verified = is_verified + self.has_organization_projects = has_organization_projects + self.has_repository_projects = has_repository_projects + self.public_repos = public_repos + self.public_gists = public_gists + self.followers = followers + self.following = following + self.html_url = html_url + self._type = _type + self.total_private_repos = total_private_repos + 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 + self.members_can_create_repositories = members_can_create_repositories + self.two_factor_requirement_enabled = two_factor_requirement_enabled + self.members_allowed_repository_creation_type = members_allowed_repository_creation_type + self.members_can_create_public_repositories = members_can_create_public_repositories + self.members_can_create_private_repositories = members_can_create_private_repositories + self.members_can_create_internal_repositories = members_can_create_internal_repositories + self.members_can_create_pages = members_can_create_pages + self.members_can_create_public_pages = members_can_create_public_pages + self.members_can_create_private_pages = members_can_create_private_pages + self.members_can_fork_private_repositories = members_can_fork_private_repositories + self.web_commit_signoff_required = web_commit_signoff_required + self.advanced_security_enabled_for_new_repositories = advanced_security_enabled_for_new_repositories + self.dependabot_alerts_enabled_for_new_repositories = dependabot_alerts_enabled_for_new_repositories + self.dependabot_security_updates_enabled_for_new_repositories = dependabot_security_updates_enabled_for_new_repositories + self.dependency_graph_enabled_for_new_repositories = dependency_graph_enabled_for_new_repositories + self.secret_scanning_enabled_for_new_repositories = secret_scanning_enabled_for_new_repositories + 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.created_at = created_at + self.updated_at = updated_at + self.archived_at = archived_at } public enum CodingKeys: String, CodingKey { + case login case id case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions case url - case html_url + case repos_url + case events_url + case hooks_url + case issues_url case members_url - case repositories_url - case parent + case public_members_url + case avatar_url + case description + case name + case company + case blog + case location + case email + case twitter_username + case is_verified + case has_organization_projects + case has_repository_projects + case public_repos + case public_gists + case followers + case following + case html_url + case _type = "type" + case total_private_repos + case owned_private_repos + case private_gists + case disk_usage + case collaborators + case billing_email + case plan + case default_repository_permission + case members_can_create_repositories + case two_factor_requirement_enabled + case members_allowed_repository_creation_type + case members_can_create_public_repositories + case members_can_create_private_repositories + case members_can_create_internal_repositories + case members_can_create_pages + case members_can_create_public_pages + case members_can_create_private_pages + case members_can_fork_private_repositories + case web_commit_signoff_required + case advanced_security_enabled_for_new_repositories + case dependabot_alerts_enabled_for_new_repositories + case dependabot_security_updates_enabled_for_new_repositories + case dependency_graph_enabled_for_new_repositories + case secret_scanning_enabled_for_new_repositories + 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 created_at + case updated_at + case archived_at } } /// Organization Invitation @@ -5733,7 +5630,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-invitation`. public struct organization_hyphen_invitation: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/organization-invitation/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/organization-invitation/login`. public var login: Swift.String? /// - Remark: Generated from `#/components/schemas/organization-invitation/email`. @@ -5772,7 +5669,7 @@ public enum Components { /// - invitation_teams_url: /// - invitation_source: public init( - id: Swift.Int, + id: Swift.Int64, login: Swift.String? = nil, email: Swift.String? = nil, role: Swift.String, @@ -6016,96 +5913,455 @@ public enum Components { case permissions } } - /// A fine-grained permission that protects organization resources. + /// Organization roles + /// + /// - Remark: Generated from `#/components/schemas/organization-role`. + public struct organization_hyphen_role: Codable, Hashable, Sendable { + /// The unique identifier of the role. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/id`. + public var id: Swift.Int64 + /// The name of the role. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/name`. + public var name: Swift.String + /// A short description about who this role is for or what permissions it grants. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/description`. + public var description: Swift.String? + /// A list of permissions included in this role. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/permissions`. + public var permissions: [Swift.String] + /// - Remark: Generated from `#/components/schemas/organization-role/organization`. + public var organization: Components.Schemas.nullable_hyphen_simple_hyphen_user? + /// The date and time the role was created. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/created_at`. + public var created_at: Foundation.Date + /// The date and time the role was last updated. + /// + /// - Remark: Generated from `#/components/schemas/organization-role/updated_at`. + public var updated_at: Foundation.Date + /// Creates a new `organization_hyphen_role`. + /// + /// - Parameters: + /// - 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. + /// - permissions: A list of permissions included in this role. + /// - organization: + /// - created_at: The date and time the role was created. + /// - updated_at: The date and time the role was last updated. + public init( + id: Swift.Int64, + name: Swift.String, + description: Swift.String? = nil, + permissions: [Swift.String], + organization: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + created_at: Foundation.Date, + updated_at: Foundation.Date + ) { + self.id = id + self.name = name + self.description = description + self.permissions = permissions + self.organization = organization + self.created_at = created_at + self.updated_at = updated_at + } + public enum CodingKeys: String, CodingKey { + case id + case name + case description + case permissions + case organization + case created_at + case updated_at + } + } + /// The Relationship a Team has with a role. /// - /// - Remark: Generated from `#/components/schemas/organization-fine-grained-permission`. - public struct organization_hyphen_fine_hyphen_grained_hyphen_permission: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-fine-grained-permission/name`. + /// - Remark: Generated from `#/components/schemas/team-role-assignment`. + public struct team_hyphen_role_hyphen_assignment: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team-role-assignment/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team-role-assignment/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/name`. public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-fine-grained-permission/description`. - public var description: Swift.String - /// Creates a new `organization_hyphen_fine_hyphen_grained_hyphen_permission`. + /// - Remark: Generated from `#/components/schemas/team-role-assignment/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions`. + public var permissions: Components.Schemas.team_hyphen_role_hyphen_assignment.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team_hyphen_role_hyphen_assignment`. /// /// - Parameters: + /// - id: + /// - node_id: /// - name: + /// - slug: /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: public init( + id: Swift.Int, + node_id: Swift.String, name: Swift.String, - description: Swift.String + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team_hyphen_role_hyphen_assignment.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil ) { + self.id = id + self.node_id = node_id self.name = name + self.slug = slug self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent } public enum CodingKeys: String, CodingKey { + case id + case node_id case name + case slug case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent } } - /// Organization roles + /// Groups of organization members that gives permissions on specified repositories. /// - /// - Remark: Generated from `#/components/schemas/organization-role`. - public struct organization_hyphen_role: Codable, Hashable, Sendable { - /// The unique identifier of the role. + /// - Remark: Generated from `#/components/schemas/team-simple`. + public struct team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team /// - /// - Remark: Generated from `#/components/schemas/organization-role/id`. + /// - Remark: Generated from `#/components/schemas/team-simple/id`. public var id: Swift.Int - /// The name of the role. + /// - Remark: Generated from `#/components/schemas/team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team /// - /// - Remark: Generated from `#/components/schemas/organization-role/name`. + /// - Remark: Generated from `#/components/schemas/team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/team-simple/name`. public var name: Swift.String - /// A short description about who this role is for or what permissions it grants. + /// Description of the team /// - /// - Remark: Generated from `#/components/schemas/organization-role/description`. + /// - Remark: Generated from `#/components/schemas/team-simple/description`. public var description: Swift.String? - /// A list of permissions included in this role. + /// Permission that the team will have for its repositories /// - /// - Remark: Generated from `#/components/schemas/organization-role/permissions`. - public var permissions: [Swift.String] - /// - Remark: Generated from `#/components/schemas/organization-role/organization`. - public var organization: Components.Schemas.nullable_hyphen_simple_hyphen_user? - /// The date and time the role was created. + /// - Remark: Generated from `#/components/schemas/team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have /// - /// - Remark: Generated from `#/components/schemas/organization-role/created_at`. - public var created_at: Foundation.Date - /// The date and time the role was last updated. + /// - Remark: Generated from `#/components/schemas/team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set /// - /// - Remark: Generated from `#/components/schemas/organization-role/updated_at`. - public var updated_at: Foundation.Date - /// Creates a new `organization_hyphen_role`. + /// - Remark: Generated from `#/components/schemas/team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `team_hyphen_simple`. /// /// - Parameters: - /// - 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. - /// - permissions: A list of permissions included in this role. - /// - organization: - /// - created_at: The date and time the role was created. - /// - updated_at: The date and time the role was last updated. + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment public init( id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, name: Swift.String, description: Swift.String? = nil, - permissions: [Swift.String], - organization: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - created_at: Foundation.Date, - updated_at: Foundation.Date + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil ) { self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url self.name = name self.description = description - self.permissions = permissions - self.organization = organization - self.created_at = created_at - self.updated_at = updated_at + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn } public enum CodingKeys: String, CodingKey { case id + case node_id + case url + case members_url case name case description - case permissions - case organization - case created_at - case updated_at + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// The Relationship a User has with a role. + /// + /// - Remark: Generated from `#/components/schemas/user-role-assignment`. + public struct user_hyphen_role_hyphen_assignment: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/user-role-assignment/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/user-role-assignment/email`. + public var email: Swift.String? + /// - Remark: Generated from `#/components/schemas/user-role-assignment/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/user-role-assignment/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/gravatar_id`. + public var gravatar_id: Swift.String? + /// - Remark: Generated from `#/components/schemas/user-role-assignment/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/followers_url`. + public var followers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/following_url`. + public var following_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/gists_url`. + public var gists_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/starred_url`. + public var starred_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/subscriptions_url`. + public var subscriptions_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/organizations_url`. + public var organizations_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/received_events_url`. + public var received_events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/type`. + public var _type: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/site_admin`. + public var site_admin: Swift.Bool + /// - Remark: Generated from `#/components/schemas/user-role-assignment/starred_at`. + public var starred_at: Swift.String? + /// Creates a new `user_hyphen_role_hyphen_assignment`. + /// + /// - Parameters: + /// - name: + /// - email: + /// - login: + /// - id: + /// - node_id: + /// - avatar_url: + /// - gravatar_id: + /// - url: + /// - html_url: + /// - followers_url: + /// - following_url: + /// - gists_url: + /// - starred_url: + /// - subscriptions_url: + /// - organizations_url: + /// - repos_url: + /// - events_url: + /// - received_events_url: + /// - _type: + /// - site_admin: + /// - starred_at: + public init( + name: Swift.String? = nil, + email: Swift.String? = nil, + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + avatar_url: Swift.String, + gravatar_id: Swift.String? = nil, + url: Swift.String, + html_url: Swift.String, + followers_url: Swift.String, + following_url: Swift.String, + gists_url: Swift.String, + starred_url: Swift.String, + subscriptions_url: Swift.String, + organizations_url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + received_events_url: Swift.String, + _type: Swift.String, + site_admin: Swift.Bool, + starred_at: Swift.String? = nil + ) { + self.name = name + self.email = email + self.login = login + self.id = id + self.node_id = node_id + self.avatar_url = avatar_url + self.gravatar_id = gravatar_id + self.url = url + self.html_url = html_url + self.followers_url = followers_url + self.following_url = following_url + self.gists_url = gists_url + self.starred_url = starred_url + self.subscriptions_url = subscriptions_url + self.organizations_url = organizations_url + self.repos_url = repos_url + self.events_url = events_url + self.received_events_url = received_events_url + self._type = _type + self.site_admin = site_admin + self.starred_at = starred_at + } + public enum CodingKeys: String, CodingKey { + case name + case email + case login + case id + case node_id + case avatar_url + case gravatar_id + case url + case html_url + case followers_url + case following_url + case gists_url + case starred_url + case subscriptions_url + case organizations_url + case repos_url + case events_url + case received_events_url + case _type = "type" + case site_admin + case starred_at } } /// Minimal representation of an organization programmatic access grant request for enumerations @@ -6470,34 +6726,40 @@ public enum Components { } /// Custom property defined on an organization /// - /// - Remark: Generated from `#/components/schemas/org-custom-property`. - public struct org_hyphen_custom_hyphen_property: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/custom-property`. + public struct custom_hyphen_property: Codable, Hashable, Sendable { /// The name of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/property_name`. + /// - Remark: Generated from `#/components/schemas/custom-property/property_name`. public var property_name: Swift.String + /// The URL that can be used to fetch, update, or delete info about this property via the API. + /// + /// - Remark: Generated from `#/components/schemas/custom-property/url`. + public var url: Swift.String? /// The type of the value for the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/value_type`. + /// - Remark: Generated from `#/components/schemas/custom-property/value_type`. @frozen public enum value_typePayload: String, Codable, Hashable, Sendable { case string = "string" case single_select = "single_select" + case multi_select = "multi_select" + case true_false = "true_false" } /// The type of the value for the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/value_type`. - public var value_type: Components.Schemas.org_hyphen_custom_hyphen_property.value_typePayload + /// - Remark: Generated from `#/components/schemas/custom-property/value_type`. + public var value_type: Components.Schemas.custom_hyphen_property.value_typePayload /// Whether the property is required. /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/required`. + /// - Remark: Generated from `#/components/schemas/custom-property/required`. public var required: Swift.Bool? /// Default value of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value`. + /// - Remark: Generated from `#/components/schemas/custom-property/default_value`. @frozen public enum default_valuePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value/case1`. + /// - Remark: Generated from `#/components/schemas/custom-property/default_value/case1`. case case1(Swift.String) - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value/case2`. + /// - Remark: Generated from `#/components/schemas/custom-property/default_value/case2`. case case2([Swift.String]) public init(from decoder: any Decoder) throws { var errors: [any Error] = [] @@ -6530,32 +6792,33 @@ public enum Components { } /// Default value of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value`. - public var default_value: Components.Schemas.org_hyphen_custom_hyphen_property.default_valuePayload? + /// - Remark: Generated from `#/components/schemas/custom-property/default_value`. + public var default_value: Components.Schemas.custom_hyphen_property.default_valuePayload? /// Short description of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/description`. + /// - Remark: Generated from `#/components/schemas/custom-property/description`. public var description: Swift.String? /// An ordered list of the allowed values of the property. /// The property can have up to 200 allowed values. /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/allowed_values`. + /// - Remark: Generated from `#/components/schemas/custom-property/allowed_values`. public var allowed_values: [Swift.String]? /// Who can edit the values of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/values_editable_by`. + /// - Remark: Generated from `#/components/schemas/custom-property/values_editable_by`. @frozen public enum values_editable_byPayload: String, Codable, Hashable, Sendable { case org_actors = "org_actors" case org_and_repo_actors = "org_and_repo_actors" } /// Who can edit the values of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/values_editable_by`. - public var values_editable_by: Components.Schemas.org_hyphen_custom_hyphen_property.values_editable_byPayload? - /// Creates a new `org_hyphen_custom_hyphen_property`. + /// - Remark: Generated from `#/components/schemas/custom-property/values_editable_by`. + public var values_editable_by: Components.Schemas.custom_hyphen_property.values_editable_byPayload? + /// Creates a new `custom_hyphen_property`. /// /// - 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. /// - value_type: The type of the value for the property /// - required: Whether the property is required. /// - default_value: Default value of the property @@ -6564,14 +6827,16 @@ public enum Components { /// - values_editable_by: Who can edit the values of the property public init( property_name: Swift.String, - value_type: Components.Schemas.org_hyphen_custom_hyphen_property.value_typePayload, + url: Swift.String? = nil, + value_type: Components.Schemas.custom_hyphen_property.value_typePayload, required: Swift.Bool? = nil, - default_value: Components.Schemas.org_hyphen_custom_hyphen_property.default_valuePayload? = nil, + default_value: Components.Schemas.custom_hyphen_property.default_valuePayload? = nil, description: Swift.String? = nil, allowed_values: [Swift.String]? = nil, - values_editable_by: Components.Schemas.org_hyphen_custom_hyphen_property.values_editable_byPayload? = nil + values_editable_by: Components.Schemas.custom_hyphen_property.values_editable_byPayload? = nil ) { self.property_name = property_name + self.url = url self.value_type = value_type self.required = required self.default_value = default_value @@ -6581,6 +6846,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case property_name + case url case value_type case required case default_value @@ -6694,116 +6960,17 @@ public enum Components { case properties } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team-simple`. - public struct team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { + /// 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 `#/components/parameters/pagination-before`. + public typealias pagination_hyphen_before = Swift.String + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results 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 `#/components/parameters/pagination-after`. + public typealias pagination_hyphen_after = Swift.String /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. @@ -6825,6 +6992,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String /// An organization ID. Only return organizations with an ID greater than this ID. /// /// - Remark: Generated from `#/components/parameters/since-org`. @@ -6845,10 +7016,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/invitation-id`. public typealias invitation_hyphen_id = Swift.Int - /// The slug of the team name. - /// - /// - Remark: Generated from `#/components/parameters/team-slug`. - public typealias team_hyphen_slug = Swift.String /// The unique identifier of the role. /// /// - Remark: Generated from `#/components/parameters/role-id`. @@ -7184,7 +7351,8 @@ public enum Operations { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -7373,17 +7541,6 @@ public enum Operations { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -7541,20 +7698,13 @@ public enum Operations { } /// Update an organization /// - /// **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). - /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// > [!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). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories + /// > [!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/). /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -7697,53 +7847,71 @@ 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? - /// Whether GitHub Advanced Security is automatically enabled for new repositories. + /// **Deprecated.** 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. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - 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? - /// Whether Dependabot alerts is automatically enabled for new repositories. + /// **Deprecated.** 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. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - 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? - /// Whether Dependabot security updates is automatically enabled for new repositories. + /// **Deprecated.** 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. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - 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? - /// Whether dependency graph is automatically enabled for new repositories. + /// **Deprecated.** 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. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - 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? - /// Whether secret scanning is automatically enabled for new repositories. + /// **Deprecated.** 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. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - 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? - /// Whether secret scanning push protection is automatically enabled for new repositories. + /// **Deprecated.** 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. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/secret_scanning_push_protection_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// @@ -7777,12 +7945,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: Whether GitHub Advanced Security is automatically enabled for new repositories. - /// - dependabot_alerts_enabled_for_new_repositories: Whether Dependabot alerts is automatically enabled for new repositories. - /// - dependabot_security_updates_enabled_for_new_repositories: Whether Dependabot security updates is automatically enabled for new repositories. - /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories. - /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories. - /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories. + /// - 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. /// - 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( @@ -8192,24 +8360,314 @@ public enum Operations { } } } - /// Forbidden + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/delete(orgs/delete)/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 + ) + } + } + } + /// 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 attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + public enum orgs_sol_list_hyphen_attestations { + public static let id: Swift.String = "orgs/list-attestations" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/path/org`. + public var org: Components.Parameters.org + /// The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/path/subject_digest`. + public var subject_digest: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - subject_digest: The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + public init( + org: Components.Parameters.org, + subject_digest: Swift.String + ) { + self.org = org + self.subject_digest = subject_digest + } + } + public var path: Operations.orgs_sol_list_hyphen_attestations.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/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}/attestations/{subject_digest}/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// 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/orgs/{org}/attestations/{subject_digest}/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/orgs/{org}/attestations/{subject_digest}/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// 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)." + /// - 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)." + public init( + per_page: Components.Parameters.per_hyphen_page? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil + ) { + self.per_page = per_page + self.before = before + self.after = after + } + } + public var query: Operations.orgs_sol_list_hyphen_attestations.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/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.orgs_sol_list_hyphen_attestations.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.orgs_sol_list_hyphen_attestations.Input.Path, + query: Operations.orgs_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.orgs_sol_list_hyphen_attestations.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}/attestations/{subject_digest}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload`. + public struct attestationsPayloadPayload: Codable, Hashable, Sendable { + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public struct bundlePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public var verificationMaterial: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public var dsseEnvelope: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? + /// Creates a new `bundlePayload`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? = nil, + dsseEnvelope: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public var bundle: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/repository_id`. + public var repository_id: Swift.Int? + /// Creates a new `attestationsPayloadPayload`. + /// + /// - Parameters: + /// - bundle: The attestation's Sigstore Bundle. + /// - repository_id: + public init( + bundle: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? = nil, + repository_id: Swift.Int? = nil + ) { + self.bundle = bundle + self.repository_id = repository_id + } + public enum CodingKeys: String, CodingKey { + case bundle + case repository_id + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public typealias attestationsPayload = [Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload] + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public var attestations: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - attestations: + public init(attestations: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? = nil) { + self.attestations = attestations + } + public enum CodingKeys: String, CodingKey { + case attestations + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/application\/json`. + case json(Operations.orgs_sol_list_hyphen_attestations.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.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body) { + self.body = body + } + } + /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/delete(orgs/delete)/responses/403`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)/responses/200`. /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. + /// HTTP response code: `200 ok`. + case ok(Operations.orgs_sol_list_hyphen_attestations.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.forbidden { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.orgs_sol_list_hyphen_attestations.Output.Ok { get throws { switch self { - case let .forbidden(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", + expectedStatus: "ok", response: self ) } @@ -12041,295 +12499,69 @@ public enum Operations { /// /// - Remark: HTTP `GET /orgs/{org}/invitations/{invitation_id}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/invitations/{invitation_id}/teams/get(orgs/list-invitation-teams)`. - public enum orgs_sol_list_hyphen_invitation_hyphen_teams { - public static let id: Swift.String = "orgs/list-invitation-teams" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/path/org`. - public var org: Components.Parameters.org - /// The unique identifier of the invitation. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/path/invitation_id`. - public var invitation_id: Components.Parameters.invitation_hyphen_id - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - /// - invitation_id: The unique identifier of the invitation. - public init( - org: Components.Parameters.org, - invitation_id: Components.Parameters.invitation_hyphen_id - ) { - self.org = org - self.invitation_id = invitation_id - } - } - public var path: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/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}/invitations/{invitation_id}/teams/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}/invitations/{invitation_id}/teams/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.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Query - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/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.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - query: - /// - headers: - public init( - path: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Path, - query: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Query = .init(), - headers: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.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}/invitations/{invitation_id}/teams/GET/responses/200/headers`. - public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/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.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/responses/200/content/application\/json`. - case json([Components.Schemas.team]) - /// 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.team] { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - headers: Received HTTP response headers - /// - body: Received HTTP response body - public init( - headers: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Headers = .init(), - body: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Body - ) { - self.headers = headers - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/invitations/{invitation_id}/teams/get(orgs/list-invitation-teams)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.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.orgs_sol_list_hyphen_invitation_hyphen_teams.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//orgs/{org}/invitations/{invitation_id}/teams/get(orgs/list-invitation-teams)/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 - ] - } - } - } - /// List organization members - /// - /// List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. - /// - /// - Remark: HTTP `GET /orgs/{org}/members`. - /// - Remark: Generated from `#/paths//orgs/{org}/members/get(orgs/list-members)`. - public enum orgs_sol_list_hyphen_members { - public static let id: Swift.String = "orgs/list-members" + public enum orgs_sol_list_hyphen_invitation_hyphen_teams { + public static let id: Swift.String = "orgs/list-invitation-teams" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/path/org`. public var org: Components.Parameters.org + /// The unique identifier of the invitation. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/path/invitation_id`. + public var invitation_id: Components.Parameters.invitation_hyphen_id /// Creates a new `Path`. /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - public init(org: Components.Parameters.org) { + /// - invitation_id: The unique identifier of the invitation. + public init( + org: Components.Parameters.org, + invitation_id: Components.Parameters.invitation_hyphen_id + ) { self.org = org + self.invitation_id = invitation_id } } - public var path: Operations.orgs_sol_list_hyphen_members.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query`. + public var path: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/query`. public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { - case _2fa_disabled = "2fa_disabled" - case all = "all" - } - /// Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/filter`. - public var filter: Operations.orgs_sol_list_hyphen_members.Input.Query.filterPayload? - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { - case all = "all" - case admin = "admin" - case member = "member" - } - /// Filter members returned by their role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/role`. - public var role: Operations.orgs_sol_list_hyphen_members.Input.Query.rolePayload? /// 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}/members/GET/query/per_page`. + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/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}/members/GET/query/page`. + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/query/page`. public var page: Components.Parameters.page? /// Creates a new `Query`. /// /// - Parameters: - /// - filter: Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. - /// - role: Filter members returned by their role. /// - 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( - filter: Operations.orgs_sol_list_hyphen_members.Input.Query.filterPayload? = nil, - role: Operations.orgs_sol_list_hyphen_members.Input.Query.rolePayload? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, page: Components.Parameters.page? = nil ) { - self.filter = filter - self.role = role self.per_page = per_page self.page = page } } - public var query: Operations.orgs_sol_list_hyphen_members.Input.Query - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/header`. + public var query: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/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.orgs_sol_list_hyphen_members.Input.Headers + public var headers: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -12337,9 +12569,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.orgs_sol_list_hyphen_members.Input.Path, - query: Operations.orgs_sol_list_hyphen_members.Input.Query = .init(), - headers: Operations.orgs_sol_list_hyphen_members.Input.Headers = .init() + path: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Path, + query: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Query = .init(), + headers: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Input.Headers = .init() ) { self.path = path self.query = query @@ -12348,9 +12580,9 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/responses/200/headers`. + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/responses/200/headers`. public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/responses/200/headers/Link`. + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/responses/200/headers/Link`. public var Link: Components.Headers.link? /// Creates a new `Headers`. /// @@ -12361,16 +12593,16 @@ public enum Operations { } } /// Received HTTP response headers - public var headers: Operations.orgs_sol_list_hyphen_members.Output.Ok.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/responses/200/content`. + public var headers: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/responses/200/content/application\/json`. - case json([Components.Schemas.simple_hyphen_user]) + /// - Remark: Generated from `#/paths/orgs/{org}/invitations/{invitation_id}/teams/GET/responses/200/content/application\/json`. + case json([Components.Schemas.team]) /// 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.simple_hyphen_user] { + public var json: [Components.Schemas.team] { get throws { switch self { case let .json(body): @@ -12380,15 +12612,15 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.orgs_sol_list_hyphen_members.Output.Ok.Body + public var body: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - headers: Received HTTP response headers /// - body: Received HTTP response body public init( - headers: Operations.orgs_sol_list_hyphen_members.Output.Ok.Headers = .init(), - body: Operations.orgs_sol_list_hyphen_members.Output.Ok.Body + headers: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Headers = .init(), + body: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok.Body ) { self.headers = headers self.body = body @@ -12396,15 +12628,15 @@ public enum Operations { } /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/members/get(orgs/list-members)/responses/200`. + /// - Remark: Generated from `#/paths//orgs/{org}/invitations/{invitation_id}/teams/get(orgs/list-invitation-teams)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_list_hyphen_members.Output.Ok) + case ok(Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.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.orgs_sol_list_hyphen_members.Output.Ok { + public var ok: Operations.orgs_sol_list_hyphen_invitation_hyphen_teams.Output.Ok { get throws { switch self { case let .ok(response): @@ -12417,24 +12649,24 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. + /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/members/get(orgs/list-members)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/invitations/{invitation_id}/teams/get(orgs/list-invitation-teams)/responses/404`. /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// 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 `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { get throws { switch self { - case let .unprocessableContent(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", + expectedStatus: "notFound", response: self ) } @@ -12471,258 +12703,196 @@ public enum Operations { } } } - /// Check organization membership for a user - /// - /// Check if a user is, publicly or privately, a member of the organization. - /// - /// - Remark: HTTP `GET /orgs/{org}/members/{username}`. - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)`. - public enum orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user { - public static let id: Swift.String = "orgs/check-membership-for-user" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/path/org`. - public var org: Components.Parameters.org - /// The handle for the GitHub user account. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/path/username`. - public var username: Components.Parameters.username - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - /// - username: The handle for the GitHub user account. - public init( - org: Components.Parameters.org, - username: Components.Parameters.username - ) { - self.org = org - self.username = username - } - } - public var path: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Input.Path - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - public init(path: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Input.Path) { - self.path = path - } - } - @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} - } - /// Response if requester is an organization member and user is a member - /// - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.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.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent { - get throws { - switch self { - case let .noContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "noContent", - response: self - ) - } - } - } - public struct Found: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/responses/302/headers`. - public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/responses/302/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.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found.Headers - /// Creates a new `Found`. - /// - /// - Parameters: - /// - headers: Received HTTP response headers - public init(headers: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found.Headers = .init()) { - self.headers = headers - } - } - /// Response if requester is not an organization member - /// - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/302`. - /// - /// HTTP response code: `302 found`. - case found(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found) - /// The associated value of the enum case if `self` is `.found`. - /// - /// - Throws: An error if `self` is not `.found`. - /// - SeeAlso: `.found`. - public var found: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found { - get throws { - switch self { - case let .found(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "found", - response: self - ) - } - } - } - public struct NotFound: Sendable, Hashable { - /// Creates a new `NotFound`. - public init() {} - } - /// Not Found if requester is an organization member and user is not a member - /// - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.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.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.NotFound { - 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) - } - } - /// Remove an organization member + /// List organization members /// - /// Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + /// List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. /// - /// - Remark: HTTP `DELETE /orgs/{org}/members/{username}`. - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)`. - public enum orgs_sol_remove_hyphen_member { - public static let id: Swift.String = "orgs/remove-member" + /// - Remark: HTTP `GET /orgs/{org}/members`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/get(orgs/list-members)`. + public enum orgs_sol_list_hyphen_members { + public static let id: Swift.String = "orgs/list-members" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/path/org`. public var org: Components.Parameters.org - /// The handle for the GitHub user account. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/path/username`. - public var username: Components.Parameters.username /// Creates a new `Path`. /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - /// - username: The handle for the GitHub user account. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.orgs_sol_list_hyphen_members.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/filter`. + @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + case _2fa_disabled = "2fa_disabled" + case all = "all" + } + /// Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/filter`. + public var filter: Operations.orgs_sol_list_hyphen_members.Input.Query.filterPayload? + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/role`. + @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + case all = "all" + case admin = "admin" + case member = "member" + } + /// Filter members returned by their role. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/role`. + public var role: Operations.orgs_sol_list_hyphen_members.Input.Query.rolePayload? + /// 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}/members/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}/members/GET/query/page`. + public var page: Components.Parameters.page? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - filter: Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. + /// - role: Filter members returned by their role. + /// - 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( - org: Components.Parameters.org, - username: Components.Parameters.username + filter: Operations.orgs_sol_list_hyphen_members.Input.Query.filterPayload? = nil, + role: Operations.orgs_sol_list_hyphen_members.Input.Query.rolePayload? = nil, + per_page: Components.Parameters.per_hyphen_page? = nil, + page: Components.Parameters.page? = nil ) { - self.org = org - self.username = username + self.filter = filter + self.role = role + self.per_page = per_page + self.page = page } } - public var path: Operations.orgs_sol_remove_hyphen_member.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/header`. + public var query: Operations.orgs_sol_list_hyphen_members.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/members/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.orgs_sol_remove_hyphen_member.Input.Headers + public var headers: Operations.orgs_sol_list_hyphen_members.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: public init( - path: Operations.orgs_sol_remove_hyphen_member.Input.Path, - headers: Operations.orgs_sol_remove_hyphen_member.Input.Headers = .init() + path: Operations.orgs_sol_list_hyphen_members.Input.Path, + query: Operations.orgs_sol_list_hyphen_members.Input.Query = .init(), + headers: Operations.orgs_sol_list_hyphen_members.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers } } @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/members/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.orgs_sol_list_hyphen_members.Output.Ok.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/responses/200/content/application\/json`. + case json([Components.Schemas.simple_hyphen_user]) + /// 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.simple_hyphen_user] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.orgs_sol_list_hyphen_members.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.orgs_sol_list_hyphen_members.Output.Ok.Headers = .init(), + body: Operations.orgs_sol_list_hyphen_members.Output.Ok.Body + ) { + self.headers = headers + self.body = body + } } /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)/responses/204`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/get(orgs/list-members)/responses/200`. /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.orgs_sol_remove_hyphen_member.Output.NoContent) - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.orgs_sol_list_hyphen_members.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.orgs_sol_remove_hyphen_member.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.orgs_sol_list_hyphen_members.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } - /// Forbidden + /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)/responses/403`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/get(orgs/list-members)/responses/422`. /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. + /// 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 `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.forbidden { + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { get throws { switch self { - case let .forbidden(response): + case let .unprocessableContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", + expectedStatus: "unprocessableContent", response: self ) } @@ -12759,24 +12929,24 @@ public enum Operations { } } } - /// Get organization membership for a user + /// Check organization membership for a user /// - /// In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. + /// Check if a user is, publicly or privately, a member of the organization. /// - /// - Remark: HTTP `GET /orgs/{org}/memberships/{username}`. - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)`. - public enum orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user { - public static let id: Swift.String = "orgs/get-membership-for-user" + /// - Remark: HTTP `GET /orgs/{org}/members/{username}`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)`. + public enum orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user { + public static let id: Swift.String = "orgs/check-membership-for-user" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/path/org`. public var org: Components.Parameters.org /// The handle for the GitHub user account. /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/path/username`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/path/username`. public var username: Components.Parameters.username /// Creates a new `Path`. /// @@ -12788,128 +12958,114 @@ public enum Operations { username: Components.Parameters.username ) { self.org = org - self.username = username - } - } - public var path: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/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.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - public init( - path: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Input.Path, - headers: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.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}/memberships/{username}/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.org_hyphen_membership) - /// 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.org_hyphen_membership { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body) { - self.body = body + self.username = username } } - /// Response + public var path: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Input.Path + /// Creates a new `Input`. /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)/responses/200`. + /// - Parameters: + /// - path: + public init(path: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Input.Path) { + self.path = path + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response if requester is an organization member and user is a member /// - /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/204`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok { + /// HTTP response code: `204 noContent`. + case noContent(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.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.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } - /// Resource not found + public struct Found: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/responses/302/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/GET/responses/302/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.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found.Headers + /// Creates a new `Found`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + public init(headers: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found.Headers = .init()) { + self.headers = headers + } + } + /// Response if requester is not an organization member /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/302`. /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. + /// HTTP response code: `302 found`. + case found(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found) + /// The associated value of the enum case if `self` is `.found`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { + /// - Throws: An error if `self` is not `.found`. + /// - SeeAlso: `.found`. + public var found: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.Found { get throws { switch self { - case let .notFound(response): + case let .found(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "found", response: self ) } } } - /// Forbidden + public struct NotFound: Sendable, Hashable { + /// Creates a new `NotFound`. + public init() {} + } + /// Not Found if requester is an organization member and user is not a member /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)/responses/403`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/404`. /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. + /// HTTP response code: `404 notFound`. + case notFound(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.forbidden { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.NotFound { get throws { switch self { - case let .forbidden(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", + expectedStatus: "notFound", response: self ) } @@ -12920,58 +13076,25 @@ public enum Operations { /// 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 organization membership for a user - /// - /// Only authenticated organization owners can add a member to the organization or update the member's role. - /// - /// * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. - /// - /// * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. - /// - /// **Rate limits** + /// Remove an organization member /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. /// - /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. - public enum orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user { - public static let id: Swift.String = "orgs/set-membership-for-user" + /// - Remark: HTTP `DELETE /orgs/{org}/members/{username}`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)`. + public enum orgs_sol_remove_hyphen_member { + public static let id: Swift.String = "orgs/remove-member" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/path/org`. public var org: Components.Parameters.org /// The handle for the GitHub user account. /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/path/username`. + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/path/username`. public var username: Components.Parameters.username /// Creates a new `Path`. /// @@ -12986,139 +13109,55 @@ public enum Operations { self.username = username } } - public var path: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/header`. + public var path: Operations.orgs_sol_remove_hyphen_member.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/members/{username}/DELETE/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.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The role to give the user in the organization. Can be one of: - /// * `admin` - The user will become an owner of the organization. - /// * `member` - The user will become a non-owner member of the organization. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/json/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { - case admin = "admin" - case member = "member" - } - /// The role to give the user in the organization. Can be one of: - /// * `admin` - The user will become an owner of the organization. - /// * `member` - The user will become a non-owner member of the organization. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/json/role`. - public var role: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body.jsonPayload.rolePayload? - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - role: The role to give the user in the organization. Can be one of: - public init(role: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body.jsonPayload.rolePayload? = nil) { - self.role = role - } - public enum CodingKeys: String, CodingKey { - case role - } - } - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/content/application\/json`. - case json(Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body.jsonPayload) - } - public var body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body? + public var headers: Operations.orgs_sol_remove_hyphen_member.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Path, - headers: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Headers = .init(), - body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body? = nil + path: Operations.orgs_sol_remove_hyphen_member.Input.Path, + headers: Operations.orgs_sol_remove_hyphen_member.Input.Headers = .init() ) { 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}/memberships/{username}/PUT/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.org_hyphen_membership) - /// 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.org_hyphen_membership { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_set_hyphen_membership_hyphen_for_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.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Output.Ok { - get throws { - switch self { - case let .ok(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "ok", - response: self - ) - } - } } - /// Validation failed, or the endpoint has been spammed. + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)/responses/204`. /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.orgs_sol_remove_hyphen_member.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.orgs_sol_remove_hyphen_member.Output.NoContent { get throws { switch self { - case let .unprocessableContent(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", + expectedStatus: "noContent", response: self ) } @@ -13126,7 +13165,7 @@ public enum Operations { } /// Forbidden /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)/responses/403`. + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)/responses/403`. /// /// HTTP response code: `403 forbidden`. case forbidden(Components.Responses.forbidden) @@ -13178,26 +13217,24 @@ public enum Operations { } } } - /// Remove organization membership for a user - /// - /// In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + /// Get organization membership for a user /// - /// If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + /// In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. /// - /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. - public enum orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user { - public static let id: Swift.String = "orgs/remove-membership-for-user" + /// - Remark: HTTP `GET /orgs/{org}/memberships/{username}`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)`. + public enum orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user { + public static let id: Swift.String = "orgs/get-membership-for-user" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/path/org`. public var org: Components.Parameters.org /// The handle for the GitHub user account. /// - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/path/username`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/path/username`. public var username: Components.Parameters.username /// Creates a new `Path`. /// @@ -13212,101 +13249,125 @@ public enum Operations { self.username = username } } - public var path: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/header`. + public var path: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/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.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input.Headers + public var headers: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input.Path, - headers: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input.Headers = .init() + path: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Input.Path, + headers: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.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() {} + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.org_hyphen_membership) + /// 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.org_hyphen_membership { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body) { + self.body = body + } } /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)/responses/204`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)/responses/200`. /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent) - /// The associated value of the enum case if `self` is `.noContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.orgs_sol_get_hyphen_membership_hyphen_for_hyphen_user.Output.Ok { get throws { switch self { - case let .noContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "noContent", + expectedStatus: "ok", response: self ) } } } - /// Forbidden + /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)/responses/403`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)/responses/404`. /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. + /// 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 `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.forbidden { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { get throws { switch self { - case let .forbidden(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", + expectedStatus: "notFound", response: self ) } } } - /// Resource not found + /// Forbidden /// - /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/get(orgs/get-membership-for-user)/responses/403`. /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. + /// 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 `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { get throws { switch self { - case let .notFound(response): + case let .forbidden(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "forbidden", response: self ) } @@ -13343,75 +13404,120 @@ public enum Operations { } } } - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Set organization membership for a user /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." + /// Only authenticated organization owners can add a member to the organization or update the member's role. /// - /// To use this endpoint, the authenticated user must be one of: + /// * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + /// + /// * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + /// **Rate limits** /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - public enum orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions { - public static let id: Swift.String = "orgs/list-organization-fine-grained-permissions" + /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. + public enum orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user { + public static let id: Swift.String = "orgs/set-membership-for-user" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/path/org`. public var org: Components.Parameters.org + /// The handle for the GitHub user account. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/path/username`. + public var username: Components.Parameters.username /// Creates a new `Path`. /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - public init(org: Components.Parameters.org) { + /// - username: The handle for the GitHub user account. + public init( + org: Components.Parameters.org, + username: Components.Parameters.username + ) { self.org = org + self.username = username } } - public var path: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/header`. + public var path: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/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.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Headers + public var headers: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The role to give the user in the organization. Can be one of: + /// * `admin` - The user will become an owner of the organization. + /// * `member` - The user will become a non-owner member of the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/json/role`. + @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + case admin = "admin" + case member = "member" + } + /// The role to give the user in the organization. Can be one of: + /// * `admin` - The user will become an owner of the organization. + /// * `member` - The user will become a non-owner member of the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/json/role`. + public var role: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body.jsonPayload.rolePayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - role: The role to give the user in the organization. Can be one of: + public init(role: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body.jsonPayload.rolePayload? = nil) { + self.role = role + } + public enum CodingKeys: String, CodingKey { + case role + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/content/application\/json`. + case json(Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body.jsonPayload) + } + public var body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body? /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Path, - headers: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Headers = .init() + path: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Path, + headers: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Headers = .init(), + body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Input.Body? = nil ) { 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}/organization-fine-grained-permissions/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/responses/200/content/application\/json`. - case json([Components.Schemas.organization_hyphen_fine_hyphen_grained_hyphen_permission]) + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/responses/200/content/application\/json`. + case json(Components.Schemas.org_hyphen_membership) /// 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.organization_hyphen_fine_hyphen_grained_hyphen_permission] { + public var json: Components.Schemas.org_hyphen_membership { get throws { switch self { case let .json(body): @@ -13421,56 +13527,33 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output.Ok.Body + public var body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output.Ok.Body) { + public init(body: Operations.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)/responses/200`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.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.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.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//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)/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 { + case ok(Operations.orgs_sol_set_hyphen_membership_hyphen_for_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.orgs_sol_set_hyphen_membership_hyphen_for_hyphen_user.Output.Ok { get throws { switch self { - case let .notFound(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "ok", response: self ) } @@ -13478,7 +13561,7 @@ public enum Operations { } /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)/responses/422`. /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Components.Responses.validation_failed) @@ -13499,6 +13582,29 @@ public enum Operations { } } } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)/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 + ) + } + } + } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. @@ -13530,182 +13636,135 @@ public enum Operations { } } } - /// Get all organization roles for an organization - /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: + /// Remove organization membership for a user /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + /// In order to remove a user's membership with an organization, the authenticated user must be an organization owner. /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. /// - /// - Remark: HTTP `GET /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)`. - public enum orgs_sol_list_hyphen_org_hyphen_roles { - public static let id: Swift.String = "orgs/list-org-roles" + /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. + public enum orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user { + public static let id: Swift.String = "orgs/remove-membership-for-user" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/path/org`. public var org: Components.Parameters.org + /// The handle for the GitHub user account. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/path/username`. + public var username: Components.Parameters.username /// Creates a new `Path`. /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - public init(org: Components.Parameters.org) { + /// - username: The handle for the GitHub user account. + public init( + org: Components.Parameters.org, + username: Components.Parameters.username + ) { self.org = org + self.username = username } } - public var path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/header`. + public var path: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/DELETE/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.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers + public var headers: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path, - headers: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers = .init() + path: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input.Path, + headers: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.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}/organization-roles/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The total number of organization roles available to the organization. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/total_count`. - public var total_count: Swift.Int? - /// The list of organization roles available to the organization. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/roles`. - public var roles: [Components.Schemas.organization_hyphen_role]? - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - total_count: The total number of organization roles available to the organization. - /// - roles: The list of organization roles available to the organization. - public init( - total_count: Swift.Int? = nil, - roles: [Components.Schemas.organization_hyphen_role]? = nil - ) { - self.total_count = total_count - self.roles = roles - } - public enum CodingKeys: String, CodingKey { - case total_count - case roles - } - } - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/application\/json`. - case json(Operations.orgs_sol_list_hyphen_org_hyphen_roles.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.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body.jsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body) { - self.body = body - } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} } - /// Response - list of organization roles + /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/200`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)/responses/204`. /// - /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok { + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent { get throws { switch self { - case let .ok(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "ok", + expectedStatus: "noContent", response: self ) } } } - /// Resource not found + /// Forbidden /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)/responses/403`. /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. + /// 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 `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { get throws { switch self { - case let .notFound(response): + case let .forbidden(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "forbidden", response: self ) } } } - /// Validation failed, or the endpoint has been spammed. + /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)/responses/404`. /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// 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 `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { get throws { switch self { - case let .unprocessableContent(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", + expectedStatus: "notFound", response: self ) } @@ -13742,27 +13801,27 @@ public enum Operations { } } } - /// Create a custom organization role + /// Get all organization roles for an organization /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. + /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - public enum orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role { - public static let id: Swift.String = "orgs/create-custom-organization-role" + /// - Remark: HTTP `GET /orgs/{org}/organization-roles`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)`. + public enum orgs_sol_list_hyphen_org_hyphen_roles { + public static let id: Swift.String = "orgs/list-org-roles" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path/org`. public var org: Components.Parameters.org /// Creates a new `Path`. /// @@ -13772,87 +13831,70 @@ public enum Operations { self.org = org } } - public var path: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/header`. + public var path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/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.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The name of the custom role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json/name`. - public var name: Swift.String - /// A short description about the intended usage of this role or what permissions it grants. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json/description`. - public var description: Swift.String? - /// A list of additional permissions included in this role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json/permissions`. - public var permissions: [Swift.String] - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - name: The name of the custom role. - /// - description: A short description about the intended usage of this role or what permissions it grants. - /// - permissions: A list of additional permissions included in this role. - public init( - name: Swift.String, - description: Swift.String? = nil, - permissions: [Swift.String] - ) { - self.name = name - self.description = description - self.permissions = permissions - } - public enum CodingKeys: String, CodingKey { - case name - case description - case permissions - } - } - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/content/application\/json`. - case json(Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body.jsonPayload) - } - public var body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body + public var headers: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body + path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path, + headers: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers = .init() ) { 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}/organization-roles/POST/responses/201/content`. + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/responses/201/content/application\/json`. - case json(Components.Schemas.organization_hyphen_role) + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The total number of organization roles available to the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/total_count`. + public var total_count: Swift.Int? + /// The list of organization roles available to the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/roles`. + public var roles: [Components.Schemas.organization_hyphen_role]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - total_count: The total number of organization roles available to the organization. + /// - roles: The list of organization roles available to the organization. + public init( + total_count: Swift.Int? = nil, + roles: [Components.Schemas.organization_hyphen_role]? = nil + ) { + self.total_count = total_count + self.roles = roles + } + public enum CodingKeys: String, CodingKey { + case total_count + case roles + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/application\/json`. + case json(Operations.orgs_sol_list_hyphen_org_hyphen_roles.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: Components.Schemas.organization_hyphen_role { + public var json: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body.jsonPayload { get throws { switch self { case let .json(body): @@ -13862,56 +13904,33 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created.Body - /// Creates a new `Created`. + public var body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body + /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created.Body) { + public init(body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body) { self.body = body } } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/201`. - /// - /// HTTP response code: `201 created`. - case created(Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.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.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created { - get throws { - switch self { - case let .created(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "created", - response: self - ) - } - } - } - /// Validation failed, or the endpoint has been spammed. + /// Response - list of organization roles /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/200`. /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// HTTP response code: `200 ok`. + case ok(Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok { get throws { switch self { - case let .unprocessableContent(response): + case let .ok(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", + expectedStatus: "ok", response: self ) } @@ -13919,7 +13938,7 @@ public enum Operations { } /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Components.Responses.not_found) @@ -13940,24 +13959,24 @@ public enum Operations { } } } - /// Conflict + /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/409`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/422`. /// - /// HTTP response code: `409 conflict`. - case conflict(Components.Responses.conflict) - /// The associated value of the enum case if `self` is `.conflict`. + /// 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 `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Components.Responses.conflict { + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { get throws { switch self { - case let .conflict(response): + case let .unprocessableContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "conflict", + expectedStatus: "unprocessableContent", response: self ) } @@ -13996,7 +14015,7 @@ public enum Operations { } /// Remove all organization roles for a team /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14075,7 +14094,7 @@ public enum Operations { } /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14215,7 +14234,7 @@ public enum Operations { } /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14301,7 +14320,7 @@ public enum Operations { } /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14380,7 +14399,7 @@ public enum Operations { } /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14520,7 +14539,7 @@ public enum Operations { } /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14565,203 +14584,34 @@ public enum Operations { /// Creates a new `Input`. /// /// - Parameters: - /// - path: - public init(path: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.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}/organization-roles/users/{username}/{role_id}/delete(orgs/revoke-org-role-user)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.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.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.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) - } - } - /// Get an organization role - /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)`. - public enum orgs_sol_get_hyphen_org_hyphen_role { - public static let id: Swift.String = "orgs/get-org-role" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/org`. - public var org: Components.Parameters.org - /// The unique identifier of the role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/role_id`. - public var role_id: Components.Parameters.role_hyphen_id - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - /// - role_id: The unique identifier of the role. - public init( - org: Components.Parameters.org, - role_id: Components.Parameters.role_hyphen_id - ) { - self.org = org - self.role_id = role_id - } - } - public var path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_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.orgs_sol_get_hyphen_org_hyphen_role.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - public init( - path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path, - headers: Operations.orgs_sol_get_hyphen_org_hyphen_role.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}/organization-roles/{role_id}/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.organization_hyphen_role) - /// 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.organization_hyphen_role { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_get_hyphen_org_hyphen_role.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.orgs_sol_get_hyphen_org_hyphen_role.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//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/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 - ) - } - } + /// - path: + public init(path: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Input.Path) { + self.path = path } - /// Validation failed, or the endpoint has been spammed. + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/{role_id}/delete(orgs/revoke-org-role-user)/responses/204`. /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output.NoContent { get throws { switch self { - case let .unprocessableContent(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", + expectedStatus: "noContent", response: self ) } @@ -14772,58 +14622,32 @@ public enum Operations { /// 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 custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Get an organization role /// + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. + /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - public enum orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role { - public static let id: Swift.String = "orgs/patch-custom-organization-role" + /// - Remark: HTTP `GET /orgs/{org}/organization-roles/{role_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)`. + public enum orgs_sol_get_hyphen_org_hyphen_role { + public static let id: Swift.String = "orgs/get-org-role" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/org`. public var org: Components.Parameters.org /// The unique identifier of the role. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/path/role_id`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/role_id`. public var role_id: Components.Parameters.role_hyphen_id /// Creates a new `Path`. /// @@ -14838,81 +14662,37 @@ public enum Operations { self.role_id = role_id } } - public var path: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/header`. + public var path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/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.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The name of the custom role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// A short description about the intended usage of this role or what permissions it grants. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json/description`. - public var description: Swift.String? - /// A list of additional permissions included in this role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json/permissions`. - public var permissions: [Swift.String]? - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - name: The name of the custom role. - /// - description: A short description about the intended usage of this role or what permissions it grants. - /// - permissions: A list of additional permissions included in this role. - public init( - name: Swift.String? = nil, - description: Swift.String? = nil, - permissions: [Swift.String]? = nil - ) { - self.name = name - self.description = description - self.permissions = permissions - } - public enum CodingKeys: String, CodingKey { - case name - case description - case permissions - } - } - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/content/application\/json`. - case json(Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body.jsonPayload) - } - public var body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body + public var headers: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body + path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path, + headers: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Headers = .init() ) { 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}/organization-roles/{role_id}/PATCH/responses/200/content`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/responses/200/content/application\/json`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/responses/200/content/application\/json`. case json(Components.Schemas.organization_hyphen_role) /// The associated value of the enum case if `self` is `.json`. /// @@ -14928,26 +14708,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok.Body + public var body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok.Body) { + public init(body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/responses/200`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok) + case ok(Operations.orgs_sol_get_hyphen_org_hyphen_role.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.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok { + public var ok: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok { get throws { switch self { case let .ok(response): @@ -14960,70 +14740,47 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/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 - ) - } - } - } - /// Conflict + /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/responses/409`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/404`. /// - /// HTTP response code: `409 conflict`. - case conflict(Components.Responses.conflict) - /// The associated value of the enum case if `self` is `.conflict`. + /// 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 `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Components.Responses.conflict { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { get throws { switch self { - case let .conflict(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "conflict", + expectedStatus: "notFound", response: self ) } } } - /// Resource not found + /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/422`. /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. + /// 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 `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { get throws { switch self { - case let .notFound(response): + case let .unprocessableContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "unprocessableContent", response: self ) } @@ -15060,91 +14817,9 @@ public enum Operations { } } } - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - public enum orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role { - public static let id: Swift.String = "orgs/delete-custom-organization-role" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/DELETE/path/org`. - public var org: Components.Parameters.org - /// The unique identifier of the role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/DELETE/path/role_id`. - public var role_id: Components.Parameters.role_hyphen_id - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - /// - role_id: The unique identifier of the role. - public init( - org: Components.Parameters.org, - role_id: Components.Parameters.role_hyphen_id - ) { - self.org = org - self.role_id = role_id - } - } - public var path: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input.Path - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - public init(path: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.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}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.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.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.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 teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -15250,12 +14925,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/teams/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/teams/GET/responses/200/content/application\/json`. - case json([Components.Schemas.team]) + case json([Components.Schemas.team_hyphen_role_hyphen_assignment]) /// 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.team] { + public var json: [Components.Schemas.team_hyphen_role_hyphen_assignment] { get throws { switch self { case let .json(body): @@ -15389,7 +15064,7 @@ public enum Operations { } /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -15495,12 +15170,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/users/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/users/GET/responses/200/content/application\/json`. - case json([Components.Schemas.simple_hyphen_user]) + case json([Components.Schemas.user_hyphen_role_hyphen_assignment]) /// 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.simple_hyphen_user] { + public var json: [Components.Schemas.user_hyphen_role_hyphen_assignment] { get throws { switch self { case let .json(body): @@ -18474,12 +18149,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/GET/responses/200/content/application\/json`. - case json([Components.Schemas.org_hyphen_custom_hyphen_property]) + case json([Components.Schemas.custom_hyphen_property]) /// 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.org_hyphen_custom_hyphen_property] { + public var json: [Components.Schemas.custom_hyphen_property] { get throws { switch self { case let .json(body): @@ -18645,12 +18320,12 @@ public enum Operations { /// The array of custom properties to create or update. /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/PATCH/requestBody/json/properties`. - public var properties: [Components.Schemas.org_hyphen_custom_hyphen_property] + public var properties: [Components.Schemas.custom_hyphen_property] /// Creates a new `jsonPayload`. /// /// - Parameters: /// - properties: The array of custom properties to create or update. - public init(properties: [Components.Schemas.org_hyphen_custom_hyphen_property]) { + public init(properties: [Components.Schemas.custom_hyphen_property]) { self.properties = properties } public enum CodingKeys: String, CodingKey { @@ -18682,12 +18357,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/PATCH/responses/200/content/application\/json`. - case json([Components.Schemas.org_hyphen_custom_hyphen_property]) + case json([Components.Schemas.custom_hyphen_property]) /// 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.org_hyphen_custom_hyphen_property] { + public var json: [Components.Schemas.custom_hyphen_property] { get throws { switch self { case let .json(body): @@ -18870,12 +18545,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.org_hyphen_custom_hyphen_property) + case json(Components.Schemas.custom_hyphen_property) /// 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.org_hyphen_custom_hyphen_property { + public var json: Components.Schemas.custom_hyphen_property { get throws { switch self { case let .json(body): @@ -19053,6 +18728,8 @@ public enum Operations { @frozen public enum value_typePayload: String, Codable, Hashable, Sendable { case string = "string" case single_select = "single_select" + case multi_select = "multi_select" + case true_false = "true_false" } /// The type of the value for the property /// @@ -19166,12 +18843,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.org_hyphen_custom_hyphen_property) + case json(Components.Schemas.custom_hyphen_property) /// 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.org_hyphen_custom_hyphen_property { + public var json: Components.Schemas.custom_hyphen_property { get throws { switch self { case let .json(body): @@ -20613,33 +20290,6 @@ public enum Operations { } } } - public struct Conflict: Sendable, Hashable { - /// Creates a new `Conflict`. - public init() {} - } - /// The organization has reached the maximum number of security manager teams. - /// - /// - Remark: Generated from `#/paths//orgs/{org}/security-managers/teams/{team_slug}/put(orgs/add-security-manager-team)/responses/409`. - /// - /// HTTP response code: `409 conflict`. - case conflict(Operations.orgs_sol_add_hyphen_security_hyphen_manager_hyphen_team.Output.Conflict) - /// The associated value of the enum case if `self` is `.conflict`. - /// - /// - Throws: An error if `self` is not `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Operations.orgs_sol_add_hyphen_security_hyphen_manager_hyphen_team.Output.Conflict { - get throws { - switch self { - case let .conflict(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "conflict", - response: self - ) - } - } - } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. @@ -20727,6 +20377,9 @@ 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/). + /// /// 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)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index 9eaab52dc69..097e4b06541 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -836,7 +836,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -899,7 +899,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1012,7 +1012,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1075,7 +1075,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1281,6 +1281,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1288,22 +1310,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -1311,7 +1337,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository`. public struct nullable_hyphen_minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository/name`. @@ -1659,7 +1685,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, diff --git a/Sources/projects/Types.swift b/Sources/projects/Types.swift index dde96de8f76..1cb1cfdeb73 100644 --- a/Sources/projects/Types.swift +++ b/Sources/projects/Types.swift @@ -624,7 +624,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -687,7 +687,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -831,7 +831,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -894,7 +894,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1215,7 +1215,7 @@ public enum Components { /// The project card's ID /// /// - Remark: Generated from `#/components/schemas/project-card/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/project-card/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/project-card/note`. @@ -1258,7 +1258,7 @@ public enum Components { /// - project_url: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, note: Swift.String? = nil, creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, diff --git a/Sources/pulls/Client.swift b/Sources/pulls/Client.swift index 421e5b6991e..0d806b85bb7 100644 --- a/Sources/pulls/Client.swift +++ b/Sources/pulls/Client.swift @@ -1478,8 +1478,8 @@ public struct Client: APIProtocol { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// 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)." /// @@ -2246,7 +2246,8 @@ public struct Client: APIProtocol { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// 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. /// @@ -2815,9 +2816,8 @@ public struct Client: APIProtocol { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// 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/pulls/Types.swift b/Sources/pulls/Types.swift index dd8454dbb2d..981a93264fc 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -217,8 +217,8 @@ public protocol APIProtocol: Sendable { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// 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)." /// @@ -289,7 +289,8 @@ public protocol APIProtocol: Sendable { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// 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. /// @@ -363,9 +364,8 @@ public protocol APIProtocol: Sendable { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// 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)." /// @@ -722,8 +722,8 @@ extension APIProtocol { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// 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)." /// @@ -854,7 +854,8 @@ extension APIProtocol { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// 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. /// @@ -974,9 +975,8 @@ extension APIProtocol { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// 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)." /// @@ -1066,7 +1066,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1129,7 +1129,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1273,7 +1273,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1336,7 +1336,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1582,7 +1582,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -2025,7 +2025,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2315,212 +2315,6 @@ public enum Components { case anonymous_access_enabled } } - /// A collection of related issues and pull requests. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone`. - public struct nullable_hyphen_milestone: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/nullable-milestone/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/labels_url`. - public var labels_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/node_id`. - public var node_id: Swift.String - /// The number of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/number`. - public var number: Swift.Int - /// The state of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { - case open = "open" - case closed = "closed" - } - /// The state of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - public var state: Components.Schemas.nullable_hyphen_milestone.statePayload - /// The title of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/title`. - public var title: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/creator`. - public var creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/open_issues`. - public var open_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_issues`. - public var closed_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/nullable-milestone/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_at`. - public var closed_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/due_on`. - public var due_on: Foundation.Date? - /// Creates a new `nullable_hyphen_milestone`. - /// - /// - Parameters: - /// - url: - /// - html_url: - /// - labels_url: - /// - id: - /// - node_id: - /// - number: The number of the milestone. - /// - state: The state of the milestone. - /// - title: The title of the milestone. - /// - description: - /// - creator: - /// - open_issues: - /// - closed_issues: - /// - created_at: - /// - updated_at: - /// - closed_at: - /// - due_on: - public init( - url: Swift.String, - html_url: Swift.String, - labels_url: Swift.String, - id: Swift.Int, - node_id: Swift.String, - number: Swift.Int, - state: Components.Schemas.nullable_hyphen_milestone.statePayload, - title: Swift.String, - description: Swift.String? = nil, - creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - open_issues: Swift.Int, - closed_issues: Swift.Int, - created_at: Foundation.Date, - updated_at: Foundation.Date, - closed_at: Foundation.Date? = nil, - due_on: Foundation.Date? = nil - ) { - self.url = url - self.html_url = html_url - self.labels_url = labels_url - self.id = id - self.node_id = node_id - self.number = number - self.state = state - self.title = title - self.description = description - self.creator = creator - self.open_issues = open_issues - self.closed_issues = closed_issues - self.created_at = created_at - self.updated_at = updated_at - self.closed_at = closed_at - self.due_on = due_on - } - public enum CodingKeys: String, CodingKey { - case url - case html_url - case labels_url - case id - case node_id - case number - case state - case title - case description - case creator - case open_issues - case closed_issues - case created_at - case updated_at - case closed_at - case due_on - } - } - /// How the author is associated with the repository. - /// - /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { - case COLLABORATOR = "COLLABORATOR" - case CONTRIBUTOR = "CONTRIBUTOR" - case FIRST_TIMER = "FIRST_TIMER" - case FIRST_TIME_CONTRIBUTOR = "FIRST_TIME_CONTRIBUTOR" - case MANNEQUIN = "MANNEQUIN" - case MEMBER = "MEMBER" - case NONE = "NONE" - case OWNER = "OWNER" - } - /// - Remark: Generated from `#/components/schemas/reaction-rollup`. - public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/reaction-rollup/total_count`. - public var total_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/+1`. - public var _plus_1: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/-1`. - public var _hyphen_1: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/laugh`. - public var laugh: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/confused`. - public var confused: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/heart`. - public var heart: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/hooray`. - public var hooray: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/eyes`. - public var eyes: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/rocket`. - public var rocket: Swift.Int - /// Creates a new `reaction_hyphen_rollup`. - /// - /// - Parameters: - /// - url: - /// - total_count: - /// - _plus_1: - /// - _hyphen_1: - /// - laugh: - /// - confused: - /// - heart: - /// - hooray: - /// - eyes: - /// - rocket: - public init( - url: Swift.String, - total_count: Swift.Int, - _plus_1: Swift.Int, - _hyphen_1: Swift.Int, - laugh: Swift.Int, - confused: Swift.Int, - heart: Swift.Int, - hooray: Swift.Int, - eyes: Swift.Int, - rocket: Swift.Int - ) { - self.url = url - self.total_count = total_count - self._plus_1 = _plus_1 - self._hyphen_1 = _hyphen_1 - self.laugh = laugh - self.confused = confused - self.heart = heart - self.hooray = hooray - self.eyes = eyes - self.rocket = rocket - } - public enum CodingKeys: String, CodingKey { - case url - case total_count - case _plus_1 = "+1" - case _hyphen_1 = "-1" - case laugh - case confused - case heart - case hooray - case eyes - case rocket - } - } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. @@ -2766,6 +2560,222 @@ public enum Components { case parent } } + /// A collection of related issues and pull requests. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone`. + public struct nullable_hyphen_milestone: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/nullable-milestone/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/labels_url`. + public var labels_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/node_id`. + public var node_id: Swift.String + /// The number of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/number`. + public var number: Swift.Int + /// The state of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. + @frozen public enum statePayload: String, Codable, Hashable, Sendable { + case open = "open" + case closed = "closed" + } + /// The state of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. + public var state: Components.Schemas.nullable_hyphen_milestone.statePayload + /// The title of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/title`. + public var title: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/creator`. + public var creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/open_issues`. + public var open_issues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_issues`. + public var closed_issues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/updated_at`. + public var updated_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_at`. + public var closed_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/due_on`. + public var due_on: Foundation.Date? + /// Creates a new `nullable_hyphen_milestone`. + /// + /// - Parameters: + /// - url: + /// - html_url: + /// - labels_url: + /// - id: + /// - node_id: + /// - number: The number of the milestone. + /// - state: The state of the milestone. + /// - title: The title of the milestone. + /// - description: + /// - creator: + /// - open_issues: + /// - closed_issues: + /// - created_at: + /// - updated_at: + /// - closed_at: + /// - due_on: + public init( + url: Swift.String, + html_url: Swift.String, + labels_url: Swift.String, + id: Swift.Int, + node_id: Swift.String, + number: Swift.Int, + state: Components.Schemas.nullable_hyphen_milestone.statePayload, + title: Swift.String, + description: Swift.String? = nil, + creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + open_issues: Swift.Int, + closed_issues: Swift.Int, + created_at: Foundation.Date, + updated_at: Foundation.Date, + closed_at: Foundation.Date? = nil, + due_on: Foundation.Date? = nil + ) { + self.url = url + self.html_url = html_url + self.labels_url = labels_url + self.id = id + self.node_id = node_id + self.number = number + self.state = state + self.title = title + self.description = description + self.creator = creator + self.open_issues = open_issues + self.closed_issues = closed_issues + self.created_at = created_at + self.updated_at = updated_at + self.closed_at = closed_at + self.due_on = due_on + } + public enum CodingKeys: String, CodingKey { + case url + case html_url + case labels_url + case id + case node_id + case number + case state + case title + case description + case creator + case open_issues + case closed_issues + case created_at + case updated_at + case closed_at + case due_on + } + } + /// How the author is associated with the repository. + /// + /// - Remark: Generated from `#/components/schemas/author-association`. + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + case COLLABORATOR = "COLLABORATOR" + case CONTRIBUTOR = "CONTRIBUTOR" + case FIRST_TIMER = "FIRST_TIMER" + case FIRST_TIME_CONTRIBUTOR = "FIRST_TIME_CONTRIBUTOR" + case MANNEQUIN = "MANNEQUIN" + case MEMBER = "MEMBER" + case NONE = "NONE" + case OWNER = "OWNER" + } + /// - Remark: Generated from `#/components/schemas/reaction-rollup`. + public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/reaction-rollup/total_count`. + public var total_count: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/+1`. + public var _plus_1: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/-1`. + public var _hyphen_1: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/laugh`. + public var laugh: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/confused`. + public var confused: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/heart`. + public var heart: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/hooray`. + public var hooray: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/eyes`. + public var eyes: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/rocket`. + public var rocket: Swift.Int + /// Creates a new `reaction_hyphen_rollup`. + /// + /// - Parameters: + /// - url: + /// - total_count: + /// - _plus_1: + /// - _hyphen_1: + /// - laugh: + /// - confused: + /// - heart: + /// - hooray: + /// - eyes: + /// - rocket: + public init( + url: Swift.String, + total_count: Swift.Int, + _plus_1: Swift.Int, + _hyphen_1: Swift.Int, + laugh: Swift.Int, + confused: Swift.Int, + heart: Swift.Int, + hooray: Swift.Int, + eyes: Swift.Int, + rocket: Swift.Int + ) { + self.url = url + self.total_count = total_count + self._plus_1 = _plus_1 + self._hyphen_1 = _hyphen_1 + self.laugh = laugh + self.confused = confused + self.heart = heart + self.hooray = hooray + self.eyes = eyes + self.rocket = rocket + } + public enum CodingKeys: String, CodingKey { + case url + case total_count + case _plus_1 = "+1" + case _hyphen_1 = "-1" + case laugh + case confused + case heart + case hooray + case eyes + case rocket + } + } + /// An object without any properties. + /// + /// - Remark: Generated from `#/components/schemas/empty-object`. + public struct empty_hyphen_object: Codable, Hashable, Sendable { + /// Creates a new `empty_hyphen_object`. + public init() {} + public init(from decoder: any Decoder) throws { + try decoder.ensureNoAdditionalProperties(knownKeys: []) + } + } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/team-simple`. @@ -3121,9 +3131,79 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/commit/commit`. public var commit: Components.Schemas.commit.commitPayload /// - Remark: Generated from `#/components/schemas/commit/author`. - public var author: Components.Schemas.nullable_hyphen_simple_hyphen_user? + @frozen public enum authorPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/author/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/author/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/commit/author`. + public var author: Components.Schemas.commit.authorPayload? /// - Remark: Generated from `#/components/schemas/commit/committer`. - public var committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + @frozen public enum committerPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/committer/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/committer/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/commit/committer`. + public var committer: Components.Schemas.commit.committerPayload? /// - Remark: Generated from `#/components/schemas/commit/parentsPayload`. public struct parentsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/commit/parentsPayload/sha`. @@ -3211,8 +3291,8 @@ public enum Components { html_url: Swift.String, comments_url: Swift.String, commit: Components.Schemas.commit.commitPayload, - author: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + author: Components.Schemas.commit.authorPayload? = nil, + committer: Components.Schemas.commit.committerPayload? = nil, parents: Components.Schemas.commit.parentsPayload, stats: Components.Schemas.commit.statsPayload? = nil, files: [Components.Schemas.diff_hyphen_entry]? = nil @@ -3318,7 +3398,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-simple/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-simple/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/html_url`. @@ -3626,7 +3706,7 @@ public enum Components { /// - draft: Indicates whether or not the pull request is a draft. public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, html_url: Swift.String, diff_url: Swift.String, @@ -3749,11 +3829,11 @@ public enum Components { /// The ID of the pull request review to which the comment belongs. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/pull_request_review_id`. - public var pull_request_review_id: Swift.Int? + public var pull_request_review_id: Swift.Int64? /// The ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The node ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/node_id`. @@ -3971,8 +4051,8 @@ public enum Components { /// - body_text: public init( url: Swift.String, - pull_request_review_id: Swift.Int? = nil, - id: Swift.Int, + pull_request_review_id: Swift.Int64? = nil, + id: Swift.Int64, node_id: Swift.String, diff_hunk: Swift.String, path: Swift.String, @@ -4069,7 +4149,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/html_url`. @@ -4945,7 +5025,7 @@ public enum Components { /// - 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.Int + 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`. @@ -4995,7 +5075,7 @@ public enum Components { gists_url: Swift.String, gravatar_id: Swift.String? = nil, html_url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, login: Swift.String, organizations_url: Swift.String, @@ -5790,7 +5870,7 @@ public enum Components { /// - 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.Int + 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`. @@ -5840,7 +5920,7 @@ public enum Components { gists_url: Swift.String, gravatar_id: Swift.String? = nil, html_url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, login: Swift.String, organizations_url: Swift.String, @@ -6073,7 +6153,7 @@ public enum Components { /// - changed_files: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, html_url: Swift.String, diff_url: Swift.String, @@ -6284,7 +6364,7 @@ public enum Components { /// Unique identifier of the review /// /// - Remark: Generated from `#/components/schemas/pull-request-review/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-review/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-review/user`. @@ -6383,7 +6463,7 @@ public enum Components { /// - body_text: /// - author_association: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, user: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, body: Swift.String, @@ -6434,9 +6514,9 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/review-comment/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/review-comment/pull_request_review_id`. - public var pull_request_review_id: Swift.Int? + public var pull_request_review_id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/review-comment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/review-comment/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/review-comment/diff_hunk`. @@ -6575,8 +6655,8 @@ public enum Components { /// - original_start_line: The original first line of the range for a multi-line comment. public init( url: Swift.String, - pull_request_review_id: Swift.Int? = nil, - id: Swift.Int, + pull_request_review_id: Swift.Int64? = nil, + id: Swift.Int64, node_id: Swift.String, diff_hunk: Swift.String, path: Swift.String, @@ -9858,8 +9938,8 @@ public enum Operations { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// 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)." /// @@ -11508,7 +11588,8 @@ public enum Operations { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// 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. /// @@ -12671,9 +12752,8 @@ public enum Operations { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// 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/rate-limit/Client.swift b/Sources/rate-limit/Client.swift index 343a675a408..5cfda7888c1 100644 --- a/Sources/rate-limit/Client.swift +++ b/Sources/rate-limit/Client.swift @@ -40,7 +40,8 @@ public struct Client: APIProtocol { } /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -53,7 +54,8 @@ public struct Client: APIProtocol { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * 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. + /// > [!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. /// /// - 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 cedd3ad37c7..dc38c7028d0 100644 --- a/Sources/rate-limit/Types.swift +++ b/Sources/rate-limit/Types.swift @@ -13,7 +13,8 @@ import struct Foundation.Date public protocol APIProtocol: Sendable { /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -26,7 +27,8 @@ public protocol APIProtocol: Sendable { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * 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. + /// > [!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. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. @@ -37,7 +39,8 @@ public protocol APIProtocol: Sendable { extension APIProtocol { /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -50,7 +53,8 @@ extension APIProtocol { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * 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. + /// > [!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. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. @@ -296,7 +300,8 @@ public enum Components { public enum Operations { /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -309,7 +314,8 @@ public enum Operations { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * 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. + /// > [!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. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. diff --git a/Sources/reactions/Client.swift b/Sources/reactions/Client.swift index b8abadb7cb1..21656304d0d 100644 --- a/Sources/reactions/Client.swift +++ b/Sources/reactions/Client.swift @@ -42,7 +42,8 @@ public struct Client: APIProtocol { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -144,7 +145,8 @@ public struct Client: APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -244,7 +246,8 @@ public struct Client: APIProtocol { } /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -294,7 +297,8 @@ public struct Client: APIProtocol { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -395,7 +399,8 @@ public struct Client: APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -494,7 +499,8 @@ public struct Client: APIProtocol { } /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -777,7 +783,8 @@ public struct Client: APIProtocol { } /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -1058,7 +1065,8 @@ public struct Client: APIProtocol { } /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -1361,7 +1369,8 @@ public struct Client: APIProtocol { } /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -1642,7 +1651,8 @@ public struct Client: APIProtocol { } /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -1923,7 +1933,8 @@ public struct Client: APIProtocol { } /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -1968,7 +1979,8 @@ public struct Client: APIProtocol { } /// List reactions for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -2068,7 +2080,8 @@ public struct Client: APIProtocol { } /// Create reaction for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -2150,7 +2163,8 @@ public struct Client: APIProtocol { } /// List reactions for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -2249,7 +2263,8 @@ public struct Client: APIProtocol { } /// Create reaction for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// 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 f62657db493..4d42b545b3a 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -15,7 +15,8 @@ public protocol APIProtocol: Sendable { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -28,7 +29,8 @@ public protocol APIProtocol: Sendable { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -37,7 +39,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_in_hyphen_org(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_in_hyphen_org.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_in_hyphen_org.Output /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -50,7 +53,8 @@ public protocol APIProtocol: Sendable { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -63,7 +67,8 @@ public protocol APIProtocol: Sendable { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -72,7 +77,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_in_hyphen_org(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_in_hyphen_org.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_in_hyphen_org.Output /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -97,7 +103,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_commit_hyphen_comment(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_commit_hyphen_comment.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_commit_hyphen_comment.Output /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -120,7 +127,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_issue_hyphen_comment(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_issue_hyphen_comment.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_issue_hyphen_comment.Output /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -143,7 +151,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_issue(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_issue.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_issue.Output /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -166,7 +175,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_pull_hyphen_request_hyphen_review_hyphen_comment(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_pull_hyphen_request_hyphen_review_hyphen_comment.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_pull_hyphen_request_hyphen_review_hyphen_comment.Output /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -189,7 +199,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_release(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_release.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_release.Output /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -198,7 +209,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_delete_hyphen_for_hyphen_release(_ input: Operations.reactions_sol_delete_hyphen_for_hyphen_release.Input) async throws -> Operations.reactions_sol_delete_hyphen_for_hyphen_release.Output /// List reactions for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -210,7 +222,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Create reaction for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -224,7 +237,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// List reactions for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -236,7 +250,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_legacy(_ input: Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_legacy.Output /// Create reaction for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -256,7 +271,8 @@ extension APIProtocol { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -279,7 +295,8 @@ extension APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -298,7 +315,8 @@ extension APIProtocol { } /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -313,7 +331,8 @@ extension APIProtocol { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -336,7 +355,8 @@ extension APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -355,7 +375,8 @@ extension APIProtocol { } /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -402,7 +423,8 @@ extension APIProtocol { } /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -447,7 +469,8 @@ extension APIProtocol { } /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -492,7 +515,8 @@ extension APIProtocol { } /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -537,7 +561,8 @@ extension APIProtocol { } /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -582,7 +607,8 @@ extension APIProtocol { } /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -593,7 +619,8 @@ extension APIProtocol { } /// List reactions for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -615,7 +642,8 @@ extension APIProtocol { } /// Create reaction for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -639,7 +667,8 @@ extension APIProtocol { } /// List reactions for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -661,7 +690,8 @@ extension APIProtocol { } /// Create reaction for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -747,7 +777,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -810,7 +840,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1069,6 +1099,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. @@ -1085,10 +1119,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/org`. public typealias org = Swift.String - /// The slug of the team name. - /// - /// - Remark: Generated from `#/components/parameters/team-slug`. - public typealias team_hyphen_slug = Swift.String /// The number that identifies the discussion. /// /// - Remark: Generated from `#/components/parameters/discussion-number`. @@ -1216,7 +1246,8 @@ public enum Operations { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -1441,7 +1472,8 @@ public enum Operations { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1688,7 +1720,8 @@ public enum Operations { } /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -1790,7 +1823,8 @@ public enum Operations { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -2008,7 +2042,8 @@ public enum Operations { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -2248,7 +2283,8 @@ public enum Operations { } /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -2837,7 +2873,8 @@ public enum Operations { } /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -3424,7 +3461,8 @@ public enum Operations { } /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -4034,7 +4072,8 @@ public enum Operations { } /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -4621,7 +4660,8 @@ public enum Operations { } /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -5204,7 +5244,8 @@ public enum Operations { } /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -5295,7 +5336,8 @@ public enum Operations { } /// List reactions for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -5511,7 +5553,8 @@ public enum Operations { } /// Create reaction for a team discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -5704,7 +5747,8 @@ public enum Operations { } /// List reactions for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -5913,7 +5957,8 @@ public enum Operations { } /// Create reaction for a team discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 4fd5a8a824a..de935b61842 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -42,7 +42,8 @@ public struct Client: APIProtocol { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -536,6 +537,13 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "ref", + value: input.query.ref + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -778,6 +786,9 @@ public struct Client: APIProtocol { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. public func repos_sol_get_hyphen_org_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Output { @@ -1096,7 +1107,8 @@ public struct Client: APIProtocol { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -1659,6 +1671,219 @@ public struct Client: APIProtocol { } ) } + /// Create an attestation + /// + /// 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. + /// + /// 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). + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + public func repos_sol_create_hyphen_attestation(_ input: Operations.repos_sol_create_hyphen_attestation.Input) async throws -> Operations.repos_sol_create_hyphen_attestation.Output { + try await client.send( + input: input, + forOperation: Operations.repos_sol_create_hyphen_attestation.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/attestations", + parameters: [ + input.path.owner, + input.path.repo + ] + ) + 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.repos_sol_create_hyphen_attestation.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.repos_sol_create_hyphen_attestation.Output.Created.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.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 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, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. + /// + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + public func repos_sol_list_hyphen_attestations(_ input: Operations.repos_sol_list_hyphen_attestations.Input) async throws -> Operations.repos_sol_list_hyphen_attestations.Output { + try await client.send( + input: input, + forOperation: Operations.repos_sol_list_hyphen_attestations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/attestations/{}", + parameters: [ + input.path.owner, + input.path.repo, + input.path.subject_digest + ] + ) + 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: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + 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.repos_sol_list_hyphen_attestations.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.repos_sol_list_hyphen_attestations.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 + ) + ) + } + } + ) + } /// Get all autolinks of a repository /// /// Gets all autolinks that are configured for a repository. @@ -2459,9 +2684,11 @@ public struct Client: APIProtocol { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -2944,7 +3171,8 @@ public struct Client: APIProtocol { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -3115,7 +3343,8 @@ public struct Client: APIProtocol { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -4093,7 +4322,8 @@ public struct Client: APIProtocol { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -5418,7 +5648,8 @@ public struct Client: APIProtocol { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -5980,7 +6211,8 @@ public struct Client: APIProtocol { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -7239,7 +7471,8 @@ public struct Client: APIProtocol { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// 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)." Pagination query parameters are not supported for these media types. /// @@ -8093,6 +8326,8 @@ public struct Client: APIProtocol { return .forbidden(.init(body: body)) case 302: return .found(.init()) + case 304: + return .notModified(.init()) default: return .undocumented( statusCode: response.status.code, @@ -8109,7 +8344,8 @@ public struct Client: APIProtocol { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -8240,7 +8476,7 @@ public struct Client: APIProtocol { return .unprocessableContent(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.conflict.Body + let body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8250,7 +8486,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.basic_hyphen_error.self, + Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) @@ -8282,7 +8518,8 @@ public struct Client: APIProtocol { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -9549,7 +9786,8 @@ public struct Client: APIProtocol { } /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -9621,9 +9859,11 @@ public struct Client: APIProtocol { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -10276,7 +10516,9 @@ public struct Client: APIProtocol { } /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -10607,9 +10849,11 @@ public struct Client: APIProtocol { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -11914,7 +12158,8 @@ public struct Client: APIProtocol { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -14500,6 +14745,8 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .ok(.init(body: body)) + case 304: + return .notModified(.init()) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.not_found.Body @@ -15381,9 +15628,8 @@ public struct Client: APIProtocol { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -16387,6 +16633,9 @@ public struct Client: APIProtocol { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. public func repos_sol_get_hyphen_repo_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Output { @@ -16713,12 +16962,10 @@ public struct Client: APIProtocol { } /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -16906,7 +17153,8 @@ public struct Client: APIProtocol { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -17331,8 +17579,8 @@ public struct Client: APIProtocol { } /// Deprecated - List tag protection states for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!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. /// /// This returns the tag protection states of a repository. /// @@ -17446,8 +17694,8 @@ public struct Client: APIProtocol { } /// Deprecated - Create a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -17569,8 +17817,8 @@ public struct Client: APIProtocol { } /// Deprecated - Delete a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -17667,7 +17915,9 @@ public struct Client: APIProtocol { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -18613,7 +18863,8 @@ public struct Client: APIProtocol { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index f9a4d08a5f8..f498e59a45c 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -15,7 +15,8 @@ public protocol APIProtocol: Sendable { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -63,6 +64,9 @@ public protocol APIProtocol: Sendable { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. func repos_sol_get_hyphen_org_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Output @@ -84,7 +88,8 @@ public protocol APIProtocol: Sendable { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -118,6 +123,28 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /repos/{owner}/{repo}/activity`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)`. func repos_sol_list_hyphen_activities(_ input: Operations.repos_sol_list_hyphen_activities.Input) async throws -> Operations.repos_sol_list_hyphen_activities.Output + /// Create an attestation + /// + /// 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. + /// + /// 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). + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + func repos_sol_create_hyphen_attestation(_ input: Operations.repos_sol_create_hyphen_attestation.Input) async throws -> Operations.repos_sol_create_hyphen_attestation.Output + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. + /// + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + func repos_sol_list_hyphen_attestations(_ input: Operations.repos_sol_list_hyphen_attestations.Input) async throws -> Operations.repos_sol_list_hyphen_attestations.Output /// Get all autolinks of a repository /// /// Gets all autolinks that are configured for a repository. @@ -200,9 +227,11 @@ public protocol APIProtocol: Sendable { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -252,7 +281,8 @@ public protocol APIProtocol: Sendable { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -270,7 +300,8 @@ public protocol APIProtocol: Sendable { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -350,7 +381,8 @@ public protocol APIProtocol: Sendable { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -488,7 +520,8 @@ public protocol APIProtocol: Sendable { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -580,7 +613,8 @@ public protocol APIProtocol: Sendable { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -737,7 +771,8 @@ public protocol APIProtocol: Sendable { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// 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)." Pagination query parameters are not supported for these media types. /// @@ -908,7 +943,8 @@ public protocol APIProtocol: Sendable { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -925,7 +961,8 @@ public protocol APIProtocol: Sendable { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -1072,7 +1109,8 @@ public protocol APIProtocol: Sendable { func repos_sol_get_hyphen_all_hyphen_environments(_ input: Operations.repos_sol_get_hyphen_all_hyphen_environments.Input) async throws -> Operations.repos_sol_get_hyphen_all_hyphen_environments.Output /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -1085,9 +1123,11 @@ public protocol APIProtocol: Sendable { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -1176,7 +1216,9 @@ public protocol APIProtocol: Sendable { func repos_sol_create_hyphen_deployment_hyphen_protection_hyphen_rule(_ input: Operations.repos_sol_create_hyphen_deployment_hyphen_protection_hyphen_rule.Input) async throws -> Operations.repos_sol_create_hyphen_deployment_hyphen_protection_hyphen_rule.Output /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -1220,9 +1262,11 @@ public protocol APIProtocol: Sendable { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -1313,7 +1357,8 @@ public protocol APIProtocol: Sendable { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -1635,9 +1680,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -1732,6 +1776,9 @@ public protocol APIProtocol: Sendable { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. func repos_sol_get_hyphen_repo_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Output @@ -1751,12 +1798,10 @@ public protocol APIProtocol: Sendable { func repos_sol_delete_hyphen_repo_hyphen_ruleset(_ input: Operations.repos_sol_delete_hyphen_repo_hyphen_ruleset.Input) async throws -> Operations.repos_sol_delete_hyphen_repo_hyphen_ruleset.Output /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -1778,7 +1823,8 @@ public protocol APIProtocol: Sendable { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -1825,8 +1871,8 @@ public protocol APIProtocol: Sendable { 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 /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!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. /// /// This returns the tag protection states of a repository. /// @@ -1838,8 +1884,8 @@ public protocol APIProtocol: Sendable { 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 /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -1850,8 +1896,8 @@ public protocol APIProtocol: Sendable { 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 /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -1865,7 +1911,9 @@ public protocol APIProtocol: Sendable { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -1959,7 +2007,8 @@ public protocol APIProtocol: Sendable { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. @@ -2038,7 +2087,8 @@ extension APIProtocol { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -2144,6 +2194,9 @@ extension APIProtocol { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. public func repos_sol_get_hyphen_org_hyphen_ruleset( @@ -2191,7 +2244,8 @@ extension APIProtocol { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -2261,6 +2315,48 @@ extension APIProtocol { headers: headers )) } + /// Create an attestation + /// + /// 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. + /// + /// 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). + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + public func repos_sol_create_hyphen_attestation( + path: Operations.repos_sol_create_hyphen_attestation.Input.Path, + headers: Operations.repos_sol_create_hyphen_attestation.Input.Headers = .init(), + body: Operations.repos_sol_create_hyphen_attestation.Input.Body + ) async throws -> Operations.repos_sol_create_hyphen_attestation.Output { + try await repos_sol_create_hyphen_attestation(Operations.repos_sol_create_hyphen_attestation.Input( + path: path, + headers: headers, + body: body + )) + } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. + /// + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + public func repos_sol_list_hyphen_attestations( + path: Operations.repos_sol_list_hyphen_attestations.Input.Path, + query: Operations.repos_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.repos_sol_list_hyphen_attestations.Input.Headers = .init() + ) async throws -> Operations.repos_sol_list_hyphen_attestations.Output { + try await repos_sol_list_hyphen_attestations(Operations.repos_sol_list_hyphen_attestations.Input( + path: path, + query: query, + headers: headers + )) + } /// Get all autolinks of a repository /// /// Gets all autolinks that are configured for a repository. @@ -2415,9 +2511,11 @@ extension APIProtocol { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -2517,7 +2615,8 @@ extension APIProtocol { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -2553,7 +2652,8 @@ extension APIProtocol { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -2715,7 +2815,8 @@ extension APIProtocol { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -2977,7 +3078,8 @@ extension APIProtocol { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -3111,7 +3213,8 @@ extension APIProtocol { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -3368,7 +3471,8 @@ extension APIProtocol { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// 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)." Pagination query parameters are not supported for these media types. /// @@ -3597,7 +3701,8 @@ extension APIProtocol { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -3624,7 +3729,8 @@ extension APIProtocol { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -3875,7 +3981,8 @@ extension APIProtocol { } /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -3896,9 +4003,11 @@ extension APIProtocol { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -4057,7 +4166,9 @@ extension APIProtocol { } /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -4131,9 +4242,11 @@ extension APIProtocol { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -4332,7 +4445,8 @@ extension APIProtocol { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -4974,9 +5088,8 @@ extension APIProtocol { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -5161,6 +5274,9 @@ extension APIProtocol { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. public func repos_sol_get_hyphen_repo_hyphen_ruleset( @@ -5208,12 +5324,10 @@ extension APIProtocol { } /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -5251,7 +5365,8 @@ extension APIProtocol { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -5342,8 +5457,8 @@ extension APIProtocol { } /// Deprecated - List tag protection states for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!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. /// /// This returns the tag protection states of a repository. /// @@ -5363,8 +5478,8 @@ extension APIProtocol { } /// Deprecated - Create a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -5385,8 +5500,8 @@ extension APIProtocol { } /// Deprecated - Delete a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -5408,7 +5523,9 @@ extension APIProtocol { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -5586,7 +5703,8 @@ extension APIProtocol { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. @@ -5754,7 +5872,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -5817,7 +5935,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -5961,7 +6079,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -6024,7 +6142,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -6103,6 +6221,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -6233,8 +6353,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/webhook_secret`. @@ -6247,6 +6365,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -6257,7 +6376,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -6265,6 +6383,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -6275,7 +6394,6 @@ public enum Components { permissions: Components.Schemas.integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -6283,6 +6401,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -6293,7 +6412,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -6302,6 +6420,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -6312,7 +6431,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -6986,7 +7104,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -7429,7 +7547,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -7762,6 +7880,251 @@ public enum Components { case html_url } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// A collection of related issues and pull requests. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone`. @@ -7898,6 +8261,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -8028,8 +8393,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -8042,6 +8405,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -8052,7 +8416,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -8060,6 +8423,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -8070,7 +8434,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -8078,6 +8441,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -8088,7 +8452,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -8097,6 +8460,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -8107,7 +8471,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -8295,6 +8658,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -8302,22 +8687,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -8325,7 +8714,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -8673,7 +9062,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -8949,251 +9338,6 @@ public enum Components { try decoder.ensureNoAdditionalProperties(knownKeys: []) } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } /// Custom property name and associated value /// /// - Remark: Generated from `#/components/schemas/custom-property-value`. @@ -9267,7 +9411,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/nullable-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -9710,7 +9854,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -10042,7 +10186,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/full-repository`. public struct full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/full-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/full-repository/name`. @@ -10491,7 +10635,7 @@ public enum Components { /// - security_and_analysis: /// - custom_properties: The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -11014,21 +11158,36 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/property_values`. public var property_values: [Swift.String] + /// The source of the repository property. Defaults to 'custom' if not specified. + /// + /// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/source`. + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + case custom = "custom" + case system = "system" + } + /// The source of the repository property. Defaults to 'custom' if not specified. + /// + /// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/source`. + public var source: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec.sourcePayload? /// Creates a new `repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec`. /// /// - Parameters: /// - name: The name of the repository property to target /// - property_values: The values to match for the repository property + /// - source: The source of the repository property. Defaults to 'custom' if not specified. public init( name: Swift.String, - property_values: [Swift.String] + property_values: [Swift.String], + source: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec.sourcePayload? = nil ) { self.name = name self.property_values = property_values + self.source = source } public enum CodingKeys: String, CodingKey { case name case property_values + case source } } /// Parameters for a repository property condition @@ -11325,6 +11484,117 @@ public enum Components { case _type = "type" } } + /// Merges must be performed via a merge queue. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue`. + public struct repository_hyphen_rule_hyphen_merge_hyphen_queue: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/type`. + @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + case merge_queue = "merge_queue" + } + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/type`. + public var _type: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters`. + public struct parametersPayload: Codable, Hashable, Sendable { + /// Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/check_response_timeout_minutes`. + public var check_response_timeout_minutes: Swift.Int + /// When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/grouping_strategy`. + @frozen public enum grouping_strategyPayload: String, Codable, Hashable, Sendable { + case ALLGREEN = "ALLGREEN" + case HEADGREEN = "HEADGREEN" + } + /// When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/grouping_strategy`. + public var grouping_strategy: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.grouping_strategyPayload + /// Limit the number of queued pull requests requesting checks and workflow runs at the same time. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/max_entries_to_build`. + public var max_entries_to_build: Swift.Int + /// The maximum number of PRs that will be merged together in a group. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/max_entries_to_merge`. + public var max_entries_to_merge: Swift.Int + /// Method to use when merging changes from queued pull requests. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/merge_method`. + @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable { + case MERGE = "MERGE" + case SQUASH = "SQUASH" + case REBASE = "REBASE" + } + /// Method to use when merging changes from queued pull requests. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/merge_method`. + public var merge_method: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.merge_methodPayload + /// The minimum number of PRs that will be merged together in a group. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/min_entries_to_merge`. + public var min_entries_to_merge: Swift.Int + /// The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/min_entries_to_merge_wait_minutes`. + public var min_entries_to_merge_wait_minutes: Swift.Int + /// Creates a new `parametersPayload`. + /// + /// - Parameters: + /// - check_response_timeout_minutes: Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed + /// - grouping_strategy: When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + /// - max_entries_to_build: Limit the number of queued pull requests requesting checks and workflow runs at the same time. + /// - max_entries_to_merge: The maximum number of PRs that will be merged together in a group. + /// - merge_method: Method to use when merging changes from queued pull requests. + /// - min_entries_to_merge: The minimum number of PRs that will be merged together in a group. + /// - min_entries_to_merge_wait_minutes: The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. + public init( + check_response_timeout_minutes: Swift.Int, + grouping_strategy: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.grouping_strategyPayload, + max_entries_to_build: Swift.Int, + max_entries_to_merge: Swift.Int, + merge_method: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.merge_methodPayload, + min_entries_to_merge: Swift.Int, + min_entries_to_merge_wait_minutes: Swift.Int + ) { + self.check_response_timeout_minutes = check_response_timeout_minutes + self.grouping_strategy = grouping_strategy + self.max_entries_to_build = max_entries_to_build + self.max_entries_to_merge = max_entries_to_merge + self.merge_method = merge_method + self.min_entries_to_merge = min_entries_to_merge + self.min_entries_to_merge_wait_minutes = min_entries_to_merge_wait_minutes + } + public enum CodingKeys: String, CodingKey { + case check_response_timeout_minutes + case grouping_strategy + case max_entries_to_build + case max_entries_to_merge + case merge_method + case min_entries_to_merge + case min_entries_to_merge_wait_minutes + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload? + /// Creates a new `repository_hyphen_rule_hyphen_merge_hyphen_queue`. + /// + /// - Parameters: + /// - _type: + /// - parameters: + public init( + _type: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue._typePayload, + parameters: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload? = nil + ) { + self._type = _type + self.parameters = parameters + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case parameters + } + } /// Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. /// /// - Remark: Generated from `#/components/schemas/repository-rule-required-deployments`. @@ -11513,6 +11783,10 @@ public enum Components { public var _type: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks._typePayload /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/parameters/do_not_enforce_on_create`. + public var do_not_enforce_on_create: Swift.Bool? /// Status checks that are required. /// /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/parameters/required_status_checks`. @@ -11524,16 +11798,20 @@ public enum Components { /// Creates a new `parametersPayload`. /// /// - Parameters: + /// - do_not_enforce_on_create: Allow repositories and branches to be created if a check would otherwise prohibit it. /// - required_status_checks: Status checks that are required. /// - strict_required_status_checks_policy: Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. public init( + do_not_enforce_on_create: Swift.Bool? = nil, required_status_checks: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_status_hyphen_check_hyphen_configuration], strict_required_status_checks_policy: Swift.Bool ) { + self.do_not_enforce_on_create = do_not_enforce_on_create self.required_status_checks = required_status_checks self.strict_required_status_checks_policy = strict_required_status_checks_policy } public enum CodingKeys: String, CodingKey { + case do_not_enforce_on_create case required_status_checks case strict_required_status_checks_policy } @@ -12040,6 +12318,10 @@ public enum Components { public var _type: Components.Schemas.repository_hyphen_rule_hyphen_workflows._typePayload /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/parameters/do_not_enforce_on_create`. + public var do_not_enforce_on_create: Swift.Bool? /// Workflows that must pass for this rule to pass. /// /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/parameters/workflows`. @@ -12047,11 +12329,17 @@ public enum Components { /// Creates a new `parametersPayload`. /// /// - Parameters: + /// - do_not_enforce_on_create: Allow repositories and branches to be created if a check would otherwise prohibit it. /// - workflows: Workflows that must pass for this rule to pass. - public init(workflows: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_workflow_hyphen_file_hyphen_reference]) { + public init( + do_not_enforce_on_create: Swift.Bool? = nil, + workflows: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_workflow_hyphen_file_hyphen_reference] + ) { + self.do_not_enforce_on_create = do_not_enforce_on_create self.workflows = workflows } public enum CodingKeys: String, CodingKey { + case do_not_enforce_on_create case workflows } } @@ -12189,42 +12477,45 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule/case4`. case repository_hyphen_rule_hyphen_required_hyphen_linear_hyphen_history(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_linear_hyphen_history) /// - Remark: Generated from `#/components/schemas/repository-rule/case5`. - case repository_hyphen_rule_hyphen_required_hyphen_deployments(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments) + case repository_hyphen_rule_hyphen_merge_hyphen_queue(Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue) /// - Remark: Generated from `#/components/schemas/repository-rule/case6`. - case repository_hyphen_rule_hyphen_required_hyphen_signatures(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures) + case repository_hyphen_rule_hyphen_required_hyphen_deployments(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments) /// - Remark: Generated from `#/components/schemas/repository-rule/case7`. - case repository_hyphen_rule_hyphen_pull_hyphen_request(Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request) + case repository_hyphen_rule_hyphen_required_hyphen_signatures(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures) /// - Remark: Generated from `#/components/schemas/repository-rule/case8`. - case repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks) + case repository_hyphen_rule_hyphen_pull_hyphen_request(Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request) /// - Remark: Generated from `#/components/schemas/repository-rule/case9`. - case repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward(Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward) + case repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks) /// - Remark: Generated from `#/components/schemas/repository-rule/case10`. - case repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern) + case repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward(Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward) /// - Remark: Generated from `#/components/schemas/repository-rule/case11`. - case repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern) + case repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case12`. - case repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern) + case repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case13`. - case repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern) + case repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case14`. + 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. + /// > [!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/case15`. - public struct Case15Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. + public struct Case16Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case file_path_restriction = "file_path_restriction" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case15Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The file paths that are restricted from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/parameters/restricted_file_paths`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters/restricted_file_paths`. public var restricted_file_paths: [Swift.String] /// Creates a new `parametersPayload`. /// @@ -12237,16 +12528,16 @@ public enum Components { case restricted_file_paths } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case15Payload.parametersPayload? - /// Creates a new `Case15Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? + /// Creates a new `Case16Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case15Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case15Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12256,29 +12547,31 @@ public enum Components { case parameters } } - /// Note: file_path_restriction is in beta and subject to change. + /// > [!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/case15`. - case case15(Components.Schemas.repository_hyphen_rule.Case15Payload) - /// Note: max_file_path_length is in beta and subject to change. + /// - 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/case16`. - public struct Case16Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. + public struct Case17Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case max_file_path_length = "max_file_path_length" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The maximum amount of characters allowed in file paths /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters/max_file_path_length`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters/max_file_path_length`. public var max_file_path_length: Swift.Int /// Creates a new `parametersPayload`. /// @@ -12291,16 +12584,16 @@ public enum Components { case max_file_path_length } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? - /// Creates a new `Case16Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? + /// Creates a new `Case17Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12310,29 +12603,31 @@ public enum Components { case parameters } } - /// Note: max_file_path_length is in beta and subject to change. + /// > [!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/case16`. - case case16(Components.Schemas.repository_hyphen_rule.Case16Payload) - /// Note: file_extension_restriction is in beta and subject to change. + /// - 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/case17`. - public struct Case17Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. + public struct Case18Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case file_extension_restriction = "file_extension_restriction" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The file extensions that are restricted from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters/restricted_file_extensions`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters/restricted_file_extensions`. public var restricted_file_extensions: [Swift.String] /// Creates a new `parametersPayload`. /// @@ -12345,16 +12640,16 @@ public enum Components { case restricted_file_extensions } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? - /// Creates a new `Case17Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? + /// Creates a new `Case18Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12364,29 +12659,31 @@ public enum Components { case parameters } } - /// Note: file_extension_restriction is in beta and subject to change. + /// > [!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/case17`. - case case17(Components.Schemas.repository_hyphen_rule.Case17Payload) - /// Note: max_file_size is in beta and subject to change. + /// - 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/case18`. - public struct Case18Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. + public struct Case19Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case max_file_size = "max_file_size" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case19Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters/max_file_size`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/parameters/max_file_size`. public var max_file_size: Swift.Int /// Creates a new `parametersPayload`. /// @@ -12399,16 +12696,16 @@ public enum Components { case max_file_size } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? - /// Creates a new `Case18Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case19Payload.parametersPayload? + /// Creates a new `Case19Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case19Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case19Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12418,15 +12715,16 @@ public enum Components { case parameters } } - /// Note: max_file_size is in beta and subject to change. + /// > [!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/case18`. - case case18(Components.Schemas.repository_hyphen_rule.Case18Payload) /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. - case repository_hyphen_rule_hyphen_workflows(Components.Schemas.repository_hyphen_rule_hyphen_workflows) + case case19(Components.Schemas.repository_hyphen_rule.Case19Payload) /// - Remark: Generated from `#/components/schemas/repository-rule/case20`. + case repository_hyphen_rule_hyphen_workflows(Components.Schemas.repository_hyphen_rule_hyphen_workflows) + /// - Remark: Generated from `#/components/schemas/repository-rule/case21`. case repository_hyphen_rule_hyphen_code_hyphen_scanning(Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning) public init(from decoder: any Decoder) throws { var errors: [any Error] = [] @@ -12454,6 +12752,12 @@ public enum Components { } catch { errors.append(error) } + do { + self = .repository_hyphen_rule_hyphen_merge_hyphen_queue(try .init(from: decoder)) + return + } catch { + errors.append(error) + } do { self = .repository_hyphen_rule_hyphen_required_hyphen_deployments(try .init(from: decoder)) return @@ -12515,25 +12819,25 @@ public enum Components { errors.append(error) } do { - self = .case15(try .init(from: decoder)) + self = .case16(try .init(from: decoder)) return } catch { errors.append(error) } do { - self = .case16(try .init(from: decoder)) + self = .case17(try .init(from: decoder)) return } catch { errors.append(error) } do { - self = .case17(try .init(from: decoder)) + self = .case18(try .init(from: decoder)) return } catch { errors.append(error) } do { - self = .case18(try .init(from: decoder)) + self = .case19(try .init(from: decoder)) return } catch { errors.append(error) @@ -12566,6 +12870,8 @@ public enum Components { try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_required_hyphen_linear_hyphen_history(value): try value.encode(to: encoder) + case let .repository_hyphen_rule_hyphen_merge_hyphen_queue(value): + try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_required_hyphen_deployments(value): try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_required_hyphen_signatures(value): @@ -12586,14 +12892,14 @@ public enum Components { try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern(value): try value.encode(to: encoder) - case let .case15(value): - try value.encode(to: encoder) case let .case16(value): try value.encode(to: encoder) case let .case17(value): try value.encode(to: encoder) case let .case18(value): try value.encode(to: encoder) + case let .case19(value): + try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_workflows(value): try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_code_hyphen_scanning(value): @@ -12615,7 +12921,8 @@ 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. + /// > [!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 { @@ -12625,7 +12932,8 @@ public enum Components { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!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? @@ -13200,7 +13508,7 @@ public enum Components { /// Unique identifier of the deployment /// /// - Remark: Generated from `#/components/schemas/deployment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/deployment/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/deployment/sha`. @@ -13319,7 +13627,7 @@ public enum Components { /// - performed_via_github_app: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, sha: Swift.String, ref: Swift.String, @@ -13796,7 +14104,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/login`. public var login: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/id`. - public var id: Swift.Int? + public var id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/node_id`. public var node_id: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/avatar_url`. @@ -13852,7 +14160,7 @@ public enum Components { /// - site_admin: public init( login: Swift.String? = nil, - id: Swift.Int? = nil, + id: Swift.Int64? = nil, node_id: Swift.String? = nil, avatar_url: Swift.String? = nil, gravatar_id: Swift.String? = nil, @@ -14168,6 +14476,8 @@ public enum Components { public var owner: Components.Schemas.branch_hyphen_restriction_hyphen_policy.appsPayloadPayload.ownerPayload? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/name`. public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/description`. public var description: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/external_url`. @@ -14225,6 +14535,7 @@ public enum Components { /// - node_id: /// - owner: /// - name: + /// - client_id: /// - description: /// - external_url: /// - html_url: @@ -14238,6 +14549,7 @@ public enum Components { node_id: Swift.String? = nil, owner: Components.Schemas.branch_hyphen_restriction_hyphen_policy.appsPayloadPayload.ownerPayload? = nil, name: Swift.String? = nil, + client_id: Swift.String? = nil, description: Swift.String? = nil, external_url: Swift.String? = nil, html_url: Swift.String? = nil, @@ -14251,6 +14563,7 @@ public enum Components { self.node_id = node_id self.owner = owner self.name = name + self.client_id = client_id self.description = description self.external_url = external_url self.html_url = html_url @@ -14265,6 +14578,7 @@ public enum Components { case node_id case owner case name + case client_id case description case external_url case html_url @@ -14874,9 +15188,79 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/commit/commit`. public var commit: Components.Schemas.commit.commitPayload /// - Remark: Generated from `#/components/schemas/commit/author`. - public var author: Components.Schemas.nullable_hyphen_simple_hyphen_user? + @frozen public enum authorPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/author/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/author/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/commit/author`. + public var author: Components.Schemas.commit.authorPayload? + /// - Remark: Generated from `#/components/schemas/commit/committer`. + @frozen public enum committerPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/committer/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/committer/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + 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) + } + do { + self = .empty_hyphen_object(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) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } /// - Remark: Generated from `#/components/schemas/commit/committer`. - public var committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + public var committer: Components.Schemas.commit.committerPayload? /// - Remark: Generated from `#/components/schemas/commit/parentsPayload`. public struct parentsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/commit/parentsPayload/sha`. @@ -14964,8 +15348,8 @@ public enum Components { html_url: Swift.String, comments_url: Swift.String, commit: Components.Schemas.commit.commitPayload, - author: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + author: Components.Schemas.commit.authorPayload? = nil, + committer: Components.Schemas.commit.committerPayload? = nil, parents: Components.Schemas.commit.parentsPayload, stats: Components.Schemas.commit.statsPayload? = nil, files: [Components.Schemas.diff_hyphen_entry]? = nil @@ -15707,7 +16091,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/collaborator/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/collaborator/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/collaborator/email`. public var email: Swift.String? /// - Remark: Generated from `#/components/schemas/collaborator/name`. @@ -15816,7 +16200,7 @@ public enum Components { /// - role_name: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, email: Swift.String? = nil, name: Swift.String? = nil, node_id: Swift.String, @@ -15893,7 +16277,7 @@ public enum Components { /// Unique identifier of the repository invitation. /// /// - Remark: Generated from `#/components/schemas/repository-invitation/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository-invitation/repository`. public var repository: Components.Schemas.minimal_hyphen_repository /// - Remark: Generated from `#/components/schemas/repository-invitation/invitee`. @@ -15942,7 +16326,7 @@ public enum Components { /// - html_url: /// - node_id: public init( - id: Swift.Int, + id: Swift.Int64, repository: Components.Schemas.minimal_hyphen_repository, invitee: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, inviter: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, @@ -15984,7 +16368,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-collaborator/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-collaborator/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-collaborator/email`. public var email: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-collaborator/name`. @@ -16093,7 +16477,7 @@ public enum Components { /// - role_name: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, email: Swift.String? = nil, name: Swift.String? = nil, node_id: Swift.String, @@ -16420,7 +16804,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-simple/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-simple/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/html_url`. @@ -16728,7 +17112,7 @@ public enum Components { /// - draft: Indicates whether or not the pull request is a draft. public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, html_url: Swift.String, diff_url: Swift.String, @@ -18341,6 +18725,102 @@ public enum Components { case commit } } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. + public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String + /// Repository rule violation was detected + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error`. + public struct repository_hyphen_rule_hyphen_violation_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/status`. + public var status: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public struct metadataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public struct secret_scanningPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload`. + public struct bypass_placeholdersPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/placeholder_id`. + public var placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/token_type`. + public var token_type: Swift.String? + /// Creates a new `bypass_placeholdersPayloadPayload`. + /// + /// - Parameters: + /// - placeholder_id: + /// - token_type: + public init( + placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? = nil, + token_type: Swift.String? = nil + ) { + self.placeholder_id = placeholder_id + self.token_type = token_type + } + public enum CodingKeys: String, CodingKey { + case placeholder_id + case token_type + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public typealias bypass_placeholdersPayload = [Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayloadPayload] + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public var bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? + /// Creates a new `secret_scanningPayload`. + /// + /// - Parameters: + /// - bypass_placeholders: + public init(bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? = nil) { + self.bypass_placeholders = bypass_placeholders + } + public enum CodingKeys: String, CodingKey { + case bypass_placeholders + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public var secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? + /// Creates a new `metadataPayload`. + /// + /// - Parameters: + /// - secret_scanning: + public init(secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? = nil) { + self.secret_scanning = secret_scanning + } + public enum CodingKeys: String, CodingKey { + case secret_scanning + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public var metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? + /// Creates a new `repository_hyphen_rule_hyphen_violation_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - status: + /// - metadata: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + status: Swift.String? = nil, + metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.status = status + self.metadata = metadata + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case status + case metadata + } + } /// Contributor /// /// - Remark: Generated from `#/components/schemas/contributor`. @@ -18487,7 +18967,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/deployment-status/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/deployment-status/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/deployment-status/node_id`. public var node_id: Swift.String /// The state of the status. @@ -18558,7 +19038,7 @@ public enum Components { /// - performed_via_github_app: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, state: Components.Schemas.deployment_hyphen_status.statePayload, creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, @@ -18647,7 +19127,7 @@ public enum Components { /// The id of the environment. /// /// - Remark: Generated from `#/components/schemas/environment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/environment/node_id`. public var node_id: Swift.String /// The name of the environment. @@ -18927,7 +19407,7 @@ public enum Components { /// - protection_rules: Built-in deployment protection rules for the environment. /// - deployment_branch_policy: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, url: Swift.String, @@ -20671,7 +21151,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case5`. public struct Case5Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case5/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case5/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case5Payload`. @@ -20680,7 +21160,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments, + value1: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20700,7 +21180,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case6`. public struct Case6Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case6/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case6/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case6Payload`. @@ -20709,7 +21189,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures, + value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20729,7 +21209,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case7`. public struct Case7Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case7/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case7/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case7Payload`. @@ -20738,7 +21218,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request, + value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20758,7 +21238,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case8`. public struct Case8Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case8/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case8/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case8Payload`. @@ -20767,7 +21247,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks, + value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20787,7 +21267,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case9`. public struct Case9Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case9/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case9/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case9Payload`. @@ -20796,7 +21276,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward, + value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20816,7 +21296,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case10`. public struct Case10Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case10/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case10/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case10Payload`. @@ -20825,7 +21305,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20845,7 +21325,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case11`. public struct Case11Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case11/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case11/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case11Payload`. @@ -20854,7 +21334,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20874,7 +21354,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case12`. public struct Case12Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case12/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case12/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case12Payload`. @@ -20883,7 +21363,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20903,7 +21383,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case13`. public struct Case13Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case13/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case13/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case13Payload`. @@ -20912,7 +21392,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20932,7 +21412,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case14`. public struct Case14Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case14/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case14/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case14Payload`. @@ -20941,7 +21421,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20961,7 +21441,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15`. public struct Case15Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case15Payload`. @@ -20970,7 +21450,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows, + value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20990,7 +21470,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16`. public struct Case16Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case16Payload`. @@ -20999,7 +21479,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning, + value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21016,6 +21496,35 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16`. case case16(Components.Schemas.repository_hyphen_rule_hyphen_detailed.Case16Payload) + /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17`. + public struct Case17Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17/value1`. + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning + /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17/value2`. + public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info + /// Creates a new `Case17Payload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning, + value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info + ) { + 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/repository-rule-detailed/case17`. + case case17(Components.Schemas.repository_hyphen_rule_hyphen_detailed.Case17Payload) public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { @@ -21114,6 +21623,12 @@ public enum Components { } catch { errors.append(error) } + do { + self = .case17(try .init(from: decoder)) + return + } catch { + errors.append(error) + } throw Swift.DecodingError.failedToDecodeOneOfSchema( type: Self.self, codingPath: decoder.codingPath, @@ -21154,6 +21669,8 @@ public enum Components { try value.encode(to: encoder) case let .case16(value): try value.encode(to: encoder) + case let .case17(value): + try value.encode(to: encoder) } } } @@ -21600,10 +22117,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int - /// Only show results that were last updated after the given time. 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/since`. - public typealias since = Foundation.Date /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. @@ -21632,6 +22145,11 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/invitation-id`. 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. /// /// - Remark: Generated from `#/components/parameters/repository-name-in-query`. @@ -21748,10 +22266,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/release-id`. public typealias release_hyphen_id = Swift.Int - /// The name of the ref. Cannot contain wildcard characters. 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 unique identifier of the tag protection. /// /// - Remark: Generated from `#/components/parameters/tag-protection-id`. @@ -22195,7 +22709,8 @@ public enum Operations { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -22543,6 +23058,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/use_squash_pr_title_as_default`. @available(*, deprecated) public var use_squash_pr_title_as_default: Swift.Bool? + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -22553,6 +23070,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -22580,6 +23099,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/squash_merge_commit_message`. public var squash_merge_commit_message: Operations.repos_sol_create_hyphen_in_hyphen_org.Input.Body.jsonPayload.squash_merge_commit_messagePayload? + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -22590,6 +23111,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -22664,9 +23187,9 @@ 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. **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. - /// - squash_merge_commit_title: The default value for a squash merge commit title: + /// - 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: The default value for a merge commit title. + /// - merge_commit_title: Required when using `merge_commit_message`. /// - merge_commit_message: The default value for a merge commit message. /// - custom_properties: The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( @@ -23169,7 +23692,8 @@ 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. + /// > [!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 { @@ -23179,7 +23703,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!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? @@ -23404,6 +23929,11 @@ public enum Operations { public var path: Operations.repos_sol_get_hyphen_org_hyphen_rule_hyphen_suites.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query`. 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. /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/repository_name`. @@ -23447,6 +23977,7 @@ public enum Operations { /// Creates a new `Query`. /// /// - 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. /// - 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. @@ -23454,6 +23985,7 @@ 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)." /// - 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( + ref: Components.Parameters.ref_hyphen_in_hyphen_query? = nil, repository_name: Components.Parameters.repository_hyphen_name_hyphen_in_hyphen_query? = nil, time_period: Components.Parameters.time_hyphen_period? = nil, actor_name: Components.Parameters.actor_hyphen_name_hyphen_in_hyphen_query? = nil, @@ -23461,6 +23993,7 @@ public enum Operations { per_page: Components.Parameters.per_hyphen_page? = nil, page: Components.Parameters.page? = nil ) { + self.ref = ref self.repository_name = repository_name self.time_period = time_period self.actor_name = actor_name @@ -23822,6 +24355,9 @@ public enum Operations { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. public enum repos_sol_get_hyphen_org_hyphen_ruleset { @@ -24060,7 +24596,8 @@ 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. + /// > [!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 { @@ -24070,7 +24607,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!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? @@ -24435,7 +24973,8 @@ public enum Operations { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. 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)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -24800,25 +25339,52 @@ 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 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`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// Can be `enabled` or `disabled`. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns/status`. + public var status: Swift.String? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - 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 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`. + public var secret_scanning_non_provider_patterns: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_and_analysisPayload`. /// /// - Parameters: /// - 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_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_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? = 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_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_non_provider_patterns } } /// Specify which security and analysis features to enable or disable for the repository. @@ -24881,6 +25447,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/use_squash_pr_title_as_default`. @available(*, deprecated) public var use_squash_pr_title_as_default: Swift.Bool? + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -24891,6 +25459,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -24918,6 +25488,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/squash_merge_commit_message`. public var squash_merge_commit_message: Operations.repos_sol_update.Input.Body.jsonPayload.squash_merge_commit_messagePayload? + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -24928,6 +25500,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -24988,9 +25562,9 @@ public enum Operations { /// - 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. - /// - squash_merge_commit_title: The default value for a squash merge commit title: + /// - 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: The default value for a merge commit title. + /// - merge_commit_title: Required when using `merge_commit_message`. /// - merge_commit_message: The default value for a merge commit message. /// - archived: Whether to archive this repository. `false` will unarchive a previously archived repository. /// - allow_forking: Either `true` to allow private forks, or `false` to prevent private forks. @@ -25513,148 +26087,679 @@ public enum Operations { } } } - /// List repository activities + /// List repository activities + /// + /// Lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users. + /// + /// For more information about viewing repository activity, + /// see "[Viewing activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/activity`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)`. + public enum repos_sol_list_hyphen_activities { + public static let id: Swift.String = "repos/list-activities" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/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}/activity/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}/activity/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.repos_sol_list_hyphen_activities.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query`. + public struct Query: Sendable, Hashable { + /// - 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/repos/{owner}/{repo}/activity/GET/query/direction`. + public var direction: Components.Parameters.direction? + /// 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}/activity/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// 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}/activity/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}/activity/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// The Git reference for the activities you want to list. + /// + /// The `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/ref`. + public var ref: Swift.String? + /// The GitHub username to use to filter by the actor who performed the activity. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/actor`. + public var actor: Swift.String? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. + @frozen public enum time_periodPayload: String, Codable, Hashable, Sendable { + case day = "day" + case week = "week" + case month = "month" + case quarter = "quarter" + case year = "year" + } + /// The time period to filter by. + /// + /// For example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours). + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. + public var time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. + @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable { + case push = "push" + case force_push = "force_push" + case branch_creation = "branch_creation" + case branch_deletion = "branch_deletion" + case pr_merge = "pr_merge" + case merge_queue_merge = "merge_queue_merge" + } + /// The activity type to filter by. + /// + /// For example, you can choose to filter by "force_push", to see all force pushes to the repository. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. + public var activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - direction: The direction to sort the results by. + /// - 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)." + /// - ref: The Git reference for the activities you want to list. + /// - actor: The GitHub username to use to filter by the actor who performed the activity. + /// - time_period: The time period to filter by. + /// - activity_type: The activity type to filter by. + public init( + direction: Components.Parameters.direction? = nil, + per_page: Components.Parameters.per_hyphen_page? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil, + ref: Swift.String? = nil, + actor: Swift.String? = nil, + time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? = nil, + activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? = nil + ) { + self.direction = direction + self.per_page = per_page + self.before = before + self.after = after + self.ref = ref + self.actor = actor + self.time_period = time_period + self.activity_type = activity_type + } + } + public var query: Operations.repos_sol_list_hyphen_activities.Input.Query + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/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.repos_sol_list_hyphen_activities.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.repos_sol_list_hyphen_activities.Input.Path, + query: Operations.repos_sol_list_hyphen_activities.Input.Query = .init(), + headers: Operations.repos_sol_list_hyphen_activities.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}/activity/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/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.repos_sol_list_hyphen_activities.Output.Ok.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content/application\/json`. + case json([Components.Schemas.activity]) + /// 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.activity] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.repos_sol_list_hyphen_activities.Output.Ok.Headers = .init(), + body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body + ) { + self.headers = headers + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.repos_sol_list_hyphen_activities.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.repos_sol_list_hyphen_activities.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Validation failed, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/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 + ) + } + } + } + /// 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 an attestation + /// + /// 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. + /// + /// 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). + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + public enum repos_sol_create_hyphen_attestation { + public static let id: Swift.String = "repos/create-attestation" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/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}/attestations/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}/attestations/POST/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.repos_sol_create_hyphen_attestation.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/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.repos_sol_create_hyphen_attestation.Input.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle`. + public struct bundlePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/verificationMaterial`. + public var verificationMaterial: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.verificationMaterialPayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/dsseEnvelope`. + public var dsseEnvelope: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.dsseEnvelopePayload? + /// Creates a new `bundlePayload`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.verificationMaterialPayload? = nil, + dsseEnvelope: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle`. + public var bundle: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - bundle: The attestation's Sigstore Bundle. + public init(bundle: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload) { + self.bundle = bundle + } + public enum CodingKeys: String, CodingKey { + case bundle + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/content/application\/json`. + case json(Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload) + } + public var body: Operations.repos_sol_create_hyphen_attestation.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.repos_sol_create_hyphen_attestation.Input.Path, + headers: Operations.repos_sol_create_hyphen_attestation.Input.Headers = .init(), + body: Operations.repos_sol_create_hyphen_attestation.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}/attestations/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/responses/201/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The ID of the attestation. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/responses/201/content/json/id`. + public var id: Swift.Int? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - id: The ID of the attestation. + public init(id: Swift.Int? = nil) { + self.id = id + } + public enum CodingKeys: String, CodingKey { + case id + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/responses/201/content/application\/json`. + case json(Operations.repos_sol_create_hyphen_attestation.Output.Created.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_create_hyphen_attestation.Output.Created.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.repos_sol_create_hyphen_attestation.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.repos_sol_create_hyphen_attestation.Output.Created.Body) { + self.body = body + } + } + /// response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.repos_sol_create_hyphen_attestation.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.repos_sol_create_hyphen_attestation.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}/attestations/post(repos/create-attestation)/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 + ) + } + } + } + /// Validation failed, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)/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. + 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 attestations /// - /// Lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users. + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. /// - /// For more information about viewing repository activity, - /// see "[Viewing activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. /// - /// - Remark: HTTP `GET /repos/{owner}/{repo}/activity`. - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)`. - public enum repos_sol_list_hyphen_activities { - public static let id: Swift.String = "repos/list-activities" + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + public enum repos_sol_list_hyphen_attestations { + public static let id: Swift.String = "repos/list-attestations" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/path`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/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}/activity/GET/path/owner`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/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}/activity/GET/path/repo`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/path/repo`. public var repo: Components.Parameters.repo + /// The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/path/subject_digest`. + public var subject_digest: 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. + /// - subject_digest: The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. public init( owner: Components.Parameters.owner, - repo: Components.Parameters.repo + repo: Components.Parameters.repo, + subject_digest: Swift.String ) { self.owner = owner self.repo = repo + self.subject_digest = subject_digest } } - public var path: Operations.repos_sol_list_hyphen_activities.Input.Path - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query`. + public var path: Operations.repos_sol_list_hyphen_attestations.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query`. public struct Query: Sendable, Hashable { - /// - 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/repos/{owner}/{repo}/activity/GET/query/direction`. - public var direction: Components.Parameters.direction? /// 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}/activity/GET/query/per_page`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// 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}/activity/GET/query/before`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/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}/activity/GET/query/after`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query/after`. public var after: Components.Parameters.pagination_hyphen_after? - /// The Git reference for the activities you want to list. - /// - /// The `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/ref`. - public var ref: Swift.String? - /// The GitHub username to use to filter by the actor who performed the activity. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/actor`. - public var actor: Swift.String? - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. - @frozen public enum time_periodPayload: String, Codable, Hashable, Sendable { - case day = "day" - case week = "week" - case month = "month" - case quarter = "quarter" - case year = "year" - } - /// The time period to filter by. - /// - /// For example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours). - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. - public var time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. - @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable { - case push = "push" - case force_push = "force_push" - case branch_creation = "branch_creation" - case branch_deletion = "branch_deletion" - case pr_merge = "pr_merge" - case merge_queue_merge = "merge_queue_merge" - } - /// The activity type to filter by. - /// - /// For example, you can choose to filter by "force_push", to see all force pushes to the repository. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. - public var activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? /// Creates a new `Query`. /// /// - Parameters: - /// - direction: The direction to sort the results by. /// - 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)." - /// - ref: The Git reference for the activities you want to list. - /// - actor: The GitHub username to use to filter by the actor who performed the activity. - /// - time_period: The time period to filter by. - /// - activity_type: The activity type to filter by. public init( - direction: Components.Parameters.direction? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, before: Components.Parameters.pagination_hyphen_before? = nil, - after: Components.Parameters.pagination_hyphen_after? = nil, - ref: Swift.String? = nil, - actor: Swift.String? = nil, - time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? = nil, - activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? = nil + after: Components.Parameters.pagination_hyphen_after? = nil ) { - self.direction = direction self.per_page = per_page self.before = before self.after = after - self.ref = ref - self.actor = actor - self.time_period = time_period - self.activity_type = activity_type } } - public var query: Operations.repos_sol_list_hyphen_activities.Input.Query - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/header`. + public var query: Operations.repos_sol_list_hyphen_attestations.Input.Query + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/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.repos_sol_list_hyphen_activities.Input.Headers + public var headers: Operations.repos_sol_list_hyphen_attestations.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -25662,9 +26767,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.repos_sol_list_hyphen_activities.Input.Path, - query: Operations.repos_sol_list_hyphen_activities.Input.Query = .init(), - headers: Operations.repos_sol_list_hyphen_activities.Input.Headers = .init() + path: Operations.repos_sol_list_hyphen_attestations.Input.Path, + query: Operations.repos_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.repos_sol_list_hyphen_attestations.Input.Headers = .init() ) { self.path = path self.query = query @@ -25673,29 +26778,126 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/headers`. - public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/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.repos_sol_list_hyphen_activities.Output.Ok.Headers - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content/application\/json`. - case json([Components.Schemas.activity]) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload`. + public struct attestationsPayloadPayload: Codable, Hashable, Sendable { + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public struct bundlePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public var verificationMaterial: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public var dsseEnvelope: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? + /// Creates a new `bundlePayload`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? = nil, + dsseEnvelope: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public var bundle: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/repository_id`. + public var repository_id: Swift.Int? + /// Creates a new `attestationsPayloadPayload`. + /// + /// - Parameters: + /// - bundle: The attestation's Sigstore Bundle. + /// - repository_id: + public init( + bundle: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? = nil, + repository_id: Swift.Int? = nil + ) { + self.bundle = bundle + self.repository_id = repository_id + } + public enum CodingKeys: String, CodingKey { + case bundle + case repository_id + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public typealias attestationsPayload = [Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload] + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public var attestations: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - attestations: + public init(attestations: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? = nil) { + self.attestations = attestations + } + public enum CodingKeys: String, CodingKey { + case attestations + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/application\/json`. + case json(Operations.repos_sol_list_hyphen_attestations.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: [Components.Schemas.activity] { + public var json: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload { get throws { switch self { case let .json(body): @@ -25705,31 +26907,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body + public var body: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: - /// - headers: Received HTTP response headers /// - body: Received HTTP response body - public init( - headers: Operations.repos_sol_list_hyphen_activities.Output.Ok.Headers = .init(), - body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body - ) { - self.headers = headers + public init(body: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/responses/200`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.repos_sol_list_hyphen_activities.Output.Ok) + case ok(Operations.repos_sol_list_hyphen_attestations.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.repos_sol_list_hyphen_activities.Output.Ok { + public var ok: Operations.repos_sol_list_hyphen_attestations.Output.Ok { get throws { switch self { case let .ok(response): @@ -25742,29 +26939,6 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/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 - ) - } - } - } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. @@ -26575,7 +27749,7 @@ public enum Operations { self.body = body } } - /// Response if dependabot is enabled + /// Response if Dependabot is enabled /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/get(repos/check-automated-security-fixes)/responses/200`. /// @@ -26602,7 +27776,7 @@ public enum Operations { /// Creates a new `NotFound`. public init() {} } - /// Not Found if dependabot is not enabled for the repository + /// Not Found if Dependabot is not enabled for the repository /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/get(repos/check-automated-security-fixes)/responses/404`. /// @@ -27394,9 +28568,11 @@ public enum Operations { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -28709,7 +29885,8 @@ public enum Operations { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -29173,7 +30350,8 @@ public enum Operations { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -31161,7 +32339,8 @@ public enum Operations { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -34061,7 +35240,8 @@ public enum Operations { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -35144,7 +36324,8 @@ public enum Operations { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -36294,11 +37475,11 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/GET/query/committer`. public var committer: Swift.String? - /// Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/GET/query/since`. - public var since: Components.Parameters.since? - /// Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + public var since: Foundation.Date? + /// Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/GET/query/until`. public var until: Foundation.Date? @@ -36317,8 +37498,8 @@ public enum Operations { /// - path: Only commits containing this file path will be returned. /// - author: GitHub username or email address to use to filter by commit author. /// - committer: GitHub username or email address to use to filter by commit committer. - /// - since: Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - /// - until: Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - since: Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. + /// - until: Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. /// - 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( @@ -36326,7 +37507,7 @@ public enum Operations { path: Swift.String? = nil, author: Swift.String? = nil, committer: Swift.String? = nil, - since: Components.Parameters.since? = nil, + since: Foundation.Date? = nil, until: Foundation.Date? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, page: Components.Parameters.page? = nil @@ -37464,7 +38645,8 @@ public enum Operations { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// 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)." Pagination query parameters are not supported for these media types. /// @@ -38962,6 +40144,29 @@ public enum Operations { } } } + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/get(repos/get-content)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. @@ -39003,7 +40208,8 @@ public enum Operations { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -39355,17 +40561,80 @@ public enum Operations { } } } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json`. + @frozen public enum jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json/case1`. + case basic_hyphen_error(Components.Schemas.basic_hyphen_error) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json/case2`. + case repository_hyphen_rule_hyphen_violation_hyphen_error(Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .basic_hyphen_error(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .repository_hyphen_rule_hyphen_violation_hyphen_error(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 .basic_hyphen_error(value): + try value.encode(to: encoder) + case let .repository_hyphen_rule_hyphen_violation_hyphen_error(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/application\/json`. + case json(Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.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_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body) { + self.body = body + } + } /// Conflict /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/put(repos/create-or-update-file-contents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Components.Responses.conflict) + case conflict(Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Components.Responses.conflict { + public var conflict: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict { get throws { switch self { case let .conflict(response): @@ -39419,7 +40688,8 @@ public enum Operations { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -41349,7 +42619,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/POST/requestBody/json/state`. public var state: Operations.repos_sol_create_hyphen_deployment_hyphen_status.Input.Body.jsonPayload.statePayload - /// The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + /// The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. + /// + /// > [!NOTE] + /// > It's recommended to use the `log_url` parameter, which replaces `target_url`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/POST/requestBody/json/target_url`. public var target_url: Swift.String? @@ -41377,7 +42650,7 @@ public enum Operations { /// /// - Parameters: /// - state: The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - /// - target_url: The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + /// - target_url: The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. /// - log_url: The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` /// - description: A short description of the status. The maximum description length is 140 characters. /// - environment: Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used. @@ -42155,7 +43428,8 @@ public enum Operations { } /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -42309,9 +43583,11 @@ public enum Operations { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -43884,7 +45160,9 @@ public enum Operations { } /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -44574,9 +45852,11 @@ public enum Operations { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -47115,7 +48395,8 @@ public enum Operations { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -52553,6 +53834,29 @@ public enum Operations { } } } + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/readme/get(repos/get-readme)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } /// Resource not found /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/readme/get(repos/get-readme)/responses/404`. @@ -54395,9 +55699,8 @@ public enum Operations { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -55816,7 +57119,8 @@ 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. + /// > [!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 { @@ -55826,7 +57130,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!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? @@ -56060,7 +57365,8 @@ public enum Operations { public var path: Operations.repos_sol_get_hyphen_repo_hyphen_rule_hyphen_suites.Input.Path /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/rule-suites/GET/query`. public struct Query: Sendable, Hashable { - /// The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. + /// 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? @@ -56103,7 +57409,7 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - ref: The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. + /// - 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. /// - 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. @@ -56485,6 +57791,9 @@ public enum Operations { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. public enum repos_sol_get_hyphen_repo_hyphen_ruleset { @@ -56755,7 +58064,8 @@ 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. + /// > [!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 { @@ -56765,7 +58075,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!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? @@ -57135,12 +58446,10 @@ public enum Operations { } /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -57549,7 +58858,8 @@ public enum Operations { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -58491,8 +59801,8 @@ public enum Operations { } /// Deprecated - List tag protection states for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!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. /// /// This returns the tag protection states of a repository. /// @@ -58683,8 +59993,8 @@ public enum Operations { } /// Deprecated - Create a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -58900,8 +60210,8 @@ public enum Operations { } /// Deprecated - Delete a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!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. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -59077,7 +60387,9 @@ public enum Operations { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -60939,7 +62251,8 @@ public enum Operations { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. @@ -61867,6 +63180,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/delete_branch_on_merge`. public var delete_branch_on_merge: Swift.Bool? + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -61877,6 +63192,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -61904,6 +63221,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/squash_merge_commit_message`. public var squash_merge_commit_message: Operations.repos_sol_create_hyphen_for_hyphen_authenticated_hyphen_user.Input.Body.jsonPayload.squash_merge_commit_messagePayload? + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -61914,6 +63233,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -61969,9 +63290,9 @@ public enum Operations { /// - allow_rebase_merge: Whether to allow rebase merges for pull requests. /// - 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 - /// - squash_merge_commit_title: The default value for a squash merge commit title: + /// - 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: The default value for a merge commit title. + /// - merge_commit_title: Required when using `merge_commit_message`. /// - merge_commit_message: The default value for a merge commit message. /// - has_downloads: Whether downloads are enabled. /// - is_template: Whether this repository acts as a template that can be used to generate new repositories. diff --git a/Sources/search/Client.swift b/Sources/search/Client.swift index 374c7890677..bf94bccf9ef 100644 --- a/Sources/search/Client.swift +++ b/Sources/search/Client.swift @@ -341,7 +341,8 @@ public struct Client: APIProtocol { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index fda7ba981b1..2fb5e9d41fa 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -64,7 +64,8 @@ public protocol APIProtocol: Sendable { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. @@ -204,7 +205,8 @@ extension APIProtocol { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. @@ -338,7 +340,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -401,7 +403,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -514,7 +516,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -577,7 +579,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -823,7 +825,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1266,7 +1268,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -1735,6 +1737,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -1865,8 +1869,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -1879,6 +1881,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -1889,7 +1892,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -1897,6 +1899,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -1907,7 +1910,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -1915,6 +1917,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -1925,7 +1928,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -1934,6 +1936,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -1944,7 +1947,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -2132,6 +2134,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2139,22 +2163,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -2162,7 +2190,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -2510,7 +2538,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -4420,7 +4448,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/user-search-result-item/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/user-search-result-item/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/user-search-result-item/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/user-search-result-item/avatar_url`. @@ -4524,7 +4552,7 @@ public enum Components { /// - suspended_at: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -5362,7 +5390,8 @@ public enum Operations { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. diff --git a/Sources/secret-scanning/Client.swift b/Sources/secret-scanning/Client.swift index 82e6c56bbc2..c66162b2ebb 100644 --- a/Sources/secret-scanning/Client.swift +++ b/Sources/secret-scanning/Client.swift @@ -895,4 +895,110 @@ public struct Client: APIProtocol { } ) } + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - 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)`. + public 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 { + try await client.send( + input: input, + forOperation: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/secret-scanning/push-protection-bypasses", + parameters: [ + input.path.owner, + input.path.repo + ] + ) + 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 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.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_push_hyphen_protection_hyphen_bypass.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 403: + return .forbidden(.init()) + case 404: + return .notFound(.init()) + case 422: + return .unprocessableContent(.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)) + 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 726d1f00c91..7e1c7b29706 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -79,6 +79,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations/get(secret-scanning/list-locations-for-alert)`. func secret_hyphen_scanning_sol_list_hyphen_locations_hyphen_for_hyphen_alert(_ input: Operations.secret_hyphen_scanning_sol_list_hyphen_locations_hyphen_for_hyphen_alert.Input) async throws -> Operations.secret_hyphen_scanning_sol_list_hyphen_locations_hyphen_for_hyphen_alert.Output + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - 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 } /// Convenience overloads for operation inputs. @@ -209,6 +220,27 @@ extension APIProtocol { headers: headers )) } + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - 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)`. + public func secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass( + path: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Path, + headers: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Headers = .init(), + body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Body + ) async throws -> Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output { + try await secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input( + path: path, + headers: headers, + body: body + )) + } } /// Server URLs defined in the OpenAPI document. @@ -236,7 +268,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -299,7 +331,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -412,7 +444,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -475,7 +507,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -563,7 +595,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -792,7 +824,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -986,7 +1018,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/secret_type`. public var secret_type: Swift.String? /// User-friendly name for the detected secret, matching the `secret_type`. - /// For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + /// For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." /// /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/secret_type_display_name`. public var secret_type_display_name: Swift.String? @@ -1107,6 +1139,10 @@ public enum Components { case validity } } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. + public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String /// - Remark: Generated from `#/components/schemas/secret-scanning-alert`. public struct secret_hyphen_scanning_hyphen_alert: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/number`. @@ -1142,7 +1178,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/secret_type`. public var secret_type: Swift.String? /// User-friendly name for the detected secret, matching the `secret_type`. - /// For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + /// For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/secret_type_display_name`. public var secret_type_display_name: Swift.String? @@ -1824,6 +1860,47 @@ public enum Components { case details } } + /// The reason for bypassing push protection. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-reason`. + @frozen public enum secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason: String, Codable, Hashable, Sendable { + case false_positive = "false_positive" + case used_in_tests = "used_in_tests" + case will_fix_later = "will_fix_later" + } + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass`. + public struct secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass/reason`. + public var reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason? + /// The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass/expire_at`. + public var expire_at: Foundation.Date? + /// The token type this bypass is for. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass/token_type`. + public var token_type: Swift.String? + /// Creates a new `secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass`. + /// + /// - Parameters: + /// - reason: + /// - expire_at: The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - token_type: The token type this bypass is for. + public init( + reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason? = nil, + expire_at: Foundation.Date? = nil, + token_type: Swift.String? = nil + ) { + self.reason = reason + self.expire_at = expire_at + self.token_type = token_type + } + public enum CodingKeys: String, CodingKey { + case reason + case expire_at + case token_type + } + } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { @@ -1862,7 +1939,7 @@ public enum Components { case resolved = "resolved" } /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-secret-type`. @@ -2052,7 +2129,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/state`. public var state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/secret_type`. @@ -2346,7 +2423,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/state`. public var state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/secret_type`. @@ -2656,7 +2733,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/state`. public var state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/secret_type`. @@ -3669,4 +3746,285 @@ public enum Operations { } } } + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - 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)`. + public enum secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass { + public static let id: Swift.String = "secret-scanning/create-push-protection-bypass" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/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}/secret-scanning/push-protection-bypasses/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}/secret-scanning/push-protection-bypasses/POST/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_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/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.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/json/reason`. + public var reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/json/placeholder_id`. + public var placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - reason: + /// - placeholder_id: + public init( + reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason, + placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id + ) { + self.reason = reason + self.placeholder_id = placeholder_id + } + public enum CodingKeys: String, CodingKey { + case reason + case placeholder_id + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/content/application\/json`. + case json(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Body.jsonPayload) + } + public var body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Path, + headers: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Headers = .init(), + body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.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}/secret-scanning/push-protection-bypasses/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/responses/200/content/application\/json`. + case json(Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass) + /// 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_push_hyphen_protection_hyphen_bypass { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.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_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct Forbidden: Sendable, Hashable { + /// Creates a new `Forbidden`. + public init() {} + } + /// User does not have enough permissions to perform this action. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.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: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// Creates a new `NotFound`. + public init() {} + } + /// Placeholder ID not found, or push protection is disabled on this repository. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.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_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.NotFound { + 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() {} + } + /// Bad request, input data missing or incorrect. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.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.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.UnprocessableContent { + 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}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/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 + ] + } + } + } } diff --git a/Sources/security-advisories/Client.swift b/Sources/security-advisories/Client.swift index d6956a89148..dbe8c7827c9 100644 --- a/Sources/security-advisories/Client.swift +++ b/Sources/security-advisories/Client.swift @@ -137,6 +137,20 @@ public struct Client: APIProtocol { name: "modified", value: input.query.modified ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "epss_percentage", + value: input.query.epss_percentage + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "epss_percentile", + value: input.query.epss_percentile + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -1392,7 +1406,8 @@ public struct Client: APIProtocol { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index b184dae992f..4f7aa8f66c4 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -111,7 +111,8 @@ public protocol APIProtocol: Sendable { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. @@ -302,7 +303,8 @@ extension APIProtocol { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. @@ -432,7 +434,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -495,7 +497,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -762,6 +764,31 @@ public enum Components { public typealias cwesPayload = [Components.Schemas.global_hyphen_advisory.cwesPayloadPayload] /// - Remark: Generated from `#/components/schemas/global-advisory/cwes`. public var cwes: Components.Schemas.global_hyphen_advisory.cwesPayload? + /// - Remark: Generated from `#/components/schemas/global-advisory/epss`. + public struct epssPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/global-advisory/epss/percentage`. + public var percentage: Swift.Double? + /// - Remark: Generated from `#/components/schemas/global-advisory/epss/percentile`. + public var percentile: Swift.Double? + /// Creates a new `epssPayload`. + /// + /// - Parameters: + /// - percentage: + /// - percentile: + public init( + percentage: Swift.Double? = nil, + percentile: Swift.Double? = nil + ) { + self.percentage = percentage + self.percentile = percentile + } + public enum CodingKeys: String, CodingKey { + case percentage + case percentile + } + } + /// - Remark: Generated from `#/components/schemas/global-advisory/epss`. + public var epss: Components.Schemas.global_hyphen_advisory.epssPayload? /// - Remark: Generated from `#/components/schemas/global-advisory/creditsPayload`. public struct creditsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/global-advisory/creditsPayload/user`. @@ -816,6 +843,7 @@ public enum Components { /// - vulnerabilities: The products and respective version ranges affected by the advisory. /// - cvss: /// - cwes: + /// - epss: /// - credits: The users who contributed to the advisory. public init( ghsa_id: Swift.String, @@ -838,6 +866,7 @@ public enum Components { vulnerabilities: [Components.Schemas.vulnerability]? = nil, cvss: Components.Schemas.global_hyphen_advisory.cvssPayload? = nil, cwes: Components.Schemas.global_hyphen_advisory.cwesPayload? = nil, + epss: Components.Schemas.global_hyphen_advisory.epssPayload? = nil, credits: Components.Schemas.global_hyphen_advisory.creditsPayload? = nil ) { self.ghsa_id = ghsa_id @@ -860,6 +889,7 @@ public enum Components { self.vulnerabilities = vulnerabilities self.cvss = cvss self.cwes = cwes + self.epss = epss self.credits = credits } public enum CodingKeys: String, CodingKey { @@ -883,6 +913,7 @@ public enum Components { case vulnerabilities case cvss case cwes + case epss case credits } public init(from decoder: any Decoder) throws { @@ -967,6 +998,10 @@ public enum Components { Components.Schemas.global_hyphen_advisory.cwesPayload.self, forKey: .cwes ) + epss = try container.decodeIfPresent( + Components.Schemas.global_hyphen_advisory.epssPayload.self, + forKey: .epss + ) credits = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.creditsPayload.self, forKey: .credits @@ -992,6 +1027,7 @@ public enum Components { "vulnerabilities", "cvss", "cwes", + "epss", "credits" ]) } @@ -1075,7 +1111,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1138,7 +1174,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1433,7 +1469,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1876,7 +1912,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2166,6 +2202,251 @@ public enum Components { case anonymous_access_enabled } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// A GitHub repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository`. @@ -2173,7 +2454,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -2402,7 +2683,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2634,15 +2915,37 @@ public enum Components { /// /// - Parameters: /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { self.status = status } public enum CodingKeys: String, CodingKey { case status } } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - 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? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2650,267 +2953,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent + case secret_scanning_non_provider_patterns } } /// A repository on GitHub. @@ -2920,7 +2982,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/nullable-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -3363,7 +3425,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -3695,7 +3757,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/full-repository`. public struct full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/full-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/full-repository/name`. @@ -4144,7 +4206,7 @@ public enum Components { /// - security_and_analysis: /// - custom_properties: The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -6382,6 +6444,16 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/advisories/GET/query/modified`. public var modified: Swift.String? + /// If specified, only return advisories that have an EPSS percentage score that matches the provided value. + /// The EPSS percentage represents the likelihood of a CVE being exploited. + /// + /// - Remark: Generated from `#/paths/advisories/GET/query/epss_percentage`. + public var epss_percentage: Swift.String? + /// If specified, only return advisories that have an EPSS percentile score that matches the provided value. + /// The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs. + /// + /// - Remark: Generated from `#/paths/advisories/GET/query/epss_percentile`. + public var epss_percentile: Swift.String? /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// /// - Remark: Generated from `#/paths/advisories/GET/query/before`. @@ -6407,6 +6479,8 @@ public enum Operations { @frozen public enum sortPayload: String, Codable, Hashable, Sendable { case updated = "updated" case published = "published" + case epss_percentage = "epss_percentage" + case epss_percentile = "epss_percentile" } /// The property to sort the results by. /// @@ -6426,6 +6500,8 @@ public enum Operations { /// - published: If specified, only return advisories that were published on a date or date range. /// - updated: If specified, only return advisories that were updated on a date or date range. /// - modified: If specified, only show advisories that were updated or published on a date or date range. + /// - epss_percentage: If specified, only return advisories that have an EPSS percentage score that matches the provided value. + /// - epss_percentile: If specified, only return advisories that have an EPSS percentile score that matches the provided value. /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - direction: The direction to sort the results by. @@ -6443,6 +6519,8 @@ public enum Operations { published: Swift.String? = nil, updated: Swift.String? = nil, modified: Swift.String? = nil, + epss_percentage: Swift.String? = nil, + epss_percentile: Swift.String? = nil, before: Components.Parameters.pagination_hyphen_before? = nil, after: Components.Parameters.pagination_hyphen_after? = nil, direction: Components.Parameters.direction? = nil, @@ -6460,6 +6538,8 @@ public enum Operations { self.published = published self.updated = updated self.modified = modified + self.epss_percentage = epss_percentage + self.epss_percentile = epss_percentile self.before = before self.after = after self.direction = direction @@ -8467,7 +8547,8 @@ public enum Operations { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. diff --git a/Sources/teams/Client.swift b/Sources/teams/Client.swift index d0ede64edf4..50c05979d3d 100644 --- a/Sources/teams/Client.swift +++ b/Sources/teams/Client.swift @@ -269,7 +269,8 @@ public struct Client: APIProtocol { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -358,7 +359,8 @@ public struct Client: APIProtocol { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -526,7 +528,8 @@ public struct Client: APIProtocol { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -569,7 +572,8 @@ public struct Client: APIProtocol { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -676,7 +680,8 @@ public struct Client: APIProtocol { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -754,7 +759,8 @@ public struct Client: APIProtocol { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -824,7 +830,8 @@ public struct Client: APIProtocol { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -905,7 +912,8 @@ public struct Client: APIProtocol { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -951,7 +959,8 @@ public struct Client: APIProtocol { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -1052,7 +1061,8 @@ public struct Client: APIProtocol { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1131,7 +1141,8 @@ public struct Client: APIProtocol { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -1202,7 +1213,8 @@ public struct Client: APIProtocol { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1282,7 +1294,8 @@ public struct Client: APIProtocol { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1329,7 +1342,8 @@ public struct Client: APIProtocol { /// /// 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`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -1516,10 +1530,11 @@ public struct Client: APIProtocol { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -1593,13 +1608,15 @@ public struct Client: APIProtocol { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -1684,9 +1701,11 @@ public struct Client: APIProtocol { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -1732,7 +1751,8 @@ public struct Client: APIProtocol { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -1821,7 +1841,8 @@ public struct Client: APIProtocol { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -1891,7 +1912,8 @@ public struct Client: APIProtocol { /// /// 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. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -1972,7 +1994,8 @@ public struct Client: APIProtocol { /// /// 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. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -2016,7 +2039,8 @@ public struct Client: APIProtocol { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -2111,7 +2135,8 @@ public struct Client: APIProtocol { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -2184,7 +2209,8 @@ public struct Client: APIProtocol { /// /// 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. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -2242,7 +2268,8 @@ public struct Client: APIProtocol { /// /// 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. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -2287,7 +2314,8 @@ public struct Client: APIProtocol { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. @@ -2374,7 +2402,8 @@ public struct Client: APIProtocol { } /// Get a team (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -2461,11 +2490,13 @@ public struct Client: APIProtocol { } /// Update a team (Legacy) /// - /// **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. + /// > [!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. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -2627,7 +2658,8 @@ public struct Client: APIProtocol { } /// Delete a team (Legacy) /// - /// **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. + /// > [!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. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -2720,7 +2752,8 @@ public struct Client: APIProtocol { } /// List discussions (Legacy) /// - /// **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. + /// > [!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. /// /// List all discussions on a team's page. /// @@ -2818,7 +2851,8 @@ public struct Client: APIProtocol { } /// Create a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new discussion post on a team's page. /// @@ -2898,7 +2932,8 @@ public struct Client: APIProtocol { } /// Get a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific discussion on a team's page. /// @@ -2968,7 +3003,8 @@ public struct Client: APIProtocol { } /// Update a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -3049,7 +3085,8 @@ public struct Client: APIProtocol { } /// Delete a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Delete a discussion from a team's page. /// @@ -3095,7 +3132,8 @@ public struct Client: APIProtocol { } /// List discussion comments (Legacy) /// - /// **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. + /// > [!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. /// /// List all comments on a team discussion. /// @@ -3194,7 +3232,8 @@ public struct Client: APIProtocol { } /// Create a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new comment on a team discussion. /// @@ -3275,7 +3314,8 @@ public struct Client: APIProtocol { } /// Get a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific comment on a team discussion. /// @@ -3346,7 +3386,8 @@ public struct Client: APIProtocol { } /// Update a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the body text of a discussion comment. /// @@ -3426,7 +3467,8 @@ public struct Client: APIProtocol { } /// Delete a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Deletes a comment on a team discussion. /// @@ -3473,7 +3515,8 @@ public struct Client: APIProtocol { } /// List pending team invitations (Legacy) /// - /// **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. + /// > [!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. /// /// 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`. /// @@ -3562,7 +3605,8 @@ public struct Client: APIProtocol { } /// List team members (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -3736,7 +3780,8 @@ public struct Client: APIProtocol { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -3818,7 +3863,8 @@ public struct Client: APIProtocol { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -3862,7 +3908,8 @@ public struct Client: APIProtocol { } /// Get team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -3959,13 +4006,15 @@ public struct Client: APIProtocol { } /// Add or update team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -4072,13 +4121,15 @@ public struct Client: APIProtocol { } /// Remove team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -4122,7 +4173,8 @@ public struct Client: APIProtocol { } /// List team projects (Legacy) /// - /// **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. + /// > [!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. /// /// Lists the organization projects for a team. /// @@ -4233,7 +4285,8 @@ public struct Client: APIProtocol { } /// Check team permissions for a project (Legacy) /// - /// **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. + /// > [!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. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -4303,7 +4356,8 @@ public struct Client: APIProtocol { } /// Add or update team project permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -4428,7 +4482,8 @@ public struct Client: APIProtocol { } /// Remove a project from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -4520,7 +4575,8 @@ public struct Client: APIProtocol { } /// List team repositories (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -4629,9 +4685,11 @@ public struct Client: APIProtocol { } /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!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. /// - /// **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. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -4704,7 +4762,8 @@ public struct Client: APIProtocol { } /// Add or update team repository permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -4810,7 +4869,8 @@ public struct Client: APIProtocol { } /// Remove a repository from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -4855,7 +4915,8 @@ public struct Client: APIProtocol { } /// List child teams (Legacy) /// - /// **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. + /// > [!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. /// /// - 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 a02be521678..9b55f8ce3fb 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -31,7 +31,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -40,7 +41,8 @@ public protocol APIProtocol: Sendable { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -51,7 +53,8 @@ public protocol APIProtocol: Sendable { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -60,7 +63,8 @@ public protocol APIProtocol: Sendable { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -73,7 +77,8 @@ public protocol APIProtocol: Sendable { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -84,7 +89,8 @@ public protocol APIProtocol: Sendable { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -95,7 +101,8 @@ public protocol APIProtocol: Sendable { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -106,7 +113,8 @@ public protocol APIProtocol: Sendable { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -117,7 +125,8 @@ public protocol APIProtocol: Sendable { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -130,7 +139,8 @@ public protocol APIProtocol: Sendable { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -141,7 +151,8 @@ public protocol APIProtocol: Sendable { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -152,7 +163,8 @@ public protocol APIProtocol: Sendable { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -163,7 +175,8 @@ public protocol APIProtocol: Sendable { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -174,7 +187,8 @@ public protocol APIProtocol: Sendable { /// /// 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`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -194,10 +208,11 @@ public protocol APIProtocol: Sendable { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -210,13 +225,15 @@ public protocol APIProtocol: Sendable { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -227,9 +244,11 @@ public protocol APIProtocol: Sendable { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -238,7 +257,8 @@ public protocol APIProtocol: Sendable { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -247,7 +267,8 @@ public protocol APIProtocol: Sendable { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -256,7 +277,8 @@ public protocol APIProtocol: Sendable { /// /// 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. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -265,7 +287,8 @@ public protocol APIProtocol: Sendable { /// /// 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. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -274,7 +297,8 @@ public protocol APIProtocol: Sendable { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -289,7 +313,8 @@ public protocol APIProtocol: Sendable { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -298,7 +323,8 @@ public protocol APIProtocol: Sendable { /// /// 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. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -309,7 +335,8 @@ public protocol APIProtocol: Sendable { /// /// 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. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -318,14 +345,16 @@ public protocol APIProtocol: Sendable { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. func teams_sol_list_hyphen_child_hyphen_in_hyphen_org(_ input: Operations.teams_sol_list_hyphen_child_hyphen_in_hyphen_org.Input) async throws -> Operations.teams_sol_list_hyphen_child_hyphen_in_hyphen_org.Output /// Get a team (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -333,11 +362,13 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_legacy.Output /// Update a team (Legacy) /// - /// **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. + /// > [!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. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -345,7 +376,8 @@ public protocol APIProtocol: Sendable { func teams_sol_update_hyphen_legacy(_ input: Operations.teams_sol_update_hyphen_legacy.Input) async throws -> Operations.teams_sol_update_hyphen_legacy.Output /// Delete a team (Legacy) /// - /// **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. + /// > [!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. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -357,7 +389,8 @@ public protocol APIProtocol: Sendable { func teams_sol_delete_hyphen_legacy(_ input: Operations.teams_sol_delete_hyphen_legacy.Input) async throws -> Operations.teams_sol_delete_hyphen_legacy.Output /// List discussions (Legacy) /// - /// **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. + /// > [!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. /// /// List all discussions on a team's page. /// @@ -369,7 +402,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_discussions_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_discussions_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_discussions_hyphen_legacy.Output /// Create a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new discussion post on a team's page. /// @@ -383,7 +417,8 @@ public protocol APIProtocol: Sendable { func teams_sol_create_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_create_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_create_hyphen_discussion_hyphen_legacy.Output /// Get a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific discussion on a team's page. /// @@ -395,7 +430,8 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_discussion_hyphen_legacy.Output /// Update a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -407,7 +443,8 @@ public protocol APIProtocol: Sendable { func teams_sol_update_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_update_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_update_hyphen_discussion_hyphen_legacy.Output /// Delete a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Delete a discussion from a team's page. /// @@ -419,7 +456,8 @@ public protocol APIProtocol: Sendable { func teams_sol_delete_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_delete_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_delete_hyphen_discussion_hyphen_legacy.Output /// List discussion comments (Legacy) /// - /// **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. + /// > [!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. /// /// List all comments on a team discussion. /// @@ -431,7 +469,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_discussion_hyphen_comments_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_discussion_hyphen_comments_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_discussion_hyphen_comments_hyphen_legacy.Output /// Create a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new comment on a team discussion. /// @@ -445,7 +484,8 @@ public protocol APIProtocol: Sendable { func teams_sol_create_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_create_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_create_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Get a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific comment on a team discussion. /// @@ -457,7 +497,8 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Update a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the body text of a discussion comment. /// @@ -469,7 +510,8 @@ public protocol APIProtocol: Sendable { func teams_sol_update_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_update_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_update_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Delete a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Deletes a comment on a team discussion. /// @@ -481,7 +523,8 @@ public protocol APIProtocol: Sendable { func teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// List pending team invitations (Legacy) /// - /// **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. + /// > [!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. /// /// 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`. /// @@ -491,7 +534,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_pending_hyphen_invitations_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_pending_hyphen_invitations_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_pending_hyphen_invitations_hyphen_legacy.Output /// List team members (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -521,7 +565,8 @@ public protocol APIProtocol: Sendable { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -539,7 +584,8 @@ public protocol APIProtocol: Sendable { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -547,7 +593,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_member_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_member_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_member_hyphen_legacy.Output /// Get team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -564,13 +611,15 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output /// Add or update team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -582,13 +631,15 @@ public protocol APIProtocol: Sendable { func teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy(_ input: Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Input) async throws -> Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output /// Remove team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -596,7 +647,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output /// List team projects (Legacy) /// - /// **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. + /// > [!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. /// /// Lists the organization projects for a team. /// @@ -606,7 +658,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_projects_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_projects_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_projects_hyphen_legacy.Output /// Check team permissions for a project (Legacy) /// - /// **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. + /// > [!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. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -616,7 +669,8 @@ public protocol APIProtocol: Sendable { func teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_legacy(_ input: Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_legacy.Input) async throws -> Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_legacy.Output /// Add or update team project permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -626,7 +680,8 @@ public protocol APIProtocol: Sendable { func teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_legacy(_ input: Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_legacy.Input) async throws -> Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_legacy.Output /// Remove a project from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -636,7 +691,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_project_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_project_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_project_hyphen_legacy.Output /// List team repositories (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -644,9 +700,11 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_repos_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_repos_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_repos_hyphen_legacy.Output /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!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. /// - /// **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. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -656,7 +714,8 @@ public protocol APIProtocol: Sendable { func teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy(_ input: Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy.Input) async throws -> Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy.Output /// Add or update team repository permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -668,7 +727,8 @@ public protocol APIProtocol: Sendable { func teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_legacy(_ input: Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_legacy.Input) async throws -> Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_legacy.Output /// Remove a repository from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -678,7 +738,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_repo_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_repo_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_repo_hyphen_legacy.Output /// List child teams (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. @@ -740,7 +801,8 @@ extension APIProtocol { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -757,7 +819,8 @@ extension APIProtocol { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -778,7 +841,8 @@ extension APIProtocol { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -789,7 +853,8 @@ extension APIProtocol { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -812,7 +877,8 @@ extension APIProtocol { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -833,7 +899,8 @@ extension APIProtocol { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -852,7 +919,8 @@ extension APIProtocol { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -873,7 +941,8 @@ extension APIProtocol { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -886,7 +955,8 @@ extension APIProtocol { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -909,7 +979,8 @@ extension APIProtocol { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -930,7 +1001,8 @@ extension APIProtocol { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -949,7 +1021,8 @@ extension APIProtocol { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -970,7 +1043,8 @@ extension APIProtocol { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -983,7 +1057,8 @@ extension APIProtocol { /// /// 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`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -1023,10 +1098,11 @@ extension APIProtocol { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -1047,13 +1123,15 @@ extension APIProtocol { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -1074,9 +1152,11 @@ extension APIProtocol { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -1087,7 +1167,8 @@ extension APIProtocol { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -1106,7 +1187,8 @@ extension APIProtocol { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -1123,7 +1205,8 @@ extension APIProtocol { /// /// 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. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -1142,7 +1225,8 @@ extension APIProtocol { /// /// 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. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -1153,7 +1237,8 @@ extension APIProtocol { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -1178,7 +1263,8 @@ extension APIProtocol { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -1195,7 +1281,8 @@ extension APIProtocol { /// /// 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. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -1214,7 +1301,8 @@ extension APIProtocol { /// /// 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. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -1225,7 +1313,8 @@ extension APIProtocol { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. @@ -1242,7 +1331,8 @@ extension APIProtocol { } /// Get a team (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -1258,11 +1348,13 @@ extension APIProtocol { } /// Update a team (Legacy) /// - /// **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. + /// > [!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. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -1280,7 +1372,8 @@ extension APIProtocol { } /// Delete a team (Legacy) /// - /// **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. + /// > [!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. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -1300,7 +1393,8 @@ extension APIProtocol { } /// List discussions (Legacy) /// - /// **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. + /// > [!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. /// /// List all discussions on a team's page. /// @@ -1322,7 +1416,8 @@ extension APIProtocol { } /// Create a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new discussion post on a team's page. /// @@ -1346,7 +1441,8 @@ extension APIProtocol { } /// Get a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific discussion on a team's page. /// @@ -1366,7 +1462,8 @@ extension APIProtocol { } /// Update a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -1388,7 +1485,8 @@ extension APIProtocol { } /// Delete a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Delete a discussion from a team's page. /// @@ -1402,7 +1500,8 @@ extension APIProtocol { } /// List discussion comments (Legacy) /// - /// **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. + /// > [!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. /// /// List all comments on a team discussion. /// @@ -1424,7 +1523,8 @@ extension APIProtocol { } /// Create a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new comment on a team discussion. /// @@ -1448,7 +1548,8 @@ extension APIProtocol { } /// Get a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific comment on a team discussion. /// @@ -1468,7 +1569,8 @@ extension APIProtocol { } /// Update a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the body text of a discussion comment. /// @@ -1490,7 +1592,8 @@ extension APIProtocol { } /// Delete a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Deletes a comment on a team discussion. /// @@ -1504,7 +1607,8 @@ extension APIProtocol { } /// List pending team invitations (Legacy) /// - /// **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. + /// > [!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. /// /// 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`. /// @@ -1524,7 +1628,8 @@ extension APIProtocol { } /// List team members (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -1566,7 +1671,8 @@ extension APIProtocol { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -1592,7 +1698,8 @@ extension APIProtocol { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -1602,7 +1709,8 @@ extension APIProtocol { } /// Get team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -1627,13 +1735,15 @@ extension APIProtocol { } /// Add or update team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -1655,13 +1765,15 @@ extension APIProtocol { } /// Remove team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -1671,7 +1783,8 @@ extension APIProtocol { } /// List team projects (Legacy) /// - /// **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. + /// > [!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. /// /// Lists the organization projects for a team. /// @@ -1691,7 +1804,8 @@ extension APIProtocol { } /// Check team permissions for a project (Legacy) /// - /// **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. + /// > [!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. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -1709,7 +1823,8 @@ extension APIProtocol { } /// Add or update team project permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -1729,7 +1844,8 @@ extension APIProtocol { } /// Remove a project from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -1747,7 +1863,8 @@ extension APIProtocol { } /// List team repositories (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -1765,9 +1882,11 @@ extension APIProtocol { } /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!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. /// - /// **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. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -1785,7 +1904,8 @@ extension APIProtocol { } /// Add or update team repository permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -1807,7 +1927,8 @@ extension APIProtocol { } /// Remove a repository from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -1819,7 +1940,8 @@ extension APIProtocol { } /// List child teams (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. @@ -1882,7 +2004,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1945,7 +2067,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2058,7 +2180,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -2121,7 +2243,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2403,6 +2525,251 @@ public enum Components { case html_url } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// - Remark: Generated from `#/components/schemas/reaction-rollup`. public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. @@ -2572,29 +2939,55 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? - /// Creates a new `security_hyphen_and_hyphen_analysis`. - /// - /// - Parameters: + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/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_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - 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? + /// Creates a new `security_hyphen_and_hyphen_analysis`. + /// + /// - Parameters: /// - advanced_security: /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: 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_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 ) { 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 } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -2602,7 +2995,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -2950,7 +3343,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2975,490 +3368,245 @@ public enum Components { events_url: Swift.String, forks_url: Swift.String, git_commits_url: Swift.String, - git_refs_url: Swift.String, - git_tags_url: Swift.String, - git_url: Swift.String? = nil, - 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, - notifications_url: Swift.String, - pulls_url: Swift.String, - releases_url: Swift.String, - ssh_url: Swift.String? = nil, - 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, - clone_url: Swift.String? = nil, - mirror_url: Swift.String? = nil, - hooks_url: Swift.String, - svn_url: Swift.String? = nil, - homepage: Swift.String? = nil, - language: Swift.String? = nil, - forks_count: Swift.Int? = nil, - stargazers_count: Swift.Int? = nil, - watchers_count: Swift.Int? = nil, - size: Swift.Int? = nil, - default_branch: Swift.String? = nil, - open_issues_count: Swift.Int? = nil, - is_template: Swift.Bool? = nil, - topics: [Swift.String]? = nil, - has_issues: Swift.Bool? = nil, - has_projects: Swift.Bool? = nil, - has_wiki: Swift.Bool? = nil, - has_pages: Swift.Bool? = nil, - has_downloads: Swift.Bool? = nil, - has_discussions: Swift.Bool? = nil, - archived: Swift.Bool? = nil, - disabled: Swift.Bool? = nil, - visibility: Swift.String? = nil, - pushed_at: Foundation.Date? = nil, - created_at: Foundation.Date? = nil, - updated_at: Foundation.Date? = nil, - permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? = nil, - role_name: Swift.String? = nil, - temp_clone_token: Swift.String? = nil, - delete_branch_on_merge: Swift.Bool? = nil, - subscribers_count: Swift.Int? = nil, - network_count: Swift.Int? = nil, - code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? = nil, - license: Components.Schemas.minimal_hyphen_repository.licensePayload? = nil, - forks: Swift.Int? = nil, - open_issues: Swift.Int? = nil, - watchers: Swift.Int? = nil, - allow_forking: Swift.Bool? = nil, - web_commit_signoff_required: Swift.Bool? = nil, - security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.full_name = full_name - self.owner = owner - self._private = _private - self.html_url = html_url - self.description = description - self.fork = fork - self.url = url - 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.downloads_url = downloads_url - self.events_url = events_url - self.forks_url = forks_url - self.git_commits_url = git_commits_url - self.git_refs_url = git_refs_url - self.git_tags_url = git_tags_url - self.git_url = git_url - 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.notifications_url = notifications_url - self.pulls_url = pulls_url - self.releases_url = releases_url - self.ssh_url = ssh_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.clone_url = clone_url - self.mirror_url = mirror_url - self.hooks_url = hooks_url - self.svn_url = svn_url - self.homepage = homepage - self.language = language - self.forks_count = forks_count - self.stargazers_count = stargazers_count - self.watchers_count = watchers_count - self.size = size - self.default_branch = default_branch - self.open_issues_count = open_issues_count - self.is_template = is_template - self.topics = topics - self.has_issues = has_issues - self.has_projects = has_projects - self.has_wiki = has_wiki - self.has_pages = has_pages - self.has_downloads = has_downloads - self.has_discussions = has_discussions - self.archived = archived - self.disabled = disabled - self.visibility = visibility - self.pushed_at = pushed_at - self.created_at = created_at - self.updated_at = updated_at - self.permissions = permissions - self.role_name = role_name - self.temp_clone_token = temp_clone_token - self.delete_branch_on_merge = delete_branch_on_merge - self.subscribers_count = subscribers_count - self.network_count = network_count - self.code_of_conduct = code_of_conduct - self.license = license - self.forks = forks - self.open_issues = open_issues - self.watchers = watchers - self.allow_forking = allow_forking - self.web_commit_signoff_required = web_commit_signoff_required - self.security_and_analysis = security_and_analysis - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case full_name - case owner - case _private = "private" - case html_url - case description - case fork - case url - 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 downloads_url - case events_url - case forks_url - case git_commits_url - case git_refs_url - case git_tags_url - case git_url - 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 notifications_url - case pulls_url - case releases_url - case ssh_url - case stargazers_url - case statuses_url - case subscribers_url - case subscription_url - case tags_url - case teams_url - case trees_url - case clone_url - case mirror_url - case hooks_url - case svn_url - case homepage - case language - case forks_count - case stargazers_count - case watchers_count - case size - case default_branch - case open_issues_count - case is_template - case topics - case has_issues - case has_projects - case has_wiki - case has_pages - case has_downloads - case has_discussions - case archived - case disabled - case visibility - case pushed_at - case created_at - case updated_at - case permissions - case role_name - case temp_clone_token - case delete_branch_on_merge - case subscribers_count - case network_count - case code_of_conduct - case license - case forks - case open_issues - case watchers - case allow_forking - case web_commit_signoff_required - case security_and_analysis - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + git_refs_url: Swift.String, + git_tags_url: Swift.String, + git_url: Swift.String? = nil, + 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, + notifications_url: Swift.String, + pulls_url: Swift.String, + releases_url: Swift.String, + ssh_url: Swift.String? = nil, + 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, + clone_url: Swift.String? = nil, + mirror_url: Swift.String? = nil, + hooks_url: Swift.String, + svn_url: Swift.String? = nil, + homepage: Swift.String? = nil, + language: Swift.String? = nil, + forks_count: Swift.Int? = nil, + stargazers_count: Swift.Int? = nil, + watchers_count: Swift.Int? = nil, + size: Swift.Int? = nil, + default_branch: Swift.String? = nil, + open_issues_count: Swift.Int? = nil, + is_template: Swift.Bool? = nil, + topics: [Swift.String]? = nil, + has_issues: Swift.Bool? = nil, + has_projects: Swift.Bool? = nil, + has_wiki: Swift.Bool? = nil, + has_pages: Swift.Bool? = nil, + has_downloads: Swift.Bool? = nil, + has_discussions: Swift.Bool? = nil, + archived: Swift.Bool? = nil, + disabled: Swift.Bool? = nil, + visibility: Swift.String? = nil, + pushed_at: Foundation.Date? = nil, + created_at: Foundation.Date? = nil, + updated_at: Foundation.Date? = nil, + permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? = nil, + role_name: Swift.String? = nil, + temp_clone_token: Swift.String? = nil, + delete_branch_on_merge: Swift.Bool? = nil, + subscribers_count: Swift.Int? = nil, + network_count: Swift.Int? = nil, + code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? = nil, + license: Components.Schemas.minimal_hyphen_repository.licensePayload? = nil, + forks: Swift.Int? = nil, + open_issues: Swift.Int? = nil, + watchers: Swift.Int? = nil, + allow_forking: Swift.Bool? = nil, + web_commit_signoff_required: Swift.Bool? = nil, + security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? = nil ) { self.id = id self.node_id = node_id self.name = name - self.slug = slug + self.full_name = full_name + self.owner = owner + self._private = _private + self.html_url = html_url self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions + self.fork = fork self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent + 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.downloads_url = downloads_url + self.events_url = events_url + self.forks_url = forks_url + self.git_commits_url = git_commits_url + self.git_refs_url = git_refs_url + self.git_tags_url = git_tags_url + self.git_url = git_url + 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.notifications_url = notifications_url + self.pulls_url = pulls_url + self.releases_url = releases_url + self.ssh_url = ssh_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.clone_url = clone_url + self.mirror_url = mirror_url + self.hooks_url = hooks_url + self.svn_url = svn_url + self.homepage = homepage + self.language = language + self.forks_count = forks_count + self.stargazers_count = stargazers_count + self.watchers_count = watchers_count + self.size = size + self.default_branch = default_branch + self.open_issues_count = open_issues_count + self.is_template = is_template + self.topics = topics + self.has_issues = has_issues + self.has_projects = has_projects + self.has_wiki = has_wiki + self.has_pages = has_pages + self.has_downloads = has_downloads + self.has_discussions = has_discussions + self.archived = archived + self.disabled = disabled + self.visibility = visibility + self.pushed_at = pushed_at + self.created_at = created_at + self.updated_at = updated_at + self.permissions = permissions + self.role_name = role_name + self.temp_clone_token = temp_clone_token + self.delete_branch_on_merge = delete_branch_on_merge + self.subscribers_count = subscribers_count + self.network_count = network_count + self.code_of_conduct = code_of_conduct + self.license = license + self.forks = forks + self.open_issues = open_issues + self.watchers = watchers + self.allow_forking = allow_forking + self.web_commit_signoff_required = web_commit_signoff_required + self.security_and_analysis = security_and_analysis } public enum CodingKeys: String, CodingKey { case id case node_id case name - case slug + case full_name + case owner + case _private = "private" + case html_url case description - case privacy - case notification_setting - case permission - case permissions + case fork case url - case html_url - case members_url - case repositories_url - case parent + 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 downloads_url + case events_url + case forks_url + case git_commits_url + case git_refs_url + case git_tags_url + case git_url + 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 notifications_url + case pulls_url + case releases_url + case ssh_url + case stargazers_url + case statuses_url + case subscribers_url + case subscription_url + case tags_url + case teams_url + case trees_url + case clone_url + case mirror_url + case hooks_url + case svn_url + case homepage + case language + case forks_count + case stargazers_count + case watchers_count + case size + case default_branch + case open_issues_count + case is_template + case topics + case has_issues + case has_projects + case has_wiki + case has_pages + case has_downloads + case has_discussions + case archived + case disabled + case visibility + case pushed_at + case created_at + case updated_at + case permissions + case role_name + case temp_clone_token + case delete_branch_on_merge + case subscribers_count + case network_count + case code_of_conduct + case license + case forks + case open_issues + case watchers + case allow_forking + case web_commit_signoff_required + case security_and_analysis } } /// Organization Invitation @@ -3466,7 +3614,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-invitation`. public struct organization_hyphen_invitation: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/organization-invitation/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/organization-invitation/login`. public var login: Swift.String? /// - Remark: Generated from `#/components/schemas/organization-invitation/email`. @@ -3505,7 +3653,7 @@ public enum Components { /// - invitation_teams_url: /// - invitation_source: public init( - id: Swift.Int, + id: Swift.Int64, login: Swift.String? = nil, email: Swift.String? = nil, role: Swift.String, @@ -5114,6 +5262,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -5130,10 +5282,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias username = Swift.String - /// The slug of the team name. - /// - /// - Remark: Generated from `#/components/parameters/team-slug`. - public typealias team_hyphen_slug = Swift.String /// The number that identifies the discussion. /// /// - Remark: Generated from `#/components/parameters/discussion-number`. @@ -5763,7 +5911,8 @@ public enum Operations { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -5929,7 +6078,8 @@ public enum Operations { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -6298,7 +6448,8 @@ public enum Operations { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -6375,7 +6526,8 @@ public enum Operations { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -6587,7 +6739,8 @@ public enum Operations { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -6776,7 +6929,8 @@ public enum Operations { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -6928,7 +7082,8 @@ public enum Operations { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7116,7 +7271,8 @@ public enum Operations { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7202,7 +7358,8 @@ public enum Operations { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -7414,7 +7571,8 @@ public enum Operations { /// /// 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)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7592,7 +7750,8 @@ public enum Operations { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -7751,7 +7910,8 @@ public enum Operations { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7936,7 +8096,8 @@ public enum Operations { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -8029,7 +8190,8 @@ public enum Operations { /// /// 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`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -8422,10 +8584,11 @@ public enum Operations { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -8606,13 +8769,15 @@ public enum Operations { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -8851,9 +9016,11 @@ public enum Operations { /// /// 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. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -8964,7 +9131,8 @@ public enum Operations { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -9153,7 +9321,8 @@ public enum Operations { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -9330,7 +9499,8 @@ public enum Operations { /// /// 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. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -9564,7 +9734,8 @@ public enum Operations { /// /// 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. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -9648,7 +9819,8 @@ public enum Operations { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -9843,7 +10015,8 @@ public enum Operations { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -10054,7 +10227,8 @@ public enum Operations { /// /// 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. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -10175,7 +10349,8 @@ public enum Operations { /// /// 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. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -10266,7 +10441,8 @@ public enum Operations { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. @@ -10453,7 +10629,8 @@ public enum Operations { } /// Get a team (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -10608,11 +10785,13 @@ public enum Operations { } /// Update a team (Legacy) /// - /// **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. + /// > [!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. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -10968,7 +11147,8 @@ public enum Operations { } /// Delete a team (Legacy) /// - /// **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. + /// > [!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. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -11126,7 +11306,8 @@ public enum Operations { } /// List discussions (Legacy) /// - /// **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. + /// > [!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. /// /// List all discussions on a team's page. /// @@ -11320,7 +11501,8 @@ public enum Operations { } /// Create a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new discussion post on a team's page. /// @@ -11502,7 +11684,8 @@ public enum Operations { } /// Get a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific discussion on a team's page. /// @@ -11647,7 +11830,8 @@ public enum Operations { } /// Update a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -11828,7 +12012,8 @@ public enum Operations { } /// Delete a discussion (Legacy) /// - /// **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. + /// > [!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. /// /// Delete a discussion from a team's page. /// @@ -11907,7 +12092,8 @@ public enum Operations { } /// List discussion comments (Legacy) /// - /// **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. + /// > [!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. /// /// List all comments on a team discussion. /// @@ -12110,7 +12296,8 @@ public enum Operations { } /// Create a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Creates a new comment on a team discussion. /// @@ -12283,7 +12470,8 @@ public enum Operations { } /// Get a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Get a specific comment on a team discussion. /// @@ -12435,7 +12623,8 @@ public enum Operations { } /// Update a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Edits the body text of a discussion comment. /// @@ -12613,7 +12802,8 @@ public enum Operations { } /// Delete a discussion comment (Legacy) /// - /// **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. + /// > [!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. /// /// Deletes a comment on a team discussion. /// @@ -12699,7 +12889,8 @@ public enum Operations { } /// List pending team invitations (Legacy) /// - /// **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. + /// > [!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. /// /// 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`. /// @@ -12879,7 +13070,8 @@ public enum Operations { } /// List team members (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -13209,7 +13401,8 @@ public enum Operations { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -13413,7 +13606,8 @@ public enum Operations { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -13515,7 +13709,8 @@ public enum Operations { } /// Get team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// Team members will include the members of child teams. /// @@ -13688,13 +13883,15 @@ public enum Operations { } /// Add or update team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -13949,13 +14146,15 @@ public enum Operations { } /// Remove team membership for a user (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -14057,7 +14256,8 @@ public enum Operations { } /// List team projects (Legacy) /// - /// **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. + /// > [!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. /// /// Lists the organization projects for a team. /// @@ -14260,7 +14460,8 @@ public enum Operations { } /// Check team permissions for a project (Legacy) /// - /// **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. + /// > [!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. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -14430,7 +14631,8 @@ public enum Operations { } /// Add or update team project permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -14703,7 +14905,8 @@ public enum Operations { } /// Remove a project from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -14868,7 +15071,8 @@ public enum Operations { } /// List team repositories (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -15069,9 +15273,11 @@ public enum Operations { } /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!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. /// - /// **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. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -15275,7 +15481,8 @@ public enum Operations { } /// Add or update team repository permissions (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -15483,7 +15690,8 @@ public enum Operations { } /// Remove a repository from a team (Legacy) /// - /// **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. + /// > [!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. /// /// 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. /// @@ -15567,7 +15775,8 @@ public enum Operations { } /// List child teams (Legacy) /// - /// **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. + /// > [!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. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. diff --git a/Sources/users/Client.swift b/Sources/users/Client.swift index acf0bec1ead..61359f3a9e4 100644 --- a/Sources/users/Client.swift +++ b/Sources/users/Client.swift @@ -4362,6 +4362,96 @@ public struct Client: APIProtocol { } ) } + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + public func users_sol_get_hyphen_by_hyphen_id(_ input: Operations.users_sol_get_hyphen_by_hyphen_id.Input) async throws -> Operations.users_sol_get_hyphen_by_hyphen_id.Output { + try await client.send( + input: input, + forOperation: Operations.users_sol_get_hyphen_by_hyphen_id.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/user/{}", + parameters: [ + input.path.account_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.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.users_sol_get_hyphen_by_hyphen_id.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)) + 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 users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. @@ -4540,6 +4630,142 @@ public struct Client: APIProtocol { } ) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + public func users_sol_list_hyphen_attestations(_ input: Operations.users_sol_list_hyphen_attestations.Input) async throws -> Operations.users_sol_list_hyphen_attestations.Output { + try await client.send( + input: input, + forOperation: Operations.users_sol_list_hyphen_attestations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/users/{}/attestations/{}", + parameters: [ + input.path.username, + input.path.subject_digest + ] + ) + 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: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + 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.users_sol_list_hyphen_attestations.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.users_sol_list_hyphen_attestations.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)) + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.users_sol_list_hyphen_attestations.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.empty_hyphen_object.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + case 204: + return .noContent(.init()) + 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 followers of a user /// /// Lists the people following the specified user. diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index cd172f78da8..2cb9a226f61 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -265,6 +265,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /user/ssh_signing_keys/{ssh_signing_key_id}`. /// - Remark: Generated from `#/paths//user/ssh_signing_keys/{ssh_signing_key_id}/delete(users/delete-ssh-signing-key-for-authenticated-user)`. func users_sol_delete_hyphen_ssh_hyphen_signing_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.users_sol_delete_hyphen_ssh_hyphen_signing_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.users_sol_delete_hyphen_ssh_hyphen_signing_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user.Output + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + func users_sol_get_hyphen_by_hyphen_id(_ input: Operations.users_sol_get_hyphen_by_hyphen_id.Input) async throws -> Operations.users_sol_get_hyphen_by_hyphen_id.Output /// List users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. @@ -285,6 +296,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /users/{username}`. /// - Remark: Generated from `#/paths//users/{username}/get(users/get-by-username)`. func users_sol_get_hyphen_by_hyphen_username(_ input: Operations.users_sol_get_hyphen_by_hyphen_username.Input) async throws -> Operations.users_sol_get_hyphen_by_hyphen_username.Output + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + func users_sol_list_hyphen_attestations(_ input: Operations.users_sol_list_hyphen_attestations.Input) async throws -> Operations.users_sol_list_hyphen_attestations.Output /// List followers of a user /// /// Lists the people following the specified user. @@ -845,6 +867,25 @@ extension APIProtocol { headers: headers )) } + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + public func users_sol_get_hyphen_by_hyphen_id( + path: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Path, + headers: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Headers = .init() + ) async throws -> Operations.users_sol_get_hyphen_by_hyphen_id.Output { + try await users_sol_get_hyphen_by_hyphen_id(Operations.users_sol_get_hyphen_by_hyphen_id.Input( + path: path, + headers: headers + )) + } /// List users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. @@ -881,6 +922,27 @@ extension APIProtocol { headers: headers )) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + public func users_sol_list_hyphen_attestations( + path: Operations.users_sol_list_hyphen_attestations.Input.Path, + query: Operations.users_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.users_sol_list_hyphen_attestations.Input.Headers = .init() + ) async throws -> Operations.users_sol_list_hyphen_attestations.Output { + try await users_sol_list_hyphen_attestations(Operations.users_sol_list_hyphen_attestations.Input( + path: path, + query: query, + headers: headers + )) + } /// List followers of a user /// /// Lists the people following the specified user. @@ -1040,7 +1102,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1103,7 +1165,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1337,7 +1399,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/public-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/public-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/avatar_url`. @@ -1494,7 +1556,7 @@ public enum Components { /// - collaborators: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1624,7 +1686,7 @@ public enum Components { forKey: .login ) id = try container.decode( - Swift.Int.self, + Swift.Int64.self, forKey: .id ) node_id = try container.decode( @@ -1823,6 +1885,16 @@ public enum Components { ]) } } + /// An object without any properties. + /// + /// - Remark: Generated from `#/components/schemas/empty-object`. + public struct empty_hyphen_object: Codable, Hashable, Sendable { + /// Creates a new `empty_hyphen_object`. + public init() {} + public init(from decoder: any Decoder) throws { + try decoder.ensureNoAdditionalProperties(knownKeys: []) + } + } /// Private User /// /// - Remark: Generated from `#/components/schemas/private-user`. @@ -1830,7 +1902,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/private-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/private-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/private-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/private-user/avatar_url`. @@ -1996,7 +2068,7 @@ public enum Components { /// - ldap_dn: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2171,7 +2243,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/gpg-key`. public struct gpg_hyphen_key: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/gpg-key/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/gpg-key/name`. public var name: Swift.String? /// - Remark: Generated from `#/components/schemas/gpg-key/primary_key_id`. @@ -2210,7 +2282,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload`. public struct subkeysPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload/id`. - public var id: Swift.Int? + public var id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload/primary_key_id`. public var primary_key_id: Swift.Int? /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload/key_id`. @@ -2280,7 +2352,7 @@ public enum Components { /// - raw_key: /// - revoked: public init( - id: Swift.Int? = nil, + id: Swift.Int64? = nil, primary_key_id: Swift.Int? = nil, key_id: Swift.String? = nil, public_key: Swift.String? = nil, @@ -2366,7 +2438,7 @@ public enum Components { /// - revoked: /// - raw_key: public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String? = nil, primary_key_id: Swift.Int? = nil, key_id: Swift.String, @@ -2423,7 +2495,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/key/key`. public var key: Swift.String /// - Remark: Generated from `#/components/schemas/key/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/key/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/key/title`. @@ -2446,7 +2518,7 @@ public enum Components { /// - read_only: public init( key: Swift.String, - id: Swift.Int, + id: Swift.Int64, url: Swift.String, title: Swift.String, created_at: Foundation.Date, @@ -2533,6 +2605,260 @@ public enum Components { case created_at } } + /// Sigstore Bundle v0.1 + /// + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0`. + public struct sigstore_hyphen_bundle_hyphen_0: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain`. + public struct x509CertificateChainPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificatesPayload`. + public struct certificatesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificatesPayload/rawBytes`. + public var rawBytes: Swift.String? + /// Creates a new `certificatesPayloadPayload`. + /// + /// - Parameters: + /// - rawBytes: + public init(rawBytes: Swift.String? = nil) { + self.rawBytes = rawBytes + } + public enum CodingKeys: String, CodingKey { + case rawBytes + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificates`. + public typealias certificatesPayload = [Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload.certificatesPayloadPayload] + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificates`. + public var certificates: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload.certificatesPayload? + /// Creates a new `x509CertificateChainPayload`. + /// + /// - Parameters: + /// - certificates: + public init(certificates: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload.certificatesPayload? = nil) { + self.certificates = certificates + } + public enum CodingKeys: String, CodingKey { + case certificates + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain`. + public var x509CertificateChain: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload`. + public struct tlogEntriesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logIndex`. + public var logIndex: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logId`. + public struct logIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logId/keyId`. + public var keyId: Swift.String? + /// Creates a new `logIdPayload`. + /// + /// - Parameters: + /// - keyId: + public init(keyId: Swift.String? = nil) { + self.keyId = keyId + } + public enum CodingKeys: String, CodingKey { + case keyId + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logId`. + public var logId: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.logIdPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion`. + public struct kindVersionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion/kind`. + public var kind: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion/version`. + public var version: Swift.String? + /// Creates a new `kindVersionPayload`. + /// + /// - Parameters: + /// - kind: + /// - version: + public init( + kind: Swift.String? = nil, + version: Swift.String? = nil + ) { + self.kind = kind + self.version = version + } + public enum CodingKeys: String, CodingKey { + case kind + case version + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion`. + public var kindVersion: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.kindVersionPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/integratedTime`. + public var integratedTime: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionPromise`. + public struct inclusionPromisePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionPromise/signedEntryTimestamp`. + public var signedEntryTimestamp: Swift.String? + /// Creates a new `inclusionPromisePayload`. + /// + /// - Parameters: + /// - signedEntryTimestamp: + public init(signedEntryTimestamp: Swift.String? = nil) { + self.signedEntryTimestamp = signedEntryTimestamp + } + public enum CodingKeys: String, CodingKey { + case signedEntryTimestamp + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionPromise`. + public var inclusionPromise: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.inclusionPromisePayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionProof`. + public var inclusionProof: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/canonicalizedBody`. + public var canonicalizedBody: Swift.String? + /// Creates a new `tlogEntriesPayloadPayload`. + /// + /// - Parameters: + /// - logIndex: + /// - logId: + /// - kindVersion: + /// - integratedTime: + /// - inclusionPromise: + /// - inclusionProof: + /// - canonicalizedBody: + public init( + logIndex: Swift.String? = nil, + logId: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.logIdPayload? = nil, + kindVersion: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.kindVersionPayload? = nil, + integratedTime: Swift.String? = nil, + inclusionPromise: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.inclusionPromisePayload? = nil, + inclusionProof: Swift.String? = nil, + canonicalizedBody: Swift.String? = nil + ) { + self.logIndex = logIndex + self.logId = logId + self.kindVersion = kindVersion + self.integratedTime = integratedTime + self.inclusionPromise = inclusionPromise + self.inclusionProof = inclusionProof + self.canonicalizedBody = canonicalizedBody + } + public enum CodingKeys: String, CodingKey { + case logIndex + case logId + case kindVersion + case integratedTime + case inclusionPromise + case inclusionProof + case canonicalizedBody + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntries`. + public typealias tlogEntriesPayload = [Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload] + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntries`. + public var tlogEntries: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/timestampVerificationData`. + public var timestampVerificationData: Swift.String? + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - x509CertificateChain: + /// - tlogEntries: + /// - timestampVerificationData: + public init( + x509CertificateChain: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload? = nil, + tlogEntries: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayload? = nil, + timestampVerificationData: Swift.String? = nil + ) { + self.x509CertificateChain = x509CertificateChain + self.tlogEntries = tlogEntries + self.timestampVerificationData = timestampVerificationData + } + public enum CodingKeys: String, CodingKey { + case x509CertificateChain + case tlogEntries + case timestampVerificationData + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial`. + public var verificationMaterial: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/payload`. + public var payload: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/payloadType`. + public var payloadType: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signaturesPayload`. + public struct signaturesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signaturesPayload/sig`. + public var sig: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signaturesPayload/keyid`. + public var keyid: Swift.String? + /// Creates a new `signaturesPayloadPayload`. + /// + /// - Parameters: + /// - sig: + /// - keyid: + public init( + sig: Swift.String? = nil, + keyid: Swift.String? = nil + ) { + self.sig = sig + self.keyid = keyid + } + public enum CodingKeys: String, CodingKey { + case sig + case keyid + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signatures`. + public typealias signaturesPayload = [Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload.signaturesPayloadPayload] + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signatures`. + public var signatures: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload.signaturesPayload? + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - payload: + /// - payloadType: + /// - signatures: + public init( + payload: Swift.String? = nil, + payloadType: Swift.String? = nil, + signatures: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload.signaturesPayload? = nil + ) { + self.payload = payload + self.payloadType = payloadType + self.signatures = signatures + } + public enum CodingKeys: String, CodingKey { + case payload + case payloadType + case signatures + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope`. + public var dsseEnvelope: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload? + /// Creates a new `sigstore_hyphen_bundle_hyphen_0`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload? = nil, + dsseEnvelope: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } /// Hovercard /// /// - Remark: Generated from `#/components/schemas/hovercard`. @@ -2603,6 +2929,14 @@ public enum Components { } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { + /// 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 `#/components/parameters/pagination-before`. + public typealias pagination_hyphen_before = Swift.String + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results 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 `#/components/parameters/pagination-after`. + public typealias pagination_hyphen_after = Swift.String /// 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 `#/components/parameters/per-page`. @@ -2611,6 +2945,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// account_id parameter + /// + /// - Remark: Generated from `#/components/parameters/account-id`. + public typealias account_hyphen_id = Swift.Int /// The handle for the GitHub user account. /// /// - Remark: Generated from `#/components/parameters/username`. @@ -10228,6 +10566,200 @@ public enum Operations { } } } + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + public enum users_sol_get_hyphen_by_hyphen_id { + public static let id: Swift.String = "users/get-by-id" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/user/{account_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// account_id parameter + /// + /// - Remark: Generated from `#/paths/user/{account_id}/GET/path/account_id`. + public var account_id: Components.Parameters.account_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - account_id: account_id parameter + public init(account_id: Components.Parameters.account_hyphen_id) { + self.account_id = account_id + } + } + public var path: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Path + /// - Remark: Generated from `#/paths/user/{account_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.users_sol_get_hyphen_by_hyphen_id.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Path, + headers: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content`. + @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) + 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 + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .private_hyphen_user(value): + try value.encode(to: encoder) + case let .public_hyphen_user(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/application\/json`. + case json(Operations.users_sol_get_hyphen_by_hyphen_id.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.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.users_sol_get_hyphen_by_hyphen_id.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.users_sol_get_hyphen_by_hyphen_id.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//user/{account_id}/get(users/get-by-id)/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 + ] + } + } + } /// List users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. @@ -10607,6 +11139,326 @@ public enum Operations { } } } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use 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 `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + public enum users_sol_list_hyphen_attestations { + public static let id: Swift.String = "users/list-attestations" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/path`. + public struct Path: Sendable, Hashable { + /// The handle for the GitHub user account. + /// + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/path/username`. + public var username: Components.Parameters.username + /// Subject Digest + /// + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/path/subject_digest`. + public var subject_digest: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - username: The handle for the GitHub user account. + /// - subject_digest: Subject Digest + public init( + username: Components.Parameters.username, + subject_digest: Swift.String + ) { + self.username = username + self.subject_digest = subject_digest + } + } + public var path: Operations.users_sol_list_hyphen_attestations.Input.Path + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/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/users/{username}/attestations/{subject_digest}/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// 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/users/{username}/attestations/{subject_digest}/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/users/{username}/attestations/{subject_digest}/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// 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)." + /// - 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)." + public init( + per_page: Components.Parameters.per_hyphen_page? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil + ) { + self.per_page = per_page + self.before = before + self.after = after + } + } + public var query: Operations.users_sol_list_hyphen_attestations.Input.Query + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/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.users_sol_list_hyphen_attestations.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.users_sol_list_hyphen_attestations.Input.Path, + query: Operations.users_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.users_sol_list_hyphen_attestations.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/users/{username}/attestations/{subject_digest}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload`. + public struct attestationsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public var bundle: Components.Schemas.sigstore_hyphen_bundle_hyphen_0? + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/repository_id`. + public var repository_id: Swift.Int? + /// Creates a new `attestationsPayloadPayload`. + /// + /// - Parameters: + /// - bundle: + /// - repository_id: + public init( + bundle: Components.Schemas.sigstore_hyphen_bundle_hyphen_0? = nil, + repository_id: Swift.Int? = nil + ) { + self.bundle = bundle + self.repository_id = repository_id + } + public enum CodingKeys: String, CodingKey { + case bundle + case repository_id + } + } + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public typealias attestationsPayload = [Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload] + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public var attestations: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - attestations: + public init(attestations: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? = nil) { + self.attestations = attestations + } + public enum CodingKeys: String, CodingKey { + case attestations + } + } + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/application\/json`. + case json(Operations.users_sol_list_hyphen_attestations.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.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.users_sol_list_hyphen_attestations.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.users_sol_list_hyphen_attestations.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/201/content/application\/json`. + case json(Components.Schemas.empty_hyphen_object) + /// 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.empty_hyphen_object { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.users_sol_list_hyphen_attestations.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.users_sol_list_hyphen_attestations.Output.Created.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.users_sol_list_hyphen_attestations.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.users_sol_list_hyphen_attestations.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.users_sol_list_hyphen_attestations.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.users_sol_list_hyphen_attestations.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/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 + ] + } + } + } /// List followers of a user /// /// Lists the people following the specified user. diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description deleted file mode 160000 index 4adfd3e5dd6..00000000000 --- a/Submodule/github/rest-api-description +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4adfd3e5dd6abe3d8e334ba494079071d78c7fd4