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 @@
{
".": "4.50.0"
".": "4.51.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 946
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-619f2e4cc820442ae564e2345323abd65d5049b428c5780cf9f14c56002a2ba3.yml
openapi_spec_hash: 29de78582d8561745ff8f5f6c2474f1e
config_hash: 535b049bef73708a7530337b14fd0b84
config_hash: 33dae93fe380b8187d9ac4cead6e4b8f
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.51.0 (2026-02-26)

Full Changelog: [v4.50.0...v4.51.0](https://github.com/team-telnyx/telnyx-python/compare/v4.50.0...v4.51.0)

### Features

* **api:** manual updates ([ac454e8](https://github.com/team-telnyx/telnyx-python/commit/ac454e818dfb625a7de8363d1e54e9c795093ca9))

## 4.50.0 (2026-02-26)

Full Changelog: [v4.49.0...v4.50.0](https://github.com/team-telnyx/telnyx-python/compare/v4.49.0...v4.50.0)
Expand Down
9 changes: 2 additions & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3544,20 +3544,15 @@ Methods:
Types:

```python
from telnyx.types import (
QueueCreateResponse,
QueueRetrieveResponse,
QueueUpdateResponse,
QueueListResponse,
)
from telnyx.types import Queue, QueueCreateResponse, QueueRetrieveResponse, QueueUpdateResponse
```

Methods:

- <code title="post /queues">client.queues.<a href="./src/telnyx/resources/queues/queues.py">create</a>(\*\*<a href="src/telnyx/types/queue_create_params.py">params</a>) -> <a href="./src/telnyx/types/queue_create_response.py">QueueCreateResponse</a></code>
- <code title="get /queues/{queue_name}">client.queues.<a href="./src/telnyx/resources/queues/queues.py">retrieve</a>(queue_name) -> <a href="./src/telnyx/types/queue_retrieve_response.py">QueueRetrieveResponse</a></code>
- <code title="post /queues/{queue_name}">client.queues.<a href="./src/telnyx/resources/queues/queues.py">update</a>(queue_name, \*\*<a href="src/telnyx/types/queue_update_params.py">params</a>) -> <a href="./src/telnyx/types/queue_update_response.py">QueueUpdateResponse</a></code>
- <code title="get /queues">client.queues.<a href="./src/telnyx/resources/queues/queues.py">list</a>(\*\*<a href="src/telnyx/types/queue_list_params.py">params</a>) -> <a href="./src/telnyx/types/queue_list_response.py">SyncDefaultFlatPagination[QueueListResponse]</a></code>
- <code title="get /queues">client.queues.<a href="./src/telnyx/resources/queues/queues.py">list</a>(\*\*<a href="src/telnyx/types/queue_list_params.py">params</a>) -> <a href="./src/telnyx/types/queue.py">SyncDefaultFlatPagination[Queue]</a></code>
- <code title="delete /queues/{queue_name}">client.queues.<a href="./src/telnyx/resources/queues/queues.py">delete</a>(queue_name) -> None</code>

## Calls
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.50.0"
version = "4.51.0"
description = "Telnyx API SDK for global Voice, SMS, MMS, WhatsApp, Fax, Wireless IoT, SIP Trunking, and Call Control."
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.50.0" # x-release-please-version
__version__ = "4.51.0" # x-release-please-version
14 changes: 7 additions & 7 deletions src/telnyx/resources/queues/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
async_to_streamed_response_wrapper,
)
from ...pagination import SyncDefaultFlatPagination, AsyncDefaultFlatPagination
from ...types.queue import Queue
from ..._base_client import AsyncPaginator, make_request_options
from ...types.queue_list_response import QueueListResponse
from ...types.queue_create_response import QueueCreateResponse
from ...types.queue_update_response import QueueUpdateResponse
from ...types.queue_retrieve_response import QueueRetrieveResponse
Expand Down Expand Up @@ -182,7 +182,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncDefaultFlatPagination[QueueListResponse]:
) -> SyncDefaultFlatPagination[Queue]:
"""
List all queues for the authenticated user.

Expand All @@ -201,7 +201,7 @@ def list(
"""
return self._get_api_list(
"/queues",
page=SyncDefaultFlatPagination[QueueListResponse],
page=SyncDefaultFlatPagination[Queue],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -215,7 +215,7 @@ def list(
queue_list_params.QueueListParams,
),
),
model=QueueListResponse,
model=Queue,
)

def delete(
Expand Down Expand Up @@ -402,7 +402,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[QueueListResponse, AsyncDefaultFlatPagination[QueueListResponse]]:
) -> AsyncPaginator[Queue, AsyncDefaultFlatPagination[Queue]]:
"""
List all queues for the authenticated user.

Expand All @@ -421,7 +421,7 @@ def list(
"""
return self._get_api_list(
"/queues",
page=AsyncDefaultFlatPagination[QueueListResponse],
page=AsyncDefaultFlatPagination[Queue],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -435,7 +435,7 @@ def list(
queue_list_params.QueueListParams,
),
),
model=QueueListResponse,
model=Queue,
)

async def delete(
Expand Down
2 changes: 1 addition & 1 deletion src/telnyx/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .fax import Fax as Fax
from .fqdn import Fqdn as Fqdn
from .room import Room as Room
from .queue import Queue as Queue
from .record import Record as Record
from .shared import (
APIError as APIError,
Expand Down Expand Up @@ -170,7 +171,6 @@
from .outbound_fqdn_param import OutboundFqdnParam as OutboundFqdnParam
from .portout_list_params import PortoutListParams as PortoutListParams
from .queue_create_params import QueueCreateParams as QueueCreateParams
from .queue_list_response import QueueListResponse as QueueListResponse
from .queue_update_params import QueueUpdateParams as QueueUpdateParams
from .replaced_link_click import ReplacedLinkClick as ReplacedLinkClick
from .verify_profile_data import VerifyProfileData as VerifyProfileData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from .._models import BaseModel

__all__ = ["QueueListResponse"]
__all__ = ["Queue"]


class QueueListResponse(BaseModel):
class Queue(BaseModel):
id: str
"""Uniquely identifies the queue"""

Expand Down
34 changes: 3 additions & 31 deletions src/telnyx/types/queue_create_response.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from .queue import Queue
from .._models import BaseModel

__all__ = ["QueueCreateResponse", "Data"]


class Data(BaseModel):
id: str
"""Uniquely identifies the queue"""

average_wait_time_secs: int
"""
The average time that the calls currently in the queue have spent waiting, given
in seconds.
"""

created_at: str
"""ISO 8601 formatted date of when the queue was created"""

current_size: int
"""The number of calls currently in the queue"""

max_size: int
"""The maximum number of calls allowed in the queue"""

name: str
"""Name of the queue"""

record_type: Literal["queue"]

updated_at: str
"""ISO 8601 formatted date of when the queue was last updated"""
__all__ = ["QueueCreateResponse"]


class QueueCreateResponse(BaseModel):
data: Optional[Data] = None
data: Optional[Queue] = None
34 changes: 3 additions & 31 deletions src/telnyx/types/queue_retrieve_response.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from .queue import Queue
from .._models import BaseModel

__all__ = ["QueueRetrieveResponse", "Data"]


class Data(BaseModel):
id: str
"""Uniquely identifies the queue"""

average_wait_time_secs: int
"""
The average time that the calls currently in the queue have spent waiting, given
in seconds.
"""

created_at: str
"""ISO 8601 formatted date of when the queue was created"""

current_size: int
"""The number of calls currently in the queue"""

max_size: int
"""The maximum number of calls allowed in the queue"""

name: str
"""Name of the queue"""

record_type: Literal["queue"]

updated_at: str
"""ISO 8601 formatted date of when the queue was last updated"""
__all__ = ["QueueRetrieveResponse"]


class QueueRetrieveResponse(BaseModel):
data: Optional[Data] = None
data: Optional[Queue] = None
34 changes: 3 additions & 31 deletions src/telnyx/types/queue_update_response.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from .queue import Queue
from .._models import BaseModel

__all__ = ["QueueUpdateResponse", "Data"]


class Data(BaseModel):
id: str
"""Uniquely identifies the queue"""

average_wait_time_secs: int
"""
The average time that the calls currently in the queue have spent waiting, given
in seconds.
"""

created_at: str
"""ISO 8601 formatted date of when the queue was created"""

current_size: int
"""The number of calls currently in the queue"""

max_size: int
"""The maximum number of calls allowed in the queue"""

name: str
"""Name of the queue"""

record_type: Literal["queue"]

updated_at: str
"""ISO 8601 formatted date of when the queue was last updated"""
__all__ = ["QueueUpdateResponse"]


class QueueUpdateResponse(BaseModel):
data: Optional[Data] = None
data: Optional[Queue] = None
18 changes: 9 additions & 9 deletions tests/api_resources/test_queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from telnyx import Telnyx, AsyncTelnyx
from tests.utils import assert_matches_type
from telnyx.types import (
QueueListResponse,
Queue,
QueueCreateResponse,
QueueUpdateResponse,
QueueRetrieveResponse,
Expand Down Expand Up @@ -158,7 +158,7 @@ def test_path_params_update(self, client: Telnyx) -> None:
@parametrize
def test_method_list(self, client: Telnyx) -> None:
queue = client.queues.list()
assert_matches_type(SyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(SyncDefaultFlatPagination[Queue], queue, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
Expand All @@ -167,7 +167,7 @@ def test_method_list_with_all_params(self, client: Telnyx) -> None:
page_number=1,
page_size=1,
)
assert_matches_type(SyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(SyncDefaultFlatPagination[Queue], queue, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
Expand All @@ -177,7 +177,7 @@ def test_raw_response_list(self, client: Telnyx) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
queue = response.parse()
assert_matches_type(SyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(SyncDefaultFlatPagination[Queue], queue, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
Expand All @@ -187,7 +187,7 @@ def test_streaming_response_list(self, client: Telnyx) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

queue = response.parse()
assert_matches_type(SyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(SyncDefaultFlatPagination[Queue], queue, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down Expand Up @@ -374,7 +374,7 @@ async def test_path_params_update(self, async_client: AsyncTelnyx) -> None:
@parametrize
async def test_method_list(self, async_client: AsyncTelnyx) -> None:
queue = await async_client.queues.list()
assert_matches_type(AsyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(AsyncDefaultFlatPagination[Queue], queue, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
Expand All @@ -383,7 +383,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncTelnyx) -> N
page_number=1,
page_size=1,
)
assert_matches_type(AsyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(AsyncDefaultFlatPagination[Queue], queue, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
Expand All @@ -393,7 +393,7 @@ async def test_raw_response_list(self, async_client: AsyncTelnyx) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
queue = await response.parse()
assert_matches_type(AsyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(AsyncDefaultFlatPagination[Queue], queue, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
Expand All @@ -403,7 +403,7 @@ async def test_streaming_response_list(self, async_client: AsyncTelnyx) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

queue = await response.parse()
assert_matches_type(AsyncDefaultFlatPagination[QueueListResponse], queue, path=["response"])
assert_matches_type(AsyncDefaultFlatPagination[Queue], queue, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down