Skip to content

Commit 77a5fa4

Browse files
Update API Client
#### What's Changed --- ##### `GET` /core/groups/{group_uuid}/ ###### Parameters: Added: `include_children` in `query` ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` New required properties: - `children_obj` * Added property `children` (array) Items (string): * Added property `children_obj` (array) Items (object): > Stripped down group serializer to show relevant children for groups * Property `pk` (string) * Property `name` (string) * Property `is_superuser` (boolean) > Users added to this group will be superusers. * Property `attributes` (object) * Property `group_uuid` (string) ##### `PUT` /core/groups/{group_uuid}/ ###### Request: Changed content type : `application/json` * Added property `children` (array) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `PATCH` /core/groups/{group_uuid}/ ###### Request: Changed content type : `application/json` * Added property `children` (array) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `GET` /events/rules/{pbm_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `destination_group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `PUT` /events/rules/{pbm_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `destination_group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `PATCH` /events/rules/{pbm_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `destination_group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `GET` /policies/bindings/{policy_binding_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `PUT` /policies/bindings/{policy_binding_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `PATCH` /policies/bindings/{policy_binding_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `GET` /policies/geoip/{policy_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `countries` (array) ##### `PUT` /policies/geoip/{policy_uuid}/ ###### Request: Changed content type : `application/json` * Changed property `countries` (array) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `countries` (array) ##### `PATCH` /policies/geoip/{policy_uuid}/ ###### Request: Changed content type : `application/json` * Changed property `countries` (array) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `countries` (array) ##### `POST` /core/groups/ ###### Request: Changed content type : `application/json` * Added property `children` (array) ###### Return Type: Changed response : **201 Created** * Changed content type : `application/json` New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `GET` /core/groups/ ###### Parameters: Added: `include_children` in `query` ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `results` (array) Changed items (object): > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `POST` /events/rules/ ###### Return Type: Changed response : **201 Created** * Changed content type : `application/json` * Changed property `destination_group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `GET` /events/rules/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `results` (array) Changed items (object): > NotificationRule Serializer * Changed property `destination_group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `POST` /policies/bindings/ ###### Return Type: Changed response : **201 Created** * Changed content type : `application/json` * Changed property `group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `GET` /policies/bindings/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `results` (array) Changed items (object): > PolicyBinding Serializer * Changed property `group_obj` (object) > Group Serializer New required properties: - `children_obj` * Added property `children` (array) * Added property `children_obj` (array) ##### `POST` /policies/geoip/ ###### Request: Changed content type : `application/json` * Changed property `countries` (array) ###### Return Type: Changed response : **201 Created** * Changed content type : `application/json` * Changed property `countries` (array) ##### `GET` /policies/geoip/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `results` (array) Changed items (object): > GeoIP Policy Serializer * Changed property `countries` (array)
1 parent f006fa1 commit 77a5fa4

File tree

13 files changed

+167
-16
lines changed

13 files changed

+167
-16
lines changed

.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ Sources/authentikClient/Models/GoogleWorkspaceProviderRequest.swift
213213
Sources/authentikClient/Models/GoogleWorkspaceProviderUser.swift
214214
Sources/authentikClient/Models/GoogleWorkspaceProviderUserRequest.swift
215215
Sources/authentikClient/Models/Group.swift
216+
Sources/authentikClient/Models/GroupChild.swift
216217
Sources/authentikClient/Models/GroupKerberosSourceConnection.swift
217218
Sources/authentikClient/Models/GroupKerberosSourceConnectionRequest.swift
218219
Sources/authentikClient/Models/GroupLDAPSourceConnection.swift
@@ -971,6 +972,7 @@ docs/GoogleWorkspaceProviderRequest.md
971972
docs/GoogleWorkspaceProviderUser.md
972973
docs/GoogleWorkspaceProviderUserRequest.md
973974
docs/Group.md
975+
docs/GroupChild.md
974976
docs/GroupKerberosSourceConnection.md
975977
docs/GroupKerberosSourceConnectionRequest.md
976978
docs/GroupLDAPSourceConnection.md

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,7 @@ Class | Method | HTTP request | Description
12101210
- [GoogleWorkspaceProviderUser](docs/GoogleWorkspaceProviderUser.md)
12111211
- [GoogleWorkspaceProviderUserRequest](docs/GoogleWorkspaceProviderUserRequest.md)
12121212
- [Group](docs/Group.md)
1213+
- [GroupChild](docs/GroupChild.md)
12131214
- [GroupKerberosSourceConnection](docs/GroupKerberosSourceConnection.md)
12141215
- [GroupKerberosSourceConnectionRequest](docs/GroupKerberosSourceConnectionRequest.md)
12151216
- [GroupLDAPSourceConnection](docs/GroupLDAPSourceConnection.md)

Sources/authentikClient/APIs/CoreAPI.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,7 @@ open class CoreAPI {
14961496
/**
14971497

14981498
- parameter attributes: (query) Attributes (optional)
1499+
- parameter includeChildren: (query) (optional, default to false)
14991500
- parameter includeUsers: (query) (optional, default to true)
15001501
- parameter isSuperuser: (query) (optional)
15011502
- parameter membersByPk: (query) (optional)
@@ -1509,8 +1510,8 @@ open class CoreAPI {
15091510
- returns: PaginatedGroupList
15101511
*/
15111512
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
1512-
open class func coreGroupsList(attributes: String? = nil, includeUsers: Bool? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) async throws(ErrorResponse) -> PaginatedGroupList {
1513-
return try await coreGroupsListWithRequestBuilder(attributes: attributes, includeUsers: includeUsers, isSuperuser: isSuperuser, membersByPk: membersByPk, membersByUsername: membersByUsername, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, apiConfiguration: apiConfiguration).execute().body
1513+
open class func coreGroupsList(attributes: String? = nil, includeChildren: Bool? = nil, includeUsers: Bool? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) async throws(ErrorResponse) -> PaginatedGroupList {
1514+
return try await coreGroupsListWithRequestBuilder(attributes: attributes, includeChildren: includeChildren, includeUsers: includeUsers, isSuperuser: isSuperuser, membersByPk: membersByPk, membersByUsername: membersByUsername, name: name, ordering: ordering, page: page, pageSize: pageSize, search: search, apiConfiguration: apiConfiguration).execute().body
15141515
}
15151516

15161517
/**
@@ -1520,6 +1521,7 @@ open class CoreAPI {
15201521
- type: http
15211522
- name: authentik
15221523
- parameter attributes: (query) Attributes (optional)
1524+
- parameter includeChildren: (query) (optional, default to false)
15231525
- parameter includeUsers: (query) (optional, default to true)
15241526
- parameter isSuperuser: (query) (optional)
15251527
- parameter membersByPk: (query) (optional)
@@ -1532,14 +1534,15 @@ open class CoreAPI {
15321534
- parameter apiConfiguration: The configuration for the http request.
15331535
- returns: RequestBuilder<PaginatedGroupList>
15341536
*/
1535-
open class func coreGroupsListWithRequestBuilder(attributes: String? = nil, includeUsers: Bool? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) -> RequestBuilder<PaginatedGroupList> {
1537+
open class func coreGroupsListWithRequestBuilder(attributes: String? = nil, includeChildren: Bool? = nil, includeUsers: Bool? = nil, isSuperuser: Bool? = nil, membersByPk: [Int]? = nil, membersByUsername: [String]? = nil, name: String? = nil, ordering: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) -> RequestBuilder<PaginatedGroupList> {
15361538
let localVariablePath = "/core/groups/"
15371539
let localVariableURLString = apiConfiguration.basePath + localVariablePath
15381540
let localVariableParameters: [String: any Sendable]? = nil
15391541

15401542
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
15411543
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
15421544
"attributes": (wrappedValue: attributes?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
1545+
"include_children": (wrappedValue: includeChildren?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
15431546
"include_users": (wrappedValue: includeUsers?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
15441547
"is_superuser": (wrappedValue: isSuperuser?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
15451548
"members_by_pk": (wrappedValue: membersByPk?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
@@ -1653,13 +1656,14 @@ open class CoreAPI {
16531656
/**
16541657

16551658
- parameter groupUuid: (path) A UUID string identifying this Group.
1659+
- parameter includeChildren: (query) (optional, default to false)
16561660
- parameter includeUsers: (query) (optional, default to true)
16571661
- parameter apiConfiguration: The configuration for the http request.
16581662
- returns: Group
16591663
*/
16601664
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
1661-
open class func coreGroupsRetrieve(groupUuid: UUID, includeUsers: Bool? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) async throws(ErrorResponse) -> Group {
1662-
return try await coreGroupsRetrieveWithRequestBuilder(groupUuid: groupUuid, includeUsers: includeUsers, apiConfiguration: apiConfiguration).execute().body
1665+
open class func coreGroupsRetrieve(groupUuid: UUID, includeChildren: Bool? = nil, includeUsers: Bool? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) async throws(ErrorResponse) -> Group {
1666+
return try await coreGroupsRetrieveWithRequestBuilder(groupUuid: groupUuid, includeChildren: includeChildren, includeUsers: includeUsers, apiConfiguration: apiConfiguration).execute().body
16631667
}
16641668

16651669
/**
@@ -1669,11 +1673,12 @@ open class CoreAPI {
16691673
- type: http
16701674
- name: authentik
16711675
- parameter groupUuid: (path) A UUID string identifying this Group.
1676+
- parameter includeChildren: (query) (optional, default to false)
16721677
- parameter includeUsers: (query) (optional, default to true)
16731678
- parameter apiConfiguration: The configuration for the http request.
16741679
- returns: RequestBuilder<Group>
16751680
*/
1676-
open class func coreGroupsRetrieveWithRequestBuilder(groupUuid: UUID, includeUsers: Bool? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) -> RequestBuilder<Group> {
1681+
open class func coreGroupsRetrieveWithRequestBuilder(groupUuid: UUID, includeChildren: Bool? = nil, includeUsers: Bool? = nil, apiConfiguration: authentikClientAPIConfiguration = authentikClientAPIConfiguration.shared) -> RequestBuilder<Group> {
16771682
var localVariablePath = "/core/groups/{group_uuid}/"
16781683
let groupUuidPreEscape = "\(APIHelper.mapValueToPathItem(groupUuid))"
16791684
let groupUuidPostEscape = groupUuidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
@@ -1683,6 +1688,7 @@ open class CoreAPI {
16831688

16841689
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
16851690
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
1691+
"include_children": (wrappedValue: includeChildren?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
16861692
"include_users": (wrappedValue: includeUsers?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
16871693
])
16881694

Sources/authentikClient/Models/Group.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ public struct Group: Sendable, Codable, ParameterConvertible, Hashable {
2222
public var attributes: [String: JSONValue]?
2323
public var roles: [UUID]?
2424
public var rolesObj: [Role]
25+
public var children: [UUID]?
26+
public var childrenObj: [GroupChild]?
2527

26-
public init(pk: UUID, numPk: Int, name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, parentName: String?, users: [Int]? = nil, usersObj: [GroupMember]?, attributes: [String: JSONValue]? = nil, roles: [UUID]? = nil, rolesObj: [Role]) {
28+
public init(pk: UUID, numPk: Int, name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, parentName: String?, users: [Int]? = nil, usersObj: [GroupMember]?, attributes: [String: JSONValue]? = nil, roles: [UUID]? = nil, rolesObj: [Role], children: [UUID]? = nil, childrenObj: [GroupChild]?) {
2729
self.pk = pk
2830
self.numPk = numPk
2931
self.name = name
@@ -35,6 +37,8 @@ public struct Group: Sendable, Codable, ParameterConvertible, Hashable {
3537
self.attributes = attributes
3638
self.roles = roles
3739
self.rolesObj = rolesObj
40+
self.children = children
41+
self.childrenObj = childrenObj
3842
}
3943

4044
public enum CodingKeys: String, CodingKey, CaseIterable {
@@ -49,6 +53,8 @@ public struct Group: Sendable, Codable, ParameterConvertible, Hashable {
4953
case attributes
5054
case roles
5155
case rolesObj = "roles_obj"
56+
case children
57+
case childrenObj = "children_obj"
5258
}
5359

5460
// Encodable protocol methods
@@ -66,6 +72,8 @@ public struct Group: Sendable, Codable, ParameterConvertible, Hashable {
6672
try container.encodeIfPresent(attributes, forKey: .attributes)
6773
try container.encodeIfPresent(roles, forKey: .roles)
6874
try container.encode(rolesObj, forKey: .rolesObj)
75+
try container.encodeIfPresent(children, forKey: .children)
76+
try container.encode(childrenObj, forKey: .childrenObj)
6977
}
7078
}
7179

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//
2+
// GroupChild.swift
3+
//
4+
// Generated by openapi-generator
5+
// https://openapi-generator.tech
6+
//
7+
8+
import Foundation
9+
10+
/** Stripped down group serializer to show relevant children for groups */
11+
public struct GroupChild: Sendable, Codable, ParameterConvertible, Hashable {
12+
13+
public var pk: UUID
14+
public var name: String
15+
/** Users added to this group will be superusers. */
16+
public var isSuperuser: Bool?
17+
public var attributes: [String: JSONValue]?
18+
public var groupUuid: UUID
19+
20+
public init(pk: UUID, name: String, isSuperuser: Bool? = nil, attributes: [String: JSONValue]? = nil, groupUuid: UUID) {
21+
self.pk = pk
22+
self.name = name
23+
self.isSuperuser = isSuperuser
24+
self.attributes = attributes
25+
self.groupUuid = groupUuid
26+
}
27+
28+
public enum CodingKeys: String, CodingKey, CaseIterable {
29+
case pk
30+
case name
31+
case isSuperuser = "is_superuser"
32+
case attributes
33+
case groupUuid = "group_uuid"
34+
}
35+
36+
// Encodable protocol methods
37+
38+
public func encode(to encoder: Encoder) throws {
39+
var container = encoder.container(keyedBy: CodingKeys.self)
40+
try container.encode(pk, forKey: .pk)
41+
try container.encode(name, forKey: .name)
42+
try container.encodeIfPresent(isSuperuser, forKey: .isSuperuser)
43+
try container.encodeIfPresent(attributes, forKey: .attributes)
44+
try container.encode(groupUuid, forKey: .groupUuid)
45+
}
46+
}
47+

Sources/authentikClient/Models/GroupRequest.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ public struct GroupRequest: Sendable, Codable, ParameterConvertible, Hashable {
1818
public var users: [Int]?
1919
public var attributes: [String: JSONValue]?
2020
public var roles: [UUID]?
21+
public var children: [UUID]?
2122

22-
public init(name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: JSONValue]? = nil, roles: [UUID]? = nil) {
23+
public init(name: String, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: JSONValue]? = nil, roles: [UUID]? = nil, children: [UUID]? = nil) {
2324
self.name = name
2425
self.isSuperuser = isSuperuser
2526
self.parent = parent
2627
self.users = users
2728
self.attributes = attributes
2829
self.roles = roles
30+
self.children = children
2931
}
3032

3133
public enum CodingKeys: String, CodingKey, CaseIterable {
@@ -35,6 +37,7 @@ public struct GroupRequest: Sendable, Codable, ParameterConvertible, Hashable {
3537
case users
3638
case attributes
3739
case roles
40+
case children
3841
}
3942

4043
// Encodable protocol methods
@@ -47,6 +50,7 @@ public struct GroupRequest: Sendable, Codable, ParameterConvertible, Hashable {
4750
try container.encodeIfPresent(users, forKey: .users)
4851
try container.encodeIfPresent(attributes, forKey: .attributes)
4952
try container.encodeIfPresent(roles, forKey: .roles)
53+
try container.encodeIfPresent(children, forKey: .children)
5054
}
5155
}
5256

Sources/authentikClient/Models/PatchedGroupRequest.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ public struct PatchedGroupRequest: Sendable, Codable, ParameterConvertible, Hash
1818
public var users: [Int]?
1919
public var attributes: [String: JSONValue]?
2020
public var roles: [UUID]?
21+
public var children: [UUID]?
2122

22-
public init(name: String? = nil, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: JSONValue]? = nil, roles: [UUID]? = nil) {
23+
public init(name: String? = nil, isSuperuser: Bool? = nil, parent: UUID? = nil, users: [Int]? = nil, attributes: [String: JSONValue]? = nil, roles: [UUID]? = nil, children: [UUID]? = nil) {
2324
self.name = name
2425
self.isSuperuser = isSuperuser
2526
self.parent = parent
2627
self.users = users
2728
self.attributes = attributes
2829
self.roles = roles
30+
self.children = children
2931
}
3032

3133
public enum CodingKeys: String, CodingKey, CaseIterable {
@@ -35,6 +37,7 @@ public struct PatchedGroupRequest: Sendable, Codable, ParameterConvertible, Hash
3537
case users
3638
case attributes
3739
case roles
40+
case children
3841
}
3942

4043
// Encodable protocol methods
@@ -47,6 +50,7 @@ public struct PatchedGroupRequest: Sendable, Codable, ParameterConvertible, Hash
4750
try container.encodeIfPresent(users, forKey: .users)
4851
try container.encodeIfPresent(attributes, forKey: .attributes)
4952
try container.encodeIfPresent(roles, forKey: .roles)
53+
try container.encodeIfPresent(children, forKey: .children)
5054
}
5155
}
5256

0 commit comments

Comments
 (0)