Skip to content

Commit c090660

Browse files
Release 0.0.73
1 parent 14bb90e commit c090660

10 files changed

Lines changed: 506 additions & 3 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.72"
6+
version = "0.0.73"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,6 +1677,135 @@ client.inboxes.drafts.create(
16771677
</dl>
16781678

16791679

1680+
</dd>
1681+
</dl>
1682+
</details>
1683+
1684+
<details><summary><code>client.inboxes.drafts.<a href="src/agentmail/inboxes/drafts/client.py">update</a>(...)</code></summary>
1685+
<dl>
1686+
<dd>
1687+
1688+
#### 🔌 Usage
1689+
1690+
<dl>
1691+
<dd>
1692+
1693+
<dl>
1694+
<dd>
1695+
1696+
```python
1697+
from agentmail import AgentMail
1698+
1699+
client = AgentMail(
1700+
api_key="YOUR_API_KEY",
1701+
)
1702+
client.inboxes.drafts.update(
1703+
inbox_id="inbox_id",
1704+
draft_id="draft_id",
1705+
)
1706+
1707+
```
1708+
</dd>
1709+
</dl>
1710+
</dd>
1711+
</dl>
1712+
1713+
#### ⚙️ Parameters
1714+
1715+
<dl>
1716+
<dd>
1717+
1718+
<dl>
1719+
<dd>
1720+
1721+
**inbox_id:** `InboxId`
1722+
1723+
</dd>
1724+
</dl>
1725+
1726+
<dl>
1727+
<dd>
1728+
1729+
**draft_id:** `DraftId`
1730+
1731+
</dd>
1732+
</dl>
1733+
1734+
<dl>
1735+
<dd>
1736+
1737+
**reply_to:** `typing.Optional[DraftReplyTo]`
1738+
1739+
</dd>
1740+
</dl>
1741+
1742+
<dl>
1743+
<dd>
1744+
1745+
**to:** `typing.Optional[DraftTo]`
1746+
1747+
</dd>
1748+
</dl>
1749+
1750+
<dl>
1751+
<dd>
1752+
1753+
**cc:** `typing.Optional[DraftCc]`
1754+
1755+
</dd>
1756+
</dl>
1757+
1758+
<dl>
1759+
<dd>
1760+
1761+
**bcc:** `typing.Optional[DraftBcc]`
1762+
1763+
</dd>
1764+
</dl>
1765+
1766+
<dl>
1767+
<dd>
1768+
1769+
**subject:** `typing.Optional[DraftSubject]`
1770+
1771+
</dd>
1772+
</dl>
1773+
1774+
<dl>
1775+
<dd>
1776+
1777+
**text:** `typing.Optional[DraftText]`
1778+
1779+
</dd>
1780+
</dl>
1781+
1782+
<dl>
1783+
<dd>
1784+
1785+
**html:** `typing.Optional[DraftHtml]`
1786+
1787+
</dd>
1788+
</dl>
1789+
1790+
<dl>
1791+
<dd>
1792+
1793+
**send_at:** `typing.Optional[DraftSendAt]`
1794+
1795+
</dd>
1796+
</dl>
1797+
1798+
<dl>
1799+
<dd>
1800+
1801+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1802+
1803+
</dd>
1804+
</dl>
1805+
</dd>
1806+
</dl>
1807+
1808+
16801809
</dd>
16811810
</dl>
16821811
</details>

src/agentmail/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
DraftTo,
9191
DraftUpdatedAt,
9292
ListDraftsResponse,
93+
UpdateDraftRequest,
9394
)
9495
from .environment import AgentMailEnvironment
9596
from .events import (
@@ -307,6 +308,7 @@
307308
"ThreadTimestamp": ".threads",
308309
"ThreadUpdatedAt": ".threads",
309310
"Timestamp": ".events",
311+
"UpdateDraftRequest": ".drafts",
310312
"UpdateMessageRequest": ".messages",
311313
"ValidationError": ".errors",
312314
"ValidationErrorResponse": ".types",
@@ -483,6 +485,7 @@ def __dir__():
483485
"ThreadTimestamp",
484486
"ThreadUpdatedAt",
485487
"Timestamp",
488+
"UpdateDraftRequest",
486489
"UpdateMessageRequest",
487490
"ValidationError",
488491
"ValidationErrorResponse",

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

src/agentmail/drafts/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
DraftTo,
2828
DraftUpdatedAt,
2929
ListDraftsResponse,
30+
UpdateDraftRequest,
3031
)
3132
_dynamic_imports: typing.Dict[str, str] = {
3233
"CreateDraftRequest": ".types",
@@ -49,6 +50,7 @@
4950
"DraftTo": ".types",
5051
"DraftUpdatedAt": ".types",
5152
"ListDraftsResponse": ".types",
53+
"UpdateDraftRequest": ".types",
5254
}
5355

5456

@@ -94,4 +96,5 @@ def __dir__():
9496
"DraftTo",
9597
"DraftUpdatedAt",
9698
"ListDraftsResponse",
99+
"UpdateDraftRequest",
97100
]

src/agentmail/drafts/types/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from .draft_to import DraftTo
2727
from .draft_updated_at import DraftUpdatedAt
2828
from .list_drafts_response import ListDraftsResponse
29+
from .update_draft_request import UpdateDraftRequest
2930
_dynamic_imports: typing.Dict[str, str] = {
3031
"CreateDraftRequest": ".create_draft_request",
3132
"Draft": ".draft",
@@ -47,6 +48,7 @@
4748
"DraftTo": ".draft_to",
4849
"DraftUpdatedAt": ".draft_updated_at",
4950
"ListDraftsResponse": ".list_drafts_response",
51+
"UpdateDraftRequest": ".update_draft_request",
5052
}
5153

5254

@@ -92,4 +94,5 @@ def __dir__():
9294
"DraftTo",
9395
"DraftUpdatedAt",
9496
"ListDraftsResponse",
97+
"UpdateDraftRequest",
9598
]

src/agentmail/drafts/types/draft.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .draft_attachments import DraftAttachments
1212
from .draft_bcc import DraftBcc
1313
from .draft_cc import DraftCc
14+
from .draft_client_id import DraftClientId
1415
from .draft_html import DraftHtml
1516
from .draft_id import DraftId
1617
from .draft_in_reply_to import DraftInReplyTo
@@ -29,6 +30,7 @@ class Draft(UncheckedBaseModel):
2930
inbox_id: InboxId
3031
thread_id: ThreadId
3132
draft_id: DraftId
33+
client_id: typing.Optional[DraftClientId] = None
3234
labels: DraftLabels
3335
reply_to: typing.Optional[DraftReplyTo] = None
3436
to: typing.Optional[DraftTo] = None
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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 .draft_bcc import DraftBcc
9+
from .draft_cc import DraftCc
10+
from .draft_html import DraftHtml
11+
from .draft_reply_to import DraftReplyTo
12+
from .draft_send_at import DraftSendAt
13+
from .draft_subject import DraftSubject
14+
from .draft_text import DraftText
15+
from .draft_to import DraftTo
16+
17+
18+
class UpdateDraftRequest(UncheckedBaseModel):
19+
reply_to: typing.Optional[DraftReplyTo] = None
20+
to: typing.Optional[DraftTo] = None
21+
cc: typing.Optional[DraftCc] = None
22+
bcc: typing.Optional[DraftBcc] = None
23+
subject: typing.Optional[DraftSubject] = None
24+
text: typing.Optional[DraftText] = None
25+
html: typing.Optional[DraftHtml] = None
26+
send_at: typing.Optional[DraftSendAt] = None
27+
28+
if IS_PYDANTIC_V2:
29+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
30+
else:
31+
32+
class Config:
33+
frozen = True
34+
smart_union = True
35+
extra = pydantic.Extra.allow

0 commit comments

Comments
 (0)