diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7ccfe12..bc845f3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.15.0" + ".": "1.16.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8fb9d77..c12f542 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-5c6cdb8b7a2c0ba449927687bc378823ac947b26b7c2e6c379ae14668b73979a.yml -openapi_spec_hash: 6bc024b866f01da53e2cfd6e404157c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-4d179917b01ea51a3325e7b37ecbbb60d0ba8f60381fe715ff3ec31284ca8042.yml +openapi_spec_hash: d027d37bd7051aa8c05fe1820c05b316 config_hash: 5509bb7a961ae2e79114b24c381606d4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 55e85e1..b668254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.16.0 (2026-08-15) + +Full Changelog: [v1.15.0...v1.16.0](https://github.com/CASParser/cas-parser-python/compare/v1.15.0...v1.16.0) + +### Features + +* **api:** api update ([ceb7878](https://github.com/CASParser/cas-parser-python/commit/ceb78789bb81df619c6e2f8a62f5096f335c4fb0)) + ## 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) diff --git a/pyproject.toml b/pyproject.toml index db0bf0a..0ae106e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cas-parser-python" -version = "1.15.0" +version = "1.16.0" description = "The official Python library for the cas-parser API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/cas_parser/_client.py b/src/cas_parser/_client.py index 03568c5..7cb49cc 100644 --- a/src/cas_parser/_client.py +++ b/src/cas_parser/_client.py @@ -206,7 +206,14 @@ def contract_note(self) -> ContractNoteResource: def inbox(self) -> InboxResource: """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL @@ -519,7 +526,14 @@ def contract_note(self) -> AsyncContractNoteResource: def inbox(self) -> AsyncInboxResource: """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL @@ -774,7 +788,14 @@ def contract_note(self) -> contract_note.ContractNoteResourceWithRawResponse: def inbox(self) -> inbox.InboxResourceWithRawResponse: """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL @@ -910,7 +931,14 @@ def contract_note(self) -> contract_note.AsyncContractNoteResourceWithRawRespons def inbox(self) -> inbox.AsyncInboxResourceWithRawResponse: """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL @@ -1046,7 +1074,14 @@ def contract_note(self) -> contract_note.ContractNoteResourceWithStreamingRespon def inbox(self) -> inbox.InboxResourceWithStreamingResponse: """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL @@ -1182,7 +1217,14 @@ def contract_note(self) -> contract_note.AsyncContractNoteResourceWithStreamingR def inbox(self) -> inbox.AsyncInboxResourceWithStreamingResponse: """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL diff --git a/src/cas_parser/_version.py b/src/cas_parser/_version.py index 1d0c341..e7b34cf 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.15.0" # x-release-please-version +__version__ = "1.16.0" # x-release-please-version diff --git a/src/cas_parser/resources/inbox.py b/src/cas_parser/resources/inbox.py index 2322067..d58c55a 100644 --- a/src/cas_parser/resources/inbox.py +++ b/src/cas_parser/resources/inbox.py @@ -31,7 +31,14 @@ class InboxResource(SyncAPIResource): """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL @@ -104,7 +111,7 @@ def connect_email( self, *, redirect_uri: str, - provider: Literal["gmail", "outlook"] | Omit = omit, + provider: Literal["gmail", "outlook", "zoho"] | 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. @@ -132,18 +139,25 @@ def connect_email( - `state` - Your original state parameter **Store the `inbox_token` client-side** and use it for all subsequent inbox API - calls. + calls. The token is long-lived (it stores an encrypted refresh token), so a + single OAuth connect gives ongoing access to both historical and future CAS + statements in the user's inbox. Reuse the same token until the user revokes + access via `/v4/inbox/disconnect` or their provider's account settings. 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 + - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains. + - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, + `@live.com`, `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, + `@hotmail.fr`). Any other address registered as a personal Microsoft account + also works, including custom domains. + - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho. - Any value other than `outlook` is treated as `gmail`. The resolved provider is - returned in the response. + Any unrecognised value is treated as `gmail`. The resolved provider is returned + in the response. state: State parameter for CSRF protection (returned in redirect) @@ -275,7 +289,14 @@ def list_cas_files( class AsyncInboxResource(AsyncAPIResource): """Endpoints for importing CAS files directly from user email inboxes. - **Supported Providers:** Gmail (more coming soon) + **Supported Providers:** + + - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered + as a personal Microsoft account also works, including custom domains. + - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains **How it works:** 1. Call `POST /v4/inbox/connect` to get an OAuth URL @@ -348,7 +369,7 @@ async def connect_email( self, *, redirect_uri: str, - provider: Literal["gmail", "outlook"] | Omit = omit, + provider: Literal["gmail", "outlook", "zoho"] | 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. @@ -376,18 +397,25 @@ async def connect_email( - `state` - Your original state parameter **Store the `inbox_token` client-side** and use it for all subsequent inbox API - calls. + calls. The token is long-lived (it stores an encrypted refresh token), so a + single OAuth connect gives ongoing access to both historical and future CAS + statements in the user's inbox. Reuse the same token until the user revokes + access via `/v4/inbox/disconnect` or their provider's account settings. 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 + - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains. + - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, + `@live.com`, `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, + `@hotmail.fr`). Any other address registered as a personal Microsoft account + also works, including custom domains. + - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho. - Any value other than `outlook` is treated as `gmail`. The resolved provider is - returned in the response. + Any unrecognised value is treated as `gmail`. The resolved provider is returned + in the response. state: State parameter for CSRF protection (returned in redirect) diff --git a/src/cas_parser/types/inbox_connect_email_params.py b/src/cas_parser/types/inbox_connect_email_params.py index cf0abee..980aeb3 100644 --- a/src/cas_parser/types/inbox_connect_email_params.py +++ b/src/cas_parser/types/inbox_connect_email_params.py @@ -11,14 +11,18 @@ 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"] + provider: Literal["gmail", "outlook", "zoho"] """Mail provider to connect. Defaults to `gmail`. - - `gmail` - Google accounts - - `outlook` - Microsoft accounts + - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains. + - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, + `@live.com`, `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, + `@hotmail.fr`). Any other address registered as a personal Microsoft account + also works, including custom domains. + - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho. - Any value other than `outlook` is treated as `gmail`. The resolved provider is - returned in the response. + Any unrecognised value is treated as `gmail`. The resolved provider is returned + in the response. """ state: str diff --git a/src/cas_parser/types/inbox_connect_email_response.py b/src/cas_parser/types/inbox_connect_email_response.py index f80e2ad..4d9948c 100644 --- a/src/cas_parser/types/inbox_connect_email_response.py +++ b/src/cas_parser/types/inbox_connect_email_response.py @@ -15,7 +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 + provider: Optional[Literal["gmail", "outlook", "zoho"]] = None """The provider this OAuth URL was generated for""" status: Optional[str] = None diff --git a/src/cas_parser/types/inbox_list_cas_files_response.py b/src/cas_parser/types/inbox_list_cas_files_response.py index c4d1c62..c59c8ad 100644 --- a/src/cas_parser/types/inbox_list_cas_files_response.py +++ b/src/cas_parser/types/inbox_list_cas_files_response.py @@ -18,7 +18,7 @@ class File(BaseModel): expires_in: Optional[int] = None """URL expiration time in seconds. Defaults vary by source: - - Gmail Inbox Import: 86400 (24h) + - Email Inbox Import (Gmail, Outlook, Zoho): 86400 (24h) - Inbound Email with `callback_url` set: 172800 (48h) - Inbound Email without `callback_url`: aligned with the session TTL (~30 min) """