File tree Expand file tree Collapse file tree 8 files changed +17
-5
lines changed
Expand file tree Collapse file tree 8 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name = "agentmail"
33
44[tool .poetry ]
55name = " agentmail"
6- version = " 0.1.0 "
6+ version = " 0.1.1 "
77description = " "
88readme = " README.md"
99authors = []
@@ -30,7 +30,7 @@ packages = [
3030 { include = " agentmail" , from = " src" }
3131]
3232
33- [project .urls ]
33+ [tool . poetry .urls ]
3434Repository = ' https://github.com/agentmail-to/agentmail-python'
3535
3636[tool .poetry .dependencies ]
Original file line number Diff line number Diff 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 ()} "
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 77from ...core .unchecked_base_model import UncheckedBaseModel
88from ...inboxes .types .inbox_id import InboxId
99from ...messages .types .message_id import MessageId
10+ from ...threads .types .thread_id import ThreadId
1011from .recipient import Recipient
1112from .timestamp import Timestamp
1213
1314
1415class Bounce (UncheckedBaseModel ):
1516 inbox_id : InboxId
17+ thread_id : ThreadId
1618 message_id : MessageId
1719 timestamp : Timestamp
1820 type : str = pydantic .Field ()
Original file line number Diff line number Diff line change 77from ...core .unchecked_base_model import UncheckedBaseModel
88from ...inboxes .types .inbox_id import InboxId
99from ...messages .types .message_id import MessageId
10+ from ...threads .types .thread_id import ThreadId
1011from .timestamp import Timestamp
1112
1213
1314class Complaint (UncheckedBaseModel ):
1415 inbox_id : InboxId
16+ thread_id : ThreadId
1517 message_id : MessageId
1618 timestamp : Timestamp
1719 type : str = pydantic .Field ()
Original file line number Diff line number Diff line change 77from ...core .unchecked_base_model import UncheckedBaseModel
88from ...inboxes .types .inbox_id import InboxId
99from ...messages .types .message_id import MessageId
10+ from ...threads .types .thread_id import ThreadId
1011from .timestamp import Timestamp
1112
1213
1314class Delivery (UncheckedBaseModel ):
1415 inbox_id : InboxId
16+ thread_id : ThreadId
1517 message_id : MessageId
1618 timestamp : Timestamp
1719 recipients : typing .List [str ] = pydantic .Field ()
Original file line number Diff line number Diff line change 77from ...core .unchecked_base_model import UncheckedBaseModel
88from ...inboxes .types .inbox_id import InboxId
99from ...messages .types .message_id import MessageId
10+ from ...threads .types .thread_id import ThreadId
1011from .timestamp import Timestamp
1112
1213
1314class Reject (UncheckedBaseModel ):
1415 inbox_id : InboxId
16+ thread_id : ThreadId
1517 message_id : MessageId
1618 timestamp : Timestamp
1719 reason : str = pydantic .Field ()
Original file line number Diff line number Diff line change 77from ...core .unchecked_base_model import UncheckedBaseModel
88from ...inboxes .types .inbox_id import InboxId
99from ...messages .types .message_id import MessageId
10+ from ...threads .types .thread_id import ThreadId
1011from .timestamp import Timestamp
1112
1213
1314class Send (UncheckedBaseModel ):
1415 inbox_id : InboxId
16+ thread_id : ThreadId
1517 message_id : MessageId
1618 timestamp : Timestamp
1719 recipients : typing .List [str ] = pydantic .Field ()
You can’t perform that action at this time.
0 commit comments