File tree Expand file tree Collapse file tree 4 files changed +31
-9
lines changed
src/workos/types/authorization Expand file tree Collapse file tree 4 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 1717 Role ,
1818 RoleList ,
1919)
20- from workos .types .authorization .role_assignment import RoleAssignment
20+ from workos .types .authorization .role_assignment import (
21+ RoleAssignment ,
22+ RoleAssignmentResource ,
23+ RoleAssignmentRole ,
24+ )
Original file line number Diff line number Diff line change @@ -10,13 +10,14 @@ class AuthorizationOrganizationMembership(WorkOSModel):
1010 """Representation of an Organization Membership returned by Authorization endpoints.
1111
1212 This is a separate type from the user_management OrganizationMembership because
13- authorization endpoints return memberships without `role` and `organization_name` fields .
13+ authorization endpoints return memberships without the `role` field .
1414 """
1515
1616 object : Literal ["organization_membership" ]
1717 id : str
1818 user_id : str
1919 organization_id : str
20+ organization_name : str
2021 status : LiteralOrUntyped [OrganizationMembershipStatus ]
2122 custom_attributes : Optional [Mapping [str , Any ]] = None
2223 created_at : str
Original file line number Diff line number Diff line change @@ -8,11 +8,13 @@ class Resource(WorkOSModel):
88
99 object : Literal ["authorization_resource" ]
1010 id : str
11- resource_type : str
12- resource_id : str
11+ external_id : str
12+ name : str
13+ description : Optional [str ] = None
14+ resource_type_slug : str
1315 organization_id : str
14- external_id : Optional [str ] = None
16+ parent_resource_id : Optional [str ] = None
1517 meta : Optional [Mapping [str , Any ]] = None
16- environment_id : str
18+ environment_id : Optional [ str ] = None
1719 created_at : str
1820 updated_at : str
Original file line number Diff line number Diff line change 33from workos .types .workos_model import WorkOSModel
44
55
6+ class RoleAssignmentRole (WorkOSModel ):
7+ """The role associated with a role assignment."""
8+
9+ slug : str
10+
11+
12+ class RoleAssignmentResource (WorkOSModel ):
13+ """The resource associated with a role assignment."""
14+
15+ id : str
16+ external_id : str
17+ resource_type_slug : str
18+
19+
620class RoleAssignment (WorkOSModel ):
721 """Representation of a WorkOS Authorization Role Assignment."""
822
923 object : Literal ["role_assignment" ]
1024 id : str
11- role_slug : str
12- role_name : str
13- role_id : str
25+ role : RoleAssignmentRole
26+ resource : RoleAssignmentResource
27+ created_at : str
28+ updated_at : str
You can’t perform that action at this time.
0 commit comments