Skip to content

Commit 7eb6963

Browse files
committed
Release 0.0.20
1 parent 6e3a9de commit 7eb6963

File tree

10 files changed

+34
-38
lines changed

10 files changed

+34
-38
lines changed

poetry.lock

Lines changed: 17 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/agentmail/inboxes/types/inbox.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
from ...core.pydantic_utilities import UniversalBaseModel
44
from .inbox_id import InboxId
5-
import pydantic
65
import typing
76
from .display_name import DisplayName
87
import datetime as dt
8+
import pydantic
99
from ...core.pydantic_utilities import IS_PYDANTIC_V2
1010

1111

@@ -19,7 +19,6 @@ class Inbox(UniversalBaseModel):
1919
2020
Inbox(
2121
inbox_id="yourinbox@agentmail.to",
22-
organization_id="123e4567-e89b-12d3-a456-426614174000",
2322
display_name="Your Inbox",
2423
created_at=datetime.datetime.fromisoformat(
2524
"2024-01-15 09:30:00+00:00",
@@ -28,11 +27,6 @@ class Inbox(UniversalBaseModel):
2827
"""
2928

3029
inbox_id: InboxId
31-
organization_id: str = pydantic.Field()
32-
"""
33-
ID of organization that owns inbox.
34-
"""
35-
3630
display_name: typing.Optional[DisplayName] = None
3731
created_at: dt.datetime = pydantic.Field()
3832
"""

src/agentmail/inboxes/types/list_inboxes_response.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class ListInboxesResponse(UniversalBaseModel):
2222
inboxes=[
2323
Inbox(
2424
inbox_id="yourinbox@agentmail.to",
25-
organization_id="123e4567-e89b-12d3-a456-426614174000",
2625
display_name="Your Inbox",
2726
created_at=datetime.datetime.fromisoformat(
2827
"2024-01-15 09:30:00+00:00",

src/agentmail/messages/types/list_messages_response.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ class ListMessagesResponse(UniversalBaseModel):
2121
ListMessagesResponse(
2222
messages=[
2323
MessageItem(
24-
message_id="msg_123",
24+
inbox_id="yourinbox@agentmail.to",
2525
thread_id="thread_123",
26+
message_id="msg_123",
2627
event_id="event_123",
2728
labels=["RECEIVED", "UNREAD"],
2829
timestamp=datetime.datetime.fromisoformat(
@@ -45,8 +46,9 @@ class ListMessagesResponse(UniversalBaseModel):
4546
],
4647
),
4748
MessageItem(
48-
message_id="msg_456",
49+
inbox_id="yourinbox@agentmail.to",
4950
thread_id="thread_123",
51+
message_id="msg_456",
5052
event_id="event_456",
5153
labels=["SENT"],
5254
timestamp=datetime.datetime.fromisoformat(

src/agentmail/messages/types/message.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was auto-generated by Fern from our API Definition.
22

33
from ...core.pydantic_utilities import UniversalBaseModel
4+
from ...inboxes.types.inbox_id import InboxId
45
from ...threads.types.thread_id import ThreadId
56
from .message_id import MessageId
67
from .message_event_id import MessageEventId
@@ -21,8 +22,6 @@
2122
from .message_attachments import MessageAttachments
2223
from .message_in_reply_to import MessageInReplyTo
2324
from .message_references import MessageReferences
24-
from ...inboxes.types.inbox_id import InboxId
25-
from ...types.organization_id import OrganizationId
2625
from ...core.pydantic_utilities import IS_PYDANTIC_V2
2726
import pydantic
2827

@@ -64,10 +63,10 @@ class Message(UniversalBaseModel):
6463
in_reply_to="msg_122",
6564
references=["msg_121", "msg_122"],
6665
inbox_id="yourinbox@agentmail.to",
67-
organization_id="org_123",
6866
)
6967
"""
7068

69+
inbox_id: InboxId
7170
thread_id: ThreadId
7271
message_id: MessageId
7372
event_id: MessageEventId
@@ -85,8 +84,6 @@ class Message(UniversalBaseModel):
8584
attachments: typing.Optional[MessageAttachments] = None
8685
in_reply_to: typing.Optional[MessageInReplyTo] = None
8786
references: typing.Optional[MessageReferences] = None
88-
inbox_id: InboxId
89-
organization_id: OrganizationId
9087

9188
if IS_PYDANTIC_V2:
9289
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

src/agentmail/messages/types/message_item.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was auto-generated by Fern from our API Definition.
22

33
from ...core.pydantic_utilities import UniversalBaseModel
4+
from ...inboxes.types.inbox_id import InboxId
45
from ...threads.types.thread_id import ThreadId
56
from .message_id import MessageId
67
from .message_event_id import MessageEventId
@@ -21,6 +22,7 @@
2122

2223

2324
class MessageItem(UniversalBaseModel):
25+
inbox_id: InboxId
2426
thread_id: ThreadId
2527
message_id: MessageId
2628
event_id: MessageEventId

src/agentmail/messages/types/send_attachment.py

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

33
from ...core.pydantic_utilities import UniversalBaseModel
44
from .attachment_filename import AttachmentFilename
5+
import typing
56
from .attachment_content_type import AttachmentContentType
67
from .attachment_content import AttachmentContent
78
from ...core.pydantic_utilities import IS_PYDANTIC_V2
8-
import typing
99
import pydantic
1010

1111

1212
class SendAttachment(UniversalBaseModel):
1313
filename: AttachmentFilename
14-
content_type: AttachmentContentType
14+
content_type: typing.Optional[AttachmentContentType] = None
1515
content: AttachmentContent
1616

1717
if IS_PYDANTIC_V2:

src/agentmail/threads/types/list_threads_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class ListThreadsResponse(UniversalBaseModel):
2121
ListThreadsResponse(
2222
threads=[
2323
ThreadItem(
24+
inbox_id="yourinbox@agentmail.to",
2425
thread_id="thread_123",
2526
event_id="event_123",
2627
labels=["RECEIVED", "UNREAD"],
@@ -34,6 +35,7 @@ class ListThreadsResponse(UniversalBaseModel):
3435
preview="Let's review the timeline for...",
3536
),
3637
ThreadItem(
38+
inbox_id="yourinbox@agentmail.to",
3739
thread_id="thread_456",
3840
event_id="event_456",
3941
labels=["SENT"],

src/agentmail/threads/types/thread.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was auto-generated by Fern from our API Definition.
22

33
from ...core.pydantic_utilities import UniversalBaseModel
4+
from ...inboxes.types.inbox_id import InboxId
45
from .thread_id import ThreadId
56
from .thread_event_id import ThreadEventId
67
from .thread_labels import ThreadLabels
@@ -14,8 +15,6 @@
1415
from .thread_attachments import ThreadAttachments
1516
from ...messages.types.message import Message
1617
import pydantic
17-
from ...inboxes.types.inbox_id import InboxId
18-
from ...types.organization_id import OrganizationId
1918
from ...core.pydantic_utilities import IS_PYDANTIC_V2
2019

2120

@@ -29,7 +28,6 @@ class Thread(UniversalBaseModel):
2928
from agentmail.threads import Thread
3029
3130
Thread(
32-
organization_id="org_123",
3331
inbox_id="yourinbox@agentmail.to",
3432
thread_id="thread_123",
3533
event_id="event_123",
@@ -55,12 +53,12 @@ class Thread(UniversalBaseModel):
5553
to=["bob@example.com"],
5654
text="Let's review the timeline for the project.",
5755
inbox_id="yourinbox@agentmail.to",
58-
organization_id="org_123",
5956
)
6057
],
6158
)
6259
"""
6360

61+
inbox_id: InboxId
6462
thread_id: ThreadId
6563
event_id: ThreadEventId
6664
labels: ThreadLabels
@@ -76,9 +74,6 @@ class Thread(UniversalBaseModel):
7674
Messages in thread. Ordered by `sent_at` ascending.
7775
"""
7876

79-
inbox_id: InboxId
80-
organization_id: OrganizationId
81-
8277
if IS_PYDANTIC_V2:
8378
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
8479
else:

src/agentmail/threads/types/thread_item.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was auto-generated by Fern from our API Definition.
22

33
from ...core.pydantic_utilities import UniversalBaseModel
4+
from ...inboxes.types.inbox_id import InboxId
45
from .thread_id import ThreadId
56
from .thread_event_id import ThreadEventId
67
from .thread_labels import ThreadLabels
@@ -17,6 +18,7 @@
1718

1819

1920
class ThreadItem(UniversalBaseModel):
21+
inbox_id: InboxId
2022
thread_id: ThreadId
2123
event_id: ThreadEventId
2224
labels: ThreadLabels

0 commit comments

Comments
 (0)