Skip to content

Commit 4635e73

Browse files
committed
Release 0.0.51
1 parent 9a75b82 commit 4635e73

10 files changed

Lines changed: 154 additions & 8 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "agentmail"
33

44
[tool.poetry]
55
name = "agentmail"
6-
version = "0.0.50"
6+
version = "0.0.51"
77
description = ""
88
readme = "README.md"
99
authors = []

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.0.50",
26+
"User-Agent": "agentmail/0.0.51",
2727
"X-Fern-Language": "Python",
2828
"X-Fern-SDK-Name": "agentmail",
29-
"X-Fern-SDK-Version": "0.0.50",
29+
"X-Fern-SDK-Version": "0.0.51",
3030
**(self.get_custom_headers() or {}),
3131
}
3232
headers["Authorization"] = f"Bearer {self._get_api_key()}"

src/agentmail/webhooks/__init__.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,34 @@
1414
WebhookId,
1515
)
1616
from . import events
17-
from .events import EventId, MessageReceivedPayload, SvixId, SvixSignature, SvixTimestamp
17+
from .events import (
18+
Bounce,
19+
EventId,
20+
MessageBouncedPayload,
21+
MessageReceivedPayload,
22+
Recipient,
23+
SvixId,
24+
SvixSignature,
25+
SvixTimestamp,
26+
Timestamp,
27+
)
1828

1929
__all__ = [
30+
"Bounce",
2031
"ClientId",
2132
"CreateWebhookRequest",
2233
"EventId",
2334
"EventType",
2435
"EventTypes",
2536
"InboxIds",
2637
"ListWebhooksResponse",
38+
"MessageBouncedPayload",
2739
"MessageReceivedPayload",
40+
"Recipient",
2841
"SvixId",
2942
"SvixSignature",
3043
"SvixTimestamp",
44+
"Timestamp",
3145
"Url",
3246
"Webhook",
3347
"WebhookId",

src/agentmail/webhooks/events/__init__.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
# isort: skip_file
44

5-
from .types import EventId, MessageReceivedPayload, SvixId, SvixSignature, SvixTimestamp
5+
from .types import (
6+
Bounce,
7+
EventId,
8+
MessageBouncedPayload,
9+
MessageReceivedPayload,
10+
Recipient,
11+
SvixId,
12+
SvixSignature,
13+
SvixTimestamp,
14+
Timestamp,
15+
)
616

7-
__all__ = ["EventId", "MessageReceivedPayload", "SvixId", "SvixSignature", "SvixTimestamp"]
17+
__all__ = [
18+
"Bounce",
19+
"EventId",
20+
"MessageBouncedPayload",
21+
"MessageReceivedPayload",
22+
"Recipient",
23+
"SvixId",
24+
"SvixSignature",
25+
"SvixTimestamp",
26+
"Timestamp",
27+
]

src/agentmail/webhooks/events/types/__init__.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,24 @@
22

33
# isort: skip_file
44

5+
from .bounce import Bounce
56
from .event_id import EventId
7+
from .message_bounced_payload import MessageBouncedPayload
68
from .message_received_payload import MessageReceivedPayload
9+
from .recipient import Recipient
710
from .svix_id import SvixId
811
from .svix_signature import SvixSignature
912
from .svix_timestamp import SvixTimestamp
13+
from .timestamp import Timestamp
1014

11-
__all__ = ["EventId", "MessageReceivedPayload", "SvixId", "SvixSignature", "SvixTimestamp"]
15+
__all__ = [
16+
"Bounce",
17+
"EventId",
18+
"MessageBouncedPayload",
19+
"MessageReceivedPayload",
20+
"Recipient",
21+
"SvixId",
22+
"SvixSignature",
23+
"SvixTimestamp",
24+
"Timestamp",
25+
]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
import pydantic
6+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
7+
from ....core.unchecked_base_model import UncheckedBaseModel
8+
from ....inboxes.types.inbox_id import InboxId
9+
from ....messages.types.message_id import MessageId
10+
from .recipient import Recipient
11+
from .timestamp import Timestamp
12+
13+
14+
class Bounce(UncheckedBaseModel):
15+
inbox_id: InboxId
16+
message_id: MessageId
17+
timestamp: Timestamp
18+
type: str = pydantic.Field()
19+
"""
20+
Bounce type.
21+
"""
22+
23+
sub_type: str = pydantic.Field()
24+
"""
25+
Bounce sub-type.
26+
"""
27+
28+
recipients: typing.List[Recipient] = pydantic.Field()
29+
"""
30+
Bounced recipients.
31+
"""
32+
33+
if IS_PYDANTIC_V2:
34+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
35+
else:
36+
37+
class Config:
38+
frozen = True
39+
smart_union = True
40+
extra = pydantic.Extra.allow
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
import pydantic
6+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
7+
from ....core.unchecked_base_model import UncheckedBaseModel
8+
from ...types.event_type import EventType
9+
from .bounce import Bounce
10+
from .event_id import EventId
11+
12+
13+
class MessageBouncedPayload(UncheckedBaseModel):
14+
event_type: EventType
15+
event_id: EventId
16+
bounce: Bounce
17+
18+
if IS_PYDANTIC_V2:
19+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
20+
else:
21+
22+
class Config:
23+
frozen = True
24+
smart_union = True
25+
extra = pydantic.Extra.allow
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
import pydantic
6+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
7+
from ....core.unchecked_base_model import UncheckedBaseModel
8+
9+
10+
class Recipient(UncheckedBaseModel):
11+
address: str = pydantic.Field()
12+
"""
13+
Recipient address.
14+
"""
15+
16+
status: str = pydantic.Field()
17+
"""
18+
Recipient status.
19+
"""
20+
21+
if IS_PYDANTIC_V2:
22+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23+
else:
24+
25+
class Config:
26+
frozen = True
27+
smart_union = True
28+
extra = pydantic.Extra.allow
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import datetime as dt
4+
5+
Timestamp = dt.datetime

src/agentmail/webhooks/types/event_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
import typing
44

5-
EventType = typing.Union[typing.Literal["message.received"], typing.Any]
5+
EventType = typing.Union[typing.Literal["message.received", "message.bounced"], typing.Any]

0 commit comments

Comments
 (0)