feat: step9 membership queries#521
feat: step9 membership queries#521swaroopAkkineniWorkos wants to merge 13 commits intoENT-5353-base-fga-for-go-sdkfrom
Conversation
|
@greptile review |
|
@greptile re-review |
|
@greptile re-review |
|
@greptile re-review |
|
@greptile re-review |
|
@greptile re-review |
|
@greptile re-review |
Greptile SummaryThis PR implements three new membership-query methods on the Notable issues found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant Client
participant WorkOSAPI
note over Client: ListResourcesForMembership
Caller->>Client: ListResourcesForMembership(ctx, opts)
Client->>Client: once.Do(init) — lazy setup
Client->>Client: validate APIKey
Client->>Client: set default Limit + Order
Client->>WorkOSAPI: GET /authorization/organization_memberships/{id}/resources?permission_slug=...&limit=...&order=...&[parent_resource_id=...]
WorkOSAPI-->>Client: ListAuthorizationResourcesResponse
Client-->>Caller: response, err
note over Client: ListMembershipsForResource
Caller->>Client: ListMembershipsForResource(ctx, opts)
Client->>Client: once.Do(init)
Client->>Client: validate APIKey
Client->>Client: set default Limit + Order
Client->>WorkOSAPI: GET /authorization/resources/{resource_id}/organization_memberships?permission_slug=...&assignment=...
WorkOSAPI-->>Client: ListAuthorizationOrganizationMembershipsResponse
Client-->>Caller: response, err
note over Client: ListMembershipsForResourceByExternalId
Caller->>Client: ListMembershipsForResourceByExternalId(ctx, opts)
Client->>Client: once.Do(init)
Client->>Client: validate APIKey
Client->>Client: set default Limit + Order
Client->>WorkOSAPI: GET /authorization/organizations/{org_id}/resources/{type_slug}/{ext_id}/organization_memberships?permission_slug=...
WorkOSAPI-->>Client: ListAuthorizationOrganizationMembershipsResponse
Client-->>Caller: response, err
|
| } | ||
|
|
||
| if opts.Order == "" { | ||
| opts.Order = common.Desc |
There was a problem hiding this comment.
See comment in other PR about default order
| c.once.Do(c.init) | ||
| return ListAuthorizationResourcesResponse{}, errors.New("not implemented") | ||
|
|
||
| if c.APIKey == "" { |
There was a problem hiding this comment.
Why does this method have this but others in different PRs don't?
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.