diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e72f113..7ccfe12 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.0" + ".": "1.15.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e7b8198..8fb9d77 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-cd8e042a9746bbe9bd180614fccc7597b85f4e8f6a29da6cd2f4cbf831fb2fbe.yml -openapi_spec_hash: e27c0d9cd8cdeb348c88e6c4e8777e39 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-5c6cdb8b7a2c0ba449927687bc378823ac947b26b7c2e6c379ae14668b73979a.yml +openapi_spec_hash: 6bc024b866f01da53e2cfd6e404157c7 config_hash: 5509bb7a961ae2e79114b24c381606d4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 154c4a3..55e85e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.15.0 (2026-08-08) + +Full Changelog: [v1.14.0...v1.15.0](https://github.com/CASParser/cas-parser-python/compare/v1.14.0...v1.15.0) + +### Features + +* **api:** api update ([da9b344](https://github.com/CASParser/cas-parser-python/commit/da9b3449915120580a6d4a2f1372e50981455577)) + ## 1.14.0 (2026-08-02) Full Changelog: [v1.13.0...v1.14.0](https://github.com/CASParser/cas-parser-python/compare/v1.13.0...v1.14.0) diff --git a/pyproject.toml b/pyproject.toml index b1b7a94..db0bf0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cas-parser-python" -version = "1.14.0" +version = "1.15.0" description = "The official Python library for the cas-parser API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/cas_parser/_version.py b/src/cas_parser/_version.py index 4ab1647..1d0c341 100644 --- a/src/cas_parser/_version.py +++ b/src/cas_parser/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "cas_parser" -__version__ = "1.14.0" # x-release-please-version +__version__ = "1.15.0" # x-release-please-version diff --git a/src/cas_parser/resources/inbox.py b/src/cas_parser/resources/inbox.py index 7692744..2322067 100644 --- a/src/cas_parser/resources/inbox.py +++ b/src/cas_parser/resources/inbox.py @@ -104,6 +104,7 @@ def connect_email( self, *, redirect_uri: str, + provider: Literal["gmail", "outlook"] | Omit = omit, state: str | 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. @@ -136,6 +137,14 @@ def connect_email( Args: redirect_uri: Your callback URL to receive the inbox_token (must be http or https) + provider: Mail provider to connect. Defaults to `gmail`. + + - `gmail` - Google accounts + - `outlook` - Microsoft accounts + + Any value other than `outlook` is treated as `gmail`. The resolved provider is + returned in the response. + state: State parameter for CSRF protection (returned in redirect) extra_headers: Send extra headers @@ -151,6 +160,7 @@ def connect_email( body=maybe_transform( { "redirect_uri": redirect_uri, + "provider": provider, "state": state, }, inbox_connect_email_params.InboxConnectEmailParams, @@ -338,6 +348,7 @@ async def connect_email( self, *, redirect_uri: str, + provider: Literal["gmail", "outlook"] | Omit = omit, state: str | 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. @@ -370,6 +381,14 @@ async def connect_email( Args: redirect_uri: Your callback URL to receive the inbox_token (must be http or https) + provider: Mail provider to connect. Defaults to `gmail`. + + - `gmail` - Google accounts + - `outlook` - Microsoft accounts + + Any value other than `outlook` is treated as `gmail`. The resolved provider is + returned in the response. + state: State parameter for CSRF protection (returned in redirect) extra_headers: Send extra headers @@ -385,6 +404,7 @@ async def connect_email( body=await async_maybe_transform( { "redirect_uri": redirect_uri, + "provider": provider, "state": state, }, inbox_connect_email_params.InboxConnectEmailParams, diff --git a/src/cas_parser/types/inbox_connect_email_params.py b/src/cas_parser/types/inbox_connect_email_params.py index 73b6ec6..cf0abee 100644 --- a/src/cas_parser/types/inbox_connect_email_params.py +++ b/src/cas_parser/types/inbox_connect_email_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["InboxConnectEmailParams"] @@ -11,5 +11,15 @@ class InboxConnectEmailParams(TypedDict, total=False): redirect_uri: Required[str] """Your callback URL to receive the inbox_token (must be http or https)""" + provider: Literal["gmail", "outlook"] + """Mail provider to connect. Defaults to `gmail`. + + - `gmail` - Google accounts + - `outlook` - Microsoft accounts + + Any value other than `outlook` is treated as `gmail`. The resolved provider is + returned in the response. + """ + state: str """State parameter for CSRF protection (returned in redirect)""" diff --git a/src/cas_parser/types/inbox_connect_email_response.py b/src/cas_parser/types/inbox_connect_email_response.py index 7062217..f80e2ad 100644 --- a/src/cas_parser/types/inbox_connect_email_response.py +++ b/src/cas_parser/types/inbox_connect_email_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from typing_extensions import Literal from .._models import BaseModel @@ -14,4 +15,7 @@ class InboxConnectEmailResponse(BaseModel): oauth_url: Optional[str] = None """Redirect user to this URL to start OAuth flow""" + provider: Optional[Literal["gmail", "outlook"]] = None + """The provider this OAuth URL was generated for""" + status: Optional[str] = None diff --git a/tests/api_resources/test_inbox.py b/tests/api_resources/test_inbox.py index 3924127..deba9e3 100644 --- a/tests/api_resources/test_inbox.py +++ b/tests/api_resources/test_inbox.py @@ -70,6 +70,7 @@ def test_method_connect_email(self, client: CasParser) -> None: def test_method_connect_email_with_all_params(self, client: CasParser) -> None: inbox = client.inbox.connect_email( redirect_uri="https://yourapp.com/oauth-callback", + provider="outlook", state="abc123", ) assert_matches_type(InboxConnectEmailResponse, inbox, path=["response"]) @@ -232,6 +233,7 @@ async def test_method_connect_email(self, async_client: AsyncCasParser) -> None: async def test_method_connect_email_with_all_params(self, async_client: AsyncCasParser) -> None: inbox = await async_client.inbox.connect_email( redirect_uri="https://yourapp.com/oauth-callback", + provider="outlook", state="abc123", ) assert_matches_type(InboxConnectEmailResponse, inbox, path=["response"])