Skip to content

Commit 9a0ef5a

Browse files
feat(api): api update (#139)
1 parent 9d4474d commit 9a0ef5a

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 19
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-6d453e96e34a36ecb9e215d646d7102302edb0fd495191f44fb1a1506d9cbb8f.yml
3-
openapi_spec_hash: a68cd77477bac3d0c50351e2a174ae50
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-992c4cfe194f4e4bfed0877e15c601e0577b661c779bb1b28d7d0531bba03677.yml
3+
openapi_spec_hash: 2a2799549615cc0b9b6d5dcc83441d15
44
config_hash: d86655f9af7ae4c4c444d9a16685a7c5

src/arcadepy/resources/workers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ def create(
5151
self,
5252
*,
5353
id: str,
54-
type: str,
5554
enabled: bool | NotGiven = NOT_GIVEN,
5655
http: worker_create_params.HTTP | NotGiven = NOT_GIVEN,
5756
mcp: worker_create_params.Mcp | NotGiven = NOT_GIVEN,
57+
type: str | NotGiven = NOT_GIVEN,
5858
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5959
# The extra values given here take precedence over values defined on the client or passed to this method.
6060
extra_headers: Headers | None = None,
@@ -79,10 +79,10 @@ def create(
7979
body=maybe_transform(
8080
{
8181
"id": id,
82-
"type": type,
8382
"enabled": enabled,
8483
"http": http,
8584
"mcp": mcp,
85+
"type": type,
8686
},
8787
worker_create_params.WorkerCreateParams,
8888
),
@@ -358,10 +358,10 @@ async def create(
358358
self,
359359
*,
360360
id: str,
361-
type: str,
362361
enabled: bool | NotGiven = NOT_GIVEN,
363362
http: worker_create_params.HTTP | NotGiven = NOT_GIVEN,
364363
mcp: worker_create_params.Mcp | NotGiven = NOT_GIVEN,
364+
type: str | NotGiven = NOT_GIVEN,
365365
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
366366
# The extra values given here take precedence over values defined on the client or passed to this method.
367367
extra_headers: Headers | None = None,
@@ -386,10 +386,10 @@ async def create(
386386
body=await async_maybe_transform(
387387
{
388388
"id": id,
389-
"type": type,
390389
"enabled": enabled,
391390
"http": http,
392391
"mcp": mcp,
392+
"type": type,
393393
},
394394
worker_create_params.WorkerCreateParams,
395395
),

src/arcadepy/types/worker_create_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
class WorkerCreateParams(TypedDict, total=False):
1111
id: Required[str]
1212

13-
type: Required[str]
14-
1513
enabled: bool
1614

1715
http: HTTP
1816

1917
mcp: Mcp
2018

19+
type: str
20+
2121

2222
class HTTP(TypedDict, total=False):
2323
retry: Required[int]

tests/api_resources/test_workers.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ class TestWorkers:
2626
def test_method_create(self, client: Arcade) -> None:
2727
worker = client.workers.create(
2828
id="id",
29-
type="type",
3029
)
3130
assert_matches_type(WorkerResponse, worker, path=["response"])
3231

3332
@parametrize
3433
def test_method_create_with_all_params(self, client: Arcade) -> None:
3534
worker = client.workers.create(
3635
id="id",
37-
type="type",
3836
enabled=True,
3937
http={
4038
"retry": 0,
@@ -47,14 +45,14 @@ def test_method_create_with_all_params(self, client: Arcade) -> None:
4745
"timeout": 1,
4846
"uri": "uri",
4947
},
48+
type="type",
5049
)
5150
assert_matches_type(WorkerResponse, worker, path=["response"])
5251

5352
@parametrize
5453
def test_raw_response_create(self, client: Arcade) -> None:
5554
response = client.workers.with_raw_response.create(
5655
id="id",
57-
type="type",
5856
)
5957

6058
assert response.is_closed is True
@@ -66,7 +64,6 @@ def test_raw_response_create(self, client: Arcade) -> None:
6664
def test_streaming_response_create(self, client: Arcade) -> None:
6765
with client.workers.with_streaming_response.create(
6866
id="id",
69-
type="type",
7067
) as response:
7168
assert not response.is_closed
7269
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -335,15 +332,13 @@ class TestAsyncWorkers:
335332
async def test_method_create(self, async_client: AsyncArcade) -> None:
336333
worker = await async_client.workers.create(
337334
id="id",
338-
type="type",
339335
)
340336
assert_matches_type(WorkerResponse, worker, path=["response"])
341337

342338
@parametrize
343339
async def test_method_create_with_all_params(self, async_client: AsyncArcade) -> None:
344340
worker = await async_client.workers.create(
345341
id="id",
346-
type="type",
347342
enabled=True,
348343
http={
349344
"retry": 0,
@@ -356,14 +351,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncArcade) ->
356351
"timeout": 1,
357352
"uri": "uri",
358353
},
354+
type="type",
359355
)
360356
assert_matches_type(WorkerResponse, worker, path=["response"])
361357

362358
@parametrize
363359
async def test_raw_response_create(self, async_client: AsyncArcade) -> None:
364360
response = await async_client.workers.with_raw_response.create(
365361
id="id",
366-
type="type",
367362
)
368363

369364
assert response.is_closed is True
@@ -375,7 +370,6 @@ async def test_raw_response_create(self, async_client: AsyncArcade) -> None:
375370
async def test_streaming_response_create(self, async_client: AsyncArcade) -> None:
376371
async with async_client.workers.with_streaming_response.create(
377372
id="id",
378-
type="type",
379373
) as response:
380374
assert not response.is_closed
381375
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

0 commit comments

Comments
 (0)