Skip to content

Expose delete endpoint for organization_domains - DAAP-1753#462

Merged
ajworkos merged 1 commit intomainfrom
aj/DAAP-1753
Jul 30, 2025
Merged

Expose delete endpoint for organization_domains - DAAP-1753#462
ajworkos merged 1 commit intomainfrom
aj/DAAP-1753

Conversation

@ajworkos
Copy link
Contributor

Description

Exposes an SDK method to delete an organization domain

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[x] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

Docs PR:
https://github.com/workos/workos/pull/42288

@ajworkos ajworkos requested a review from a team as a code owner July 30, 2025 11:10
@ajworkos ajworkos requested a review from mattgd July 30, 2025 11:10
@linear
Copy link

linear bot commented Jul 30, 2025

@ajworkos ajworkos requested a review from a team July 30, 2025 11:10
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR adds a new delete_organization_domain method to the WorkOS Python SDK's Organizations module. The implementation follows the established CRUD patterns in the codebase by adding the method to the protocol interface and implementing it in both sync and async Organization classes.

The change exposes an HTTP DELETE endpoint for organization domains at the path organization_domains/{id}. The method takes an organization_domain_id parameter and returns None, consistent with other delete operations in the SDK like delete_organization. Both synchronous and asynchronous implementations are provided, maintaining the dual-interface pattern used throughout the WorkOS Python SDK.

The implementation integrates seamlessly with the existing codebase architecture - it uses the same _http_client.request() pattern with REQUEST_METHOD_DELETE constant, follows the same URL construction approach as other domain-related methods, and maintains the same docstring format and parameter validation patterns established in the Organizations module.

Comprehensive test coverage has been added that validates the HTTP request construction, URL endpoint correctness, method type (DELETE), and expected return value (None). The test follows the same mocking and assertion patterns used by other delete operation tests in the test suite.

Confidence score: 5/5

  • This PR is very safe to merge with minimal risk of production issues
  • The implementation follows established patterns exactly, has comprehensive test coverage, and addresses a straightforward CRUD operation gap
  • No files require additional attention - the code is clean and follows existing conventions

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@ajworkos ajworkos merged commit e445949 into main Jul 30, 2025
6 checks passed
@ajworkos ajworkos deleted the aj/DAAP-1753 branch July 30, 2025 15:30
@ajworkos ajworkos mentioned this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants