letta-client 1.0.0a11__py3-none-any.whl → 1.0.0a12__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 letta-client might be problematic. Click here for more details.
- letta_client/_client.py +23 -0
- letta_client/_streaming.py +4 -6
- letta_client/_version.py +1 -1
- letta_client/resources/__init__.py +14 -0
- letta_client/resources/agents/agents.py +0 -8
- letta_client/resources/groups/groups.py +1 -17
- letta_client/resources/identities/identities.py +1 -17
- letta_client/resources/mcp_servers/__init__.py +47 -0
- letta_client/resources/mcp_servers/mcp_servers.py +1165 -0
- letta_client/resources/mcp_servers/refresh.py +192 -0
- letta_client/resources/mcp_servers/tools.py +351 -0
- letta_client/resources/steps/steps.py +1 -9
- letta_client/resources/tools.py +4 -4
- letta_client/types/__init__.py +6 -0
- letta_client/types/agent_create_params.py +1 -5
- letta_client/types/group_create_params.py +1 -5
- letta_client/types/group_modify_params.py +1 -5
- letta_client/types/identity_create_params.py +1 -5
- letta_client/types/identity_upsert_params.py +1 -5
- letta_client/types/mcp_server_create_params.py +67 -0
- letta_client/types/mcp_server_create_response.py +74 -0
- letta_client/types/mcp_server_list_response.py +86 -0
- letta_client/types/mcp_server_modify_params.py +76 -0
- letta_client/types/mcp_server_modify_response.py +74 -0
- letta_client/types/mcp_server_retrieve_response.py +74 -0
- letta_client/types/mcp_servers/__init__.py +8 -0
- letta_client/types/mcp_servers/refresh_trigger_params.py +12 -0
- letta_client/types/mcp_servers/tool_list_response.py +10 -0
- letta_client/types/mcp_servers/tool_run_params.py +15 -0
- letta_client/types/mcp_servers/tool_run_response.py +43 -0
- letta_client/types/step_list_params.py +1 -5
- letta_client/types/tool.py +4 -4
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/METADATA +1 -1
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/RECORD +36 -21
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/WHEEL +0 -0
- {letta_client-1.0.0a11.dist-info → letta_client-1.0.0a12.dist-info}/licenses/LICENSE +0 -0
letta_client/_client.py
CHANGED
|
@@ -49,6 +49,7 @@ from .resources.batches import batches
|
|
|
49
49
|
from .resources.folders import folders
|
|
50
50
|
from .resources.templates import templates
|
|
51
51
|
from .resources.identities import identities
|
|
52
|
+
from .resources.mcp_servers import mcp_servers
|
|
52
53
|
from .types.health_response import HealthResponse
|
|
53
54
|
|
|
54
55
|
__all__ = [
|
|
@@ -83,11 +84,13 @@ class Letta(SyncAPIClient):
|
|
|
83
84
|
tags: tags.TagsResource
|
|
84
85
|
batches: batches.BatchesResource
|
|
85
86
|
templates: templates.TemplatesResource
|
|
87
|
+
mcp_servers: mcp_servers.McpServersResource
|
|
86
88
|
with_raw_response: LettaWithRawResponse
|
|
87
89
|
with_streaming_response: LettaWithStreamedResponse
|
|
88
90
|
|
|
89
91
|
# client options
|
|
90
92
|
api_key: str
|
|
93
|
+
project_id: str | None
|
|
91
94
|
|
|
92
95
|
_environment: Literal["cloud", "local"] | NotGiven
|
|
93
96
|
|
|
@@ -95,6 +98,7 @@ class Letta(SyncAPIClient):
|
|
|
95
98
|
self,
|
|
96
99
|
*,
|
|
97
100
|
api_key: str | None = None,
|
|
101
|
+
project_id: str | None = None,
|
|
98
102
|
environment: Literal["cloud", "local"] | NotGiven = not_given,
|
|
99
103
|
base_url: str | httpx.URL | None | NotGiven = not_given,
|
|
100
104
|
timeout: float | Timeout | None | NotGiven = not_given,
|
|
@@ -127,6 +131,8 @@ class Letta(SyncAPIClient):
|
|
|
127
131
|
)
|
|
128
132
|
self.api_key = api_key
|
|
129
133
|
|
|
134
|
+
self.project_id = project_id
|
|
135
|
+
|
|
130
136
|
self._environment = environment
|
|
131
137
|
|
|
132
138
|
base_url_env = os.environ.get("LETTA_BASE_URL")
|
|
@@ -179,6 +185,7 @@ class Letta(SyncAPIClient):
|
|
|
179
185
|
self.tags = tags.TagsResource(self)
|
|
180
186
|
self.batches = batches.BatchesResource(self)
|
|
181
187
|
self.templates = templates.TemplatesResource(self)
|
|
188
|
+
self.mcp_servers = mcp_servers.McpServersResource(self)
|
|
182
189
|
self.with_raw_response = LettaWithRawResponse(self)
|
|
183
190
|
self.with_streaming_response = LettaWithStreamedResponse(self)
|
|
184
191
|
|
|
@@ -199,6 +206,7 @@ class Letta(SyncAPIClient):
|
|
|
199
206
|
return {
|
|
200
207
|
**super().default_headers,
|
|
201
208
|
"X-Stainless-Async": "false",
|
|
209
|
+
"X-Project": self.project_id if self.project_id is not None else Omit(),
|
|
202
210
|
**self._custom_headers,
|
|
203
211
|
}
|
|
204
212
|
|
|
@@ -206,6 +214,7 @@ class Letta(SyncAPIClient):
|
|
|
206
214
|
self,
|
|
207
215
|
*,
|
|
208
216
|
api_key: str | None = None,
|
|
217
|
+
project_id: str | None = None,
|
|
209
218
|
environment: Literal["cloud", "local"] | None = None,
|
|
210
219
|
base_url: str | httpx.URL | None = None,
|
|
211
220
|
timeout: float | Timeout | None | NotGiven = not_given,
|
|
@@ -241,6 +250,7 @@ class Letta(SyncAPIClient):
|
|
|
241
250
|
http_client = http_client or self._client
|
|
242
251
|
return self.__class__(
|
|
243
252
|
api_key=api_key or self.api_key,
|
|
253
|
+
project_id=project_id or self.project_id,
|
|
244
254
|
base_url=base_url or self.base_url,
|
|
245
255
|
environment=environment or self._environment,
|
|
246
256
|
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
|
@@ -322,11 +332,13 @@ class AsyncLetta(AsyncAPIClient):
|
|
|
322
332
|
tags: tags.AsyncTagsResource
|
|
323
333
|
batches: batches.AsyncBatchesResource
|
|
324
334
|
templates: templates.AsyncTemplatesResource
|
|
335
|
+
mcp_servers: mcp_servers.AsyncMcpServersResource
|
|
325
336
|
with_raw_response: AsyncLettaWithRawResponse
|
|
326
337
|
with_streaming_response: AsyncLettaWithStreamedResponse
|
|
327
338
|
|
|
328
339
|
# client options
|
|
329
340
|
api_key: str
|
|
341
|
+
project_id: str | None
|
|
330
342
|
|
|
331
343
|
_environment: Literal["cloud", "local"] | NotGiven
|
|
332
344
|
|
|
@@ -334,6 +346,7 @@ class AsyncLetta(AsyncAPIClient):
|
|
|
334
346
|
self,
|
|
335
347
|
*,
|
|
336
348
|
api_key: str | None = None,
|
|
349
|
+
project_id: str | None = None,
|
|
337
350
|
environment: Literal["cloud", "local"] | NotGiven = not_given,
|
|
338
351
|
base_url: str | httpx.URL | None | NotGiven = not_given,
|
|
339
352
|
timeout: float | Timeout | None | NotGiven = not_given,
|
|
@@ -366,6 +379,8 @@ class AsyncLetta(AsyncAPIClient):
|
|
|
366
379
|
)
|
|
367
380
|
self.api_key = api_key
|
|
368
381
|
|
|
382
|
+
self.project_id = project_id
|
|
383
|
+
|
|
369
384
|
self._environment = environment
|
|
370
385
|
|
|
371
386
|
base_url_env = os.environ.get("LETTA_BASE_URL")
|
|
@@ -418,6 +433,7 @@ class AsyncLetta(AsyncAPIClient):
|
|
|
418
433
|
self.tags = tags.AsyncTagsResource(self)
|
|
419
434
|
self.batches = batches.AsyncBatchesResource(self)
|
|
420
435
|
self.templates = templates.AsyncTemplatesResource(self)
|
|
436
|
+
self.mcp_servers = mcp_servers.AsyncMcpServersResource(self)
|
|
421
437
|
self.with_raw_response = AsyncLettaWithRawResponse(self)
|
|
422
438
|
self.with_streaming_response = AsyncLettaWithStreamedResponse(self)
|
|
423
439
|
|
|
@@ -438,6 +454,7 @@ class AsyncLetta(AsyncAPIClient):
|
|
|
438
454
|
return {
|
|
439
455
|
**super().default_headers,
|
|
440
456
|
"X-Stainless-Async": f"async:{get_async_library()}",
|
|
457
|
+
"X-Project": self.project_id if self.project_id is not None else Omit(),
|
|
441
458
|
**self._custom_headers,
|
|
442
459
|
}
|
|
443
460
|
|
|
@@ -445,6 +462,7 @@ class AsyncLetta(AsyncAPIClient):
|
|
|
445
462
|
self,
|
|
446
463
|
*,
|
|
447
464
|
api_key: str | None = None,
|
|
465
|
+
project_id: str | None = None,
|
|
448
466
|
environment: Literal["cloud", "local"] | None = None,
|
|
449
467
|
base_url: str | httpx.URL | None = None,
|
|
450
468
|
timeout: float | Timeout | None | NotGiven = not_given,
|
|
@@ -480,6 +498,7 @@ class AsyncLetta(AsyncAPIClient):
|
|
|
480
498
|
http_client = http_client or self._client
|
|
481
499
|
return self.__class__(
|
|
482
500
|
api_key=api_key or self.api_key,
|
|
501
|
+
project_id=project_id or self.project_id,
|
|
483
502
|
base_url=base_url or self.base_url,
|
|
484
503
|
environment=environment or self._environment,
|
|
485
504
|
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
|
@@ -562,6 +581,7 @@ class LettaWithRawResponse:
|
|
|
562
581
|
self.tags = tags.TagsResourceWithRawResponse(client.tags)
|
|
563
582
|
self.batches = batches.BatchesResourceWithRawResponse(client.batches)
|
|
564
583
|
self.templates = templates.TemplatesResourceWithRawResponse(client.templates)
|
|
584
|
+
self.mcp_servers = mcp_servers.McpServersResourceWithRawResponse(client.mcp_servers)
|
|
565
585
|
|
|
566
586
|
self.health = to_raw_response_wrapper(
|
|
567
587
|
client.health,
|
|
@@ -583,6 +603,7 @@ class AsyncLettaWithRawResponse:
|
|
|
583
603
|
self.tags = tags.AsyncTagsResourceWithRawResponse(client.tags)
|
|
584
604
|
self.batches = batches.AsyncBatchesResourceWithRawResponse(client.batches)
|
|
585
605
|
self.templates = templates.AsyncTemplatesResourceWithRawResponse(client.templates)
|
|
606
|
+
self.mcp_servers = mcp_servers.AsyncMcpServersResourceWithRawResponse(client.mcp_servers)
|
|
586
607
|
|
|
587
608
|
self.health = async_to_raw_response_wrapper(
|
|
588
609
|
client.health,
|
|
@@ -604,6 +625,7 @@ class LettaWithStreamedResponse:
|
|
|
604
625
|
self.tags = tags.TagsResourceWithStreamingResponse(client.tags)
|
|
605
626
|
self.batches = batches.BatchesResourceWithStreamingResponse(client.batches)
|
|
606
627
|
self.templates = templates.TemplatesResourceWithStreamingResponse(client.templates)
|
|
628
|
+
self.mcp_servers = mcp_servers.McpServersResourceWithStreamingResponse(client.mcp_servers)
|
|
607
629
|
|
|
608
630
|
self.health = to_streamed_response_wrapper(
|
|
609
631
|
client.health,
|
|
@@ -625,6 +647,7 @@ class AsyncLettaWithStreamedResponse:
|
|
|
625
647
|
self.tags = tags.AsyncTagsResourceWithStreamingResponse(client.tags)
|
|
626
648
|
self.batches = batches.AsyncBatchesResourceWithStreamingResponse(client.batches)
|
|
627
649
|
self.templates = templates.AsyncTemplatesResourceWithStreamingResponse(client.templates)
|
|
650
|
+
self.mcp_servers = mcp_servers.AsyncMcpServersResourceWithStreamingResponse(client.mcp_servers)
|
|
628
651
|
|
|
629
652
|
self.health = async_to_streamed_response_wrapper(
|
|
630
653
|
client.health,
|
letta_client/_streaming.py
CHANGED
|
@@ -76,9 +76,8 @@ class Stream(Generic[_T]):
|
|
|
76
76
|
if sse.event is None:
|
|
77
77
|
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
78
78
|
|
|
79
|
-
#
|
|
80
|
-
|
|
81
|
-
...
|
|
79
|
+
# As we might not fully consume the response stream, we need to close it explicitly
|
|
80
|
+
response.close()
|
|
82
81
|
|
|
83
82
|
def __enter__(self) -> Self:
|
|
84
83
|
return self
|
|
@@ -159,9 +158,8 @@ class AsyncStream(Generic[_T]):
|
|
|
159
158
|
if sse.event is None:
|
|
160
159
|
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
161
160
|
|
|
162
|
-
#
|
|
163
|
-
|
|
164
|
-
...
|
|
161
|
+
# As we might not fully consume the response stream, we need to close it explicitly
|
|
162
|
+
await response.aclose()
|
|
165
163
|
|
|
166
164
|
async def __aenter__(self) -> Self:
|
|
167
165
|
return self
|
letta_client/_version.py
CHANGED
|
@@ -104,6 +104,14 @@ from .identities import (
|
|
|
104
104
|
IdentitiesResourceWithStreamingResponse,
|
|
105
105
|
AsyncIdentitiesResourceWithStreamingResponse,
|
|
106
106
|
)
|
|
107
|
+
from .mcp_servers import (
|
|
108
|
+
McpServersResource,
|
|
109
|
+
AsyncMcpServersResource,
|
|
110
|
+
McpServersResourceWithRawResponse,
|
|
111
|
+
AsyncMcpServersResourceWithRawResponse,
|
|
112
|
+
McpServersResourceWithStreamingResponse,
|
|
113
|
+
AsyncMcpServersResourceWithStreamingResponse,
|
|
114
|
+
)
|
|
107
115
|
|
|
108
116
|
__all__ = [
|
|
109
117
|
"ArchivesResource",
|
|
@@ -184,4 +192,10 @@ __all__ = [
|
|
|
184
192
|
"AsyncTemplatesResourceWithRawResponse",
|
|
185
193
|
"TemplatesResourceWithStreamingResponse",
|
|
186
194
|
"AsyncTemplatesResourceWithStreamingResponse",
|
|
195
|
+
"McpServersResource",
|
|
196
|
+
"AsyncMcpServersResource",
|
|
197
|
+
"McpServersResourceWithRawResponse",
|
|
198
|
+
"AsyncMcpServersResourceWithRawResponse",
|
|
199
|
+
"McpServersResourceWithStreamingResponse",
|
|
200
|
+
"AsyncMcpServersResourceWithStreamingResponse",
|
|
187
201
|
]
|
|
@@ -191,7 +191,6 @@ class AgentsResource(SyncAPIResource):
|
|
|
191
191
|
tool_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
192
192
|
tool_rules: Optional[Iterable[agent_create_params.ToolRule]] | Omit = omit,
|
|
193
193
|
tools: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
194
|
-
x_project: str | Omit = omit,
|
|
195
194
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
196
195
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
197
196
|
extra_headers: Headers | None = None,
|
|
@@ -306,8 +305,6 @@ class AgentsResource(SyncAPIResource):
|
|
|
306
305
|
|
|
307
306
|
tools: The tools used by the agent.
|
|
308
307
|
|
|
309
|
-
x_project: The project slug to associate with the agent (cloud only).
|
|
310
|
-
|
|
311
308
|
extra_headers: Send extra headers
|
|
312
309
|
|
|
313
310
|
extra_query: Add additional query parameters to the request
|
|
@@ -316,7 +313,6 @@ class AgentsResource(SyncAPIResource):
|
|
|
316
313
|
|
|
317
314
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
318
315
|
"""
|
|
319
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
320
316
|
return self._post(
|
|
321
317
|
"/v1/agents/",
|
|
322
318
|
body=maybe_transform(
|
|
@@ -1026,7 +1022,6 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1026
1022
|
tool_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
1027
1023
|
tool_rules: Optional[Iterable[agent_create_params.ToolRule]] | Omit = omit,
|
|
1028
1024
|
tools: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
1029
|
-
x_project: str | Omit = omit,
|
|
1030
1025
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1031
1026
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1032
1027
|
extra_headers: Headers | None = None,
|
|
@@ -1141,8 +1136,6 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1141
1136
|
|
|
1142
1137
|
tools: The tools used by the agent.
|
|
1143
1138
|
|
|
1144
|
-
x_project: The project slug to associate with the agent (cloud only).
|
|
1145
|
-
|
|
1146
1139
|
extra_headers: Send extra headers
|
|
1147
1140
|
|
|
1148
1141
|
extra_query: Add additional query parameters to the request
|
|
@@ -1151,7 +1144,6 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1151
1144
|
|
|
1152
1145
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
1153
1146
|
"""
|
|
1154
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
1155
1147
|
return await self._post(
|
|
1156
1148
|
"/v1/agents/",
|
|
1157
1149
|
body=await async_maybe_transform(
|
|
@@ -9,7 +9,7 @@ import httpx
|
|
|
9
9
|
|
|
10
10
|
from ...types import ManagerType, group_list_params, group_create_params, group_modify_params
|
|
11
11
|
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
12
|
-
from ..._utils import maybe_transform,
|
|
12
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
13
13
|
from .messages import (
|
|
14
14
|
MessagesResource,
|
|
15
15
|
AsyncMessagesResource,
|
|
@@ -68,7 +68,6 @@ class GroupsResource(SyncAPIResource):
|
|
|
68
68
|
manager_config: group_create_params.ManagerConfig | Omit = omit,
|
|
69
69
|
project_id: Optional[str] | Omit = omit,
|
|
70
70
|
shared_block_ids: SequenceNotStr[str] | Omit = omit,
|
|
71
|
-
x_project: str | Omit = omit,
|
|
72
71
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
73
72
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
74
73
|
extra_headers: Headers | None = None,
|
|
@@ -92,8 +91,6 @@ class GroupsResource(SyncAPIResource):
|
|
|
92
91
|
|
|
93
92
|
shared_block_ids
|
|
94
93
|
|
|
95
|
-
x_project: The project slug to associate with the group (cloud only).
|
|
96
|
-
|
|
97
94
|
extra_headers: Send extra headers
|
|
98
95
|
|
|
99
96
|
extra_query: Add additional query parameters to the request
|
|
@@ -102,7 +99,6 @@ class GroupsResource(SyncAPIResource):
|
|
|
102
99
|
|
|
103
100
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
104
101
|
"""
|
|
105
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
106
102
|
return self._post(
|
|
107
103
|
"/v1/groups/",
|
|
108
104
|
body=maybe_transform(
|
|
@@ -290,7 +286,6 @@ class GroupsResource(SyncAPIResource):
|
|
|
290
286
|
manager_config: Optional[group_modify_params.ManagerConfig] | Omit = omit,
|
|
291
287
|
project_id: Optional[str] | Omit = omit,
|
|
292
288
|
shared_block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
293
|
-
x_project: str | Omit = omit,
|
|
294
289
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
295
290
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
296
291
|
extra_headers: Headers | None = None,
|
|
@@ -314,8 +309,6 @@ class GroupsResource(SyncAPIResource):
|
|
|
314
309
|
|
|
315
310
|
shared_block_ids
|
|
316
311
|
|
|
317
|
-
x_project: The project slug to associate with the group (cloud only).
|
|
318
|
-
|
|
319
312
|
extra_headers: Send extra headers
|
|
320
313
|
|
|
321
314
|
extra_query: Add additional query parameters to the request
|
|
@@ -326,7 +319,6 @@ class GroupsResource(SyncAPIResource):
|
|
|
326
319
|
"""
|
|
327
320
|
if not group_id:
|
|
328
321
|
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
329
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
330
322
|
return self._patch(
|
|
331
323
|
f"/v1/groups/{group_id}",
|
|
332
324
|
body=maybe_transform(
|
|
@@ -379,7 +371,6 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
379
371
|
manager_config: group_create_params.ManagerConfig | Omit = omit,
|
|
380
372
|
project_id: Optional[str] | Omit = omit,
|
|
381
373
|
shared_block_ids: SequenceNotStr[str] | Omit = omit,
|
|
382
|
-
x_project: str | Omit = omit,
|
|
383
374
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
384
375
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
385
376
|
extra_headers: Headers | None = None,
|
|
@@ -403,8 +394,6 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
403
394
|
|
|
404
395
|
shared_block_ids
|
|
405
396
|
|
|
406
|
-
x_project: The project slug to associate with the group (cloud only).
|
|
407
|
-
|
|
408
397
|
extra_headers: Send extra headers
|
|
409
398
|
|
|
410
399
|
extra_query: Add additional query parameters to the request
|
|
@@ -413,7 +402,6 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
413
402
|
|
|
414
403
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
415
404
|
"""
|
|
416
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
417
405
|
return await self._post(
|
|
418
406
|
"/v1/groups/",
|
|
419
407
|
body=await async_maybe_transform(
|
|
@@ -601,7 +589,6 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
601
589
|
manager_config: Optional[group_modify_params.ManagerConfig] | Omit = omit,
|
|
602
590
|
project_id: Optional[str] | Omit = omit,
|
|
603
591
|
shared_block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
604
|
-
x_project: str | Omit = omit,
|
|
605
592
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
606
593
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
607
594
|
extra_headers: Headers | None = None,
|
|
@@ -625,8 +612,6 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
625
612
|
|
|
626
613
|
shared_block_ids
|
|
627
614
|
|
|
628
|
-
x_project: The project slug to associate with the group (cloud only).
|
|
629
|
-
|
|
630
615
|
extra_headers: Send extra headers
|
|
631
616
|
|
|
632
617
|
extra_query: Add additional query parameters to the request
|
|
@@ -637,7 +622,6 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
637
622
|
"""
|
|
638
623
|
if not group_id:
|
|
639
624
|
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
640
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
641
625
|
return await self._patch(
|
|
642
626
|
f"/v1/groups/{group_id}",
|
|
643
627
|
body=await async_maybe_transform(
|
|
@@ -31,7 +31,7 @@ from ...types import (
|
|
|
31
31
|
identity_upsert_params,
|
|
32
32
|
)
|
|
33
33
|
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
34
|
-
from ..._utils import maybe_transform,
|
|
34
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
35
35
|
from ..._compat import cached_property
|
|
36
36
|
from .properties import (
|
|
37
37
|
PropertiesResource,
|
|
@@ -100,7 +100,6 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
100
100
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
101
101
|
project_id: Optional[str] | Omit = omit,
|
|
102
102
|
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
103
|
-
x_project: str | Omit = omit,
|
|
104
103
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
105
104
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
106
105
|
extra_headers: Headers | None = None,
|
|
@@ -126,8 +125,6 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
126
125
|
|
|
127
126
|
properties: List of properties associated with the identity.
|
|
128
127
|
|
|
129
|
-
x_project: The project slug to associate with the identity (cloud only).
|
|
130
|
-
|
|
131
128
|
extra_headers: Send extra headers
|
|
132
129
|
|
|
133
130
|
extra_query: Add additional query parameters to the request
|
|
@@ -136,7 +133,6 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
136
133
|
|
|
137
134
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
138
135
|
"""
|
|
139
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
140
136
|
return self._post(
|
|
141
137
|
"/v1/identities/",
|
|
142
138
|
body=maybe_transform(
|
|
@@ -391,7 +387,6 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
391
387
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
392
388
|
project_id: Optional[str] | Omit = omit,
|
|
393
389
|
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
394
|
-
x_project: str | Omit = omit,
|
|
395
390
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
396
391
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
397
392
|
extra_headers: Headers | None = None,
|
|
@@ -417,8 +412,6 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
417
412
|
|
|
418
413
|
properties: List of properties associated with the identity.
|
|
419
414
|
|
|
420
|
-
x_project: The project slug to associate with the identity (cloud only).
|
|
421
|
-
|
|
422
415
|
extra_headers: Send extra headers
|
|
423
416
|
|
|
424
417
|
extra_query: Add additional query parameters to the request
|
|
@@ -427,7 +420,6 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
427
420
|
|
|
428
421
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
429
422
|
"""
|
|
430
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
431
423
|
return self._put(
|
|
432
424
|
"/v1/identities/",
|
|
433
425
|
body=maybe_transform(
|
|
@@ -491,7 +483,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
491
483
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
492
484
|
project_id: Optional[str] | Omit = omit,
|
|
493
485
|
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
494
|
-
x_project: str | Omit = omit,
|
|
495
486
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
496
487
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
497
488
|
extra_headers: Headers | None = None,
|
|
@@ -517,8 +508,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
517
508
|
|
|
518
509
|
properties: List of properties associated with the identity.
|
|
519
510
|
|
|
520
|
-
x_project: The project slug to associate with the identity (cloud only).
|
|
521
|
-
|
|
522
511
|
extra_headers: Send extra headers
|
|
523
512
|
|
|
524
513
|
extra_query: Add additional query parameters to the request
|
|
@@ -527,7 +516,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
527
516
|
|
|
528
517
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
529
518
|
"""
|
|
530
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
531
519
|
return await self._post(
|
|
532
520
|
"/v1/identities/",
|
|
533
521
|
body=await async_maybe_transform(
|
|
@@ -782,7 +770,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
782
770
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
783
771
|
project_id: Optional[str] | Omit = omit,
|
|
784
772
|
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
785
|
-
x_project: str | Omit = omit,
|
|
786
773
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
787
774
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
788
775
|
extra_headers: Headers | None = None,
|
|
@@ -808,8 +795,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
808
795
|
|
|
809
796
|
properties: List of properties associated with the identity.
|
|
810
797
|
|
|
811
|
-
x_project: The project slug to associate with the identity (cloud only).
|
|
812
|
-
|
|
813
798
|
extra_headers: Send extra headers
|
|
814
799
|
|
|
815
800
|
extra_query: Add additional query parameters to the request
|
|
@@ -818,7 +803,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
818
803
|
|
|
819
804
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
820
805
|
"""
|
|
821
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
822
806
|
return await self._put(
|
|
823
807
|
"/v1/identities/",
|
|
824
808
|
body=await async_maybe_transform(
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .tools import (
|
|
4
|
+
ToolsResource,
|
|
5
|
+
AsyncToolsResource,
|
|
6
|
+
ToolsResourceWithRawResponse,
|
|
7
|
+
AsyncToolsResourceWithRawResponse,
|
|
8
|
+
ToolsResourceWithStreamingResponse,
|
|
9
|
+
AsyncToolsResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .refresh import (
|
|
12
|
+
RefreshResource,
|
|
13
|
+
AsyncRefreshResource,
|
|
14
|
+
RefreshResourceWithRawResponse,
|
|
15
|
+
AsyncRefreshResourceWithRawResponse,
|
|
16
|
+
RefreshResourceWithStreamingResponse,
|
|
17
|
+
AsyncRefreshResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .mcp_servers import (
|
|
20
|
+
McpServersResource,
|
|
21
|
+
AsyncMcpServersResource,
|
|
22
|
+
McpServersResourceWithRawResponse,
|
|
23
|
+
AsyncMcpServersResourceWithRawResponse,
|
|
24
|
+
McpServersResourceWithStreamingResponse,
|
|
25
|
+
AsyncMcpServersResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"ToolsResource",
|
|
30
|
+
"AsyncToolsResource",
|
|
31
|
+
"ToolsResourceWithRawResponse",
|
|
32
|
+
"AsyncToolsResourceWithRawResponse",
|
|
33
|
+
"ToolsResourceWithStreamingResponse",
|
|
34
|
+
"AsyncToolsResourceWithStreamingResponse",
|
|
35
|
+
"RefreshResource",
|
|
36
|
+
"AsyncRefreshResource",
|
|
37
|
+
"RefreshResourceWithRawResponse",
|
|
38
|
+
"AsyncRefreshResourceWithRawResponse",
|
|
39
|
+
"RefreshResourceWithStreamingResponse",
|
|
40
|
+
"AsyncRefreshResourceWithStreamingResponse",
|
|
41
|
+
"McpServersResource",
|
|
42
|
+
"AsyncMcpServersResource",
|
|
43
|
+
"McpServersResourceWithRawResponse",
|
|
44
|
+
"AsyncMcpServersResourceWithRawResponse",
|
|
45
|
+
"McpServersResourceWithStreamingResponse",
|
|
46
|
+
"AsyncMcpServersResourceWithStreamingResponse",
|
|
47
|
+
]
|