@@ -33,6 +33,15 @@ public protocol APIProtocol: Sendable {
3333 /// - Remark: HTTP `GET /organizations/{org}/dependabot/repository-access`.
3434 /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/get(dependabot/repository-access-for-org)`.
3535 func dependabotRepositoryAccessForOrg( _ input: Operations . DependabotRepositoryAccessForOrg . Input ) async throws -> Operations . DependabotRepositoryAccessForOrg . Output
36+ /// Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies.
37+ ///
38+ /// > [!NOTE]
39+ /// > This operation supports both server-to-server and user-to-server access.
40+ /// Unauthorized users will not see the existence of this endpoint.
41+ ///
42+ /// - Remark: HTTP `PATCH /organizations/{org}/dependabot/repository-access`.
43+ /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/patch(dependabot/update-repository-access-for-org)`.
44+ func dependabotUpdateRepositoryAccessForOrg( _ input: Operations . DependabotUpdateRepositoryAccessForOrg . Input ) async throws -> Operations . DependabotUpdateRepositoryAccessForOrg . Output
3645 /// Set the default repository access level for Dependabot
3746 ///
3847 /// > [!NOTE]
@@ -264,6 +273,25 @@ extension APIProtocol {
264273 headers: headers
265274 ) )
266275 }
276+ /// Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies.
277+ ///
278+ /// > [!NOTE]
279+ /// > This operation supports both server-to-server and user-to-server access.
280+ /// Unauthorized users will not see the existence of this endpoint.
281+ ///
282+ /// - Remark: HTTP `PATCH /organizations/{org}/dependabot/repository-access`.
283+ /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/patch(dependabot/update-repository-access-for-org)`.
284+ public func dependabotUpdateRepositoryAccessForOrg(
285+ path: Operations . DependabotUpdateRepositoryAccessForOrg . Input . Path ,
286+ headers: Operations . DependabotUpdateRepositoryAccessForOrg . Input . Headers = . init( ) ,
287+ body: Operations . DependabotUpdateRepositoryAccessForOrg . Input . Body
288+ ) async throws -> Operations . DependabotUpdateRepositoryAccessForOrg . Output {
289+ try await dependabotUpdateRepositoryAccessForOrg ( Operations . DependabotUpdateRepositoryAccessForOrg. Input (
290+ path: path,
291+ headers: headers,
292+ body: body
293+ ) )
294+ }
267295 /// Set the default repository access level for Dependabot
268296 ///
269297 /// > [!NOTE]
@@ -4642,6 +4670,224 @@ public enum Operations {
46424670 }
46434671 }
46444672 }
4673+ /// Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies.
4674+ ///
4675+ /// > [!NOTE]
4676+ /// > This operation supports both server-to-server and user-to-server access.
4677+ /// Unauthorized users will not see the existence of this endpoint.
4678+ ///
4679+ /// - Remark: HTTP `PATCH /organizations/{org}/dependabot/repository-access`.
4680+ /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/patch(dependabot/update-repository-access-for-org)`.
4681+ public enum DependabotUpdateRepositoryAccessForOrg {
4682+ public static let id : Swift . String = " dependabot/update-repository-access-for-org "
4683+ public struct Input : Sendable , Hashable {
4684+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/path`.
4685+ public struct Path : Sendable , Hashable {
4686+ /// The organization name. The name is not case sensitive.
4687+ ///
4688+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/path/org`.
4689+ public var org : Components . Parameters . Org
4690+ /// Creates a new `Path`.
4691+ ///
4692+ /// - Parameters:
4693+ /// - org: The organization name. The name is not case sensitive.
4694+ public init ( org: Components . Parameters . Org ) {
4695+ self . org = org
4696+ }
4697+ }
4698+ public var path : Operations . DependabotUpdateRepositoryAccessForOrg . Input . Path
4699+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/header`.
4700+ public struct Headers : Sendable , Hashable {
4701+ public var accept : [ OpenAPIRuntime . AcceptHeaderContentType < Operations . DependabotUpdateRepositoryAccessForOrg . AcceptableContentType > ]
4702+ /// Creates a new `Headers`.
4703+ ///
4704+ /// - Parameters:
4705+ /// - accept:
4706+ public init ( accept: [ OpenAPIRuntime . AcceptHeaderContentType < Operations . DependabotUpdateRepositoryAccessForOrg . AcceptableContentType > ] = . defaultValues( ) ) {
4707+ self . accept = accept
4708+ }
4709+ }
4710+ public var headers : Operations . DependabotUpdateRepositoryAccessForOrg . Input . Headers
4711+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/requestBody`.
4712+ @frozen public enum Body : Sendable , Hashable {
4713+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/requestBody/json`.
4714+ @frozen public enum JsonPayload : Codable , Hashable , Sendable {
4715+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/requestBody/json/case1`.
4716+ public struct Case1Payload : Codable , Hashable , Sendable {
4717+ /// Creates a new `Case1Payload`.
4718+ public init ( ) { }
4719+ }
4720+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/requestBody/json/case1`.
4721+ case case1( Operations . DependabotUpdateRepositoryAccessForOrg . Input . Body . JsonPayload . Case1Payload )
4722+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/requestBody/json/case2`.
4723+ public struct Case2Payload : Codable , Hashable , Sendable {
4724+ /// Creates a new `Case2Payload`.
4725+ public init ( ) { }
4726+ }
4727+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/requestBody/json/case2`.
4728+ case case2( Operations . DependabotUpdateRepositoryAccessForOrg . Input . Body . JsonPayload . Case2Payload )
4729+ public init ( from decoder: any Decoder ) throws {
4730+ var errors : [ any Error ] = [ ]
4731+ do {
4732+ self = . case1( try . init( from: decoder) )
4733+ return
4734+ } catch {
4735+ errors. append ( error)
4736+ }
4737+ do {
4738+ self = . case2( try . init( from: decoder) )
4739+ return
4740+ } catch {
4741+ errors. append ( error)
4742+ }
4743+ throw Swift . DecodingError. failedToDecodeOneOfSchema (
4744+ type: Self . self,
4745+ codingPath: decoder. codingPath,
4746+ errors: errors
4747+ )
4748+ }
4749+ public func encode( to encoder: any Encoder ) throws {
4750+ switch self {
4751+ case let . case1( value) :
4752+ try value. encode ( to: encoder)
4753+ case let . case2( value) :
4754+ try value. encode ( to: encoder)
4755+ }
4756+ }
4757+ }
4758+ /// - Remark: Generated from `#/paths/organizations/{org}/dependabot/repository-access/PATCH/requestBody/content/application\/json`.
4759+ case json( Operations . DependabotUpdateRepositoryAccessForOrg . Input . Body . JsonPayload )
4760+ }
4761+ public var body : Operations . DependabotUpdateRepositoryAccessForOrg . Input . Body
4762+ /// Creates a new `Input`.
4763+ ///
4764+ /// - Parameters:
4765+ /// - path:
4766+ /// - headers:
4767+ /// - body:
4768+ public init (
4769+ path: Operations . DependabotUpdateRepositoryAccessForOrg . Input . Path ,
4770+ headers: Operations . DependabotUpdateRepositoryAccessForOrg . Input . Headers = . init( ) ,
4771+ body: Operations . DependabotUpdateRepositoryAccessForOrg . Input . Body
4772+ ) {
4773+ self . path = path
4774+ self . headers = headers
4775+ self . body = body
4776+ }
4777+ }
4778+ @frozen public enum Output : Sendable , Hashable {
4779+ public struct NoContent : Sendable , Hashable {
4780+ /// Creates a new `NoContent`.
4781+ public init ( ) { }
4782+ }
4783+ /// Response
4784+ ///
4785+ /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/patch(dependabot/update-repository-access-for-org)/responses/204`.
4786+ ///
4787+ /// HTTP response code: `204 noContent`.
4788+ case noContent( Operations . DependabotUpdateRepositoryAccessForOrg . Output . NoContent )
4789+ /// Response
4790+ ///
4791+ /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/patch(dependabot/update-repository-access-for-org)/responses/204`.
4792+ ///
4793+ /// HTTP response code: `204 noContent`.
4794+ public static var noContent : Self {
4795+ . noContent( . init( ) )
4796+ }
4797+ /// The associated value of the enum case if `self` is `.noContent`.
4798+ ///
4799+ /// - Throws: An error if `self` is not `.noContent`.
4800+ /// - SeeAlso: `.noContent`.
4801+ public var noContent : Operations . DependabotUpdateRepositoryAccessForOrg . Output . NoContent {
4802+ get throws {
4803+ switch self {
4804+ case let . noContent( response) :
4805+ return response
4806+ default :
4807+ try throwUnexpectedResponseStatus (
4808+ expectedStatus: " noContent " ,
4809+ response: self
4810+ )
4811+ }
4812+ }
4813+ }
4814+ /// Forbidden
4815+ ///
4816+ /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/patch(dependabot/update-repository-access-for-org)/responses/403`.
4817+ ///
4818+ /// HTTP response code: `403 forbidden`.
4819+ case forbidden( Components . Responses . Forbidden )
4820+ /// The associated value of the enum case if `self` is `.forbidden`.
4821+ ///
4822+ /// - Throws: An error if `self` is not `.forbidden`.
4823+ /// - SeeAlso: `.forbidden`.
4824+ public var forbidden : Components . Responses . Forbidden {
4825+ get throws {
4826+ switch self {
4827+ case let . forbidden( response) :
4828+ return response
4829+ default :
4830+ try throwUnexpectedResponseStatus (
4831+ expectedStatus: " forbidden " ,
4832+ response: self
4833+ )
4834+ }
4835+ }
4836+ }
4837+ /// Resource not found
4838+ ///
4839+ /// - Remark: Generated from `#/paths//organizations/{org}/dependabot/repository-access/patch(dependabot/update-repository-access-for-org)/responses/404`.
4840+ ///
4841+ /// HTTP response code: `404 notFound`.
4842+ case notFound( Components . Responses . NotFound )
4843+ /// The associated value of the enum case if `self` is `.notFound`.
4844+ ///
4845+ /// - Throws: An error if `self` is not `.notFound`.
4846+ /// - SeeAlso: `.notFound`.
4847+ public var notFound : Components . Responses . NotFound {
4848+ get throws {
4849+ switch self {
4850+ case let . notFound( response) :
4851+ return response
4852+ default :
4853+ try throwUnexpectedResponseStatus (
4854+ expectedStatus: " notFound " ,
4855+ response: self
4856+ )
4857+ }
4858+ }
4859+ }
4860+ /// Undocumented response.
4861+ ///
4862+ /// A response with a code that is not documented in the OpenAPI document.
4863+ case undocumented( statusCode: Swift . Int , OpenAPIRuntime . UndocumentedPayload )
4864+ }
4865+ @frozen public enum AcceptableContentType : AcceptableProtocol {
4866+ case json
4867+ case other( Swift . String )
4868+ public init ? ( rawValue: Swift . String ) {
4869+ switch rawValue. lowercased ( ) {
4870+ case " application/json " :
4871+ self = . json
4872+ default :
4873+ self = . other( rawValue)
4874+ }
4875+ }
4876+ public var rawValue : Swift . String {
4877+ switch self {
4878+ case let . other( string) :
4879+ return string
4880+ case . json:
4881+ return " application/json "
4882+ }
4883+ }
4884+ public static var allCases : [ Self ] {
4885+ [
4886+ . json
4887+ ]
4888+ }
4889+ }
4890+ }
46454891 /// Set the default repository access level for Dependabot
46464892 ///
46474893 /// > [!NOTE]
0 commit comments