Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.10.0"
".": "0.11.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 32
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/ark%2Fark-b8e976f80ad32cae91b6b2590db9c7e3de3fbcf4d583afc1373f3e59b57199e5.yml
openapi_spec_hash: 3233c1972cd8d2509b32b3f32891b3e4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/ark%2Fark-15736053ec21a66dfd09dff6e1eec25c17d9b7cb72853626687ab1cb9c63870f.yml
openapi_spec_hash: 0814dd86f388e3d02172997eaefc90b4
config_hash: d547cc5e7cc41bda64fd8db0d7cb1279
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.11.0 (2026-01-23)

Full Changelog: [v0.10.0...v0.11.0](https://github.com/ArkHQ-io/ark-python/compare/v0.10.0...v0.11.0)

### Features

* **api:** improve raw endpoint ([3ab12b8](https://github.com/ArkHQ-io/ark-python/commit/3ab12b8c773e65632dbc7253e5e37d32883f888a))

## 0.10.0 (2026-01-22)

Full Changelog: [v0.9.0...v0.10.0](https://github.com/ArkHQ-io/ark-python/compare/v0.9.0...v0.10.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ark-email"
version = "0.10.0"
version = "0.11.0"
description = "The official Python library for the ark API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/ark/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "ark"
__version__ = "0.10.0" # x-release-please-version
__version__ = "0.11.0" # x-release-please-version
40 changes: 20 additions & 20 deletions src/ark/resources/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ def send_batch(
def send_raw(
self,
*,
data: str,
mail_from: str,
rcpt_to: SequenceNotStr[str],
from_: str,
raw_message: str,
to: SequenceNotStr[str],
bounce: Optional[bool] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -499,14 +499,14 @@ def send_raw(
Use this for advanced use cases or
when migrating from systems that generate raw email content.

The `data` field should contain the base64-encoded raw email.
The `rawMessage` field should contain the base64-encoded raw email.

Args:
data: Base64-encoded RFC 2822 message
from_: Sender email address

mail_from: Envelope sender address
raw_message: Base64-encoded RFC 2822 MIME message

rcpt_to: Envelope recipient addresses
to: Recipient email addresses

bounce: Whether this is a bounce message (accepts null)

Expand All @@ -522,9 +522,9 @@ def send_raw(
"/emails/raw",
body=maybe_transform(
{
"data": data,
"mail_from": mail_from,
"rcpt_to": rcpt_to,
"from_": from_,
"raw_message": raw_message,
"to": to,
"bounce": bounce,
},
email_send_raw_params.EmailSendRawParams,
Expand Down Expand Up @@ -982,9 +982,9 @@ async def send_batch(
async def send_raw(
self,
*,
data: str,
mail_from: str,
rcpt_to: SequenceNotStr[str],
from_: str,
raw_message: str,
to: SequenceNotStr[str],
bounce: Optional[bool] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -998,14 +998,14 @@ async def send_raw(
Use this for advanced use cases or
when migrating from systems that generate raw email content.

The `data` field should contain the base64-encoded raw email.
The `rawMessage` field should contain the base64-encoded raw email.

Args:
data: Base64-encoded RFC 2822 message
from_: Sender email address

mail_from: Envelope sender address
raw_message: Base64-encoded RFC 2822 MIME message

rcpt_to: Envelope recipient addresses
to: Recipient email addresses

bounce: Whether this is a bounce message (accepts null)

Expand All @@ -1021,9 +1021,9 @@ async def send_raw(
"/emails/raw",
body=await async_maybe_transform(
{
"data": data,
"mail_from": mail_from,
"rcpt_to": rcpt_to,
"from_": from_,
"raw_message": raw_message,
"to": to,
"bounce": bounce,
},
email_send_raw_params.EmailSendRawParams,
Expand Down
12 changes: 6 additions & 6 deletions src/ark/types/email_send_raw_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@


class EmailSendRawParams(TypedDict, total=False):
data: Required[str]
"""Base64-encoded RFC 2822 message"""
from_: Required[Annotated[str, PropertyInfo(alias="from")]]
"""Sender email address"""

mail_from: Required[Annotated[str, PropertyInfo(alias="mailFrom")]]
"""Envelope sender address"""
raw_message: Required[Annotated[str, PropertyInfo(alias="rawMessage")]]
"""Base64-encoded RFC 2822 MIME message"""

rcpt_to: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="rcptTo")]]
"""Envelope recipient addresses"""
to: Required[SequenceNotStr[str]]
"""Recipient email addresses"""

bounce: Optional[bool]
"""Whether this is a bounce message (accepts null)"""
48 changes: 24 additions & 24 deletions tests/api_resources/test_emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,28 +350,28 @@ def test_streaming_response_send_batch(self, client: Ark) -> None:
@parametrize
def test_method_send_raw(self, client: Ark) -> None:
email = client.emails.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
)
assert_matches_type(EmailSendRawResponse, email, path=["response"])

@parametrize
def test_method_send_raw_with_all_params(self, client: Ark) -> None:
email = client.emails.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
bounce=True,
)
assert_matches_type(EmailSendRawResponse, email, path=["response"])

@parametrize
def test_raw_response_send_raw(self, client: Ark) -> None:
response = client.emails.with_raw_response.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
)

assert response.is_closed is True
Expand All @@ -382,9 +382,9 @@ def test_raw_response_send_raw(self, client: Ark) -> None:
@parametrize
def test_streaming_response_send_raw(self, client: Ark) -> None:
with client.emails.with_streaming_response.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -724,28 +724,28 @@ async def test_streaming_response_send_batch(self, async_client: AsyncArk) -> No
@parametrize
async def test_method_send_raw(self, async_client: AsyncArk) -> None:
email = await async_client.emails.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
)
assert_matches_type(EmailSendRawResponse, email, path=["response"])

@parametrize
async def test_method_send_raw_with_all_params(self, async_client: AsyncArk) -> None:
email = await async_client.emails.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
bounce=True,
)
assert_matches_type(EmailSendRawResponse, email, path=["response"])

@parametrize
async def test_raw_response_send_raw(self, async_client: AsyncArk) -> None:
response = await async_client.emails.with_raw_response.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
)

assert response.is_closed is True
Expand All @@ -756,9 +756,9 @@ async def test_raw_response_send_raw(self, async_client: AsyncArk) -> None:
@parametrize
async def test_streaming_response_send_raw(self, async_client: AsyncArk) -> None:
async with async_client.emails.with_streaming_response.send_raw(
data="data",
mail_from="dev@stainless.com",
rcpt_to=["dev@stainless.com"],
from_="dev@stainless.com",
raw_message="rawMessage",
to=["dev@stainless.com"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down