Authorization Resources endpoints for Internal ID (#1471)#1479
Merged
swaroopAkkineniWorkos merged 15 commits intomainfrom Feb 13, 2026
Merged
Authorization Resources endpoints for Internal ID (#1471)#1479swaroopAkkineniWorkos merged 15 commits intomainfrom
swaroopAkkineniWorkos merged 15 commits intomainfrom
Conversation
…e itnerfaces that can be exported (#1481)
…tion resource to a string from array
csrbarber
approved these changes
Feb 13, 2026
Contributor
Greptile OverviewGreptile SummaryThis PR adds support for authorization resource management using internal IDs, consolidating functionality from previously merged PRs (#1471, #1472, #1473, #1474, #1478). The implementation adds 8 new methods to the Authorization class for managing resources and role assignments. Key Changes:
Implementation Quality:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Authorization
participant WorkOS
participant FetchClient
participant API
Note over Client,API: Resource Management Flow (Internal ID)
Client->>Authorization: getResource(resourceId)
Authorization->>WorkOS: get(/authorization/resources/{id})
WorkOS->>FetchClient: get(url, options)
FetchClient->>API: GET /authorization/resources/{id}
API-->>FetchClient: AuthorizationResourceResponse
FetchClient-->>WorkOS: response
WorkOS-->>Authorization: response data
Authorization->>Authorization: deserializeAuthorizationResource()
Authorization-->>Client: AuthorizationResource
Note over Client,API: Role Assignment Flow
Client->>Authorization: assignRole(options)
Authorization->>Authorization: serializeAssignRoleOptions()
Authorization->>WorkOS: post(/om/{id}/role_assignments, body)
WorkOS->>FetchClient: post(url, body, options)
FetchClient->>API: POST /om/{id}/role_assignments
API-->>FetchClient: RoleAssignmentResponse
FetchClient-->>WorkOS: response
WorkOS-->>Authorization: response data
Authorization->>Authorization: deserializeRoleAssignment()
Authorization-->>Client: RoleAssignment
Note over Client,API: Remove Role Flow (with body)
Client->>Authorization: removeRole(options)
Authorization->>Authorization: serializeRemoveRoleOptions()
Authorization->>WorkOS: deleteWithBody(/om/{id}/role_assignments, body)
WorkOS->>FetchClient: deleteWithBody(url, body, options)
FetchClient->>API: DELETE /om/{id}/role_assignments (with body)
API-->>FetchClient: 204 No Content
FetchClient-->>WorkOS: response
WorkOS-->>Authorization: void
Authorization-->>Client: void
Note over Client,API: List Resources for Membership
Client->>Authorization: listResourcesForMembership(options)
Authorization->>Authorization: serializeListResourcesForMembershipOptions()
Authorization->>WorkOS: get(/om/{id}/resources, query)
WorkOS->>FetchClient: get(url, options)
FetchClient->>API: GET /om/{id}/resources?permission_slug=...
API-->>FetchClient: AuthorizationResourceListResponse
FetchClient-->>WorkOS: response
WorkOS-->>Authorization: response data
Authorization->>Authorization: deserializeAuthorizationResource() for each
Authorization-->>Client: AuthorizationResourceList
Last reviewed commit: bfc197d |
atainter
approved these changes
Feb 13, 2026
| "external_id": "doc-12345678", | ||
| "name": "Q5 Budget Report", | ||
| "description": "Financial report for Q5 2025", | ||
| "resource_type_slug": "document", |
Contributor
There was a problem hiding this comment.
Not blocking, but can you follow with an update to change these test fixtures to use workspace -> project instead of folder/document?
Contributor
Author
There was a problem hiding this comment.
oh sorry, i forgot about that
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.
adding these new api's that can be called