Skip to content
Open
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 @@
{
".": "4.190.0"
".": "4.191.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 1410
configured_endpoints: 1411
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [4.191.0](https://github.com/team-telnyx/telnyx-python/compare/v4.190.0...v4.191.0) (2026-11-02)


### Features

* promote from staging e8c5468 ([abfe949](https://github.com/team-telnyx/telnyx-python/commit/abfe949caed764e6348954c70b4b38be5509878c))

## [4.190.0](https://github.com/team-telnyx/telnyx-python/compare/v4.189.0...v4.190.0) (2026-10-28)


Expand Down
40 changes: 25 additions & 15 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ from telnyx.types.ai import (
TelnyxAvatarSettings,
ToolNode,
ToolNodeReq,
TranscriptionChallenger,
TranscriptionEndpointingPlan,
TranscriptionFallbackModel,
TranscriptionSettings,
TranscriptionSettingsConfig,
TransferTool,
Expand Down Expand Up @@ -1525,7 +1527,11 @@ Methods:
Types:

```python
from telnyx.types.ai.memory.namespaces import NamespaceSettingsResponse
from telnyx.types.ai.memory.namespaces import (
NamespaceSettings,
NamespaceSettingsResponse,
SummarySettings,
)
```

Methods:
Expand Down Expand Up @@ -3702,6 +3708,8 @@ Types:
from telnyx.types.phone_numbers import (
NumbersPhoneNumbersJob,
PhoneNumbersJob,
PhoneNumbersJobPendingOperation,
PhoneNumbersJobSuccessfulOperation,
JobRetrieveResponse,
JobDeleteBatchResponse,
JobUpdateBatchResponse,
Expand Down Expand Up @@ -5089,11 +5097,13 @@ Types:
```python
from telnyx.types import (
TelephonyCredential,
TokenMaterial,
TelephonyCredentialCreateResponse,
TelephonyCredentialRetrieveResponse,
TelephonyCredentialUpdateResponse,
TelephonyCredentialDeleteResponse,
TelephonyCredentialCreateTokenResponse,
TelephonyCredentialRetrieveTokenMaterialResponse,
)
```

Expand All @@ -5105,6 +5115,7 @@ Methods:
- <code title="get /telephony_credentials">client.telephony_credentials.<a href="./src/telnyx/resources/telephony_credentials.py">list</a>(\*\*<a href="src/telnyx/types/telephony_credential_list_params.py">params</a>) -> <a href="./src/telnyx/types/telephony_credential.py">SyncDefaultFlatPagination[TelephonyCredential]</a></code>
- <code title="delete /telephony_credentials/{id}">client.telephony_credentials.<a href="./src/telnyx/resources/telephony_credentials.py">delete</a>(id) -> <a href="./src/telnyx/types/telephony_credential_delete_response.py">TelephonyCredentialDeleteResponse</a></code>
- <code title="post /telephony_credentials/{id}/token">client.telephony_credentials.<a href="./src/telnyx/resources/telephony_credentials.py">create_token</a>(id) -> str</code>
- <code title="get /telephony_credentials/{id}/token_material">client.telephony_credentials.<a href="./src/telnyx/resources/telephony_credentials.py">retrieve_token_material</a>(id) -> <a href="./src/telnyx/types/telephony_credential_retrieve_token_material_response.py">TelephonyCredentialRetrieveTokenMaterialResponse</a></code>

# Texml

Expand Down Expand Up @@ -6042,15 +6053,9 @@ Methods:

### PhoneNumbers

Types:

```python
from telnyx.types.whatsapp.business_accounts import PhoneNumberListResponse
```

Methods:

- <code title="get /v2/whatsapp/business_accounts/{id}/phone_numbers">client.whatsapp.business_accounts.phone_numbers.<a href="./src/telnyx/resources/whatsapp/business_accounts/phone_numbers.py">list</a>(id, \*\*<a href="src/telnyx/types/whatsapp/business_accounts/phone_number_list_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/business_accounts/phone_number_list_response.py">SyncDefaultFlatPagination[PhoneNumberListResponse]</a></code>
- <code title="get /v2/whatsapp/business_accounts/{id}/phone_numbers">client.whatsapp.business_accounts.phone_numbers.<a href="./src/telnyx/resources/whatsapp/business_accounts/phone_numbers.py">list</a>(id, \*\*<a href="src/telnyx/types/whatsapp/business_accounts/phone_number_list_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/whatsapp_phone_response.py">SyncDefaultFlatPagination[WhatsappPhoneResponse]</a></code>
- <code title="post /v2/whatsapp/business_accounts/{id}/phone_numbers">client.whatsapp.business_accounts.phone_numbers.<a href="./src/telnyx/resources/whatsapp/business_accounts/phone_numbers.py">initialize_verification</a>(id, \*\*<a href="src/telnyx/types/whatsapp/business_accounts/phone_number_initialize_verification_params.py">params</a>) -> None</code>

### Settings
Expand Down Expand Up @@ -6096,7 +6101,7 @@ Types:

```python
from telnyx.types.whatsapp import (
PhoneNumberListResponse,
WhatsappPhoneResponse,
PhoneNumberGetResponse,
PhoneNumberRetrieveConversationWindowResponse,
PhoneNumberRetrievePhoneNumberResponse,
Expand All @@ -6105,7 +6110,7 @@ from telnyx.types.whatsapp import (

Methods:

- <code title="get /v2/whatsapp/phone_numbers">client.whatsapp.phone_numbers.<a href="./src/telnyx/resources/whatsapp/phone_numbers/phone_numbers.py">list</a>(\*\*<a href="src/telnyx/types/whatsapp/phone_number_list_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/phone_number_list_response.py">SyncDefaultFlatPagination[PhoneNumberListResponse]</a></code>
- <code title="get /v2/whatsapp/phone_numbers">client.whatsapp.phone_numbers.<a href="./src/telnyx/resources/whatsapp/phone_numbers/phone_numbers.py">list</a>(\*\*<a href="src/telnyx/types/whatsapp/phone_number_list_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/whatsapp_phone_response.py">SyncDefaultFlatPagination[WhatsappPhoneResponse]</a></code>
- <code title="delete /v2/whatsapp/phone_numbers/{phone_number}">client.whatsapp.phone_numbers.<a href="./src/telnyx/resources/whatsapp/phone_numbers/phone_numbers.py">delete</a>(phone_number) -> None</code>
- <code title="get /whatsapp/phone_numbers">client.whatsapp.phone_numbers.<a href="./src/telnyx/resources/whatsapp/phone_numbers/phone_numbers.py">get</a>(\*\*<a href="src/telnyx/types/whatsapp/phone_number_get_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/phone_number_get_response.py">PhoneNumberGetResponse</a></code>
- <code title="post /v2/whatsapp/phone_numbers/{phone_number}/resend_verification">client.whatsapp.phone_numbers.<a href="./src/telnyx/resources/whatsapp/phone_numbers/phone_numbers.py">resend_verification</a>(phone_number, \*\*<a href="src/telnyx/types/whatsapp/phone_number_resend_verification_params.py">params</a>) -> None</code>
Expand Down Expand Up @@ -6227,17 +6232,17 @@ Types:

```python
from telnyx.types.whatsapp import (
WhatsappHostedSignup,
HostedSignupCreateResponse,
HostedSignupRetrieveResponse,
HostedSignupListResponse,
)
```

Methods:

- <code title="post /whatsapp/hosted_signups">client.whatsapp.hosted_signups.<a href="./src/telnyx/resources/whatsapp/hosted_signups.py">create</a>(\*\*<a href="src/telnyx/types/whatsapp/hosted_signup_create_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/hosted_signup_create_response.py">HostedSignupCreateResponse</a></code>
- <code title="get /whatsapp/hosted_signups/{id}">client.whatsapp.hosted_signups.<a href="./src/telnyx/resources/whatsapp/hosted_signups.py">retrieve</a>(id) -> <a href="./src/telnyx/types/whatsapp/hosted_signup_retrieve_response.py">HostedSignupRetrieveResponse</a></code>
- <code title="get /whatsapp/hosted_signups">client.whatsapp.hosted_signups.<a href="./src/telnyx/resources/whatsapp/hosted_signups.py">list</a>(\*\*<a href="src/telnyx/types/whatsapp/hosted_signup_list_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/hosted_signup_list_response.py">SyncDefaultFlatPagination[HostedSignupListResponse]</a></code>
- <code title="get /whatsapp/hosted_signups">client.whatsapp.hosted_signups.<a href="./src/telnyx/resources/whatsapp/hosted_signups.py">list</a>(\*\*<a href="src/telnyx/types/whatsapp/hosted_signup_list_params.py">params</a>) -> <a href="./src/telnyx/types/whatsapp/whatsapp_hosted_signup.py">SyncDefaultFlatPagination[WhatsappHostedSignup]</a></code>

# WhatsappMessageTemplates

Expand Down Expand Up @@ -6458,6 +6463,7 @@ Types:

```python
from telnyx.types.enterprises.reputation import (
ExternalVerification,
ExternalVerificationStatus,
ExternalVerificationWrapped,
)
Expand All @@ -6480,7 +6486,10 @@ Methods:
Types:

```python
from telnyx.types.enterprises import EnterpriseEmailVerificationStatusWrapped
from telnyx.types.enterprises import (
EnterpriseEmailVerificationStatus,
EnterpriseEmailVerificationStatusWrapped,
)
```

Methods:
Expand Down Expand Up @@ -6859,7 +6868,7 @@ from telnyx.types import (

Methods:

- <code title="get /email_events">client.email_events.<a href="./src/telnyx/resources/email_events.py">list</a>(\*\*<a href="src/telnyx/types/email_event_list_params.py">params</a>) -> <a href="./src/telnyx/types/email_event_list_response.py">EmailEventListResponse</a></code>
- <code title="get /email_events">client.email_events.<a href="./src/telnyx/resources/email_events.py">list</a>(\*\*<a href="src/telnyx/types/email_event_list_params.py">params</a>) -> <a href="./src/telnyx/types/email_event_list_response.py">SyncEmailEventsCursorPagination[EmailEventListResponse]</a></code>
- <code title="get /email_events/stats">client.email_events.<a href="./src/telnyx/resources/email_events.py">retrieve_stats</a>(\*\*<a href="src/telnyx/types/email_event_retrieve_stats_params.py">params</a>) -> <a href="./src/telnyx/types/email_event_retrieve_stats_response.py">EmailEventRetrieveStatsResponse</a></code>

# EmailInboxes
Expand Down Expand Up @@ -7058,6 +7067,7 @@ from telnyx.types import (
EmailTemplateCommon,
EmailTemplateResponse,
UpdateEmailTemplateRequest,
VariableSchemaEntry,
EmailTemplateRenderResponse,
)
```
Expand Down Expand Up @@ -7305,7 +7315,7 @@ Methods:
Types:

```python
from telnyx.types.compute.funcs import FuncLogExportConfigResponse
from telnyx.types.compute.funcs import FuncLogExportConfig, FuncLogExportConfigResponse
```

Methods:
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 = "telnyx"
version = "4.190.0"
version = "4.191.0"
description = "The official Python library for the telnyx API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/telnyx/_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__ = "telnyx"
__version__ = "4.190.0" # x-release-please-version
__version__ = "4.191.0" # x-release-please-version
53 changes: 53 additions & 0 deletions src/telnyx/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"EmailCursorPaginationMeta",
"SyncEmailCursorPagination",
"AsyncEmailCursorPagination",
"EmailEventsCursorPaginationMeta",
"SyncEmailEventsCursorPagination",
"AsyncEmailEventsCursorPagination",
"EmailBracketCursorPaginationMeta",
"SyncEmailBracketCursorPagination",
"AsyncEmailBracketCursorPagination",
Expand Down Expand Up @@ -593,6 +596,56 @@ def next_page_info(self) -> Optional[PageInfo]:
return PageInfo(params={"page_cursor": page_cursor})


class EmailEventsCursorPaginationMeta(BaseModel):
page_cursor: Optional[str] = None


class SyncEmailEventsCursorPagination(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
data: List[_T]
meta: Optional[EmailEventsCursorPaginationMeta] = None

@override
def _get_page_items(self) -> List[_T]:
data = self.data
if not data:
return []
return data

@override
def next_page_info(self) -> Optional[PageInfo]:
page_cursor = None
if self.meta is not None:
if self.meta.page_cursor is not None:
page_cursor = self.meta.page_cursor
if not page_cursor:
return None

return PageInfo(params={"page[cursor]": page_cursor})


class AsyncEmailEventsCursorPagination(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
data: List[_T]
meta: Optional[EmailEventsCursorPaginationMeta] = None

@override
def _get_page_items(self) -> List[_T]:
data = self.data
if not data:
return []
return data

@override
def next_page_info(self) -> Optional[PageInfo]:
page_cursor = None
if self.meta is not None:
if self.meta.page_cursor is not None:
page_cursor = self.meta.page_cursor
if not page_cursor:
return None

return PageInfo(params={"page[cursor]": page_cursor})


class EmailBracketCursorPaginationMeta(BaseModel):
page_cursor: Optional[str] = None

Expand Down
5 changes: 3 additions & 2 deletions src/telnyx/resources/browser_sessions/browser_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Dict
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -68,7 +69,7 @@ def create(
policy: browser_session_create_params.Policy,
idempotency_key: str | Omit = omit,
limits: browser_session_create_params.Limits | Omit = omit,
metadata: object | Omit = omit,
metadata: Dict[str, object] | 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.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -289,7 +290,7 @@ async def create(
policy: browser_session_create_params.Policy,
idempotency_key: str | Omit = omit,
limits: browser_session_create_params.Limits | Omit = omit,
metadata: object | Omit = omit,
metadata: Dict[str, object] | 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.
extra_headers: Headers | None = None,
Expand Down
21 changes: 12 additions & 9 deletions src/telnyx/resources/email_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from .._base_client import make_request_options
from ..pagination import SyncEmailEventsCursorPagination, AsyncEmailEventsCursorPagination
from .._base_client import AsyncPaginator, make_request_options
from ..types.email_event_list_response import EmailEventListResponse
from ..types.email_event_retrieve_stats_response import EmailEventRetrieveStatsResponse

Expand Down Expand Up @@ -62,7 +63,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EmailEventListResponse:
) -> SyncEmailEventsCursorPagination[EmailEventListResponse]:
"""
Lists account-level email events sorted oldest first by
`occurred_at asc, id asc`. Each row contains a legacy email.-prefixed event_type
Expand Down Expand Up @@ -118,8 +119,9 @@ def list(

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get(
return self._get_api_list(
"/email_events",
page=SyncEmailEventsCursorPagination[EmailEventListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -137,7 +139,7 @@ def list(
email_event_list_params.EmailEventListParams,
),
),
cast_to=EmailEventListResponse,
model=EmailEventListResponse,
)

def retrieve_stats(
Expand Down Expand Up @@ -212,7 +214,7 @@ def with_streaming_response(self) -> AsyncEmailEventsResourceWithStreamingRespon
"""
return AsyncEmailEventsResourceWithStreamingResponse(self)

async def list(
def list(
self,
*,
email_id: str | Omit = omit,
Expand All @@ -227,7 +229,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EmailEventListResponse:
) -> AsyncPaginator[EmailEventListResponse, AsyncEmailEventsCursorPagination[EmailEventListResponse]]:
"""
Lists account-level email events sorted oldest first by
`occurred_at asc, id asc`. Each row contains a legacy email.-prefixed event_type
Expand Down Expand Up @@ -283,14 +285,15 @@ async def list(

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._get(
return self._get_api_list(
"/email_events",
page=AsyncEmailEventsCursorPagination[EmailEventListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
query=maybe_transform(
{
"email_id": email_id,
"event_type": event_type,
Expand All @@ -302,7 +305,7 @@ async def list(
email_event_list_params.EmailEventListParams,
),
),
cast_to=EmailEventListResponse,
model=EmailEventListResponse,
)

async def retrieve_stats(
Expand Down
Loading
Loading