-
Notifications
You must be signed in to change notification settings - Fork 26
feat: fga adding base types and module registraiton #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
swaroopAkkineniWorkos
wants to merge
44
commits into
main
Choose a base branch
from
ENT-5224-python-sdk-for-fga-worktree-fuck-around
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,022
−113
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
ab35617
adding base types and module registraiton
swaroopAkkineniWorkos 5f6892d
moar
swaroopAkkineniWorkos 0bc40fb
lol
swaroopAkkineniWorkos 526eb7d
lol
swaroopAkkineniWorkos 13dad51
nits for re-dupe OrganizationMembershipStatus
swaroopAkkineniWorkos ff239c7
Format
swaroopAkkineniWorkos a5823c6
adding AUTHORIZATION_RESOURCES_PATH to base
swaroopAkkineniWorkos 8dd434f
FGA_1: create/delete/get/update resource (#563)
swaroopAkkineniWorkos fe59018
FGA_2: listResources(), get/update/delete resource_by_external_id (#569)
swaroopAkkineniWorkos a50f5d5
FGA_3: check() (#568)
swaroopAkkineniWorkos 3eca552
remove organization_name for list
swaroopAkkineniWorkos fa170f0
casade
swaroopAkkineniWorkos 035f1c3
lol
swaroopAkkineniWorkos 8fbbc5f
moar
swaroopAkkineniWorkos 7342ad4
Create
swaroopAkkineniWorkos 3f25161
test update
swaroopAkkineniWorkos dfca291
break outp
swaroopAkkineniWorkos 5f72f0d
lol
swaroopAkkineniWorkos a7c6d28
moar
swaroopAkkineniWorkos 0111cde
moar
swaroopAkkineniWorkos ba59cf6
merge conflcits
swaroopAkkineniWorkos 6b8ca59
refactor authorization resource
swaroopAkkineniWorkos f04c33e
Test updates
swaroopAkkineniWorkos 778aa67
get_resource
swaroopAkkineniWorkos dcd8bda
create
swaroopAkkineniWorkos 070c2ca
Get changes
swaroopAkkineniWorkos 58564df
delete
swaroopAkkineniWorkos a71ebc6
list
swaroopAkkineniWorkos 2199f79
get_resource_by_external_id
swaroopAkkineniWorkos d3e3c79
update_resource_by_external_id
swaroopAkkineniWorkos 3127241
delete_resource_by_external_id
swaroopAkkineniWorkos a554548
check
swaroopAkkineniWorkos d7c4f7e
Cleaner tests
swaroopAkkineniWorkos 5211752
nits
swaroopAkkineniWorkos a6d1db9
lint
swaroopAkkineniWorkos 17c754c
type fix
swaroopAkkineniWorkos 7c96c59
type fix
swaroopAkkineniWorkos 954bb37
type fix
swaroopAkkineniWorkos 0e5eaab
update
swaroopAkkineniWorkos 87eb732
final nit
swaroopAkkineniWorkos 01e567d
FGA_4: list/assign/remove role, remove roleAssginment (#570)
swaroopAkkineniWorkos 0ef43e8
Merge branch 'main' into ENT-5224-python-sdk-for-fga-worktree-fuck-ar…
swaroopAkkineniWorkos 08f1c84
feat: FGA_5 list_resources_for_membership, list_memberships_for_resou…
swaroopAkkineniWorkos aa664d9
lol
swaroopAkkineniWorkos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,32 @@ | ||
| from workos.types.authorization.access_check_response import AccessCheckResponse | ||
| from workos.types.authorization.environment_role import ( | ||
| EnvironmentRole, | ||
| EnvironmentRoleList, | ||
| ) | ||
| from workos.types.authorization.organization_membership import ( | ||
| AuthorizationOrganizationMembership, | ||
| ) | ||
| from workos.types.authorization.organization_role import ( | ||
| OrganizationRole, | ||
| OrganizationRoleEvent, | ||
| OrganizationRoleList, | ||
| ) | ||
| from workos.types.authorization.permission import Permission | ||
| from workos.types.authorization.parent_resource_identifier import ( | ||
| ParentResourceIdentifier, | ||
| ) | ||
| from workos.types.authorization.authorization_resource import AuthorizationResource | ||
| from workos.types.authorization.resource_identifier import ( | ||
| ResourceIdentifier, | ||
| ResourceIdentifierByExternalId, | ||
| ResourceIdentifierById, | ||
| ) | ||
| from workos.types.authorization.role import ( | ||
| Role, | ||
| RoleList, | ||
| ) | ||
| from workos.types.authorization.role_assignment import ( | ||
| RoleAssignment, | ||
| RoleAssignmentResource, | ||
| RoleAssignmentRole, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from workos.types.workos_model import WorkOSModel | ||
|
|
||
|
|
||
| class AccessCheckResponse(WorkOSModel): | ||
| authorized: bool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from typing import Literal | ||
|
|
||
| Assignment = Literal["direct", "indirect"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| from typing import Literal, Optional | ||
|
|
||
| from workos.types.workos_model import WorkOSModel | ||
|
|
||
|
|
||
| class AuthorizationResource(WorkOSModel): | ||
| """Representation of an Authorization Resource.""" | ||
|
|
||
| object: Literal["authorization_resource"] | ||
| id: str | ||
| external_id: str | ||
| name: str | ||
| description: Optional[str] = None | ||
| resource_type_slug: str | ||
| organization_id: str | ||
| parent_resource_id: Optional[str] = None | ||
| created_at: str | ||
| updated_at: str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from workos.types.user_management.organization_membership import ( | ||
| BaseOrganizationMembership, | ||
| ) | ||
|
|
||
| AuthorizationOrganizationMembership = BaseOrganizationMembership |
15 changes: 15 additions & 0 deletions
15
src/workos/types/authorization/parent_resource_identifier.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| from typing import Union | ||
|
|
||
| from typing_extensions import TypedDict | ||
|
|
||
|
|
||
| class ParentResourceById(TypedDict): | ||
| parent_resource_id: str | ||
|
|
||
|
|
||
| class ParentResourceByExternalId(TypedDict): | ||
| parent_resource_external_id: str | ||
| parent_resource_type_slug: str | ||
|
|
||
|
|
||
| ParentResourceIdentifier = Union[ParentResourceById, ParentResourceByExternalId] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| from typing import Union | ||
|
|
||
| from typing_extensions import TypedDict | ||
|
|
||
|
|
||
| class ResourceIdentifierById(TypedDict): | ||
| resource_id: str | ||
|
|
||
|
|
||
| class ResourceIdentifierByExternalId(TypedDict): | ||
| resource_external_id: str | ||
| resource_type_slug: str | ||
|
|
||
|
|
||
| ResourceIdentifier = Union[ResourceIdentifierById, ResourceIdentifierByExternalId] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| from typing import Literal | ||
|
|
||
| from workos.types.workos_model import WorkOSModel | ||
|
|
||
|
|
||
| class RoleAssignmentRole(WorkOSModel): | ||
| slug: str | ||
|
|
||
|
|
||
| class RoleAssignmentResource(WorkOSModel): | ||
| id: str | ||
| external_id: str | ||
| resource_type_slug: str | ||
|
|
||
|
|
||
| class RoleAssignment(WorkOSModel): | ||
| object: Literal["role_assignment"] | ||
| id: str | ||
| role: RoleAssignmentRole | ||
| resource: RoleAssignmentResource | ||
| created_at: str | ||
| updated_at: str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.