Skip to content

Commit ef28978

Browse files
Release 0.1.1
1 parent 9f679bb commit ef28978

File tree

8 files changed

+17
-5
lines changed

8 files changed

+17
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "agentmail"
33

44
[tool.poetry]
55
name = "agentmail"
6-
version = "0.1.0"
6+
version = "0.1.1"
77
description = ""
88
readme = "README.md"
99
authors = []
@@ -30,7 +30,7 @@ packages = [
3030
{ include = "agentmail", from = "src"}
3131
]
3232

33-
[project.urls]
33+
[tool.poetry.urls]
3434
Repository = 'https://github.com/agentmail-to/agentmail-python'
3535

3636
[tool.poetry.dependencies]

src/agentmail/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ def __init__(
2323

2424
def get_headers(self) -> typing.Dict[str, str]:
2525
headers: typing.Dict[str, str] = {
26-
"User-Agent": "agentmail/0.1.0",
26+
"User-Agent": "agentmail/0.1.1",
2727
"X-Fern-Language": "Python",
2828
"X-Fern-SDK-Name": "agentmail",
29-
"X-Fern-SDK-Version": "0.1.0",
29+
"X-Fern-SDK-Version": "0.1.1",
3030
**(self.get_custom_headers() or {}),
3131
}
3232
headers["Authorization"] = f"Bearer {self._get_api_key()}"

src/agentmail/core/pydantic_utilities.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ def universal_root_validator(
220220
) -> Callable[[AnyCallable], AnyCallable]:
221221
def decorator(func: AnyCallable) -> AnyCallable:
222222
if IS_PYDANTIC_V2:
223-
return cast(AnyCallable, pydantic.model_validator(mode="before" if pre else "after")(func)) # type: ignore[attr-defined]
223+
# In Pydantic v2, for RootModel we always use "before" mode
224+
# The custom validators transform the input value before the model is created
225+
return cast(AnyCallable, pydantic.model_validator(mode="before")(func)) # type: ignore[attr-defined]
224226
return cast(AnyCallable, pydantic.root_validator(pre=pre)(func)) # type: ignore[call-overload]
225227

226228
return decorator

src/agentmail/events/types/bounce.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
from ...core.unchecked_base_model import UncheckedBaseModel
88
from ...inboxes.types.inbox_id import InboxId
99
from ...messages.types.message_id import MessageId
10+
from ...threads.types.thread_id import ThreadId
1011
from .recipient import Recipient
1112
from .timestamp import Timestamp
1213

1314

1415
class Bounce(UncheckedBaseModel):
1516
inbox_id: InboxId
17+
thread_id: ThreadId
1618
message_id: MessageId
1719
timestamp: Timestamp
1820
type: str = pydantic.Field()

src/agentmail/events/types/complaint.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
from ...core.unchecked_base_model import UncheckedBaseModel
88
from ...inboxes.types.inbox_id import InboxId
99
from ...messages.types.message_id import MessageId
10+
from ...threads.types.thread_id import ThreadId
1011
from .timestamp import Timestamp
1112

1213

1314
class Complaint(UncheckedBaseModel):
1415
inbox_id: InboxId
16+
thread_id: ThreadId
1517
message_id: MessageId
1618
timestamp: Timestamp
1719
type: str = pydantic.Field()

src/agentmail/events/types/delivery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
from ...core.unchecked_base_model import UncheckedBaseModel
88
from ...inboxes.types.inbox_id import InboxId
99
from ...messages.types.message_id import MessageId
10+
from ...threads.types.thread_id import ThreadId
1011
from .timestamp import Timestamp
1112

1213

1314
class Delivery(UncheckedBaseModel):
1415
inbox_id: InboxId
16+
thread_id: ThreadId
1517
message_id: MessageId
1618
timestamp: Timestamp
1719
recipients: typing.List[str] = pydantic.Field()

src/agentmail/events/types/reject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
from ...core.unchecked_base_model import UncheckedBaseModel
88
from ...inboxes.types.inbox_id import InboxId
99
from ...messages.types.message_id import MessageId
10+
from ...threads.types.thread_id import ThreadId
1011
from .timestamp import Timestamp
1112

1213

1314
class Reject(UncheckedBaseModel):
1415
inbox_id: InboxId
16+
thread_id: ThreadId
1517
message_id: MessageId
1618
timestamp: Timestamp
1719
reason: str = pydantic.Field()

src/agentmail/events/types/send.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
from ...core.unchecked_base_model import UncheckedBaseModel
88
from ...inboxes.types.inbox_id import InboxId
99
from ...messages.types.message_id import MessageId
10+
from ...threads.types.thread_id import ThreadId
1011
from .timestamp import Timestamp
1112

1213

1314
class Send(UncheckedBaseModel):
1415
inbox_id: InboxId
16+
thread_id: ThreadId
1517
message_id: MessageId
1618
timestamp: Timestamp
1719
recipients: typing.List[str] = pydantic.Field()

0 commit comments

Comments
 (0)