telnyx 3.10.0__py3-none-any.whl → 3.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of telnyx might be problematic. Click here for more details.

Files changed (49) hide show
  1. telnyx/_version.py +1 -1
  2. telnyx/resources/__init__.py +1 -2
  3. telnyx/resources/ai/__init__.py +28 -0
  4. telnyx/resources/ai/ai.py +64 -0
  5. telnyx/resources/ai/integrations/__init__.py +33 -0
  6. telnyx/resources/ai/integrations/connections.py +294 -0
  7. telnyx/resources/ai/integrations/integrations.py +246 -0
  8. telnyx/resources/ai/mcp_servers.py +571 -0
  9. telnyx/resources/conferences/actions.py +180 -8
  10. telnyx/resources/conferences/conferences.py +50 -3
  11. telnyx/resources/texml/accounts/calls/calls.py +8 -0
  12. telnyx/resources/webhooks.py +82 -94
  13. telnyx/types/__init__.py +1 -0
  14. telnyx/types/ai/__init__.py +9 -0
  15. telnyx/types/ai/integration_list_response.py +28 -0
  16. telnyx/types/ai/integration_retrieve_response.py +24 -0
  17. telnyx/types/ai/integrations/__init__.py +6 -0
  18. telnyx/types/ai/integrations/connection_list_response.py +19 -0
  19. telnyx/types/ai/integrations/connection_retrieve_response.py +19 -0
  20. telnyx/types/ai/mcp_server_create_params.py +22 -0
  21. telnyx/types/ai/mcp_server_create_response.py +24 -0
  22. telnyx/types/ai/mcp_server_list_params.py +19 -0
  23. telnyx/types/ai/mcp_server_list_response.py +28 -0
  24. telnyx/types/ai/mcp_server_retrieve_response.py +24 -0
  25. telnyx/types/ai/mcp_server_update_params.py +28 -0
  26. telnyx/types/ai/mcp_server_update_response.py +24 -0
  27. telnyx/types/conference_create_params.py +6 -0
  28. telnyx/types/conference_list_params.py +3 -0
  29. telnyx/types/conference_list_participants_params.py +4 -1
  30. telnyx/types/conference_retrieve_params.py +12 -0
  31. telnyx/types/conferences/action_hold_params.py +7 -1
  32. telnyx/types/conferences/action_join_params.py +6 -0
  33. telnyx/types/conferences/action_leave_params.py +6 -0
  34. telnyx/types/conferences/action_mute_params.py +7 -1
  35. telnyx/types/conferences/action_play_params.py +7 -1
  36. telnyx/types/conferences/action_record_pause_params.py +7 -1
  37. telnyx/types/conferences/action_record_resume_params.py +7 -1
  38. telnyx/types/conferences/action_record_start_params.py +6 -0
  39. telnyx/types/conferences/action_record_stop_params.py +7 -1
  40. telnyx/types/conferences/action_speak_params.py +6 -0
  41. telnyx/types/conferences/action_stop_params.py +7 -1
  42. telnyx/types/conferences/action_unhold_params.py +7 -1
  43. telnyx/types/conferences/action_unmute_params.py +7 -1
  44. telnyx/types/conferences/action_update_params.py +6 -0
  45. telnyx/types/texml/accounts/call_calls_params.py +5 -0
  46. {telnyx-3.10.0.dist-info → telnyx-3.11.0.dist-info}/METADATA +1 -1
  47. {telnyx-3.10.0.dist-info → telnyx-3.11.0.dist-info}/RECORD +49 -32
  48. {telnyx-3.10.0.dist-info → telnyx-3.11.0.dist-info}/WHEEL +0 -0
  49. {telnyx-3.10.0.dist-info → telnyx-3.11.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,246 @@
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 ...._compat import cached_property
9
+ from .connections import (
10
+ ConnectionsResource,
11
+ AsyncConnectionsResource,
12
+ ConnectionsResourceWithRawResponse,
13
+ AsyncConnectionsResourceWithRawResponse,
14
+ ConnectionsResourceWithStreamingResponse,
15
+ AsyncConnectionsResourceWithStreamingResponse,
16
+ )
17
+ from ...._resource import SyncAPIResource, AsyncAPIResource
18
+ from ...._response import (
19
+ to_raw_response_wrapper,
20
+ to_streamed_response_wrapper,
21
+ async_to_raw_response_wrapper,
22
+ async_to_streamed_response_wrapper,
23
+ )
24
+ from ...._base_client import make_request_options
25
+ from ....types.ai.integration_list_response import IntegrationListResponse
26
+ from ....types.ai.integration_retrieve_response import IntegrationRetrieveResponse
27
+
28
+ __all__ = ["IntegrationsResource", "AsyncIntegrationsResource"]
29
+
30
+
31
+ class IntegrationsResource(SyncAPIResource):
32
+ @cached_property
33
+ def connections(self) -> ConnectionsResource:
34
+ return ConnectionsResource(self._client)
35
+
36
+ @cached_property
37
+ def with_raw_response(self) -> IntegrationsResourceWithRawResponse:
38
+ """
39
+ This property can be used as a prefix for any HTTP method call to return
40
+ the raw response object instead of the parsed content.
41
+
42
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
43
+ """
44
+ return IntegrationsResourceWithRawResponse(self)
45
+
46
+ @cached_property
47
+ def with_streaming_response(self) -> IntegrationsResourceWithStreamingResponse:
48
+ """
49
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
50
+
51
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
52
+ """
53
+ return IntegrationsResourceWithStreamingResponse(self)
54
+
55
+ def retrieve(
56
+ self,
57
+ integration_id: str,
58
+ *,
59
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
60
+ # The extra values given here take precedence over values defined on the client or passed to this method.
61
+ extra_headers: Headers | None = None,
62
+ extra_query: Query | None = None,
63
+ extra_body: Body | None = None,
64
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
65
+ ) -> IntegrationRetrieveResponse:
66
+ """
67
+ Retrieve integration details
68
+
69
+ Args:
70
+ extra_headers: Send extra headers
71
+
72
+ extra_query: Add additional query parameters to the request
73
+
74
+ extra_body: Add additional JSON properties to the request
75
+
76
+ timeout: Override the client-level default timeout for this request, in seconds
77
+ """
78
+ if not integration_id:
79
+ raise ValueError(f"Expected a non-empty value for `integration_id` but received {integration_id!r}")
80
+ return self._get(
81
+ f"/ai/integrations/{integration_id}",
82
+ options=make_request_options(
83
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
84
+ ),
85
+ cast_to=IntegrationRetrieveResponse,
86
+ )
87
+
88
+ def list(
89
+ self,
90
+ *,
91
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
92
+ # The extra values given here take precedence over values defined on the client or passed to this method.
93
+ extra_headers: Headers | None = None,
94
+ extra_query: Query | None = None,
95
+ extra_body: Body | None = None,
96
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
97
+ ) -> IntegrationListResponse:
98
+ """List all available integrations."""
99
+ return self._get(
100
+ "/ai/integrations",
101
+ options=make_request_options(
102
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
103
+ ),
104
+ cast_to=IntegrationListResponse,
105
+ )
106
+
107
+
108
+ class AsyncIntegrationsResource(AsyncAPIResource):
109
+ @cached_property
110
+ def connections(self) -> AsyncConnectionsResource:
111
+ return AsyncConnectionsResource(self._client)
112
+
113
+ @cached_property
114
+ def with_raw_response(self) -> AsyncIntegrationsResourceWithRawResponse:
115
+ """
116
+ This property can be used as a prefix for any HTTP method call to return
117
+ the raw response object instead of the parsed content.
118
+
119
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
120
+ """
121
+ return AsyncIntegrationsResourceWithRawResponse(self)
122
+
123
+ @cached_property
124
+ def with_streaming_response(self) -> AsyncIntegrationsResourceWithStreamingResponse:
125
+ """
126
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
127
+
128
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
129
+ """
130
+ return AsyncIntegrationsResourceWithStreamingResponse(self)
131
+
132
+ async def retrieve(
133
+ self,
134
+ integration_id: str,
135
+ *,
136
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
137
+ # The extra values given here take precedence over values defined on the client or passed to this method.
138
+ extra_headers: Headers | None = None,
139
+ extra_query: Query | None = None,
140
+ extra_body: Body | None = None,
141
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
142
+ ) -> IntegrationRetrieveResponse:
143
+ """
144
+ Retrieve integration details
145
+
146
+ Args:
147
+ extra_headers: Send extra headers
148
+
149
+ extra_query: Add additional query parameters to the request
150
+
151
+ extra_body: Add additional JSON properties to the request
152
+
153
+ timeout: Override the client-level default timeout for this request, in seconds
154
+ """
155
+ if not integration_id:
156
+ raise ValueError(f"Expected a non-empty value for `integration_id` but received {integration_id!r}")
157
+ return await self._get(
158
+ f"/ai/integrations/{integration_id}",
159
+ options=make_request_options(
160
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
161
+ ),
162
+ cast_to=IntegrationRetrieveResponse,
163
+ )
164
+
165
+ async def list(
166
+ self,
167
+ *,
168
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169
+ # The extra values given here take precedence over values defined on the client or passed to this method.
170
+ extra_headers: Headers | None = None,
171
+ extra_query: Query | None = None,
172
+ extra_body: Body | None = None,
173
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
174
+ ) -> IntegrationListResponse:
175
+ """List all available integrations."""
176
+ return await self._get(
177
+ "/ai/integrations",
178
+ options=make_request_options(
179
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
180
+ ),
181
+ cast_to=IntegrationListResponse,
182
+ )
183
+
184
+
185
+ class IntegrationsResourceWithRawResponse:
186
+ def __init__(self, integrations: IntegrationsResource) -> None:
187
+ self._integrations = integrations
188
+
189
+ self.retrieve = to_raw_response_wrapper(
190
+ integrations.retrieve,
191
+ )
192
+ self.list = to_raw_response_wrapper(
193
+ integrations.list,
194
+ )
195
+
196
+ @cached_property
197
+ def connections(self) -> ConnectionsResourceWithRawResponse:
198
+ return ConnectionsResourceWithRawResponse(self._integrations.connections)
199
+
200
+
201
+ class AsyncIntegrationsResourceWithRawResponse:
202
+ def __init__(self, integrations: AsyncIntegrationsResource) -> None:
203
+ self._integrations = integrations
204
+
205
+ self.retrieve = async_to_raw_response_wrapper(
206
+ integrations.retrieve,
207
+ )
208
+ self.list = async_to_raw_response_wrapper(
209
+ integrations.list,
210
+ )
211
+
212
+ @cached_property
213
+ def connections(self) -> AsyncConnectionsResourceWithRawResponse:
214
+ return AsyncConnectionsResourceWithRawResponse(self._integrations.connections)
215
+
216
+
217
+ class IntegrationsResourceWithStreamingResponse:
218
+ def __init__(self, integrations: IntegrationsResource) -> None:
219
+ self._integrations = integrations
220
+
221
+ self.retrieve = to_streamed_response_wrapper(
222
+ integrations.retrieve,
223
+ )
224
+ self.list = to_streamed_response_wrapper(
225
+ integrations.list,
226
+ )
227
+
228
+ @cached_property
229
+ def connections(self) -> ConnectionsResourceWithStreamingResponse:
230
+ return ConnectionsResourceWithStreamingResponse(self._integrations.connections)
231
+
232
+
233
+ class AsyncIntegrationsResourceWithStreamingResponse:
234
+ def __init__(self, integrations: AsyncIntegrationsResource) -> None:
235
+ self._integrations = integrations
236
+
237
+ self.retrieve = async_to_streamed_response_wrapper(
238
+ integrations.retrieve,
239
+ )
240
+ self.list = async_to_streamed_response_wrapper(
241
+ integrations.list,
242
+ )
243
+
244
+ @cached_property
245
+ def connections(self) -> AsyncConnectionsResourceWithStreamingResponse:
246
+ return AsyncConnectionsResourceWithStreamingResponse(self._integrations.connections)