diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 11537e99660..455631abe52 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -235,12 +235,12 @@ public struct Client: APIProtocol { /// **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)`. @@ -396,11 +396,10 @@ public struct Client: APIProtocol { /// /// **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)`. @@ -579,13 +578,13 @@ public struct Client: APIProtocol { /// 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. + /// 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)`. @@ -757,9 +756,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)`. @@ -927,13 +926,13 @@ public struct Client: APIProtocol { /// 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. + /// 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)`. @@ -1105,9 +1104,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)`. @@ -1466,9 +1465,9 @@ public struct Client: APIProtocol { /// /// 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)`. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index d8c6b23c057..74f586c6f5f 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -35,12 +35,12 @@ public protocol APIProtocol: Sendable { /// **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)`. @@ -49,11 +49,10 @@ public protocol APIProtocol: Sendable { /// /// **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)`. @@ -65,13 +64,13 @@ public protocol APIProtocol: Sendable { /// 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. + /// 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)`. @@ -87,9 +86,9 @@ 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)`. @@ -101,13 +100,13 @@ public protocol APIProtocol: Sendable { /// 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. + /// 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)`. @@ -123,9 +122,9 @@ 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)`. @@ -155,9 +154,9 @@ public protocol APIProtocol: Sendable { /// /// 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)`. @@ -200,12 +199,12 @@ extension APIProtocol { /// **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)`. @@ -222,11 +221,10 @@ extension APIProtocol { /// /// **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). - /// - /// 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)`. @@ -248,13 +246,13 @@ extension APIProtocol { /// 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. + /// 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)`. @@ -280,9 +278,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)`. @@ -304,13 +302,13 @@ extension APIProtocol { /// 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. + /// 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)`. @@ -336,9 +334,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)`. @@ -388,9 +386,9 @@ extension APIProtocol { /// /// 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)`. @@ -893,6 +891,91 @@ public enum Components { ]) } } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `organization_hyphen_simple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - node_id: + /// - url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, + members_url: Swift.String, + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.node_id = node_id + self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case node_id + case url + case repos_url + case events_url + case hooks_url + case issues_url + case members_url + case public_members_url + case avatar_url + case description + } + } /// The breakdown of Copilot Business seats for the organization. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown`. @@ -1614,6 +1697,79 @@ public enum Components { case plan } } + /// 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.Int + /// - 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.Int, + 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 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`. @@ -1669,12 +1825,45 @@ public enum Components { /// /// - 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. + /// 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 { @@ -1683,6 +1872,12 @@ public enum Components { } 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, @@ -1693,10 +1888,12 @@ public enum Components { switch self { case let .team(value): try value.encode(to: encoder) + case let .enterprise_hyphen_team(value): + try value.encode(to: encoder) } } } - /// The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. + /// 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? @@ -1724,7 +1921,8 @@ public enum Components { /// /// - 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. + /// - 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. @@ -1732,6 +1930,7 @@ public enum Components { /// - 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, @@ -1740,6 +1939,7 @@ public enum Components { 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 @@ -1749,6 +1949,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case assignee + case organization case assigning_team case pending_cancellation_date case last_activity_at @@ -1762,6 +1963,10 @@ public enum Components { 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 @@ -1788,6 +1993,7 @@ public enum Components { ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "assignee", + "organization", "assigning_team", "pending_cancellation_date", "last_activity_at", @@ -2225,12 +2431,12 @@ public enum Operations { /// **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)`. @@ -2483,11 +2689,10 @@ public enum Operations { /// /// **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). - /// - /// 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)`. @@ -2787,13 +2992,13 @@ public enum Operations { /// 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. + /// 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)`. @@ -3096,9 +3301,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)`. @@ -3397,13 +3602,13 @@ public enum Operations { /// 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. + /// 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)`. @@ -3706,9 +3911,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)`. @@ -4283,9 +4488,9 @@ public enum Operations { /// /// 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)`. diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index ace3c8c9a66..80449eaa97a 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -2887,7 +2887,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)`. @@ -4134,7 +4134,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) @@ -4229,7 +4229,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) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 81ae2addf46..67d7ea777a3 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -338,7 +338,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)`. @@ -1383,7 +1383,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)`. @@ -6108,6 +6108,390 @@ public enum Components { case updated_at } } + /// The Relationship a Team has with a role. + /// + /// - 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/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, + 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 + } + } + /// 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 + } + } + /// 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 /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request`. @@ -6482,6 +6866,8 @@ public enum Components { @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 /// @@ -6694,113 +7080,6 @@ 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 { @@ -12956,7 +13235,7 @@ public enum Operations { /// /// **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)`. @@ -15250,12 +15529,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): @@ -15495,12 +15774,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): @@ -19053,6 +19332,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 /// diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 4fd5a8a824a..74be912e3db 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -8093,6 +8093,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, diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index f9a4d08a5f8..79064437729 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -21600,10 +21600,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`. @@ -36294,11 +36290,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 +36313,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 +36322,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 @@ -38962,6 +38958,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. diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index b29a2c59ea4..62b23af16ec 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit b29a2c59ea46a74c2ec81e8e2800c6d5a677b187 +Subproject commit 62b23af16ec379af0466b516ccf1f0dd8373f91b