Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #12

Merged
merged 1 commit into from
Nov 19, 2024
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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude%2Fprelude-c1f72f65743e762371400a6f36ba21d4e68ceaa351cb3ea7674cbc04a39e298c.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude%2Fprelude-1f5a50e21d467599b13b9fa8a754941c04020e024bb43ec00017b5c48b5d6c51.yml
9 changes: 8 additions & 1 deletion src/prelude_python_sdk/types/verification_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ class Options(TypedDict, total=False):
devices.
"""

custom_code: str
"""The custom code to use for OTP verification.

This feature is only available for compatibility purposes and subject to
Prelude’s approval. Contact us to discuss your use case.
"""

locale: str
"""
A BCP-47 formatted locale string with the language the text message will be sent
Expand Down Expand Up @@ -82,7 +89,7 @@ class Signals(TypedDict, total=False):
device_model: str
"""The model of the user's device."""

device_platform: Literal["android", "ios", "web"]
device_platform: Literal["android", "ios", "ipados", "tvos", "web"]
"""The type of the user's device."""

ip: str
Expand Down
36 changes: 18 additions & 18 deletions tests/api_resources/test_transactional.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class TestTransactional:
@parametrize
def test_method_send(self, client: Prelude) -> None:
transactional = client.transactional.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
)
assert_matches_type(TransactionalSendResponse, transactional, path=["response"])

Expand All @@ -34,13 +34,13 @@ def test_method_send(self, client: Prelude) -> None:
@parametrize
def test_method_send_with_all_params(self, client: Prelude) -> None:
transactional = client.transactional.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
callback_url="callback_url",
correlation_id="correlation_id",
expires_at="expires_at",
from_="from",
variables={"foo": "string"},
variables={"foo": "bar"},
)
assert_matches_type(TransactionalSendResponse, transactional, path=["response"])

Expand All @@ -50,8 +50,8 @@ def test_method_send_with_all_params(self, client: Prelude) -> None:
@parametrize
def test_raw_response_send(self, client: Prelude) -> None:
response = client.transactional.with_raw_response.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
)

assert response.is_closed is True
Expand All @@ -65,8 +65,8 @@ def test_raw_response_send(self, client: Prelude) -> None:
@parametrize
def test_streaming_response_send(self, client: Prelude) -> None:
with client.transactional.with_streaming_response.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -86,8 +86,8 @@ class TestAsyncTransactional:
@parametrize
async def test_method_send(self, async_client: AsyncPrelude) -> None:
transactional = await async_client.transactional.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
)
assert_matches_type(TransactionalSendResponse, transactional, path=["response"])

Expand All @@ -97,13 +97,13 @@ async def test_method_send(self, async_client: AsyncPrelude) -> None:
@parametrize
async def test_method_send_with_all_params(self, async_client: AsyncPrelude) -> None:
transactional = await async_client.transactional.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
callback_url="callback_url",
correlation_id="correlation_id",
expires_at="expires_at",
from_="from",
variables={"foo": "string"},
variables={"foo": "bar"},
)
assert_matches_type(TransactionalSendResponse, transactional, path=["response"])

Expand All @@ -113,8 +113,8 @@ async def test_method_send_with_all_params(self, async_client: AsyncPrelude) ->
@parametrize
async def test_raw_response_send(self, async_client: AsyncPrelude) -> None:
response = await async_client.transactional.with_raw_response.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
)

assert response.is_closed is True
Expand All @@ -128,8 +128,8 @@ async def test_raw_response_send(self, async_client: AsyncPrelude) -> None:
@parametrize
async def test_streaming_response_send(self, async_client: AsyncPrelude) -> None:
async with async_client.transactional.with_streaming_response.send(
template_id="template_id",
to="to",
template_id="template_01jd1xq0cffycayqtdkdbv4d61",
to="+30123456789",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Prelude) -> None:
metadata={"correlation_id": "correlation_id"},
options={
"app_realm": "app_realm",
"custom_code": "custom_code",
"locale": "el-GR",
"sender_id": "sender_id",
"template_id": "template_id",
Expand Down Expand Up @@ -153,6 +154,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncPrelude) -
metadata={"correlation_id": "correlation_id"},
options={
"app_realm": "app_realm",
"custom_code": "custom_code",
"locale": "el-GR",
"sender_id": "sender_id",
"template_id": "template_id",
Expand Down