FGA_BASE: adding base types and module registraiton#556
FGA_BASE: adding base types and module registraiton#556swaroopAkkineniWorkos wants to merge 7 commits intomainfrom
Conversation
|
@greptile review |
Greptile SummaryAdded foundational types and HTTP client support for the FGA (Fine-Grained Authorization) base module. This PR introduces four new authorization type models ( Key changes:
Confidence Score: 5/5
Important Files Changed
Class Diagram%%{init: {'theme': 'neutral'}}%%
classDiagram
class WorkOSModel {
<<BaseModel>>
}
class Resource {
+string object
+string id
+string external_id
+string name
+Optional~string~ description
+string resource_type_slug
+string organization_id
+Optional~string~ parent_resource_id
+string created_at
+string updated_at
}
class RoleAssignment {
+string object
+string id
+RoleAssignmentRole role
+RoleAssignmentResource resource
+string created_at
+string updated_at
}
class RoleAssignmentRole {
+string slug
}
class RoleAssignmentResource {
+string id
+string external_id
+string resource_type_slug
}
class AccessEvaluation {
+bool authorized
}
class AuthorizationOrganizationMembership {
+string object
+string id
+string user_id
+string organization_id
+string organization_name
+OrganizationMembershipStatus status
+Optional~Mapping~ custom_attributes
+string created_at
+string updated_at
}
WorkOSModel <|-- Resource
WorkOSModel <|-- RoleAssignment
WorkOSModel <|-- RoleAssignmentRole
WorkOSModel <|-- RoleAssignmentResource
WorkOSModel <|-- AccessEvaluation
WorkOSModel <|-- AuthorizationOrganizationMembership
RoleAssignment --> RoleAssignmentRole
RoleAssignment --> RoleAssignmentResource
Last reviewed commit: a5823c6 |
| from workos.types.workos_model import WorkOSModel | ||
| from workos.typing.literals import LiteralOrUntyped | ||
|
|
||
| OrganizationMembershipStatus = Literal["active", "inactive", "pending"] |
There was a problem hiding this comment.
Duplicated OrganizationMembershipStatus literal
This exact same Literal["active", "inactive", "pending"] type alias is already defined in src/workos/types/user_management/organization_membership.py:7. Consider importing from a shared location or re-exporting from one module to the other to avoid the definitions drifting apart over time.
There was a problem hiding this comment.
Just pushed up a change where I moved "OrganizationMembershipStatus" to it's own file to be imported
Description
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.