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 @@
{
".": "1.15.0"
".": "1.16.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: 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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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 = "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"
Expand Down
54 changes: 48 additions & 6 deletions src/cas_parser/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cas_parser/_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__ = "cas_parser"
__version__ = "1.15.0" # x-release-please-version
__version__ = "1.16.0" # x-release-please-version
56 changes: 42 additions & 14 deletions src/cas_parser/resources/inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)

Expand Down
14 changes: 9 additions & 5 deletions src/cas_parser/types/inbox_connect_email_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cas_parser/types/inbox_connect_email_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/cas_parser/types/inbox_list_cas_files_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
"""
Expand Down
Loading