Skip to content

fix(domains): add capabilities and create tls to domain types - #321

Open
mayankbohradev wants to merge 1 commit into
resend:mainfrom
mayankbohradev:fix/domain-capabilities-types
Open

mayankbohradev wants to merge 1 commit into
resend:mainfrom
mayankbohradev:fix/domain-capabilities-types

Conversation

@mayankbohradev

@mayankbohradev mayankbohradev commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds the documented capabilities field to the domain create params, update params, Domain and the create response. Adds tls to the create params.

Why

The API accepts and returns these fields (create, update, get, list), and the SDK already forwards them. The types rejected them, so mypy reported documented usage as an error.

How

  • DomainCapabilities and DomainCapabilityStatus describe the response object.
  • Domains.CapabilitiesParams is total=False, because create and update accept one or both keys.
  • capabilities is NotRequired on the response types, like the other optional domain settings.
  • No runtime change.

Testing

  • Before the change, mypy reported 22 errors on the new tests.
  • tox -e lint, tox -e mypy and tox -e py pass (876 tests).
  • New sync and async tests cover request bodies and typed response access.

Notes for reviewers

New public names: resend.DomainCapabilities, resend.DomainCapabilityStatus and resend.Domains.CapabilitiesParams. #320 edits the same file; I can rebase after it merges.


Summary by cubic

Adds the documented capabilities and tls fields to the domain types so mypy no longer rejects usage that the API already supports.

  • capabilities is now accepted on create and update params and returned on create, get, and list responses.
  • tls is now accepted on create params.
  • Adds new public types resend.DomainCapabilities, resend.DomainCapabilityStatus, and resend.Domains.CapabilitiesParams.

Written for commit 6703209. Summary will update on new commits.

View guided diff

The API accepts `capabilities` on create and update and `tls` on create.
It returns `capabilities` on create, get and list. The SDK already sends
and returns these values, but the types rejected them, so mypy reported
documented usage as an error.

- Add `DomainCapabilities` and `DomainCapabilityStatus`.
- Add `Domains.CapabilitiesParams` for create and update.
- Add `capabilities` to `Domain` and `CreateDomainResponse`.
- Add `tls` to `Domains.CreateParams`.

Tested with tox lint, mypy and py (876 passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant