-
Notifications
You must be signed in to change notification settings - Fork 22
Update org actions with domain_data #73
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This pull request updates the WorkOS Elixir SDK to align with changes in the WorkOS API for organization management. The main change involves replacing the :domains parameter with :domain_data in the create_organization and update_organization functions within lib/workos/organizations.ex.
The key difference is structural: where :domains previously accepted simple domain strings, :domain_data now expects an array of maps containing both domain and state fields (e.g., [%{domain: "example.com", state: "pending"}]). This change enables the API to track domain verification states, which is crucial for enterprise SSO scenarios where organizations need to verify domain ownership.
The corresponding test file test/workos/organizations_test.exs has been updated to reflect this new data structure, with all test cases now using the domain_data format. The tests maintain the same coverage while properly mocking the expected structured data.
This change integrates with the broader WorkOS platform's domain verification workflow, allowing organizations to manage domains through different verification states rather than treating them as simple strings. The SDK now supports the enhanced domain management capabilities that the WorkOS API provides.
Confidence score: 3/5
- This PR introduces a breaking change that will require users to update their code when creating or updating organizations
- Score reflects the breaking nature of the change and potential for runtime errors if users don't update their implementation
- Pay close attention to the parameter structure changes in
lib/workos/organizations.exand ensure proper migration documentation is provided
2 files reviewed, 1 comment
|
@hexedpackets Any chance I could get you or someone to look at this? |
hexedpackets
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to update the tests to match the assertion logic and this should be good to merge.
Updating the domains option to match documentation and implementation in other libraries