Skip to content

Commit 4aa46fc

Browse files
feat(api): api update
1 parent b543e85 commit 4aa46fc

6 files changed

Lines changed: 31 additions & 26 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-2fd773786951b723a5d7d7342bf1c6ab46f08bd2851e916d188faae379d5aa4c.yml
3-
openapi_spec_hash: 7515d1e5fe3130b9f5411f7aacbc8a64
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-c7cca9a7a8e15f8a584c22eab142c4af72a329117f63cc3b3f7cabb25410f2ce.yml
3+
openapi_spec_hash: f40d936e433bbf8c98179d0b36f304c8
44
config_hash: 5509bb7a961ae2e79114b24c381606d4

src/cas_parser/resources/inbound_email.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def retrieve(
156156
timeout: float | httpx.Timeout | None | NotGiven = not_given,
157157
) -> InboundEmailRetrieveResponse:
158158
"""
159-
Retrieve details of a specific mailbox including statistics.
159+
Retrieve details of a specific inbound email including statistics.
160160
161161
Args:
162162
extra_headers: Send extra headers
@@ -190,10 +190,10 @@ def list(
190190
extra_body: Body | None = None,
191191
timeout: float | httpx.Timeout | None | NotGiven = not_given,
192192
) -> InboundEmailListResponse:
193-
"""List all mailboxes associated with your API key.
193+
"""List all inbound emails associated with your API key.
194194
195-
Returns active and inactive
196-
mailboxes (deleted mailboxes are excluded).
195+
Returns active and paused
196+
inbound emails (deleted ones are excluded).
197197
198198
Args:
199199
limit: Maximum number of inbound emails to return
@@ -396,7 +396,7 @@ async def retrieve(
396396
timeout: float | httpx.Timeout | None | NotGiven = not_given,
397397
) -> InboundEmailRetrieveResponse:
398398
"""
399-
Retrieve details of a specific mailbox including statistics.
399+
Retrieve details of a specific inbound email including statistics.
400400
401401
Args:
402402
extra_headers: Send extra headers
@@ -430,10 +430,10 @@ async def list(
430430
extra_body: Body | None = None,
431431
timeout: float | httpx.Timeout | None | NotGiven = not_given,
432432
) -> InboundEmailListResponse:
433-
"""List all mailboxes associated with your API key.
433+
"""List all inbound emails associated with your API key.
434434
435-
Returns active and inactive
436-
mailboxes (deleted mailboxes are excluded).
435+
Returns active and paused
436+
inbound emails (deleted ones are excluded).
437437
438438
Args:
439439
limit: Maximum number of inbound emails to return

src/cas_parser/types/inbound_email_create_response.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class InboundEmailCreateResponse(BaseModel):
1818
callback_url: Optional[str] = None
1919
"""Webhook URL for email notifications.
2020
21-
`null` means files are only retrievable via `GET /v4/inbound-email/{id}/files`
22-
(pull delivery).
21+
Empty string (`""`) means files are only retrievable via
22+
`GET /v4/inbound-email/{id}/files` (SDK / pull mode).
2323
"""
2424

2525
created_at: Optional[datetime] = None
26-
"""When the mailbox was created"""
26+
"""When the inbound email was created"""
2727

2828
email: Optional[str] = None
2929
"""The inbound email address to forward CAS statements to"""
@@ -38,7 +38,7 @@ class InboundEmailCreateResponse(BaseModel):
3838
"""Your internal reference identifier"""
3939

4040
status: Optional[Literal["active", "paused"]] = None
41-
"""Current mailbox status"""
41+
"""Current inbound email lifecycle status"""
4242

4343
updated_at: Optional[datetime] = None
44-
"""When the mailbox was last updated"""
44+
"""When the inbound email was last updated"""

src/cas_parser/types/inbound_email_list_response.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class InboundEmail(BaseModel):
1818
callback_url: Optional[str] = None
1919
"""Webhook URL for email notifications.
2020
21-
`null` means files are only retrievable via `GET /v4/inbound-email/{id}/files`
22-
(pull delivery).
21+
Empty string (`""`) means files are only retrievable via
22+
`GET /v4/inbound-email/{id}/files` (SDK / pull mode).
2323
"""
2424

2525
created_at: Optional[datetime] = None
26-
"""When the mailbox was created"""
26+
"""When the inbound email was created"""
2727

2828
email: Optional[str] = None
2929
"""The inbound email address to forward CAS statements to"""
@@ -38,10 +38,10 @@ class InboundEmail(BaseModel):
3838
"""Your internal reference identifier"""
3939

4040
status: Optional[Literal["active", "paused"]] = None
41-
"""Current mailbox status"""
41+
"""Current inbound email lifecycle status"""
4242

4343
updated_at: Optional[datetime] = None
44-
"""When the mailbox was last updated"""
44+
"""When the inbound email was last updated"""
4545

4646

4747
class InboundEmailListResponse(BaseModel):

src/cas_parser/types/inbound_email_retrieve_response.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class InboundEmailRetrieveResponse(BaseModel):
1818
callback_url: Optional[str] = None
1919
"""Webhook URL for email notifications.
2020
21-
`null` means files are only retrievable via `GET /v4/inbound-email/{id}/files`
22-
(pull delivery).
21+
Empty string (`""`) means files are only retrievable via
22+
`GET /v4/inbound-email/{id}/files` (SDK / pull mode).
2323
"""
2424

2525
created_at: Optional[datetime] = None
26-
"""When the mailbox was created"""
26+
"""When the inbound email was created"""
2727

2828
email: Optional[str] = None
2929
"""The inbound email address to forward CAS statements to"""
@@ -38,7 +38,7 @@ class InboundEmailRetrieveResponse(BaseModel):
3838
"""Your internal reference identifier"""
3939

4040
status: Optional[Literal["active", "paused"]] = None
41-
"""Current mailbox status"""
41+
"""Current inbound email lifecycle status"""
4242

4343
updated_at: Optional[datetime] = None
44-
"""When the mailbox was last updated"""
44+
"""When the inbound email was last updated"""

src/cas_parser/types/inbox_list_cas_files_response.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ class File(BaseModel):
1616
"""Detected CAS provider based on sender email"""
1717

1818
expires_in: Optional[int] = None
19-
"""URL expiration time in seconds (default 86400 = 24 hours)"""
19+
"""URL expiration time in seconds. Defaults vary by source:
20+
21+
- Gmail Inbox Import: 86400 (24h)
22+
- Inbound Email (webhook mode): 172800 (48h)
23+
- Inbound Email (SDK mode): aligned with the session TTL (~30 min)
24+
"""
2025

2126
filename: Optional[str] = None
2227
"""Standardized filename (provider_YYYYMMDD_uniqueid.pdf)"""

0 commit comments

Comments
 (0)