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 @@
{
".": "3.5.0-alpha"
".": "3.6.0-alpha"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 801
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-d5da60e6c0a34ecb5e91fc3e232836c75e32cdc1c1f348e6b12d88e8c1d77aea.yml
openapi_spec_hash: c78b6c372d7b9a5d8735956b67e724ce
config_hash: 239f4f0a795470227c75e4d48b782e04
configured_endpoints: 846
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-cb0994e7d39146470cf25daa458555be4691e50795b9cb9be0cdd76a7d6bf357.yml
openapi_spec_hash: df09e67ae6d4df81593b396048046de5
config_hash: 53adc7ec630d90dd582727459f58a597
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 3.6.0-alpha (2025-09-23)

Full Changelog: [v3.5.0-alpha...v3.6.0-alpha](https://github.com/team-telnyx/telnyx-python/compare/v3.5.0-alpha...v3.6.0-alpha)

### Features

* **api:** manual updates ([12d91f6](https://github.com/team-telnyx/telnyx-python/commit/12d91f63949e7097d424fabd0de50fa74f7cce65))
* **api:** manual updates ([04e377e](https://github.com/team-telnyx/telnyx-python/commit/04e377ec69cfdfadb46eff9f4008dee6460ec21a))


### Chores

* do not install brew dependencies in ./scripts/bootstrap by default ([f6d0905](https://github.com/team-telnyx/telnyx-python/commit/f6d09059d41e721669697646dc072b9eca5e2c5b))
* improve example values ([38fccc3](https://github.com/team-telnyx/telnyx-python/commit/38fccc3883c842b436400beab2f5cc9932bc9039))

## 3.5.0-alpha (2025-09-19)

Full Changelog: [v3.4.0-alpha...v3.5.0-alpha](https://github.com/team-telnyx/telnyx-python/compare/v3.4.0-alpha...v3.5.0-alpha)
Expand Down
215 changes: 214 additions & 1 deletion api.md

Large diffs are not rendered by default.

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 = "3.5.0-alpha"
version = "3.6.0-alpha"
description = "The official Python library for the telnyx API"
dynamic = ["readme"]
license = "MIT"
Expand Down
14 changes: 11 additions & 3 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ set -e

cd "$(dirname "$0")/.."

if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
case "$response" in
[yY][eE][sS]|[yY])
brew bundle
;;
*)
;;
esac
echo
}
fi

Expand Down
55 changes: 53 additions & 2 deletions src/telnyx/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
seti,
fqdns,
media,
oauth,
balance,
regions,
comments,
Expand All @@ -69,15 +70,18 @@
messsages,
user_tags,
global_ips,
well_known,
call_events,
connections,
ota_updates,
short_codes,
audit_events,
oauth_grants,
requirements,
channel_zones,
number_lookup,
number_orders,
oauth_clients,
usage_reports,
billing_groups,
detail_records,
Expand Down Expand Up @@ -178,6 +182,7 @@
from .resources.faxes import faxes
from .resources.rooms import rooms
from .resources.texml import texml
from .resources.legacy import legacy
from .resources.queues import queues
from .resources.actions import actions
from .resources.payment import payment
Expand Down Expand Up @@ -217,6 +222,10 @@


class Telnyx(SyncAPIClient):
legacy: legacy.LegacyResource
oauth: oauth.OAuthResource
oauth_clients: oauth_clients.OAuthClientsResource
oauth_grants: oauth_grants.OAuthGrantsResource
webhooks: webhooks.WebhooksResource
access_ip_address: access_ip_address.AccessIPAddressResource
access_ip_ranges: access_ip_ranges.AccessIPRangesResource
Expand Down Expand Up @@ -366,6 +375,7 @@ class Telnyx(SyncAPIClient):
wireless_blocklist_values: wireless_blocklist_values.WirelessBlocklistValuesResource
wireless_blocklists: wireless_blocklists.WirelessBlocklistsResource
partner_campaigns: partner_campaigns.PartnerCampaignsResource
well_known: well_known.WellKnownResource
with_raw_response: TelnyxWithRawResponse
with_streaming_response: TelnyxWithStreamedResponse

Expand Down Expand Up @@ -409,6 +419,7 @@ def __init__(

if base_url is None:
base_url = os.environ.get("TELNYX_BASE_URL")
self._base_url_overridden = base_url is not None
if base_url is None:
base_url = f"https://api.telnyx.com/v2"

Expand All @@ -423,6 +434,10 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.legacy = legacy.LegacyResource(self)
self.oauth = oauth.OAuthResource(self)
self.oauth_clients = oauth_clients.OAuthClientsResource(self)
self.oauth_grants = oauth_grants.OAuthGrantsResource(self)
self.webhooks = webhooks.WebhooksResource(self)
self.access_ip_address = access_ip_address.AccessIPAddressResource(self)
self.access_ip_ranges = access_ip_ranges.AccessIPRangesResource(self)
Expand Down Expand Up @@ -578,6 +593,7 @@ def __init__(
self.wireless_blocklist_values = wireless_blocklist_values.WirelessBlocklistValuesResource(self)
self.wireless_blocklists = wireless_blocklists.WirelessBlocklistsResource(self)
self.partner_campaigns = partner_campaigns.PartnerCampaignsResource(self)
self.well_known = well_known.WellKnownResource(self)
self.with_raw_response = TelnyxWithRawResponse(self)
self.with_streaming_response = TelnyxWithStreamedResponse(self)

Expand Down Expand Up @@ -637,7 +653,7 @@ def copy(
params = set_default_query

http_client = http_client or self._client
return self.__class__(
client = self.__class__(
api_key=api_key or self.api_key,
base_url=base_url or self.base_url,
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
Expand All @@ -647,6 +663,8 @@ def copy(
default_query=params,
**_extra_kwargs,
)
client._base_url_overridden = self._base_url_overridden or base_url is not None
return client

# Alias for `copy` for nicer inline usage, e.g.
# client.with_options(timeout=10).foo.create(...)
Expand Down Expand Up @@ -990,6 +1008,10 @@ def _make_status_error(


class AsyncTelnyx(AsyncAPIClient):
legacy: legacy.AsyncLegacyResource
oauth: oauth.AsyncOAuthResource
oauth_clients: oauth_clients.AsyncOAuthClientsResource
oauth_grants: oauth_grants.AsyncOAuthGrantsResource
webhooks: webhooks.AsyncWebhooksResource
access_ip_address: access_ip_address.AsyncAccessIPAddressResource
access_ip_ranges: access_ip_ranges.AsyncAccessIPRangesResource
Expand Down Expand Up @@ -1139,6 +1161,7 @@ class AsyncTelnyx(AsyncAPIClient):
wireless_blocklist_values: wireless_blocklist_values.AsyncWirelessBlocklistValuesResource
wireless_blocklists: wireless_blocklists.AsyncWirelessBlocklistsResource
partner_campaigns: partner_campaigns.AsyncPartnerCampaignsResource
well_known: well_known.AsyncWellKnownResource
with_raw_response: AsyncTelnyxWithRawResponse
with_streaming_response: AsyncTelnyxWithStreamedResponse

Expand Down Expand Up @@ -1182,6 +1205,7 @@ def __init__(

if base_url is None:
base_url = os.environ.get("TELNYX_BASE_URL")
self._base_url_overridden = base_url is not None
if base_url is None:
base_url = f"https://api.telnyx.com/v2"

Expand All @@ -1196,6 +1220,10 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.legacy = legacy.AsyncLegacyResource(self)
self.oauth = oauth.AsyncOAuthResource(self)
self.oauth_clients = oauth_clients.AsyncOAuthClientsResource(self)
self.oauth_grants = oauth_grants.AsyncOAuthGrantsResource(self)
self.webhooks = webhooks.AsyncWebhooksResource(self)
self.access_ip_address = access_ip_address.AsyncAccessIPAddressResource(self)
self.access_ip_ranges = access_ip_ranges.AsyncAccessIPRangesResource(self)
Expand Down Expand Up @@ -1357,6 +1385,7 @@ def __init__(
self.wireless_blocklist_values = wireless_blocklist_values.AsyncWirelessBlocklistValuesResource(self)
self.wireless_blocklists = wireless_blocklists.AsyncWirelessBlocklistsResource(self)
self.partner_campaigns = partner_campaigns.AsyncPartnerCampaignsResource(self)
self.well_known = well_known.AsyncWellKnownResource(self)
self.with_raw_response = AsyncTelnyxWithRawResponse(self)
self.with_streaming_response = AsyncTelnyxWithStreamedResponse(self)

Expand Down Expand Up @@ -1416,7 +1445,7 @@ def copy(
params = set_default_query

http_client = http_client or self._client
return self.__class__(
client = self.__class__(
api_key=api_key or self.api_key,
base_url=base_url or self.base_url,
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
Expand All @@ -1426,6 +1455,8 @@ def copy(
default_query=params,
**_extra_kwargs,
)
client._base_url_overridden = self._base_url_overridden or base_url is not None
return client

# Alias for `copy` for nicer inline usage, e.g.
# client.with_options(timeout=10).foo.create(...)
Expand Down Expand Up @@ -1776,6 +1807,10 @@ def _make_status_error(

class TelnyxWithRawResponse:
def __init__(self, client: Telnyx) -> None:
self.legacy = legacy.LegacyResourceWithRawResponse(client.legacy)
self.oauth = oauth.OAuthResourceWithRawResponse(client.oauth)
self.oauth_clients = oauth_clients.OAuthClientsResourceWithRawResponse(client.oauth_clients)
self.oauth_grants = oauth_grants.OAuthGrantsResourceWithRawResponse(client.oauth_grants)
self.access_ip_address = access_ip_address.AccessIPAddressResourceWithRawResponse(client.access_ip_address)
self.access_ip_ranges = access_ip_ranges.AccessIPRangesResourceWithRawResponse(client.access_ip_ranges)
self.actions = actions.ActionsResourceWithRawResponse(client.actions)
Expand Down Expand Up @@ -2050,6 +2085,7 @@ def __init__(self, client: Telnyx) -> None:
client.wireless_blocklists
)
self.partner_campaigns = partner_campaigns.PartnerCampaignsResourceWithRawResponse(client.partner_campaigns)
self.well_known = well_known.WellKnownResourceWithRawResponse(client.well_known)

self.create_bucket = to_raw_response_wrapper(
client.create_bucket,
Expand Down Expand Up @@ -2080,6 +2116,10 @@ def __init__(self, client: Telnyx) -> None:

class AsyncTelnyxWithRawResponse:
def __init__(self, client: AsyncTelnyx) -> None:
self.legacy = legacy.AsyncLegacyResourceWithRawResponse(client.legacy)
self.oauth = oauth.AsyncOAuthResourceWithRawResponse(client.oauth)
self.oauth_clients = oauth_clients.AsyncOAuthClientsResourceWithRawResponse(client.oauth_clients)
self.oauth_grants = oauth_grants.AsyncOAuthGrantsResourceWithRawResponse(client.oauth_grants)
self.access_ip_address = access_ip_address.AsyncAccessIPAddressResourceWithRawResponse(client.access_ip_address)
self.access_ip_ranges = access_ip_ranges.AsyncAccessIPRangesResourceWithRawResponse(client.access_ip_ranges)
self.actions = actions.AsyncActionsResourceWithRawResponse(client.actions)
Expand Down Expand Up @@ -2394,6 +2434,7 @@ def __init__(self, client: AsyncTelnyx) -> None:
self.partner_campaigns = partner_campaigns.AsyncPartnerCampaignsResourceWithRawResponse(
client.partner_campaigns
)
self.well_known = well_known.AsyncWellKnownResourceWithRawResponse(client.well_known)

self.create_bucket = async_to_raw_response_wrapper(
client.create_bucket,
Expand Down Expand Up @@ -2424,6 +2465,10 @@ def __init__(self, client: AsyncTelnyx) -> None:

class TelnyxWithStreamedResponse:
def __init__(self, client: Telnyx) -> None:
self.legacy = legacy.LegacyResourceWithStreamingResponse(client.legacy)
self.oauth = oauth.OAuthResourceWithStreamingResponse(client.oauth)
self.oauth_clients = oauth_clients.OAuthClientsResourceWithStreamingResponse(client.oauth_clients)
self.oauth_grants = oauth_grants.OAuthGrantsResourceWithStreamingResponse(client.oauth_grants)
self.access_ip_address = access_ip_address.AccessIPAddressResourceWithStreamingResponse(
client.access_ip_address
)
Expand Down Expand Up @@ -2744,6 +2789,7 @@ def __init__(self, client: Telnyx) -> None:
self.partner_campaigns = partner_campaigns.PartnerCampaignsResourceWithStreamingResponse(
client.partner_campaigns
)
self.well_known = well_known.WellKnownResourceWithStreamingResponse(client.well_known)

self.create_bucket = to_streamed_response_wrapper(
client.create_bucket,
Expand Down Expand Up @@ -2774,6 +2820,10 @@ def __init__(self, client: Telnyx) -> None:

class AsyncTelnyxWithStreamedResponse:
def __init__(self, client: AsyncTelnyx) -> None:
self.legacy = legacy.AsyncLegacyResourceWithStreamingResponse(client.legacy)
self.oauth = oauth.AsyncOAuthResourceWithStreamingResponse(client.oauth)
self.oauth_clients = oauth_clients.AsyncOAuthClientsResourceWithStreamingResponse(client.oauth_clients)
self.oauth_grants = oauth_grants.AsyncOAuthGrantsResourceWithStreamingResponse(client.oauth_grants)
self.access_ip_address = access_ip_address.AsyncAccessIPAddressResourceWithStreamingResponse(
client.access_ip_address
)
Expand Down Expand Up @@ -3136,6 +3186,7 @@ def __init__(self, client: AsyncTelnyx) -> None:
self.partner_campaigns = partner_campaigns.AsyncPartnerCampaignsResourceWithStreamingResponse(
client.partner_campaigns
)
self.well_known = well_known.AsyncWellKnownResourceWithStreamingResponse(client.well_known)

self.create_bucket = async_to_streamed_response_wrapper(
client.create_bucket,
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__ = "3.5.0-alpha" # x-release-please-version
__version__ = "3.6.0-alpha" # x-release-please-version
Loading