Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resend/domains/_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class Record(TypedDict):
record: str
"""
The domain record type, ie: SPF, DKIM, Inbound, Tracking.
The domain record type, ie: SPF, DKIM, Inbound, Tracking, TrackingCAA.
"""
name: str
"""
Expand Down
2 changes: 1 addition & 1 deletion resend/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.28.0"
__version__ = "2.28.1"


def get_version() -> str:
Expand Down
31 changes: 30 additions & 1 deletion tests/domains_async_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ async def test_domains_create_async_with_tracking_subdomain(self) -> None:
"ttl": "Auto",
"status": "not_started",
},
{
"record": "TrackingCAA",
"name": "",
"value": '0 issue "amazon.com"',
"type": "CAA",
"ttl": "Auto",
"status": "not_started",
},
],
"region": "us-east-1",
}
Expand All @@ -195,6 +203,13 @@ async def test_domains_create_async_with_tracking_subdomain(self) -> None:
assert tracking_record["name"] == "links.example.com"
assert tracking_record["value"] == "links1.resend-dns.com"
assert tracking_record["type"] == "CNAME"
tracking_caa_record = next(
(r for r in (domain["records"] or []) if r["record"] == "TrackingCAA"),
None,
)
assert tracking_caa_record is not None
assert tracking_caa_record["type"] == "CAA"
assert tracking_caa_record["value"] == '0 issue "amazon.com"'

async def test_domains_get_async_with_tracking_fields(self) -> None:
self.set_mock_json(
Expand All @@ -216,7 +231,15 @@ async def test_domains_get_async_with_tracking_fields(self) -> None:
"type": "CNAME",
"ttl": "Auto",
"status": "verified",
}
},
{
"record": "TrackingCAA",
"name": "",
"value": '0 issue "amazon.com"',
"type": "CAA",
"ttl": "Auto",
"status": "verified",
},
],
}
)
Expand All @@ -228,6 +251,12 @@ async def test_domains_get_async_with_tracking_fields(self) -> None:
assert domain["open_tracking"] is True
assert domain["click_tracking"] is True
assert domain["tracking_subdomain"] == "links"
tracking_caa_record = next(
(r for r in (domain["records"] or []) if r["record"] == "TrackingCAA"),
None,
)
assert tracking_caa_record is not None
assert tracking_caa_record["type"] == "CAA"

async def test_domains_update_async(self) -> None:
self.set_mock_json(
Expand Down
31 changes: 30 additions & 1 deletion tests/domains_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ def test_domains_create_with_tracking_subdomain(self) -> None:
"ttl": "Auto",
"status": "not_started",
},
{
"record": "TrackingCAA",
"name": "",
"value": '0 issue "amazon.com"',
"type": "CAA",
"ttl": "Auto",
"status": "not_started",
},
],
"region": "us-east-1",
}
Expand All @@ -231,6 +239,13 @@ def test_domains_create_with_tracking_subdomain(self) -> None:
assert tracking_record["name"] == "links.example.com"
assert tracking_record["value"] == "links1.resend-dns.com"
assert tracking_record["type"] == "CNAME"
tracking_caa_record = next(
(r for r in (domain["records"] or []) if r["record"] == "TrackingCAA"),
None,
)
assert tracking_caa_record is not None
assert tracking_caa_record["type"] == "CAA"
assert tracking_caa_record["value"] == '0 issue "amazon.com"'

def test_domains_get_with_tracking_fields(self) -> None:
self.set_mock_json(
Expand All @@ -252,7 +267,15 @@ def test_domains_get_with_tracking_fields(self) -> None:
"type": "CNAME",
"ttl": "Auto",
"status": "verified",
}
},
{
"record": "TrackingCAA",
"name": "",
"value": '0 issue "amazon.com"',
"type": "CAA",
"ttl": "Auto",
"status": "verified",
},
],
}
)
Expand All @@ -264,6 +287,12 @@ def test_domains_get_with_tracking_fields(self) -> None:
assert domain["open_tracking"] is True
assert domain["click_tracking"] is True
assert domain["tracking_subdomain"] == "links"
tracking_caa_record = next(
(r for r in (domain["records"] or []) if r["record"] == "TrackingCAA"),
None,
)
assert tracking_caa_record is not None
assert tracking_caa_record["type"] == "CAA"

def test_domains_update(self) -> None:
self.set_mock_json(
Expand Down
Loading