Skip to content

Commit 21f9c94

Browse files
committed
Release 0.0.52
1 parent 4635e73 commit 21f9c94

File tree

8 files changed

+80
-4
lines changed

8 files changed

+80
-4
lines changed

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

src/agentmail/webhooks/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
from . import events
1717
from .events import (
1818
Bounce,
19+
Complaint,
1920
EventId,
2021
MessageBouncedPayload,
22+
MessageComplainedPayload,
2123
MessageReceivedPayload,
2224
Recipient,
2325
SvixId,
@@ -29,13 +31,15 @@
2931
__all__ = [
3032
"Bounce",
3133
"ClientId",
34+
"Complaint",
3235
"CreateWebhookRequest",
3336
"EventId",
3437
"EventType",
3538
"EventTypes",
3639
"InboxIds",
3740
"ListWebhooksResponse",
3841
"MessageBouncedPayload",
42+
"MessageComplainedPayload",
3943
"MessageReceivedPayload",
4044
"Recipient",
4145
"SvixId",

src/agentmail/webhooks/events/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
from .types import (
66
Bounce,
7+
Complaint,
78
EventId,
89
MessageBouncedPayload,
10+
MessageComplainedPayload,
911
MessageReceivedPayload,
1012
Recipient,
1113
SvixId,
@@ -16,8 +18,10 @@
1618

1719
__all__ = [
1820
"Bounce",
21+
"Complaint",
1922
"EventId",
2023
"MessageBouncedPayload",
24+
"MessageComplainedPayload",
2125
"MessageReceivedPayload",
2226
"Recipient",
2327
"SvixId",

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# isort: skip_file
44

55
from .bounce import Bounce
6+
from .complaint import Complaint
67
from .event_id import EventId
78
from .message_bounced_payload import MessageBouncedPayload
9+
from .message_complained_payload import MessageComplainedPayload
810
from .message_received_payload import MessageReceivedPayload
911
from .recipient import Recipient
1012
from .svix_id import SvixId
@@ -14,8 +16,10 @@
1416

1517
__all__ = [
1618
"Bounce",
19+
"Complaint",
1720
"EventId",
1821
"MessageBouncedPayload",
22+
"MessageComplainedPayload",
1923
"MessageReceivedPayload",
2024
"Recipient",
2125
"SvixId",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 .timestamp import Timestamp
11+
12+
13+
class Complaint(UncheckedBaseModel):
14+
inbox_id: InboxId
15+
message_id: MessageId
16+
timestamp: Timestamp
17+
type: str = pydantic.Field()
18+
"""
19+
Complaint type.
20+
"""
21+
22+
sub_type: str = pydantic.Field()
23+
"""
24+
Complaint sub-type.
25+
"""
26+
27+
recipients: typing.List[str] = pydantic.Field()
28+
"""
29+
Complained recipients.
30+
"""
31+
32+
if IS_PYDANTIC_V2:
33+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
34+
else:
35+
36+
class Config:
37+
frozen = True
38+
smart_union = True
39+
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 .complaint import Complaint
10+
from .event_id import EventId
11+
12+
13+
class MessageComplainedPayload(UncheckedBaseModel):
14+
event_type: EventType
15+
event_id: EventId
16+
complaint: Complaint
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

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", "message.bounced"], typing.Any]
5+
EventType = typing.Union[typing.Literal["message.received", "message.bounced", "message.complained"], typing.Any]

0 commit comments

Comments
 (0)