telnyx 3.9.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 (56) hide show
  1. telnyx/_streaming.py +4 -6
  2. telnyx/_version.py +1 -1
  3. telnyx/resources/__init__.py +1 -2
  4. telnyx/resources/ai/__init__.py +28 -0
  5. telnyx/resources/ai/ai.py +64 -0
  6. telnyx/resources/ai/integrations/__init__.py +33 -0
  7. telnyx/resources/ai/integrations/connections.py +294 -0
  8. telnyx/resources/ai/integrations/integrations.py +246 -0
  9. telnyx/resources/ai/mcp_servers.py +571 -0
  10. telnyx/resources/calls/actions.py +8 -0
  11. telnyx/resources/calls/calls.py +8 -0
  12. telnyx/resources/conferences/actions.py +180 -8
  13. telnyx/resources/conferences/conferences.py +50 -3
  14. telnyx/resources/recordings/recordings.py +2 -2
  15. telnyx/resources/texml/accounts/calls/calls.py +8 -0
  16. telnyx/resources/webhooks.py +82 -94
  17. telnyx/types/__init__.py +1 -0
  18. telnyx/types/ai/__init__.py +9 -0
  19. telnyx/types/ai/integration_list_response.py +28 -0
  20. telnyx/types/ai/integration_retrieve_response.py +24 -0
  21. telnyx/types/ai/integrations/__init__.py +6 -0
  22. telnyx/types/ai/integrations/connection_list_response.py +19 -0
  23. telnyx/types/ai/integrations/connection_retrieve_response.py +19 -0
  24. telnyx/types/ai/mcp_server_create_params.py +22 -0
  25. telnyx/types/ai/mcp_server_create_response.py +24 -0
  26. telnyx/types/ai/mcp_server_list_params.py +19 -0
  27. telnyx/types/ai/mcp_server_list_response.py +28 -0
  28. telnyx/types/ai/mcp_server_retrieve_response.py +24 -0
  29. telnyx/types/ai/mcp_server_update_params.py +28 -0
  30. telnyx/types/ai/mcp_server_update_response.py +24 -0
  31. telnyx/types/call_dial_params.py +3 -0
  32. telnyx/types/calls/action_transfer_params.py +3 -0
  33. telnyx/types/conference_create_params.py +6 -0
  34. telnyx/types/conference_list_params.py +3 -0
  35. telnyx/types/conference_list_participants_params.py +4 -1
  36. telnyx/types/conference_retrieve_params.py +12 -0
  37. telnyx/types/conferences/action_hold_params.py +7 -1
  38. telnyx/types/conferences/action_join_params.py +6 -0
  39. telnyx/types/conferences/action_leave_params.py +6 -0
  40. telnyx/types/conferences/action_mute_params.py +7 -1
  41. telnyx/types/conferences/action_play_params.py +7 -1
  42. telnyx/types/conferences/action_record_pause_params.py +7 -1
  43. telnyx/types/conferences/action_record_resume_params.py +7 -1
  44. telnyx/types/conferences/action_record_start_params.py +6 -0
  45. telnyx/types/conferences/action_record_stop_params.py +7 -1
  46. telnyx/types/conferences/action_speak_params.py +6 -0
  47. telnyx/types/conferences/action_stop_params.py +7 -1
  48. telnyx/types/conferences/action_unhold_params.py +7 -1
  49. telnyx/types/conferences/action_unmute_params.py +7 -1
  50. telnyx/types/conferences/action_update_params.py +6 -0
  51. telnyx/types/recording_list_params.py +7 -1
  52. telnyx/types/texml/accounts/call_calls_params.py +5 -0
  53. {telnyx-3.9.0.dist-info → telnyx-3.11.0.dist-info}/METADATA +1 -1
  54. {telnyx-3.9.0.dist-info → telnyx-3.11.0.dist-info}/RECORD +56 -39
  55. {telnyx-3.9.0.dist-info → telnyx-3.11.0.dist-info}/WHEEL +0 -0
  56. {telnyx-3.9.0.dist-info → telnyx-3.11.0.dist-info}/licenses/LICENSE +0 -0
telnyx/_streaming.py CHANGED
@@ -57,9 +57,8 @@ class Stream(Generic[_T]):
57
57
  for sse in iterator:
58
58
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
59
59
 
60
- # Ensure the entire stream is consumed
61
- for _sse in iterator:
62
- ...
60
+ # As we might not fully consume the response stream, we need to close it explicitly
61
+ response.close()
63
62
 
64
63
  def __enter__(self) -> Self:
65
64
  return self
@@ -121,9 +120,8 @@ class AsyncStream(Generic[_T]):
121
120
  async for sse in iterator:
122
121
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
123
122
 
124
- # Ensure the entire stream is consumed
125
- async for _sse in iterator:
126
- ...
123
+ # As we might not fully consume the response stream, we need to close it explicitly
124
+ await response.aclose()
127
125
 
128
126
  async def __aenter__(self) -> Self:
129
127
  return self
telnyx/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "telnyx"
4
- __version__ = "3.9.0" # x-release-please-version
4
+ __version__ = "3.11.0" # x-release-please-version
@@ -224,7 +224,7 @@ from .portouts import (
224
224
  PortoutsResourceWithStreamingResponse,
225
225
  AsyncPortoutsResourceWithStreamingResponse,
226
226
  )
227
- from .webhooks import TelnyxWebhook, WebhooksResource, AsyncWebhooksResource, TelnyxWebhookVerificationError
227
+ from .webhooks import WebhooksResource, AsyncWebhooksResource, TelnyxWebhookVerificationError
228
228
  from .wireless import (
229
229
  WirelessResource,
230
230
  AsyncWirelessResource,
@@ -1237,7 +1237,6 @@ __all__ = [
1237
1237
  "AsyncOAuthGrantsResourceWithStreamingResponse",
1238
1238
  "WebhooksResource",
1239
1239
  "AsyncWebhooksResource",
1240
- "TelnyxWebhook",
1241
1240
  "TelnyxWebhookVerificationError",
1242
1241
  "AccessIPAddressResource",
1243
1242
  "AsyncAccessIPAddressResource",
@@ -56,6 +56,22 @@ from .fine_tuning import (
56
56
  FineTuningResourceWithStreamingResponse,
57
57
  AsyncFineTuningResourceWithStreamingResponse,
58
58
  )
59
+ from .mcp_servers import (
60
+ McpServersResource,
61
+ AsyncMcpServersResource,
62
+ McpServersResourceWithRawResponse,
63
+ AsyncMcpServersResourceWithRawResponse,
64
+ McpServersResourceWithStreamingResponse,
65
+ AsyncMcpServersResourceWithStreamingResponse,
66
+ )
67
+ from .integrations import (
68
+ IntegrationsResource,
69
+ AsyncIntegrationsResource,
70
+ IntegrationsResourceWithRawResponse,
71
+ AsyncIntegrationsResourceWithRawResponse,
72
+ IntegrationsResourceWithStreamingResponse,
73
+ AsyncIntegrationsResourceWithStreamingResponse,
74
+ )
59
75
  from .conversations import (
60
76
  ConversationsResource,
61
77
  AsyncConversationsResource,
@@ -108,6 +124,18 @@ __all__ = [
108
124
  "AsyncFineTuningResourceWithRawResponse",
109
125
  "FineTuningResourceWithStreamingResponse",
110
126
  "AsyncFineTuningResourceWithStreamingResponse",
127
+ "IntegrationsResource",
128
+ "AsyncIntegrationsResource",
129
+ "IntegrationsResourceWithRawResponse",
130
+ "AsyncIntegrationsResourceWithRawResponse",
131
+ "IntegrationsResourceWithStreamingResponse",
132
+ "AsyncIntegrationsResourceWithStreamingResponse",
133
+ "McpServersResource",
134
+ "AsyncMcpServersResource",
135
+ "McpServersResourceWithRawResponse",
136
+ "AsyncMcpServersResourceWithRawResponse",
137
+ "McpServersResourceWithStreamingResponse",
138
+ "AsyncMcpServersResourceWithStreamingResponse",
111
139
  "AIResource",
112
140
  "AsyncAIResource",
113
141
  "AIResourceWithRawResponse",
telnyx/resources/ai/ai.py CHANGED
@@ -39,6 +39,14 @@ from ..._response import (
39
39
  async_to_raw_response_wrapper,
40
40
  async_to_streamed_response_wrapper,
41
41
  )
42
+ from .mcp_servers import (
43
+ McpServersResource,
44
+ AsyncMcpServersResource,
45
+ McpServersResourceWithRawResponse,
46
+ AsyncMcpServersResourceWithRawResponse,
47
+ McpServersResourceWithStreamingResponse,
48
+ AsyncMcpServersResourceWithStreamingResponse,
49
+ )
42
50
  from ..._base_client import make_request_options
43
51
  from .assistants.assistants import (
44
52
  AssistantsResource,
@@ -64,6 +72,14 @@ from .fine_tuning.fine_tuning import (
64
72
  FineTuningResourceWithStreamingResponse,
65
73
  AsyncFineTuningResourceWithStreamingResponse,
66
74
  )
75
+ from .integrations.integrations import (
76
+ IntegrationsResource,
77
+ AsyncIntegrationsResource,
78
+ IntegrationsResourceWithRawResponse,
79
+ AsyncIntegrationsResourceWithRawResponse,
80
+ IntegrationsResourceWithStreamingResponse,
81
+ AsyncIntegrationsResourceWithStreamingResponse,
82
+ )
67
83
  from .conversations.conversations import (
68
84
  ConversationsResource,
69
85
  AsyncConversationsResource,
@@ -107,6 +123,14 @@ class AIResource(SyncAPIResource):
107
123
  def fine_tuning(self) -> FineTuningResource:
108
124
  return FineTuningResource(self._client)
109
125
 
126
+ @cached_property
127
+ def integrations(self) -> IntegrationsResource:
128
+ return IntegrationsResource(self._client)
129
+
130
+ @cached_property
131
+ def mcp_servers(self) -> McpServersResource:
132
+ return McpServersResource(self._client)
133
+
110
134
  @cached_property
111
135
  def with_raw_response(self) -> AIResourceWithRawResponse:
112
136
  """
@@ -238,6 +262,14 @@ class AsyncAIResource(AsyncAPIResource):
238
262
  def fine_tuning(self) -> AsyncFineTuningResource:
239
263
  return AsyncFineTuningResource(self._client)
240
264
 
265
+ @cached_property
266
+ def integrations(self) -> AsyncIntegrationsResource:
267
+ return AsyncIntegrationsResource(self._client)
268
+
269
+ @cached_property
270
+ def mcp_servers(self) -> AsyncMcpServersResource:
271
+ return AsyncMcpServersResource(self._client)
272
+
241
273
  @cached_property
242
274
  def with_raw_response(self) -> AsyncAIResourceWithRawResponse:
243
275
  """
@@ -379,6 +411,14 @@ class AIResourceWithRawResponse:
379
411
  def fine_tuning(self) -> FineTuningResourceWithRawResponse:
380
412
  return FineTuningResourceWithRawResponse(self._ai.fine_tuning)
381
413
 
414
+ @cached_property
415
+ def integrations(self) -> IntegrationsResourceWithRawResponse:
416
+ return IntegrationsResourceWithRawResponse(self._ai.integrations)
417
+
418
+ @cached_property
419
+ def mcp_servers(self) -> McpServersResourceWithRawResponse:
420
+ return McpServersResourceWithRawResponse(self._ai.mcp_servers)
421
+
382
422
 
383
423
  class AsyncAIResourceWithRawResponse:
384
424
  def __init__(self, ai: AsyncAIResource) -> None:
@@ -419,6 +459,14 @@ class AsyncAIResourceWithRawResponse:
419
459
  def fine_tuning(self) -> AsyncFineTuningResourceWithRawResponse:
420
460
  return AsyncFineTuningResourceWithRawResponse(self._ai.fine_tuning)
421
461
 
462
+ @cached_property
463
+ def integrations(self) -> AsyncIntegrationsResourceWithRawResponse:
464
+ return AsyncIntegrationsResourceWithRawResponse(self._ai.integrations)
465
+
466
+ @cached_property
467
+ def mcp_servers(self) -> AsyncMcpServersResourceWithRawResponse:
468
+ return AsyncMcpServersResourceWithRawResponse(self._ai.mcp_servers)
469
+
422
470
 
423
471
  class AIResourceWithStreamingResponse:
424
472
  def __init__(self, ai: AIResource) -> None:
@@ -459,6 +507,14 @@ class AIResourceWithStreamingResponse:
459
507
  def fine_tuning(self) -> FineTuningResourceWithStreamingResponse:
460
508
  return FineTuningResourceWithStreamingResponse(self._ai.fine_tuning)
461
509
 
510
+ @cached_property
511
+ def integrations(self) -> IntegrationsResourceWithStreamingResponse:
512
+ return IntegrationsResourceWithStreamingResponse(self._ai.integrations)
513
+
514
+ @cached_property
515
+ def mcp_servers(self) -> McpServersResourceWithStreamingResponse:
516
+ return McpServersResourceWithStreamingResponse(self._ai.mcp_servers)
517
+
462
518
 
463
519
  class AsyncAIResourceWithStreamingResponse:
464
520
  def __init__(self, ai: AsyncAIResource) -> None:
@@ -498,3 +554,11 @@ class AsyncAIResourceWithStreamingResponse:
498
554
  @cached_property
499
555
  def fine_tuning(self) -> AsyncFineTuningResourceWithStreamingResponse:
500
556
  return AsyncFineTuningResourceWithStreamingResponse(self._ai.fine_tuning)
557
+
558
+ @cached_property
559
+ def integrations(self) -> AsyncIntegrationsResourceWithStreamingResponse:
560
+ return AsyncIntegrationsResourceWithStreamingResponse(self._ai.integrations)
561
+
562
+ @cached_property
563
+ def mcp_servers(self) -> AsyncMcpServersResourceWithStreamingResponse:
564
+ return AsyncMcpServersResourceWithStreamingResponse(self._ai.mcp_servers)
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .connections import (
4
+ ConnectionsResource,
5
+ AsyncConnectionsResource,
6
+ ConnectionsResourceWithRawResponse,
7
+ AsyncConnectionsResourceWithRawResponse,
8
+ ConnectionsResourceWithStreamingResponse,
9
+ AsyncConnectionsResourceWithStreamingResponse,
10
+ )
11
+ from .integrations import (
12
+ IntegrationsResource,
13
+ AsyncIntegrationsResource,
14
+ IntegrationsResourceWithRawResponse,
15
+ AsyncIntegrationsResourceWithRawResponse,
16
+ IntegrationsResourceWithStreamingResponse,
17
+ AsyncIntegrationsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "ConnectionsResource",
22
+ "AsyncConnectionsResource",
23
+ "ConnectionsResourceWithRawResponse",
24
+ "AsyncConnectionsResourceWithRawResponse",
25
+ "ConnectionsResourceWithStreamingResponse",
26
+ "AsyncConnectionsResourceWithStreamingResponse",
27
+ "IntegrationsResource",
28
+ "AsyncIntegrationsResource",
29
+ "IntegrationsResourceWithRawResponse",
30
+ "AsyncIntegrationsResourceWithRawResponse",
31
+ "IntegrationsResourceWithStreamingResponse",
32
+ "AsyncIntegrationsResourceWithStreamingResponse",
33
+ ]
@@ -0,0 +1,294 @@
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, NoneType, NotGiven, not_given
8
+ from ...._compat import cached_property
9
+ from ...._resource import SyncAPIResource, AsyncAPIResource
10
+ from ...._response import (
11
+ to_raw_response_wrapper,
12
+ to_streamed_response_wrapper,
13
+ async_to_raw_response_wrapper,
14
+ async_to_streamed_response_wrapper,
15
+ )
16
+ from ...._base_client import make_request_options
17
+ from ....types.ai.integrations.connection_list_response import ConnectionListResponse
18
+ from ....types.ai.integrations.connection_retrieve_response import ConnectionRetrieveResponse
19
+
20
+ __all__ = ["ConnectionsResource", "AsyncConnectionsResource"]
21
+
22
+
23
+ class ConnectionsResource(SyncAPIResource):
24
+ @cached_property
25
+ def with_raw_response(self) -> ConnectionsResourceWithRawResponse:
26
+ """
27
+ This property can be used as a prefix for any HTTP method call to return
28
+ the raw response object instead of the parsed content.
29
+
30
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
31
+ """
32
+ return ConnectionsResourceWithRawResponse(self)
33
+
34
+ @cached_property
35
+ def with_streaming_response(self) -> ConnectionsResourceWithStreamingResponse:
36
+ """
37
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38
+
39
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
40
+ """
41
+ return ConnectionsResourceWithStreamingResponse(self)
42
+
43
+ def retrieve(
44
+ self,
45
+ user_connection_id: str,
46
+ *,
47
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
48
+ # The extra values given here take precedence over values defined on the client or passed to this method.
49
+ extra_headers: Headers | None = None,
50
+ extra_query: Query | None = None,
51
+ extra_body: Body | None = None,
52
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
53
+ ) -> ConnectionRetrieveResponse:
54
+ """
55
+ Get user setup integrations
56
+
57
+ Args:
58
+ extra_headers: Send extra headers
59
+
60
+ extra_query: Add additional query parameters to the request
61
+
62
+ extra_body: Add additional JSON properties to the request
63
+
64
+ timeout: Override the client-level default timeout for this request, in seconds
65
+ """
66
+ if not user_connection_id:
67
+ raise ValueError(f"Expected a non-empty value for `user_connection_id` but received {user_connection_id!r}")
68
+ return self._get(
69
+ f"/ai/integrations/connections/{user_connection_id}",
70
+ options=make_request_options(
71
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
72
+ ),
73
+ cast_to=ConnectionRetrieveResponse,
74
+ )
75
+
76
+ def list(
77
+ self,
78
+ *,
79
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
80
+ # The extra values given here take precedence over values defined on the client or passed to this method.
81
+ extra_headers: Headers | None = None,
82
+ extra_query: Query | None = None,
83
+ extra_body: Body | None = None,
84
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
85
+ ) -> ConnectionListResponse:
86
+ """List user setup integrations"""
87
+ return self._get(
88
+ "/ai/integrations/connections",
89
+ options=make_request_options(
90
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
91
+ ),
92
+ cast_to=ConnectionListResponse,
93
+ )
94
+
95
+ def delete(
96
+ self,
97
+ user_connection_id: str,
98
+ *,
99
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
100
+ # The extra values given here take precedence over values defined on the client or passed to this method.
101
+ extra_headers: Headers | None = None,
102
+ extra_query: Query | None = None,
103
+ extra_body: Body | None = None,
104
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
105
+ ) -> None:
106
+ """
107
+ Delete a specific integration connection.
108
+
109
+ Args:
110
+ extra_headers: Send extra headers
111
+
112
+ extra_query: Add additional query parameters to the request
113
+
114
+ extra_body: Add additional JSON properties to the request
115
+
116
+ timeout: Override the client-level default timeout for this request, in seconds
117
+ """
118
+ if not user_connection_id:
119
+ raise ValueError(f"Expected a non-empty value for `user_connection_id` but received {user_connection_id!r}")
120
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
121
+ return self._delete(
122
+ f"/ai/integrations/connections/{user_connection_id}",
123
+ options=make_request_options(
124
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
125
+ ),
126
+ cast_to=NoneType,
127
+ )
128
+
129
+
130
+ class AsyncConnectionsResource(AsyncAPIResource):
131
+ @cached_property
132
+ def with_raw_response(self) -> AsyncConnectionsResourceWithRawResponse:
133
+ """
134
+ This property can be used as a prefix for any HTTP method call to return
135
+ the raw response object instead of the parsed content.
136
+
137
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
138
+ """
139
+ return AsyncConnectionsResourceWithRawResponse(self)
140
+
141
+ @cached_property
142
+ def with_streaming_response(self) -> AsyncConnectionsResourceWithStreamingResponse:
143
+ """
144
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
145
+
146
+ For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
147
+ """
148
+ return AsyncConnectionsResourceWithStreamingResponse(self)
149
+
150
+ async def retrieve(
151
+ self,
152
+ user_connection_id: str,
153
+ *,
154
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
155
+ # The extra values given here take precedence over values defined on the client or passed to this method.
156
+ extra_headers: Headers | None = None,
157
+ extra_query: Query | None = None,
158
+ extra_body: Body | None = None,
159
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
160
+ ) -> ConnectionRetrieveResponse:
161
+ """
162
+ Get user setup integrations
163
+
164
+ Args:
165
+ extra_headers: Send extra headers
166
+
167
+ extra_query: Add additional query parameters to the request
168
+
169
+ extra_body: Add additional JSON properties to the request
170
+
171
+ timeout: Override the client-level default timeout for this request, in seconds
172
+ """
173
+ if not user_connection_id:
174
+ raise ValueError(f"Expected a non-empty value for `user_connection_id` but received {user_connection_id!r}")
175
+ return await self._get(
176
+ f"/ai/integrations/connections/{user_connection_id}",
177
+ options=make_request_options(
178
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
179
+ ),
180
+ cast_to=ConnectionRetrieveResponse,
181
+ )
182
+
183
+ async def list(
184
+ self,
185
+ *,
186
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
187
+ # The extra values given here take precedence over values defined on the client or passed to this method.
188
+ extra_headers: Headers | None = None,
189
+ extra_query: Query | None = None,
190
+ extra_body: Body | None = None,
191
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
192
+ ) -> ConnectionListResponse:
193
+ """List user setup integrations"""
194
+ return await self._get(
195
+ "/ai/integrations/connections",
196
+ options=make_request_options(
197
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
198
+ ),
199
+ cast_to=ConnectionListResponse,
200
+ )
201
+
202
+ async def delete(
203
+ self,
204
+ user_connection_id: str,
205
+ *,
206
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
207
+ # The extra values given here take precedence over values defined on the client or passed to this method.
208
+ extra_headers: Headers | None = None,
209
+ extra_query: Query | None = None,
210
+ extra_body: Body | None = None,
211
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
212
+ ) -> None:
213
+ """
214
+ Delete a specific integration connection.
215
+
216
+ Args:
217
+ extra_headers: Send extra headers
218
+
219
+ extra_query: Add additional query parameters to the request
220
+
221
+ extra_body: Add additional JSON properties to the request
222
+
223
+ timeout: Override the client-level default timeout for this request, in seconds
224
+ """
225
+ if not user_connection_id:
226
+ raise ValueError(f"Expected a non-empty value for `user_connection_id` but received {user_connection_id!r}")
227
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
228
+ return await self._delete(
229
+ f"/ai/integrations/connections/{user_connection_id}",
230
+ options=make_request_options(
231
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
232
+ ),
233
+ cast_to=NoneType,
234
+ )
235
+
236
+
237
+ class ConnectionsResourceWithRawResponse:
238
+ def __init__(self, connections: ConnectionsResource) -> None:
239
+ self._connections = connections
240
+
241
+ self.retrieve = to_raw_response_wrapper(
242
+ connections.retrieve,
243
+ )
244
+ self.list = to_raw_response_wrapper(
245
+ connections.list,
246
+ )
247
+ self.delete = to_raw_response_wrapper(
248
+ connections.delete,
249
+ )
250
+
251
+
252
+ class AsyncConnectionsResourceWithRawResponse:
253
+ def __init__(self, connections: AsyncConnectionsResource) -> None:
254
+ self._connections = connections
255
+
256
+ self.retrieve = async_to_raw_response_wrapper(
257
+ connections.retrieve,
258
+ )
259
+ self.list = async_to_raw_response_wrapper(
260
+ connections.list,
261
+ )
262
+ self.delete = async_to_raw_response_wrapper(
263
+ connections.delete,
264
+ )
265
+
266
+
267
+ class ConnectionsResourceWithStreamingResponse:
268
+ def __init__(self, connections: ConnectionsResource) -> None:
269
+ self._connections = connections
270
+
271
+ self.retrieve = to_streamed_response_wrapper(
272
+ connections.retrieve,
273
+ )
274
+ self.list = to_streamed_response_wrapper(
275
+ connections.list,
276
+ )
277
+ self.delete = to_streamed_response_wrapper(
278
+ connections.delete,
279
+ )
280
+
281
+
282
+ class AsyncConnectionsResourceWithStreamingResponse:
283
+ def __init__(self, connections: AsyncConnectionsResource) -> None:
284
+ self._connections = connections
285
+
286
+ self.retrieve = async_to_streamed_response_wrapper(
287
+ connections.retrieve,
288
+ )
289
+ self.list = async_to_streamed_response_wrapper(
290
+ connections.list,
291
+ )
292
+ self.delete = async_to_streamed_response_wrapper(
293
+ connections.delete,
294
+ )