fix(domains): add capabilities and create tls to domain types
MA
2d ago+331+331+012345678901234567890123456789-4-4-0123456789
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
DomainCapabilitiesandDomainCapabilityStatusdescribe the response object.Domains.CapabilitiesParamsistotal=False, because create and update accept one or both keys.capabilitiesisNotRequiredon 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 mypyandtox -e pypass (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.
capabilitiesis now accepted on create and update params and returned on create, get, and list responses.tlsis now accepted on create params.- Adds new public types
resend.DomainCapabilities,resend.DomainCapabilityStatus, andresend.Domains.CapabilitiesParams.