Skip to content

Commit 19eb8f1

Browse files
docs: add UAC connection OpenAPI docs
1 parent 561e79e commit 19eb8f1

21 files changed

Lines changed: 5155 additions & 4 deletions

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1029
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-64a86d4d4c4fdf0ef1ded3682e37c9aa016e7df499b948b0b9e98e8f79c2ff93.yml
3-
openapi_spec_hash: 3d857df9f72a21782feb8c4c638b9c88
4-
config_hash: db5d4ab5ad87516c9c3d8fdb77eaba78
1+
configured_endpoints: 1035
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-055a1979f5ac02203769967c4a310711c597b14ac7ffcb8be8e0e869ebd9ca55.yml
3+
openapi_spec_hash: 60bfd254a4c29087c75e7c58022db884
4+
config_hash: cfdc548410473bb526a8fc846ec89e39

api.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5620,3 +5620,37 @@ Methods:
56205620
- <code title="patch /pronunciation_dicts/{id}">client.pronunciation_dicts.<a href="./src/telnyx/resources/pronunciation_dicts.py">update</a>(id, \*\*<a href="src/telnyx/types/pronunciation_dict_update_params.py">params</a>) -> <a href="./src/telnyx/types/pronunciation_dict_update_response.py">PronunciationDictUpdateResponse</a></code>
56215621
- <code title="get /pronunciation_dicts">client.pronunciation_dicts.<a href="./src/telnyx/resources/pronunciation_dicts.py">list</a>(\*\*<a href="src/telnyx/types/pronunciation_dict_list_params.py">params</a>) -> <a href="./src/telnyx/types/pronunciation_dict_data.py">SyncDefaultFlatPagination[PronunciationDictData]</a></code>
56225622
- <code title="delete /pronunciation_dicts/{id}">client.pronunciation_dicts.<a href="./src/telnyx/resources/pronunciation_dicts.py">delete</a>(id) -> None</code>
5623+
5624+
# UacConnections
5625+
5626+
Types:
5627+
5628+
```python
5629+
from telnyx.types import (
5630+
UacConnectionCreateResponse,
5631+
UacConnectionRetrieveResponse,
5632+
UacConnectionUpdateResponse,
5633+
UacConnectionListResponse,
5634+
UacConnectionDeleteResponse,
5635+
)
5636+
```
5637+
5638+
Methods:
5639+
5640+
- <code title="post /uac_connections">client.uac_connections.<a href="./src/telnyx/resources/uac_connections/uac_connections.py">create</a>(\*\*<a href="src/telnyx/types/uac_connection_create_params.py">params</a>) -> <a href="./src/telnyx/types/uac_connection_create_response.py">UacConnectionCreateResponse</a></code>
5641+
- <code title="get /uac_connections/{id}">client.uac_connections.<a href="./src/telnyx/resources/uac_connections/uac_connections.py">retrieve</a>(id) -> <a href="./src/telnyx/types/uac_connection_retrieve_response.py">UacConnectionRetrieveResponse</a></code>
5642+
- <code title="patch /uac_connections/{id}">client.uac_connections.<a href="./src/telnyx/resources/uac_connections/uac_connections.py">update</a>(id, \*\*<a href="src/telnyx/types/uac_connection_update_params.py">params</a>) -> <a href="./src/telnyx/types/uac_connection_update_response.py">UacConnectionUpdateResponse</a></code>
5643+
- <code title="get /uac_connections">client.uac_connections.<a href="./src/telnyx/resources/uac_connections/uac_connections.py">list</a>(\*\*<a href="src/telnyx/types/uac_connection_list_params.py">params</a>) -> <a href="./src/telnyx/types/uac_connection_list_response.py">SyncDefaultFlatPagination[UacConnectionListResponse]</a></code>
5644+
- <code title="delete /uac_connections/{id}">client.uac_connections.<a href="./src/telnyx/resources/uac_connections/uac_connections.py">delete</a>(id) -> <a href="./src/telnyx/types/uac_connection_delete_response.py">UacConnectionDeleteResponse</a></code>
5645+
5646+
## Actions
5647+
5648+
Types:
5649+
5650+
```python
5651+
from telnyx.types.uac_connections import ActionCheckRegistrationStatusResponse
5652+
```
5653+
5654+
Methods:
5655+
5656+
- <code title="post /uac_connections/{id}/actions/check_registration_status">client.uac_connections.actions.<a href="./src/telnyx/resources/uac_connections/actions.py">check_registration_status</a>(id) -> <a href="./src/telnyx/types/uac_connections/action_check_registration_status_response.py">ActionCheckRegistrationStatusResponse</a></code>

src/telnyx/_client.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
room_recordings,
109109
sim_card_groups,
110110
sim_card_orders,
111+
uac_connections,
111112
verify_profiles,
112113
wireguard_peers,
113114
access_ip_ranges,
@@ -399,6 +400,7 @@
399400
)
400401
from .resources.messaging_10dlc.messaging_10dlc import Messaging10dlcResource, AsyncMessaging10dlcResource
401402
from .resources.sim_card_groups.sim_card_groups import SimCardGroupsResource, AsyncSimCardGroupsResource
403+
from .resources.uac_connections.uac_connections import UacConnectionsResource, AsyncUacConnectionsResource
402404
from .resources.virtual_cross_connects_coverage import (
403405
VirtualCrossConnectsCoverageResource,
404406
AsyncVirtualCrossConnectsCoverageResource,
@@ -1656,6 +1658,13 @@ def pronunciation_dicts(self) -> PronunciationDictsResource:
16561658

16571659
return PronunciationDictsResource(self)
16581660

1661+
@cached_property
1662+
def uac_connections(self) -> UacConnectionsResource:
1663+
"""UAC connection operations"""
1664+
from .resources.uac_connections import UacConnectionsResource
1665+
1666+
return UacConnectionsResource(self)
1667+
16591668
@cached_property
16601669
def with_raw_response(self) -> TelnyxWithRawResponse:
16611670
return TelnyxWithRawResponse(self)
@@ -3006,6 +3015,13 @@ def pronunciation_dicts(self) -> AsyncPronunciationDictsResource:
30063015

30073016
return AsyncPronunciationDictsResource(self)
30083017

3018+
@cached_property
3019+
def uac_connections(self) -> AsyncUacConnectionsResource:
3020+
"""UAC connection operations"""
3021+
from .resources.uac_connections import AsyncUacConnectionsResource
3022+
3023+
return AsyncUacConnectionsResource(self)
3024+
30093025
@cached_property
30103026
def with_raw_response(self) -> AsyncTelnyxWithRawResponse:
30113027
return AsyncTelnyxWithRawResponse(self)
@@ -4292,6 +4308,13 @@ def pronunciation_dicts(self) -> pronunciation_dicts.PronunciationDictsResourceW
42924308

42934309
return PronunciationDictsResourceWithRawResponse(self._client.pronunciation_dicts)
42944310

4311+
@cached_property
4312+
def uac_connections(self) -> uac_connections.UacConnectionsResourceWithRawResponse:
4313+
"""UAC connection operations"""
4314+
from .resources.uac_connections import UacConnectionsResourceWithRawResponse
4315+
4316+
return UacConnectionsResourceWithRawResponse(self._client.uac_connections)
4317+
42954318

42964319
class AsyncTelnyxWithRawResponse:
42974320
_client: AsyncTelnyx
@@ -5449,6 +5472,13 @@ def pronunciation_dicts(self) -> pronunciation_dicts.AsyncPronunciationDictsReso
54495472

54505473
return AsyncPronunciationDictsResourceWithRawResponse(self._client.pronunciation_dicts)
54515474

5475+
@cached_property
5476+
def uac_connections(self) -> uac_connections.AsyncUacConnectionsResourceWithRawResponse:
5477+
"""UAC connection operations"""
5478+
from .resources.uac_connections import AsyncUacConnectionsResourceWithRawResponse
5479+
5480+
return AsyncUacConnectionsResourceWithRawResponse(self._client.uac_connections)
5481+
54525482

54535483
class TelnyxWithStreamedResponse:
54545484
_client: Telnyx
@@ -6608,6 +6638,13 @@ def pronunciation_dicts(self) -> pronunciation_dicts.PronunciationDictsResourceW
66086638

66096639
return PronunciationDictsResourceWithStreamingResponse(self._client.pronunciation_dicts)
66106640

6641+
@cached_property
6642+
def uac_connections(self) -> uac_connections.UacConnectionsResourceWithStreamingResponse:
6643+
"""UAC connection operations"""
6644+
from .resources.uac_connections import UacConnectionsResourceWithStreamingResponse
6645+
6646+
return UacConnectionsResourceWithStreamingResponse(self._client.uac_connections)
6647+
66116648

66126649
class AsyncTelnyxWithStreamedResponse:
66136650
_client: AsyncTelnyx
@@ -7813,6 +7850,13 @@ def pronunciation_dicts(self) -> pronunciation_dicts.AsyncPronunciationDictsReso
78137850

78147851
return AsyncPronunciationDictsResourceWithStreamingResponse(self._client.pronunciation_dicts)
78157852

7853+
@cached_property
7854+
def uac_connections(self) -> uac_connections.AsyncUacConnectionsResourceWithStreamingResponse:
7855+
"""UAC connection operations"""
7856+
from .resources.uac_connections import AsyncUacConnectionsResourceWithStreamingResponse
7857+
7858+
return AsyncUacConnectionsResourceWithStreamingResponse(self._client.uac_connections)
7859+
78167860

78177861
Client = Telnyx
78187862

src/telnyx/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,14 @@
569569
SimCardOrdersResourceWithStreamingResponse,
570570
AsyncSimCardOrdersResourceWithStreamingResponse,
571571
)
572+
from .uac_connections import (
573+
UacConnectionsResource,
574+
AsyncUacConnectionsResource,
575+
UacConnectionsResourceWithRawResponse,
576+
AsyncUacConnectionsResourceWithRawResponse,
577+
UacConnectionsResourceWithStreamingResponse,
578+
AsyncUacConnectionsResourceWithStreamingResponse,
579+
)
572580
from .verify_profiles import (
573581
VerifyProfilesResource,
574582
AsyncVerifyProfilesResource,
@@ -2259,4 +2267,10 @@
22592267
"AsyncPronunciationDictsResourceWithRawResponse",
22602268
"PronunciationDictsResourceWithStreamingResponse",
22612269
"AsyncPronunciationDictsResourceWithStreamingResponse",
2270+
"UacConnectionsResource",
2271+
"AsyncUacConnectionsResource",
2272+
"UacConnectionsResourceWithRawResponse",
2273+
"AsyncUacConnectionsResourceWithRawResponse",
2274+
"UacConnectionsResourceWithStreamingResponse",
2275+
"AsyncUacConnectionsResourceWithStreamingResponse",
22622276
]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .actions import (
4+
ActionsResource,
5+
AsyncActionsResource,
6+
ActionsResourceWithRawResponse,
7+
AsyncActionsResourceWithRawResponse,
8+
ActionsResourceWithStreamingResponse,
9+
AsyncActionsResourceWithStreamingResponse,
10+
)
11+
from .uac_connections import (
12+
UacConnectionsResource,
13+
AsyncUacConnectionsResource,
14+
UacConnectionsResourceWithRawResponse,
15+
AsyncUacConnectionsResourceWithRawResponse,
16+
UacConnectionsResourceWithStreamingResponse,
17+
AsyncUacConnectionsResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"ActionsResource",
22+
"AsyncActionsResource",
23+
"ActionsResourceWithRawResponse",
24+
"AsyncActionsResourceWithRawResponse",
25+
"ActionsResourceWithStreamingResponse",
26+
"AsyncActionsResourceWithStreamingResponse",
27+
"UacConnectionsResource",
28+
"AsyncUacConnectionsResource",
29+
"UacConnectionsResourceWithRawResponse",
30+
"AsyncUacConnectionsResourceWithRawResponse",
31+
"UacConnectionsResourceWithStreamingResponse",
32+
"AsyncUacConnectionsResourceWithStreamingResponse",
33+
]
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
import httpx
6+
7+
from ..._types import Body, Query, Headers, NotGiven, not_given
8+
from ..._utils import path_template
9+
from ..._compat import cached_property
10+
from ..._resource import SyncAPIResource, AsyncAPIResource
11+
from ..._response import (
12+
to_raw_response_wrapper,
13+
to_streamed_response_wrapper,
14+
async_to_raw_response_wrapper,
15+
async_to_streamed_response_wrapper,
16+
)
17+
from ..._base_client import make_request_options
18+
from ...types.uac_connections.action_check_registration_status_response import ActionCheckRegistrationStatusResponse
19+
20+
__all__ = ["ActionsResource", "AsyncActionsResource"]
21+
22+
23+
class ActionsResource(SyncAPIResource):
24+
"""UAC connection operations"""
25+
26+
@cached_property
27+
def with_raw_response(self) -> ActionsResourceWithRawResponse:
28+
"""
29+
This property can be used as a prefix for any HTTP method call to return
30+
the raw response object instead of the parsed content.
31+
32+
For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
33+
"""
34+
return ActionsResourceWithRawResponse(self)
35+
36+
@cached_property
37+
def with_streaming_response(self) -> ActionsResourceWithStreamingResponse:
38+
"""
39+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
40+
41+
For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
42+
"""
43+
return ActionsResourceWithStreamingResponse(self)
44+
45+
def check_registration_status(
46+
self,
47+
id: str,
48+
*,
49+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
50+
# The extra values given here take precedence over values defined on the client or passed to this method.
51+
extra_headers: Headers | None = None,
52+
extra_query: Query | None = None,
53+
extra_body: Body | None = None,
54+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
55+
) -> ActionCheckRegistrationStatusResponse:
56+
"""
57+
Checks the registration status for a UAC connection (`registration_status`) as
58+
well as the timestamp for the last SIP registration event
59+
(`registration_status_updated_at`).
60+
61+
Args:
62+
extra_headers: Send extra headers
63+
64+
extra_query: Add additional query parameters to the request
65+
66+
extra_body: Add additional JSON properties to the request
67+
68+
timeout: Override the client-level default timeout for this request, in seconds
69+
"""
70+
if not id:
71+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
72+
return self._post(
73+
path_template("/uac_connections/{id}/actions/check_registration_status", id=id),
74+
options=make_request_options(
75+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
76+
),
77+
cast_to=ActionCheckRegistrationStatusResponse,
78+
)
79+
80+
81+
class AsyncActionsResource(AsyncAPIResource):
82+
"""UAC connection operations"""
83+
84+
@cached_property
85+
def with_raw_response(self) -> AsyncActionsResourceWithRawResponse:
86+
"""
87+
This property can be used as a prefix for any HTTP method call to return
88+
the raw response object instead of the parsed content.
89+
90+
For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
91+
"""
92+
return AsyncActionsResourceWithRawResponse(self)
93+
94+
@cached_property
95+
def with_streaming_response(self) -> AsyncActionsResourceWithStreamingResponse:
96+
"""
97+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
98+
99+
For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
100+
"""
101+
return AsyncActionsResourceWithStreamingResponse(self)
102+
103+
async def check_registration_status(
104+
self,
105+
id: str,
106+
*,
107+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108+
# The extra values given here take precedence over values defined on the client or passed to this method.
109+
extra_headers: Headers | None = None,
110+
extra_query: Query | None = None,
111+
extra_body: Body | None = None,
112+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
113+
) -> ActionCheckRegistrationStatusResponse:
114+
"""
115+
Checks the registration status for a UAC connection (`registration_status`) as
116+
well as the timestamp for the last SIP registration event
117+
(`registration_status_updated_at`).
118+
119+
Args:
120+
extra_headers: Send extra headers
121+
122+
extra_query: Add additional query parameters to the request
123+
124+
extra_body: Add additional JSON properties to the request
125+
126+
timeout: Override the client-level default timeout for this request, in seconds
127+
"""
128+
if not id:
129+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
130+
return await self._post(
131+
path_template("/uac_connections/{id}/actions/check_registration_status", id=id),
132+
options=make_request_options(
133+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
134+
),
135+
cast_to=ActionCheckRegistrationStatusResponse,
136+
)
137+
138+
139+
class ActionsResourceWithRawResponse:
140+
def __init__(self, actions: ActionsResource) -> None:
141+
self._actions = actions
142+
143+
self.check_registration_status = to_raw_response_wrapper(
144+
actions.check_registration_status,
145+
)
146+
147+
148+
class AsyncActionsResourceWithRawResponse:
149+
def __init__(self, actions: AsyncActionsResource) -> None:
150+
self._actions = actions
151+
152+
self.check_registration_status = async_to_raw_response_wrapper(
153+
actions.check_registration_status,
154+
)
155+
156+
157+
class ActionsResourceWithStreamingResponse:
158+
def __init__(self, actions: ActionsResource) -> None:
159+
self._actions = actions
160+
161+
self.check_registration_status = to_streamed_response_wrapper(
162+
actions.check_registration_status,
163+
)
164+
165+
166+
class AsyncActionsResourceWithStreamingResponse:
167+
def __init__(self, actions: AsyncActionsResource) -> None:
168+
self._actions = actions
169+
170+
self.check_registration_status = async_to_streamed_response_wrapper(
171+
actions.check_registration_status,
172+
)

0 commit comments

Comments
 (0)