supermemory 3.0.0a1__py3-none-any.whl → 3.0.0a19__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.
- supermemory/__init__.py +2 -1
- supermemory/_base_client.py +44 -2
- supermemory/_client.py +1 -9
- supermemory/_models.py +2 -0
- supermemory/_types.py +2 -0
- supermemory/_version.py +1 -1
- supermemory/resources/__init__.py +0 -14
- supermemory/resources/connections.py +30 -117
- supermemory/resources/memories.py +100 -137
- supermemory/resources/settings.py +47 -11
- supermemory/types/__init__.py +0 -7
- supermemory/types/connection_create_params.py +5 -3
- supermemory/types/connection_get_response.py +4 -0
- supermemory/types/memory_add_params.py +28 -0
- supermemory/types/memory_get_response.py +87 -1
- supermemory/types/memory_update_params.py +28 -0
- supermemory/types/setting_get_response.py +36 -2
- supermemory/types/setting_update_params.py +30 -6
- supermemory/types/setting_update_response.py +34 -8
- {supermemory-3.0.0a1.dist-info → supermemory-3.0.0a19.dist-info}/METADATA +46 -9
- supermemory-3.0.0a19.dist-info/RECORD +48 -0
- supermemory/resources/search.py +0 -296
- supermemory/types/connection_list_params.py +0 -13
- supermemory/types/connection_list_response.py +0 -25
- supermemory/types/memory_delete_response.py +0 -9
- supermemory/types/memory_list_params.py +0 -24
- supermemory/types/memory_list_response.py +0 -95
- supermemory/types/search_execute_params.py +0 -86
- supermemory/types/search_execute_response.py +0 -52
- supermemory-3.0.0a1.dist-info/RECORD +0 -56
- {supermemory-3.0.0a1.dist-info → supermemory-3.0.0a19.dist-info}/WHEEL +0 -0
- {supermemory-3.0.0a1.dist-info → supermemory-3.0.0a19.dist-info}/licenses/LICENSE +0 -0
supermemory/__init__.py
CHANGED
@@ -36,7 +36,7 @@ from ._exceptions import (
|
|
36
36
|
UnprocessableEntityError,
|
37
37
|
APIResponseValidationError,
|
38
38
|
)
|
39
|
-
from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient
|
39
|
+
from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
|
40
40
|
from ._utils._logs import setup_logging as _setup_logging
|
41
41
|
|
42
42
|
__all__ = [
|
@@ -78,6 +78,7 @@ __all__ = [
|
|
78
78
|
"DEFAULT_CONNECTION_LIMITS",
|
79
79
|
"DefaultHttpxClient",
|
80
80
|
"DefaultAsyncHttpxClient",
|
81
|
+
"DefaultAioHttpClient",
|
81
82
|
]
|
82
83
|
|
83
84
|
if not _t.TYPE_CHECKING:
|
supermemory/_base_client.py
CHANGED
@@ -960,6 +960,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
960
960
|
if self.custom_auth is not None:
|
961
961
|
kwargs["auth"] = self.custom_auth
|
962
962
|
|
963
|
+
if options.follow_redirects is not None:
|
964
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
965
|
+
|
963
966
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
964
967
|
|
965
968
|
response = None
|
@@ -1068,7 +1071,14 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
1068
1071
|
) -> ResponseT:
|
1069
1072
|
origin = get_origin(cast_to) or cast_to
|
1070
1073
|
|
1071
|
-
if
|
1074
|
+
if (
|
1075
|
+
inspect.isclass(origin)
|
1076
|
+
and issubclass(origin, BaseAPIResponse)
|
1077
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1078
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1079
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1080
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1081
|
+
):
|
1072
1082
|
if not issubclass(origin, APIResponse):
|
1073
1083
|
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
|
1074
1084
|
|
@@ -1279,6 +1289,24 @@ class _DefaultAsyncHttpxClient(httpx.AsyncClient):
|
|
1279
1289
|
super().__init__(**kwargs)
|
1280
1290
|
|
1281
1291
|
|
1292
|
+
try:
|
1293
|
+
import httpx_aiohttp
|
1294
|
+
except ImportError:
|
1295
|
+
|
1296
|
+
class _DefaultAioHttpClient(httpx.AsyncClient):
|
1297
|
+
def __init__(self, **_kwargs: Any) -> None:
|
1298
|
+
raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra")
|
1299
|
+
else:
|
1300
|
+
|
1301
|
+
class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
|
1302
|
+
def __init__(self, **kwargs: Any) -> None:
|
1303
|
+
kwargs.setdefault("timeout", DEFAULT_TIMEOUT)
|
1304
|
+
kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS)
|
1305
|
+
kwargs.setdefault("follow_redirects", True)
|
1306
|
+
|
1307
|
+
super().__init__(**kwargs)
|
1308
|
+
|
1309
|
+
|
1282
1310
|
if TYPE_CHECKING:
|
1283
1311
|
DefaultAsyncHttpxClient = httpx.AsyncClient
|
1284
1312
|
"""An alias to `httpx.AsyncClient` that provides the same defaults that this SDK
|
@@ -1287,8 +1315,12 @@ if TYPE_CHECKING:
|
|
1287
1315
|
This is useful because overriding the `http_client` with your own instance of
|
1288
1316
|
`httpx.AsyncClient` will result in httpx's defaults being used, not ours.
|
1289
1317
|
"""
|
1318
|
+
|
1319
|
+
DefaultAioHttpClient = httpx.AsyncClient
|
1320
|
+
"""An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`."""
|
1290
1321
|
else:
|
1291
1322
|
DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient
|
1323
|
+
DefaultAioHttpClient = _DefaultAioHttpClient
|
1292
1324
|
|
1293
1325
|
|
1294
1326
|
class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
|
@@ -1460,6 +1492,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1460
1492
|
if self.custom_auth is not None:
|
1461
1493
|
kwargs["auth"] = self.custom_auth
|
1462
1494
|
|
1495
|
+
if options.follow_redirects is not None:
|
1496
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
1497
|
+
|
1463
1498
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
1464
1499
|
|
1465
1500
|
response = None
|
@@ -1568,7 +1603,14 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1568
1603
|
) -> ResponseT:
|
1569
1604
|
origin = get_origin(cast_to) or cast_to
|
1570
1605
|
|
1571
|
-
if
|
1606
|
+
if (
|
1607
|
+
inspect.isclass(origin)
|
1608
|
+
and issubclass(origin, BaseAPIResponse)
|
1609
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1610
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1611
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1612
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1613
|
+
):
|
1572
1614
|
if not issubclass(origin, AsyncAPIResponse):
|
1573
1615
|
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
|
1574
1616
|
|
supermemory/_client.py
CHANGED
@@ -21,7 +21,7 @@ from ._types import (
|
|
21
21
|
)
|
22
22
|
from ._utils import is_given, get_async_library
|
23
23
|
from ._version import __version__
|
24
|
-
from .resources import
|
24
|
+
from .resources import memories, settings, connections
|
25
25
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
26
26
|
from ._exceptions import APIStatusError, SupermemoryError
|
27
27
|
from ._base_client import (
|
@@ -44,7 +44,6 @@ __all__ = [
|
|
44
44
|
|
45
45
|
class Supermemory(SyncAPIClient):
|
46
46
|
memories: memories.MemoriesResource
|
47
|
-
search: search.SearchResource
|
48
47
|
settings: settings.SettingsResource
|
49
48
|
connections: connections.ConnectionsResource
|
50
49
|
with_raw_response: SupermemoryWithRawResponse
|
@@ -105,7 +104,6 @@ class Supermemory(SyncAPIClient):
|
|
105
104
|
)
|
106
105
|
|
107
106
|
self.memories = memories.MemoriesResource(self)
|
108
|
-
self.search = search.SearchResource(self)
|
109
107
|
self.settings = settings.SettingsResource(self)
|
110
108
|
self.connections = connections.ConnectionsResource(self)
|
111
109
|
self.with_raw_response = SupermemoryWithRawResponse(self)
|
@@ -218,7 +216,6 @@ class Supermemory(SyncAPIClient):
|
|
218
216
|
|
219
217
|
class AsyncSupermemory(AsyncAPIClient):
|
220
218
|
memories: memories.AsyncMemoriesResource
|
221
|
-
search: search.AsyncSearchResource
|
222
219
|
settings: settings.AsyncSettingsResource
|
223
220
|
connections: connections.AsyncConnectionsResource
|
224
221
|
with_raw_response: AsyncSupermemoryWithRawResponse
|
@@ -279,7 +276,6 @@ class AsyncSupermemory(AsyncAPIClient):
|
|
279
276
|
)
|
280
277
|
|
281
278
|
self.memories = memories.AsyncMemoriesResource(self)
|
282
|
-
self.search = search.AsyncSearchResource(self)
|
283
279
|
self.settings = settings.AsyncSettingsResource(self)
|
284
280
|
self.connections = connections.AsyncConnectionsResource(self)
|
285
281
|
self.with_raw_response = AsyncSupermemoryWithRawResponse(self)
|
@@ -393,7 +389,6 @@ class AsyncSupermemory(AsyncAPIClient):
|
|
393
389
|
class SupermemoryWithRawResponse:
|
394
390
|
def __init__(self, client: Supermemory) -> None:
|
395
391
|
self.memories = memories.MemoriesResourceWithRawResponse(client.memories)
|
396
|
-
self.search = search.SearchResourceWithRawResponse(client.search)
|
397
392
|
self.settings = settings.SettingsResourceWithRawResponse(client.settings)
|
398
393
|
self.connections = connections.ConnectionsResourceWithRawResponse(client.connections)
|
399
394
|
|
@@ -401,7 +396,6 @@ class SupermemoryWithRawResponse:
|
|
401
396
|
class AsyncSupermemoryWithRawResponse:
|
402
397
|
def __init__(self, client: AsyncSupermemory) -> None:
|
403
398
|
self.memories = memories.AsyncMemoriesResourceWithRawResponse(client.memories)
|
404
|
-
self.search = search.AsyncSearchResourceWithRawResponse(client.search)
|
405
399
|
self.settings = settings.AsyncSettingsResourceWithRawResponse(client.settings)
|
406
400
|
self.connections = connections.AsyncConnectionsResourceWithRawResponse(client.connections)
|
407
401
|
|
@@ -409,7 +403,6 @@ class AsyncSupermemoryWithRawResponse:
|
|
409
403
|
class SupermemoryWithStreamedResponse:
|
410
404
|
def __init__(self, client: Supermemory) -> None:
|
411
405
|
self.memories = memories.MemoriesResourceWithStreamingResponse(client.memories)
|
412
|
-
self.search = search.SearchResourceWithStreamingResponse(client.search)
|
413
406
|
self.settings = settings.SettingsResourceWithStreamingResponse(client.settings)
|
414
407
|
self.connections = connections.ConnectionsResourceWithStreamingResponse(client.connections)
|
415
408
|
|
@@ -417,7 +410,6 @@ class SupermemoryWithStreamedResponse:
|
|
417
410
|
class AsyncSupermemoryWithStreamedResponse:
|
418
411
|
def __init__(self, client: AsyncSupermemory) -> None:
|
419
412
|
self.memories = memories.AsyncMemoriesResourceWithStreamingResponse(client.memories)
|
420
|
-
self.search = search.AsyncSearchResourceWithStreamingResponse(client.search)
|
421
413
|
self.settings = settings.AsyncSettingsResourceWithStreamingResponse(client.settings)
|
422
414
|
self.connections = connections.AsyncConnectionsResourceWithStreamingResponse(client.connections)
|
423
415
|
|
supermemory/_models.py
CHANGED
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
|
|
737
737
|
idempotency_key: str
|
738
738
|
json_data: Body
|
739
739
|
extra_json: AnyMapping
|
740
|
+
follow_redirects: bool
|
740
741
|
|
741
742
|
|
742
743
|
@final
|
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
|
|
750
751
|
files: Union[HttpxRequestFiles, None] = None
|
751
752
|
idempotency_key: Union[str, None] = None
|
752
753
|
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
|
754
|
+
follow_redirects: Union[bool, None] = None
|
753
755
|
|
754
756
|
# It should be noted that we cannot use `json` here as that would override
|
755
757
|
# a BaseModel method in an incompatible fashion.
|
supermemory/_types.py
CHANGED
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
|
|
100
100
|
params: Query
|
101
101
|
extra_json: AnyMapping
|
102
102
|
idempotency_key: str
|
103
|
+
follow_redirects: bool
|
103
104
|
|
104
105
|
|
105
106
|
# Sentinel class used until PEP 0661 is accepted
|
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
|
|
215
216
|
|
216
217
|
class HttpxSendArgs(TypedDict, total=False):
|
217
218
|
auth: httpx.Auth
|
219
|
+
follow_redirects: bool
|
supermemory/_version.py
CHANGED
@@ -1,13 +1,5 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from .search import (
|
4
|
-
SearchResource,
|
5
|
-
AsyncSearchResource,
|
6
|
-
SearchResourceWithRawResponse,
|
7
|
-
AsyncSearchResourceWithRawResponse,
|
8
|
-
SearchResourceWithStreamingResponse,
|
9
|
-
AsyncSearchResourceWithStreamingResponse,
|
10
|
-
)
|
11
3
|
from .memories import (
|
12
4
|
MemoriesResource,
|
13
5
|
AsyncMemoriesResource,
|
@@ -40,12 +32,6 @@ __all__ = [
|
|
40
32
|
"AsyncMemoriesResourceWithRawResponse",
|
41
33
|
"MemoriesResourceWithStreamingResponse",
|
42
34
|
"AsyncMemoriesResourceWithStreamingResponse",
|
43
|
-
"SearchResource",
|
44
|
-
"AsyncSearchResource",
|
45
|
-
"SearchResourceWithRawResponse",
|
46
|
-
"AsyncSearchResourceWithRawResponse",
|
47
|
-
"SearchResourceWithStreamingResponse",
|
48
|
-
"AsyncSearchResourceWithStreamingResponse",
|
49
35
|
"SettingsResource",
|
50
36
|
"AsyncSettingsResource",
|
51
37
|
"SettingsResourceWithRawResponse",
|
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from typing import Dict, Union, Optional
|
5
|
+
from typing import Dict, List, Union, Optional
|
6
6
|
from typing_extensions import Literal
|
7
7
|
|
8
8
|
import httpx
|
9
9
|
|
10
|
-
from ..types import
|
10
|
+
from ..types import connection_create_params
|
11
11
|
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
12
12
|
from .._utils import maybe_transform, async_maybe_transform
|
13
13
|
from .._compat import cached_property
|
@@ -20,7 +20,6 @@ from .._response import (
|
|
20
20
|
)
|
21
21
|
from .._base_client import make_request_options
|
22
22
|
from ..types.connection_get_response import ConnectionGetResponse
|
23
|
-
from ..types.connection_list_response import ConnectionListResponse
|
24
23
|
from ..types.connection_create_response import ConnectionCreateResponse
|
25
24
|
|
26
25
|
__all__ = ["ConnectionsResource", "AsyncConnectionsResource"]
|
@@ -50,9 +49,10 @@ class ConnectionsResource(SyncAPIResource):
|
|
50
49
|
self,
|
51
50
|
provider: Literal["notion", "google-drive", "onedrive"],
|
52
51
|
*,
|
53
|
-
|
54
|
-
|
52
|
+
container_tags: List[str] | NotGiven = NOT_GIVEN,
|
53
|
+
document_limit: int | NotGiven = NOT_GIVEN,
|
55
54
|
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
|
55
|
+
redirect_url: str | NotGiven = NOT_GIVEN,
|
56
56
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
57
57
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
58
58
|
extra_headers: Headers | None = None,
|
@@ -76,56 +76,19 @@ class ConnectionsResource(SyncAPIResource):
|
|
76
76
|
raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
|
77
77
|
return self._post(
|
78
78
|
f"/v3/connections/{provider}",
|
79
|
-
body=maybe_transform(
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
"end_user_id": end_user_id,
|
88
|
-
"redirect_url": redirect_url,
|
89
|
-
},
|
90
|
-
connection_create_params.ConnectionCreateParams,
|
91
|
-
),
|
79
|
+
body=maybe_transform(
|
80
|
+
{
|
81
|
+
"container_tags": container_tags,
|
82
|
+
"document_limit": document_limit,
|
83
|
+
"metadata": metadata,
|
84
|
+
"redirect_url": redirect_url,
|
85
|
+
},
|
86
|
+
connection_create_params.ConnectionCreateParams,
|
92
87
|
),
|
93
|
-
cast_to=ConnectionCreateResponse,
|
94
|
-
)
|
95
|
-
|
96
|
-
def list(
|
97
|
-
self,
|
98
|
-
*,
|
99
|
-
end_user_id: str | NotGiven = NOT_GIVEN,
|
100
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
101
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
102
|
-
extra_headers: Headers | None = None,
|
103
|
-
extra_query: Query | None = None,
|
104
|
-
extra_body: Body | None = None,
|
105
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
106
|
-
) -> ConnectionListResponse:
|
107
|
-
"""
|
108
|
-
List all connections
|
109
|
-
|
110
|
-
Args:
|
111
|
-
extra_headers: Send extra headers
|
112
|
-
|
113
|
-
extra_query: Add additional query parameters to the request
|
114
|
-
|
115
|
-
extra_body: Add additional JSON properties to the request
|
116
|
-
|
117
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
118
|
-
"""
|
119
|
-
return self._get(
|
120
|
-
"/v3/connections",
|
121
88
|
options=make_request_options(
|
122
|
-
extra_headers=extra_headers,
|
123
|
-
extra_query=extra_query,
|
124
|
-
extra_body=extra_body,
|
125
|
-
timeout=timeout,
|
126
|
-
query=maybe_transform({"end_user_id": end_user_id}, connection_list_params.ConnectionListParams),
|
89
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
127
90
|
),
|
128
|
-
cast_to=
|
91
|
+
cast_to=ConnectionCreateResponse,
|
129
92
|
)
|
130
93
|
|
131
94
|
def get(
|
@@ -140,7 +103,7 @@ class ConnectionsResource(SyncAPIResource):
|
|
140
103
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
141
104
|
) -> ConnectionGetResponse:
|
142
105
|
"""
|
143
|
-
Get connection details
|
106
|
+
Get connection details with id
|
144
107
|
|
145
108
|
Args:
|
146
109
|
extra_headers: Send extra headers
|
@@ -186,9 +149,10 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
186
149
|
self,
|
187
150
|
provider: Literal["notion", "google-drive", "onedrive"],
|
188
151
|
*,
|
189
|
-
|
190
|
-
|
152
|
+
container_tags: List[str] | NotGiven = NOT_GIVEN,
|
153
|
+
document_limit: int | NotGiven = NOT_GIVEN,
|
191
154
|
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
|
155
|
+
redirect_url: str | NotGiven = NOT_GIVEN,
|
192
156
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
193
157
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
194
158
|
extra_headers: Headers | None = None,
|
@@ -212,58 +176,19 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
212
176
|
raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
|
213
177
|
return await self._post(
|
214
178
|
f"/v3/connections/{provider}",
|
215
|
-
body=await async_maybe_transform(
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
"end_user_id": end_user_id,
|
224
|
-
"redirect_url": redirect_url,
|
225
|
-
},
|
226
|
-
connection_create_params.ConnectionCreateParams,
|
227
|
-
),
|
179
|
+
body=await async_maybe_transform(
|
180
|
+
{
|
181
|
+
"container_tags": container_tags,
|
182
|
+
"document_limit": document_limit,
|
183
|
+
"metadata": metadata,
|
184
|
+
"redirect_url": redirect_url,
|
185
|
+
},
|
186
|
+
connection_create_params.ConnectionCreateParams,
|
228
187
|
),
|
229
|
-
cast_to=ConnectionCreateResponse,
|
230
|
-
)
|
231
|
-
|
232
|
-
async def list(
|
233
|
-
self,
|
234
|
-
*,
|
235
|
-
end_user_id: str | NotGiven = NOT_GIVEN,
|
236
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
237
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
238
|
-
extra_headers: Headers | None = None,
|
239
|
-
extra_query: Query | None = None,
|
240
|
-
extra_body: Body | None = None,
|
241
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
242
|
-
) -> ConnectionListResponse:
|
243
|
-
"""
|
244
|
-
List all connections
|
245
|
-
|
246
|
-
Args:
|
247
|
-
extra_headers: Send extra headers
|
248
|
-
|
249
|
-
extra_query: Add additional query parameters to the request
|
250
|
-
|
251
|
-
extra_body: Add additional JSON properties to the request
|
252
|
-
|
253
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
254
|
-
"""
|
255
|
-
return await self._get(
|
256
|
-
"/v3/connections",
|
257
188
|
options=make_request_options(
|
258
|
-
extra_headers=extra_headers,
|
259
|
-
extra_query=extra_query,
|
260
|
-
extra_body=extra_body,
|
261
|
-
timeout=timeout,
|
262
|
-
query=await async_maybe_transform(
|
263
|
-
{"end_user_id": end_user_id}, connection_list_params.ConnectionListParams
|
264
|
-
),
|
189
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
265
190
|
),
|
266
|
-
cast_to=
|
191
|
+
cast_to=ConnectionCreateResponse,
|
267
192
|
)
|
268
193
|
|
269
194
|
async def get(
|
@@ -278,7 +203,7 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
278
203
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
279
204
|
) -> ConnectionGetResponse:
|
280
205
|
"""
|
281
|
-
Get connection details
|
206
|
+
Get connection details with id
|
282
207
|
|
283
208
|
Args:
|
284
209
|
extra_headers: Send extra headers
|
@@ -307,9 +232,6 @@ class ConnectionsResourceWithRawResponse:
|
|
307
232
|
self.create = to_raw_response_wrapper(
|
308
233
|
connections.create,
|
309
234
|
)
|
310
|
-
self.list = to_raw_response_wrapper(
|
311
|
-
connections.list,
|
312
|
-
)
|
313
235
|
self.get = to_raw_response_wrapper(
|
314
236
|
connections.get,
|
315
237
|
)
|
@@ -322,9 +244,6 @@ class AsyncConnectionsResourceWithRawResponse:
|
|
322
244
|
self.create = async_to_raw_response_wrapper(
|
323
245
|
connections.create,
|
324
246
|
)
|
325
|
-
self.list = async_to_raw_response_wrapper(
|
326
|
-
connections.list,
|
327
|
-
)
|
328
247
|
self.get = async_to_raw_response_wrapper(
|
329
248
|
connections.get,
|
330
249
|
)
|
@@ -337,9 +256,6 @@ class ConnectionsResourceWithStreamingResponse:
|
|
337
256
|
self.create = to_streamed_response_wrapper(
|
338
257
|
connections.create,
|
339
258
|
)
|
340
|
-
self.list = to_streamed_response_wrapper(
|
341
|
-
connections.list,
|
342
|
-
)
|
343
259
|
self.get = to_streamed_response_wrapper(
|
344
260
|
connections.get,
|
345
261
|
)
|
@@ -352,9 +268,6 @@ class AsyncConnectionsResourceWithStreamingResponse:
|
|
352
268
|
self.create = async_to_streamed_response_wrapper(
|
353
269
|
connections.create,
|
354
270
|
)
|
355
|
-
self.list = async_to_streamed_response_wrapper(
|
356
|
-
connections.list,
|
357
|
-
)
|
358
271
|
self.get = async_to_streamed_response_wrapper(
|
359
272
|
connections.get,
|
360
273
|
)
|