FGA_5: list_resources_for_membership, list_memberships_for_resource, list_memberships_for_resource_by_external_id#571
Open
swaroopAkkineniWorkos wants to merge 5 commits intoENT-5224-python-sdk-for-fga-worktree-fuck-aroundfrom
Conversation
…list_memberships_for_resource_by_external_id
Author
|
@greptile review |
Comment on lines
+996
to
+999
| limit: int = DEFAULT_LIST_RESPONSE_LIMIT, | ||
| before: Optional[str] = None, | ||
| after: Optional[str] = None, | ||
| order: PaginationOrder = "desc", |
There was a problem hiding this comment.
Would ideally like to move this to a PAginationOptions object, but want to keep things consistence with above
Author
|
@greptile re-review |
Contributor
Greptile SummaryAdded three new authorization methods to query the relationship between organization memberships and resources. The implementation follows existing SDK patterns with proper sync/async support, type-safe parameter handling, and auto-pagination. All three methods ( Key additions:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant SDK
participant API
Note over Client,API: Query Resources by Membership
Client->>SDK: list_resources_for_membership(membership_id, permission, parent_resource)
SDK->>API: GET /authorization/organization_memberships/{id}/resources
API-->>SDK: List of accessible resources
SDK-->>Client: WorkOSListResource[Resource]
Note over Client,API: Query Memberships by Resource ID
Client->>SDK: list_memberships_for_resource(resource_id, permission, assignment?)
SDK->>API: GET /authorization/resources/{id}/organization_memberships
API-->>SDK: List of memberships with access
SDK-->>Client: WorkOSListResource[Membership]
Note over Client,API: Query Memberships by External ID
Client->>SDK: list_memberships_for_resource_by_external_id(org_id, type, external_id, permission)
SDK->>API: GET /authorization/organizations/{org_id}/resources/{type}/{external_id}/organization_memberships
API-->>SDK: List of memberships with access
SDK-->>Client: WorkOSListResource[Membership]
Last reviewed commit: e9a6975 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…list_memberships_for_resource_by_external_id
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.